# Handle-default independent review — card #3416

VERIFIED: inspected local code and guarded apply design; no consequential code or helper blocker identified. This is candidate review, not production acceptance. Real MariaDB rehearsal, actual rendered before/after proof, exact final deployment commit/bundle verification, and fresh production apply acceptance remain root-owned and were not performed by this reviewer.

Review date: 2026-10-12. Reviewer: /root/handle_default_review. Authorization: CLEARED by root from Jonathan's explicit Handle-default/all-current-profiles instruction. Ownership: this review document only, released on delivery. No further delegation, fixes, commits, GitHub/card/production writes, installs, Computer Use or mail actions.

## Actual candidate inspected

Candidate Windows path: `\\wsl$\Ubuntu\var\www\nuhet-automatic-replies-3416`, branch feature/automatic-replies-3416, HEAD 185a154fbc24e6cd8df5345bbc274f35d9952565 with uncommitted correction. Read actual model, Blade partial, complete new migration, five tests, behavior documentation, historical schema migration, AutomaticReplySettings, relevant controller creation/update paths, intake/company availability gates, forwarder availability/claim gates, and installed framework hydration, MySQL change grammar, migration path selection and command implementation. Read complete delegation policy, central AGENTS v7.11.1, WSL guard v3.0.0, runner v2.1.0, task lifecycle v1.6.0, account-deletion retention document, automatic-replies document, CURRENT TOP recovery, and Handle release JSON.

- ORM defaults apply to new instances/creation; installed framework raw hydration replaces attributes, preserving saved Forward. Explicit Forward is fillable and remains a valid persisted override. Omitted-mode raw inserts use the new database default. Null legacy/missing form values visually fall back to Handle; invalid explicit null inserts are not promised as a creation default because the historical database column is non-null.
- Migration alters only the existing varchar(16) non-null default and updates only automatic_reply_mode where sender_profiles.deleted_at IS NULL. Query builder avoids Eloquent events and timestamp writes. Soft-deleted profiles are excluded. Current profiles of retained deleted companies are included as requested; no company rows or lifecycle gates change. Custom category rules/destinations/verification remain intact. Category defaults stay absence Handle/14, acknowledgement Handle/0 and remaining categories Forward/0.
- Intake still loads a fresh available company through CompanyRetention; forwarding still uses availability locks and durable claims. A profile metadata change neither restores a company nor directly writes replies, pauses, skips, sends or campaigns. Existing reply actions/status are independent retained records. This review does not prove every real provider or production worker's runtime behavior.
- Tests cover new ORM/raw creation, unsaved/null form fallback, explicit Forward, category behavior, exact retained profile metadata, deleted/current distinction including deleted-company profiles, unrelated history/pauses/skips and down behavior. The migration down changes only schema default; it intentionally does not restore migrated row choices. Code rollback must also be coordinated with any controlled recovery.

## Operator helper and recovery

Read the complete actual helper `automatic-replies-3416-handle-default-apply.php`, SHA256 a87438a7e97f416a8edb6d211f4491ce2c3b399b9165ee85fc6717b9b1de2b4c. PHP8.3 lint passed through approved runner request 20261012-140944-120856-ce0ed277.

CLI/hostname/cwd/expected HEAD and database name/driver guards run before changes. Default invocation is read-only dry-run. Exclusive operation directory and before/claim files prevent blind replay. Private mode/deleted-bit/protected-row hashes and company lifecycle hashes are captured before migration. MIGRATION_STARTED_DO_NOT_REPLAY is persisted before invoking the exact new migration path. Installed Laravel BaseCommand selects supplied paths instead of default migration paths; no seed option is set. Historical migrations are neither rewritten nor consumed by this invocation under the established production migration repository.

Verification requires all observed current profiles Handle, original deleted modes unchanged, every original non-mode profile hash unchanged, no original row disappearance, matching company lifecycle hashes, matching observed column metadata other than default, and the new migration record. Complete/uncertain claim/result states retain evidence. DDL and data are expressly not atomic. Failures, interruption or verification drift require fresh readback; no automatic rollback or retry is provided.

Operational limits: snapshot/verification are not a global writer lock. An ordinary concurrent edit, deletion or company lifecycle transition may cause conservative UNCERTAIN even after successful migration. A fresh explicit Forward choice during the apply window can likewise fail all-current verification. Existing before modes permit controlled recovery only after checking later choices; never blanket-restore or replay. Files are flushed but no machine-power-loss durability guarantee is made. Model/database default activation occurs in the normal narrow deploy/migration interval. No service/config/cache change is required by this reviewed code. The real MariaDB rehearsal must confirm actual column metadata preservation; historical declaration is the expected varchar(16), non-null schema.

## Release ancestry and evidence actually checked

Approved runner git log from production f665aef40608934c082a8fea8484a145c1f4a9c0 to candidate HEAD listed seven documentation-only commits. git diff --stat between those commits confirmed seven ops-document paths, with no app/migration content. Thus the current candidate's ancestry does not require origin/master c34967b56c52bbad39e5958bdb23e9e3ebc60fe9 or unrelated PR1461 daily-spam content. Branch name master in production is compatible with an exact guarded fast-forward to the independently verified advertised feature ref. Root must still verify final commit's complete diff, bundle advertised ref/target/SHA, production ancestry/tracked clean state and preserved nine prior untracked paths immediately before activation. GitHub integration can occur separately; merged-master deployment is not reviewed or authorized here.

Read worker evidence at `K:\AI_docs_tmp\nuhet-3416-handle-default-20261012\implementation-verification.txt`: reported RED expected default failure, GREEN PHP8.3.31 5 tests/37 assertions and AutomaticReply 46 tests/290 assertions, lint/diff/strict UTF8/autoload/mailparse success, existing PHPUnit XML deprecation. Fresh reviewed file hashes match every reported hash. Full suites were not repeated. Approved runner read-only git diff/log/status and helper lint completed; no outstanding exec session. Native Windows reads used the same WSL filesystem via wsl$ because wsl.localhost alias was unavailable.

At review time release JSON says LOCAL_CANDIDATE_REVIEW_PENDING/applied false/deployed false; scratch directory contains worker verification and autoload probe only. No MariaDB or rendered-proof result was available or claimed. Fresh production baseline counts (2099 total/2086 current/13 deleted/1 custom/1815 current of deleted companies) are supplied root evidence, not independently queried by this reviewer.

## Reviewed SHA256 values

| File | SHA256 |
| --- | --- |
| app/Models/SenderProfile.php | dedbfed73082320691fc8be3ec69fdfa0fb44fabddf1f31fb9f64aa176299cc2 |
| resources/views/senderprofile/partials/automaticReplies.blade.php | 934fac3273254af39cf92ddc471398cfcfd656f9dc3901943f4af1d0cc97002b |
| database/migrations/2026_10_12_000001_default_automatic_replies_to_handle.php | 8fdb2f8daa78c9cca67f3da1bb5f96f8066f09c7be0351b2e182d12e1dc312a4 |
| tests/Feature/AutomaticReplyHandleDefaultTest.php | 0af335ebf63eebb1c0ca512161d14bae7dbf4ce74a461f4cada33a70dd72cbef |
| docs/ops/automatic-replies.md | 82e6d733050755655d26391000e156ec1854a1ce282708eba508f21950b4a4d2 |

No new file-split recommendation: reviewed changed files have one bounded responsibility. Existing large root recovery split findings are acknowledged/deferred and this review reads only CURRENT TOP rather than duplicating that recommendation or broadening scope.

Remaining uncommitted features:

1. Handle-default model/form, scoped forward migration and regression tests/behavior documentation, plus root-owned apply/release/recovery evidence and this independent review. Generated .phpunit.result.cache/tmp remain preserved, not product features.

Ownership of this document is released to root. Root owns final acceptance, remaining evidence, production operation and user-facing completion.
## Bounded helper follow-up — 2026-10-12

VERIFIED: inspected actual runtime-default additions in helper SHA256 a87438a7e97f416a8edb6d211f4491ce2c3b399b9165ee85fc6717b9b1de2b4c. A real new SenderProfile and AutomaticReplySettings actions must resolve to Handle, absence Handle/14 and acknowledgement Handle/0 before either dry-run exit or any backup/migration mutation. Successful result reports literals corresponding to these pre-write runtime assertions; it does not recompute model/category values after migration. This strengthens runtime acceptance without changing migration scope or creating mail/lifecycle actions. No consequential blocker introduced. Root reports fresh helper lint/strict UTF8 pass; reviewer inspected the actual addition and matched helper hash without rerunning suites. Prior helper lint evidence applies to the earlier revision only.

Root now reports actual MariaDB10.6.22 rehearsal passed14 checks, utf8mb4_general_ci retained, foreign keys enabled and owned schema cleanup absent. This is root-supplied follow-up evidence, not an independently executed/read rehearsal by this reviewer. Actual rendered proof and final deployment/live acceptance remain root-owned. All five application/test/behavior file hashes are reported unchanged. Fresh native production schema supplied by root is varchar(16), non-null, default Forward, utf8mb4/utf8mb4_general_ci, empty EXTRA and zero source-table triggers; this supports the historical-schema assumption above.

Only this review document was changed. Ownership released again to root. Uncommitted feature remains the Handle-default correction plus its release/recovery/review evidence.