# Card #3416 attachment compatibility independent review

Outcome: **VERIFIED local candidate; PARTIAL end-to-end delivery.** No blocking code finding in the bounded candidate. This review supports root acceptance for a concrete scoped release decision; it does not authorize or establish deployment, remote acceptance or receipt.

## Scope and inspected evidence

Independent read-only review of the frozen Nuhet candidate, base `8c64826ae0ee76e6e73d2e1d8663b1650727de69`, with sole write ownership of this report. Read delegation v2.2.0, task-lifecycle v1.6.0, central AGENTS v7.9.0 and matching Xherd doctrine v1.0.0 completely. Root reports ancestor/local instructions absent; my fresh check of directly relevant app/tests/docs subdirectories found no AGENTS or override. Background worker shares root pane; naming remains root-owned. No successor needed for this bounded review.

Inspected complete `AutomaticReplyForwarder.php`, `AutomaticReplyHandlingTest.php`, `AutomaticReply.php`, `AutomaticReplyController.php`, `AutomaticReplySettings.php`; fixture transport configuration; directly relevant installed Laravel Message and Symfony Email/DataPart/TextPart construction. Read complete `automatic-replies.md`, `account-deletion-retention.md`, attachment candidate JSON and E2E return acceptance JSON, plus current recovery TOP and transfer marker. Inspected scratch probe script only; did not read or reproduce private retained MIME content.

Fresh SHA256 values at review:

| File | SHA256 |
| --- | --- |
| app/Services/Mail/AutomaticReplyForwarder.php | 9e19c2c6fabe5834c67f401915e4adc2cf62a0e4de2d2e3077c66f3d20fd48cc |
| tests/Feature/AutomaticReplyHandlingTest.php | 043d1a2a0c6c036c393d2344ccc4c70604644e58e93dd15bf72d3fb35a112196 |
| docs/ops/automatic-replies-3416-attachment-candidate.json | 75c47503f5276d02b2244a12cf43071b18b803fc0900993d0f036358a18785ea |
| docs/ops/automatic-replies-3416-e2e-return-acceptance.json | b05d6eb188b6b838784e786fb97f6bc8c48eef78aafa47726c7144aaae18416b |

App/test hashes match root's frozen candidate contract. JSON hashes identify reviewed snapshots; root may legitimately update acceptance metadata afterward.

## Findings and reasoning

- **No blocking finding:** forwarder attachment construction at line 95 uses the original-message accessor unchanged, fixed name `automatic-reply.txt` and explicit `application/octet-stream`. Laravel passes the bytes/name/type to Symfony DataPart. DataPart sets attachment disposition and no charset; installed TextPart selects base64 when charset is null. This avoids conversion of binary/NUL/non-UTF8 original data and a false UTF-8 declaration. The exact original remains a MIME source file rather than a decoded text-body export.
- **No blocking finding:** decoded notice remains in the ordinary body. Base64 original storage and strict decoding in AutomaticReply are unchanged. The controller still scopes by authenticated company, authorizes sender-profile access and returns exact source as a private, no-store, nosniff `.eml` download. No original source is replaced by the `.txt` representation.
- **No blocking finding:** attachment change does not alter same-company verified destination resolution, original sender profile, durable pre-SMTP claim, company/reply locked phases, attempt increments or interrupted-claim recovery. Proven preparation failures retain bounded retries; ambiguous results become uncertain without automatic replay. Loop/suppression headers remain present. Local submission status still cannot establish remote delivery.
- **Informational limitation:** source saved under `.txt` may need renaming to `.eml` for mail-client opening and can contain binary bytes. This usability tradeoff is explicitly documented. Filename compatibility targets the measured receiving-server rejection; an octet-stream source can still be rejected by that or another gateway. No global filter, mail-server setting or archive bypass is introduced.

## Verification actually performed

Native PowerShell filesystem reads/searches and fresh SHA256 checks only; no PHP runner, Git operation, SMTP, production query/write, manual handler, browser or Thunderbird operation. Report written once and freshly read back with strict UTF-8 decoding and Nordic marker `ÅÄÖ åäö`; content comparison and corruption checks pass.

The new serialized test is meaningful: it traverses actual array transport, serializes the Symfony message, parses it with native mailparse, checks one attachment's filename/type/disposition/base64 and exact original including NUL/non-UTF8/Nordic bytes, readable decoded notice and all four loop headers, then checks retained/download bytes and one attempt/transport after repeated forward. RequiresPhpExtension prevents claiming this wire proof in environments without mailparse. Existing object-level attachment assertions complement this test.

Root-provided execution evidence, recorded in reviewed candidate JSON, was not independently rerun or reconstructed from raw runner logs: pre-edit RED 2 tests/13 assertions with old filename failures; PHP8.3.31/mailparse GREEN 112 tests/672 assertions; changed PHP lint and diff-check PASS; existing PHPUnit XML deprecation only. Root also reports scratch-only real retained-source probe 1 test/13 assertions PASS, 15026 original/decoded bytes with matching SHA256 `1d5167317e85e16271b9019697d9714e6194349c7cd087ac6072426fcaf84a11`. The inspected probe script uses fixture-configured local array transport and an unsaved model, tests those results and logs only metadata. My inspection supports its stated scope; I did not execute it or inspect the private raw source.

## Release/test proposal acceptance and limits

The JSON proposal is appropriately bounded for a future explicit scoped decision: reviewed code/tests/docs only, fresh master/host guards and existing guarded bundle/SFTP/fast-forward path, no migrations/settings/system changes or closed-operation replay. Existing opcache revalidation is an expectation, not deployment proof; fresh deployed source/execution must establish effective code before a live test. Actual deployment and runtime gates remain root-owned and unperformed here.

A single **new** owned return using the existing random campaign reference, new unique Message-ID/test marker and ordinary intake/scheduler is distinct from replaying reply1 or resubmitting campaign4969. Before it, freshly verify the existing reference, active consenting unchanged recipient and original verified profile/destination/company, isolate one new draft/send claim and obtain the proposed concrete scope decision. Native Thunderbird remains required; missing send/To-edit capabilities mean a precise manual user step, with no fallback. Correlate the new native Sent message, new retained reply and actual native info Inbox forward; download `.txt` and compare bytes/hash to that new retained source. Keep original reply1 at its closed one-attempt history and distinguish local submission from receiving-server acceptance. These are operational acceptance conditions, not permission granted by this report.

Reviewed historical E2E JSON reports actual terminal remote550 `.eml` rejection, one original return/forward attempt and zero native forwarded receipt. It does not supply evidence of this candidate's remote delivery. E2E remains PARTIAL until the fresh proof passes. Release decision, native manual send if needed and actual remote receipt remain outstanding root-owned gates; no local review blocker.

## Handoff

Only changed path: `docs/ops/automatic-replies-3416-attachment-review.md`. Report ownership released to root after fresh readback. No source/test edits, staging, commit, deployment or messages performed. Root retains final acceptance and may update its recovery/candidate metadata.

Known uncommitted features:

1. Narrow attachment compatibility candidate in AutomaticReplyForwarder, its regression coverage and related task documentation/evidence, including this independent review. Generated test cache/tmp are excluded; no unrelated status scan performed.

Previously acknowledged split recommendations remain deferred; no new refactor recommendation or scope expansion.
## Integration and release review — 2026-10-09

**VERIFIED narrow integrated candidate for publication/merge; BLOCKED production activation under the explicit upstream HOLD; PARTIAL E2E.** Latest user Proceed now authorizes the stated narrow publication/merge/deploy and one fresh owned return. Earlier pending-decision statements above and in the candidate snapshot describe historical preparation, superseded by the current release record. This grant does not establish production approval for unrelated PR1459.

Reread delegation v2.2.0 and central AGENTS v7.9.0; fully read matching github-access v4.0.0, wsl-health-guard v3.0.0, wsl-command-runner v2.1.0, agent-operating-procedures v1.0.0 and live-server-access v1.3.0. Central version entries match. Read complete current release JSON, candidate JSON and existing review, plus current recovery TOP. Continued report-only ownership; no shared state, source or production write.

### Actual integration evidence

Fresh independent read-only local Git checks used the approved finite WSL runner with agent `attachment_review`, owner `/root/attachment_review`, task `nuhet-3416-attachment-release-review`, class `git`. Circuit absent before invocation. Request `20261009-133146-125524-be272a29` completed exit0; fresh audit confirms exact ownership, task, class and completion. No Git network/authentication operation. Local HEAD was `21f4ca69043d2bacc1a831e256e8a74490f78221`, newer than integration commit `63cdb608b8bf04d009ae5293790b755272741045` in the release snapshot; root notified. Actual cached origin/master was `71d89c9a6c487bfec92bf6e10447da08ace482e5`, matching root's freshly fetched master evidence. I did not independently fetch GitHub.

Actual working-tree diff relative origin/master has only the already-reviewed attachment construction in app source, its two new object assertions and serialized regression in tests, and eleven task documentation/evidence files. Source diff changes `.eml/message-rfc822` to `.txt/application/octet-stream` with two explanatory comment lines. No further executable changes or migration/configuration changes. All four upstream PR1459 files compare exactly equal to origin/master with git diff exit0. Actual production-base `03c2eebd7bc8bef7daeb9387e181c60374415be1` to origin/master changed-path check returns exactly those four files; therefore a fast-forward from that production base would also activate unrelated authentication code. Git diff-check relative master PASS. Before this append, git status had only generated `.phpunit.result.cache` and `tmp/` untracked, neither touched.

Fresh native SHA256 app `9e19c2c6fabe5834c67f401915e4adc2cf62a0e4de2d2e3077c66f3d20fd48cc` and test `043d1a2a0c6c036c393d2344ccc4c70604644e58e93dd15bf72d3fb35a112196` remain exactly the independently reviewed candidate.

| Preserved upstream file | Fresh SHA256, identical content to origin/master |
| --- | --- |
| app/Http/Controllers/Auth/ResetPasswordController.php | 006ba2b9a7e68ea1d8972466e764071e3fefcfaf35b8bd729d85183e3c64ae3a |
| app/Models/ApiKey.php | 9ce2e9ec5aafa996911cf30a024839ccd18a25aab814d5d5b4a3903ccb258313 |
| tests/Feature/LoginTokenSecurityTest.php | dc6d069b6f4b6fdb597b3167a0ca9b5c4b0312c1c50dbba70988d4a792d8176f |
| tests/Feature/PasswordResetEvidenceTest.php | a78022880dd707671d202e7d12c47a9762c58da02873da3e6fcbff7a7ad5647c |

Reviewed release JSON SHA256 `702421bb525b4c63eaa71d0af97283473b3985839214d7ecb7606b7aab382aa0`. Root reports post-integration installed PHP8.3/mailparse 133 tests/805 assertions PASS, including new auth tests, existing XML deprecation only. I did not rerun tests or read private retained MIME. Equality/diff/hashes support carrying the earlier attachment review forward; this bounded review does not independently accept PR1459's security behavior or production readiness.

### Release method and consequential activation boundary

Accept the proposed bounded bundle/SFTP/guarded fast-forward method conditionally: pin the exact published/merged target, verify bundle SHA256/ref/prerequisites and production ancestor, and freshly guard host/user/pwd/branch/HEAD/tracked cleanliness/source before activation. Preserve all nine unrelated untracked paths, credentials/env, settings/schema/system state and closed campaign4969/reply1. No server GitHub credential/fetch, manual handlers, migration, cache alteration or restart is in this proposal. After activation root must prove deployed hashes and effective source before allocating/sending the new return; opcache revalidation alone is not measured proof.

**HOLD: do not activate from production03c2eebd to this master-derived target until PR1459 is separately already deployed or its production approval is verified.** Merged status and passing integrated tests do not authorize activating those authentication changes. Fresh state must identify any changed production HEAD/upstream delta before lifting this hold. If another owner deploys PR1459, revalidate exact new production state and preserve its source. If approval cannot be established, root must resolve the scope boundary; this review permits publication/merge of the narrow diff, not silently deploying the broader tree. No ad hoc partial file overwrite/cherry-pick or replacement release path is proposed.

One fresh owned return remains the approved bounded verification scope. Preserve original campaign submission and reply1/attempt1 as immutable closed operations; allocate a unique marker/Message-ID and independent single-send claim only after effective code verification. Freshly validate source reference, unchanged eligible owned recipient and company/profile/destination. Use native Thunderbird draft and manual user To/send if the capability remains absent, then ordinary intake/scheduler and exact native Sent/new reply/info Inbox/download-byte correlation. Do not infer remote acceptance from local forwarded status. No new draft/send/replay/deployment occurred in this review.

Only appended this report; strict UTF-8 and Nordic `ÅÄÖ åäö` fresh readback PASS. Release/integration review ownership returned to root; root alone accepts, resolves activation HOLD, publishes/merges/deploys, and verifies live evidence. No new split recommendation. Known uncommitted feature at handoff: this review append only; app/test candidate is already locally committed, not yet independently observed published/deployed. Generated cache/tmp remain excluded and untouched.
## Post-deployment acceptance followup — 2026-10-09

**VERIFIED bounded deployment acceptance based on root's guarded execution evidence plus independent local source/bundle and live read-only retained-state checks; PARTIAL end-to-end delivery.** No blocking finding. The previous activation HOLD is resolved by the current release JSON/recovery record of Jonathan's explicit `Ok, Proceed.` after PR1459's API/password-reset evidence changes were explained. This is a recorded root-brokered authorization, not inferred from merged status. Bounded review does not independently approve unrelated auth behavior. No further release permission is requested.

Read complete current release JSON and immutable new-return contract, current recovery TOP and actual scratch public-health JSON. Continued applicable policy/runbook context from the integration review; additionally fully read central `docs/nuhet-mcp.md` v1.0.0 (matching central entry) before native read-only MCP checks. Source/test/review boundaries and no-replay constraints remain unchanged. Exclusive Thunderbird/browser ownership belongs to the separate draft worker, not this reviewer; no UI operation performed.

### Independent checks

Fresh native local hashes remain app `9e19c2c6fabe5834c67f401915e4adc2cf62a0e4de2d2e3077c66f3d20fd48cc`, test `043d1a2a0c6c036c393d2344ccc4c70604644e58e93dd15bf72d3fb35a112196`; auth app hashes remain the four-file integration table values, and dispatcher is `17b1823596914cfdb5489b050f6a56954c60e53ac9d48b3f68ac1b39b4fb7a1b`. Local preserved bundle independently hashes `5131496bc9f32fbdef044f7bb86b46ce97d91fa770876901c02ef59141d04d83`, matching the recorded exact target `f665aef40608934c082a8fea8484a145c1f4a9c0`. These filesystem hashes identify local reviewed artifacts; remote equality is supported by root's fresh SSH evidence, not a reviewer SSH check.

Native Nuhet bounded SELECTs independently returned:

- Company1 active, nondeleted, allow_sendouts1 and expiry2038; profile138 verified/nondeleted/Forward, original default destination info mailbox and no explicit replacement profile.
- Receiver1894941 in company1, exact Jonathan owned address, consent and updated_at both `2026-10-09 08:29:04`, no nonconsent/deletion/inactivation/hard bounce.
- Exactly one original outgoing reference1/company1/campaign4969/stat9008/profile138, exact stored random Message-ID `109a916b20d3da835f2fd0100b2bf0088f1f5a89b16f348f@post.nuhet.se` and created_at `2026-10-09 12:05:16`.
- Exactly one retained reply1 for that campaign/stat/recipient/profile, absence/high/forwarded/actionforward, info destination, forward_attempts1, forwarded_at `2026-10-09 12:31:05`, no forward error. Scoped aggregate reference_count1/reply_count1/pause_count0/skip_count0. This shows retained closed state with no recorded additional submission/reply at this check; it does not prove historical or future mailbox delivery.

No credentials/token/original MIME/body returned. No database/production/mail write, handler call, Git/network operation or test rerun. Exact SELECTs were scoped to these owned IDs; no cross-customer read.

### Root execution evidence and remaining acceptance

Current release JSON reports one guarded activation at11:53:40UTC from03c2eebd to f665aef4/exit0, matching reviewed forwarder/test/auth/dispatcher hashes and lint, clean tracked state, all nine unrelated untracked paths preserved, no settings/schema/system/restart changes, exact remote staged bundle removed. Fresh root SSH session11:54:42 reports same target/hashes/clean state and bundle absence. I inspected these records, not the server shell. Root's 133-test/805-assertion suite remains execution evidence attributed to root.

Actual inspected public-health artifact records ordinary root-to-login requests twice200, HTML UTF-8/Nordic title, four same-site CSS/JS assets200 with correct MIME and no cache bypass at11:55:07UTC. I did not independently repeat HTTP or browser checks. This supports code-only release acceptance; an unchanged login page does not itself exercise the attachment forwarder. New return execution and remote receipt remain required to prove effective forwarding and receiving-server compatibility.

Contract `nuhet-3416-attachment-new-return-20261009-115638` authorizes only one new saved native draft for source36737 and marker `3416-TXT-20261009-115638`, preserving native signature/quote/linkage. Sending is a distinct root/manual step to exact bounce-To `1_4969_9008_bounce@post.nuhet.se`; draftworker is not authorized to send. Old campaign4969/reply1 stay closed; no resubmission/retry. No newly sent return, new retained reply, actual forwarded info Inbox receipt or downloaded `.txt`/new-source exact byte match exists in reviewed evidence. Therefore full E2E remains PARTIAL, with that proof pending, not a deployment blocker or repeated release-approval gate.

Informational recovery finding returned to root: current TOP appends completed activation but retains older heading/next-step/approval-pending/no-activation prose in the same current block. The current structured release record is clear, so this is not a code/deployment rejection. Normalize the TOP before final recovery acceptance to prevent a successor mistaking stale instructions for another activation or approval request. Do not repeat the once-completed deployment.

Only this report appended, fresh strict UTF-8/Nordic `ÅÄÖ åäö` readback PASS. Report ownership released to root; root retains deployment/final acceptance, draft/send coordination, card and recovery ownership. Known uncommitted features: this post-deployment review append and root-owned release/test evidence updates; reviewed executable candidate already published/merged/deployed per current record. No source feature or generated cache/tmp modified by reviewer.