Skip to content

Tracer: Receive a Lark ZIP and reply with a processed file in the same topic #657

Closed

Description

@DoodleBears

Parent

#631 — PersonaBot attachment file operations. Coordinate with #48 / #629 and Project 10; milestone v1.1.

What to build

Human posts one small CSV ZIP in an authorized Lark group/topic and explicitly @mentions the bound PersonaBot while replying to that file. Human and Bot see trusted file metadata, binary download occurs only on first access under the Bot's existing authenticated account, and the Orchestrator saves an independent working copy in an explicitly writable directory. It uses native file tools and approved Shell, creates a result ZIP, imports it as an independent Attachment and explicitly replies with that file in the same existing topic under its own bound platform identity. Human can inspect/download the received file and returned result.

Acceptance criteria

  • Qualify the exact optional provider artifact and public file-capability contract against IM tracer: work-group @Bot → PersonaBot Inbox → same-topic reply #12's working text ingress/reply baseline; reuse existing dsh-im transport helpers behind public Service methods, never private src imports or Human credentials. No claim of an upstream release or production enablement.
  • The authenticated inbound message and trusted replied-to file establish exact account fingerprint, source message/conversation/topic and resource association. Arbitrary IDs, URL-looking strings, raw Host paths, wrong accounts and mismatched parent/topic references do not grant access. No general history-read or full-admission policy is added.
  • Metadata is visible on receipt through canonical Source Event/Inbox and the existing source-detail surface without a fabricated DM/Channel. Binary transfer occurs on first explicit access with cancellation, existing byte limits and current Binding/Grant/provider availability checks. Record bounded lifecycle/failure diagnostics without secrets.
  • Persist file provenance with the existing Attachment owner and source authority, without a duplicate attachment catalog or provider transcript. Preserve canonical source deduplication and no duplicate Inbox attention across redelivery/restart. Source permission revocation refuses later source operations; an already saved independent working file remains governed by destination-directory authority.
  • Human can download the received file from source details and select its work directory through existing Grants. The actual Orchestrator acquires the source-validated file, runs native operations and existing Shell approval, and returns an explicitly selected independent result through the existing import contract.
  • A checked same-source file reply validates current account/Binding/Service Grant and source route again before upload/send. Persist Outbox intent before external effects; distinguish upload failure, provider rejection, accepted, cancellation and ambiguous outcome. No blind retries, wrong-topic fallback, display-name retargeting or remote-original replacement; accepted is not delivered/read.
  • Real-provider E2E: actual Human file upload/@mention, one native ZIP/CSV processing run and own-identity same-topic result. Download and inspect three rows, quantity seven and total sixty; verify original bytes and independent output identity. Cold restart retains canonical source/Inbox/file/Outbox facts without replaying a send. Exercise revoked/wrong source, bounded transfer failure and unknown outcome in appropriate regressions.
  • Complete bilingual ADR/architecture/guidance/release ledgers and checks, include public-safe GitHub-rendered screenshots or recording plus runnable Human QA, create one issue PR and pause the goal for Human QA.

Blocked by

#612's broader context-history read, #613 full group admission and #614 Thread following are coordination neighbors, not prerequisites for one explicitly trusted reply-to-file. Slack and provider/routing variants follow later proven behavior rather than being pre-created here.

Scope boundaries

One Lark account, one authorized group and one existing topic, one ZIP/result file. No external-original writeback, generic document parser, direct Assignment access, provider-wide search, ordinary-message subscription or additional provider.

Activity

  1. added this to the v1.1 milestone on Oct 1, 2026
  2. added
    ready-for-agentFully specified, ready for an AFK agent
    area:fullstackEnd-to-end Host and Client implementation
    feature:workspaceWorkspace Grant and working-directory authority
    feature:messagingMessaging module and external providers
    scope:tracerHuman-testable implementation slice
    on Oct 1, 2026
  3. DoodleBears commented on Oct 1, 2026

    @DoodleBears
    ContributorAuthor

    Agent work claim

    • Agent: Codex
    • Task: codex/local/01a0f268-9db7-7702-b051-bc1bb94b22b9 (not a DSH Session)
    • Branch: codex/657-lark-attachment-files
    • Started: 2026-10-01 08:42 UTC
    • State: active
    • Scope: one Lark reply-to-file @mention, checked lazy acquisition with received metadata/download UI, independent native ZIP working-copy processing and checked same-topic file reply; optional public provider contract qualification, focused regressions, real-provider/model E2E and screenshots. Pause after one PR for Human QA.

    Human approved this exact complete slice. Native blockers are closed: #633 via #653 and #12 via #655. Latest-main base is 7237c53ffe0fa3abf0219aea0b67878031388a3e; no other claim or open PR exists for this issue. The #12/provider owner's preserved QA instance is not modified or stopped by this task.

  4. added
    agent:activeOne or more coding-agent tasks currently claim this issue; see claim comments for task IDs
    in-progressHeld by an agent session; see Claim comment for who
    on Oct 1, 2026
  5. 6 remaining items

  6. DoodleBears commented on Oct 1, 2026

    @DoodleBears
    ContributorAuthor

    Agent work outcome

    • Task: codex/local/01a0f268-9db7-7702-b051-bc1bb94b22b9 (not a DSH Session).
    • State: paused for Human QA.
    • PR: feat: process Lark ZIP attachments and reply in the same topic #671
    • Head: 9d51d19ed14a32eb81009e8cf333f17a53c96286; latest main integrated with both documentation intents preserved.
    • Real Lark/model proof: exact original ZIP → @bot reply → independent write-Granted copy → native files and one approved Shell call → explicit current-run import → new application file reply in the same topic. Independently downloaded results verify rows=3, quantity=7, total=60; CSV and original ZIP remain byte-identical. Latest-main live run is pinned to adf2e5b; the subsequent review patch only fixes independent waiter recovery after concurrent transfer failure, with dedicated coverage.
    • Final validation: 1773 passed / 2 skipped; focused bridge/concurrent-failure regressions 15 passed; typecheck, build, lint/source policy, format and release ledgers passed. Both initial automated review findings were fixed.
    • GitHub-rendered screenshots, exact synthetic ZIP downloads and the reproducible QA path are included in the PR and evidence directory.
    • Human QA remains: the in-app browser exposed progress but no completed blob download event; the original HTTP download independently returned 200, no-store and the original checksum. Browser file-save completion is explicitly not counted as automated PASS.
    • The original shared test Bot receive scope and connection have been restored. This task’s QA IM Provider is disabled to stop automatic reconnection; Core, Client and synthetic QA data are retained. A fresh live run requires the existing single-receiver handoff and re-enabling this QA Provider.
    • No merge performed; await Human QA and explicit merge authorization.
  7. added and removed
    ready-for-agentFully specified, ready for an AFK agent
    agent:activeOne or more coding-agent tasks currently claim this issue; see claim comments for task IDs
    in-progressHeld by an agent session; see Claim comment for who
    on Oct 1, 2026
  8. DoodleBears commented on Oct 1, 2026

    @DoodleBears
    ContributorAuthor

    Final review head: 37edf9b675eabe4fe154ec1fd2cfe41a1c9add5a (last commit only corrects the screenshot framing). PR #671 now renders all six evidence images, including the complete latest-main ZIP card and its download button.

    Code validation remains 1773 PASS / 2 SKIP, with 15 focused review regressions passing. Real Lark/model acceptance and independently downloaded ZIP verification remain pinned to adf2e5ba: rows=3, quantity=7, total=60; original and CSV unchanged. GitHub verification is currently running.

    This issue remains ready for Human QA. Browser file-save completion is still an explicit Human QA check. The shared receiver was restored; this task’s own QA IM Provider is confirmed disabled. No merge performed.

  9. DoodleBears commented on Oct 1, 2026

    @DoodleBears
    ContributorAuthor

    Agent work outcome

    • Agent: Codex
    • Task: codex/local/01a0f268-9db7-7702-b051-bc1bb94b22b9 (not a DSH Session)
    • State: completed
    • PR: #671, merged with Human authorization at f30870655f6737e28ba90e2a4dc5969214460e91.
    • CodeRabbit: both actionable findings fixed and resolved; docstring coverage is incompatible with the repository Source policy, as documented in the PR response.
    • Final validated head: c2a8732918bf07b1047c987c9a797998bad5e13b; complete CI succeeded, local checks passed with 1792 tests passing and 2 skipped. Real Lark/model ZIP evidence and independently downloaded original/result archives are linked in the PR.
    • Remaining scope: none for this issue. Slack is a separate prospective tracer; its real QA application/channel arrangement is not yet identified. No deployment or shared receiver change was performed during merge.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:fullstackEnd-to-end Host and Client implementationfeature:messagingMessaging module and external providersfeature:workspaceWorkspace Grant and working-directory authorityscope:tracerHuman-testable implementation slice

    Type

    No type

    Projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions