Skip to content

fix(platform): stage accepted task attachment metadata - #4283

Open
yannickmonney wants to merge 1 commit into
mainfrom
fix/stage-accepted-task-attachment-metadata
Open

yannickmonney wants to merge 1 commit into
mainfrom
fix/stage-accepted-task-attachment-metadata

Conversation

@yannickmonney

@yannickmonney yannickmonney commented Oct 4, 2026 •

Copy link
Copy Markdown
Contributor

What changed

TALE-617, bounded child B of #4101 / TALE-484. The parent remains open for
other follow-ups and rollout; this PR does not close #4101.

  • Accept the attachment door's existing 1–255 UTF-16 name units and 0–255 MIME
    units in the review manifest, retaining the original display metadata.
  • Separate the on-disk leaf: reuse safePathSegment and stop at 240 UTF-8 bytes
    on code-point boundaries. Existing hashed storage-ref directories isolate
    distinct blobs even when normalized leaves share a prefix.
  • Do not infer a MIME type from names. The signed blob stream already uses the
    object's type with application/octet-stream fallback where required; task
    display MIME is not forwarded into transfer headers.
  • Keep controls, membership/tenant/document ACL gates, exact signed sizes,
    the 20 MiB limit, live issuer/current grant, and pre/post-transfer checks.
  • Extend existing unit/manifest tests and the PG/MinIO/actual-daemon lane using
    production attachment/output service writers. No second transfer stack or
    daemon, TTL, retention, durable audit, grant or opt-in change.

Verification

  • Exact origin/main implementation with the final causal matrix: 15 expected
    failures / 35 passes (blank MIME, 255-unit MIME, 241/255 ASCII and >240-byte
    multibyte names, plus shared-prefix isolation).
  • Changed unit/manifest suite and adjacent review, signed-token, signed-stream,
    discovery and integration-skip guards: 146 tests pass across 6 files with
    installed Node 24.21.0, one worker, unchanged Vitest config.
  • Scoped oxlint/oxfmt and git diff --check pass. Selected-root TypeScript checks
    cover the four changed files and both direct shim importers, with imports
    resolved: zero diagnostics; not whole-workspace tsc.
  • Scoped pinned Opengrep: zero findings on four files; engine reports one
    excluded item, so this is not a claim of exhaustive analysis.

Open proof / environment limitations

  • No heavy stack started. Named H1/H2 request is pending with fleet manager
    (30 minutes, estimated additional peak disk 8 GiB, 20 GiB reserve plus growth).
    New real-byte integration cases are implemented, not yet executed.
  • Existing dependent bridge, attachment/output service and shim tests cannot
    collect because the installed tree lacks eventsource-parser. Raw logs are
    retained; no reinstall, cache wipe or configuration weakening attempted.
  • Hosted checks and distinct independent review must finish before acceptance.
    TALE-618 follows under the same shared-test owner; TALE-549 remains separate.

Current-main rebase

Replayed the previously accepted source 5a88a660669810906eff598585071ce0c0990780 onto main d1373d84cd56972501403f62145ec52e6f65d44a, including the merged shared CI repair in #4625. The accepted feature payload and all current-main changes are preserved in one atomic commit. Configured commit and conflict checks pass; earlier behavioral proof remains recorded above. All seven native required checks and full merge-group validation remain required for this new source.

Maintenance replay: preserves the accepted feature payload on current main 7d178ca. Includes the merged #4649 Knip cleanup and the exact independently accepted one-line shared CLI inventory repair from #4654 (252f0df), which is still pending native merge on main. The fixed suite inventory keeps its discovery and source/compiled phase guards. Existing feature proof is retained; no fresh full-feature/full-workspace test or hosted-green claim. Native required checks remain mandatory.

@yannickmonney

Copy link
Copy Markdown
Contributor Author

TALE-635 independent review — ACCEPT at source level only

Exact head: 12598c9d5af9d03d34cbd2407454a90fb546e3e7 (base ffa15e019c3b6453bfb82dc44231abef2b8be0de), reverified before posting. Reviewer Codex #1 af98a247, run d969b4ff, is distinct from implementation Codex #6 8c78cac9, run 2d54b5a0. Reviewed the full TALE-617 contract and four-file patch adversarially. No blocking source defect found.

Evidence:

  • The original display name/MIME, file ID, kind and output provenance remain intact. reviewFileLeaf reuses safePathSegment and bounds the disk leaf to 240 UTF-8 bytes on code-point boundaries. Separator/dot normalization prevents traversal; SHA-256 storage-reference directories separate distinct blobs even with identical normalized prefixes.
  • Blank/long display MIME is not a transfer header and is not inferred from the filename. The inherited signed object stream uses the object's type, with application/octet-stream when absent. No invented MIME.
  • Controls/DEL, ambiguous membership, foreign metadata, document-bound aliases, exact sizes and 20 MiB ceiling remain refused. Live issuer/current grant, org/project/captured-source gates and pre/post-transfer checks remain unchanged. Late revocation/handoff refuses a successful current receipt; historically snapshot-authorized bytes may remain, not be erased.

Independent light reproduction (installed Node v24.21.0, existing server config, one worker):

  • Exact head: 146 PASS across six files, exit 0.
  • Exact original production implementation with head regression tests: 15 expected FAIL / 35 PASS, exit 1. Blank/255-unit MIME, 241/255-unit ASCII, >240-byte multibyte and shared-prefix regressions reproduce independently.
  • Five dependent bridge/attachment/output/direct-shim suites: 59 PASS, exit 0.
  • Four-file oxlint and oxfmt, plus diff whitespace: PASS.

Environment correction: the author's missing eventsource-parser limitation did not reproduce in this standing clone: existing installed version is 4.1.1, and all five selected dependent suites actually collected. No package was installed by this reviewer; this does not reinterpret the author's original environment/logs.

OPEN MERGE GATE: the extended isolated PG/MinIO/native-door/actual-daemon real-byte lane is implemented and source-reviewed, UNRUN HERE. Named heavy-slot question 6ff17332 remains pending; no stack was started. Existing TALE-617 author owns admitted runtime proof, then TALE-359 must reconcile exact-head proof and ordinary hosted checks. This ACCEPT is not merge readiness, runtime acceptance, native approval, opt-in or deployment authority. Parent #4101/TALE-484 stays open.

No whole-platform suite/workspace tsc, independent TypeScript/SAST rerun, browser/native acceptance or CI evaluation. Pinned local Opengrep was uncached; no installation or SAST pass claimed. No CI rerun/cancel/wait, push, merge, card move or #4275 work. Root's 08:15Z rule applies: a blocking finding overrides ACCEPT until independently closed on the exact head with proof.

Full source reasoning, exact patch/source copies, commands and raw reproduction/static logs: /agent/output/b47c21f0-af19-4cbb-a7c1-480d689dafd4/ (report.md).

@yannickmonney
yannickmonney force-pushed the fix/stage-accepted-task-attachment-metadata branch from 12598c9 to a414cad Compare October 9, 2026 03:25
@yannickmonney
yannickmonney force-pushed the fix/stage-accepted-task-attachment-metadata branch 4 times, most recently from 5a88a66 to 747a548 Compare October 9, 2026 14:06
@yannickmonney
yannickmonney force-pushed the fix/stage-accepted-task-attachment-metadata branch from 747a548 to 24ae728 Compare October 9, 2026 15:01
@yannickmonney
yannickmonney added this pull request to the merge queue Oct 9, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Follow-ups from the #4076 review: unmapped review-policy refusal, reviewer-picker focus, stale docs and LOWs

1 participant