FLT-359 fix round 3 responses¶
Scope: docs/FIX-ROUND-3.md, with regression tests run red before the corresponding behavior fixes. No network, secrets, fleet configuration, commits or pushes are authorized for this round. Approval enablement remains opt-in and defaults to false.
Numbered fix dispositions¶
| Fix | Change and regression coverage |
|---|---|
| 1 | Ledger verifies registered person/challenge pairs inside its transaction, accepts full or subset evidence for a valid quorum, and commits once. Round5LedgerTests covers 2-of-3, replay, swapped/unregistered challenges, repeated people and required roles. The executor must supply the same trusted policy to the verifier and ledger. |
| 2 | Reject linked/reparse directories, restrict directory access before enumeration, verify the Windows owner, require emptiness and create Unix database files with mode 0600. Junction rejection was red first; non-empty rejection already passed. |
| 3 | Order Kind, Target, Ticket and command hash before Effect and Label. Reject message limits above 256 and bound labels/targets/effect. MaximumEffectFollowsWholeSecurityPrefix asserts the exact order. The 256-character ceiling is provisional, not verified against a live viewport. |
| 4 | Shared request validation checks action, identifier, UTC/whole-second timestamps, lifetime and hash before decision APIs use the request. Malformed requests return Invalid. The notification-only gate method returns Task, so rejection means no dispatch; ledger registration retains its argument-error contract and ledger commit returns false. |
| 5 | Reject action JSON over 4096 UTF-8 bytes before canonicalization/parsing; bound individual labels and recipient counts. |
| 6 | TryRecordAsync(now) validates and persists the supplied timestamp inside BEGIN IMMEDIATE; rollback returns false. |
| 7 | Reject null/blank evidence before provider calls, make null registry lookup safe, and require a distinct-person role match before fan-out. |
| 8 | Request creation normalizes UTC timestamps to seconds and requires 60–1800 seconds. Hidden timestamps compare at whole-second precision. Actual provider minimum/maximum lifetime remains unverified. |
| 9 | Scope duplicate-marker exception handling to creation. Deterministically injected write, flush and dispose failures now surface. |
| 10 | Email timeout logging is optional and explicit; synchronous SendAsync cancellation is inside the timeout handler; caller cancellation still propagates. |
| 11 | Missing files/directories return null; save writes and flushes a temporary file before a non-overwriting atomic move. Failed serialization leaves no final file and permits retry. |
| 12 | CI uses LogFilePrefix=tests. Also addressed J4's abnormal-TRX finding: aborted/error/timeout/not-runnable runs cannot pass the test-results gate. |
The notification fault-injection factory and unused logging parameter were introduced before the red run without changing the faulty behavior, so those regressions could compile and exercise the original failure paths.
Red-first receipts¶
All commands below used dotnet test --no-restore with a separate -p:OutputPath=bin/R5<lane>/ and a FullyQualifiedName filter. Logs are local files under artifacts/.
| Lane / filter | Actual red output | Actual targeted green output | Logs |
|---|---|---|---|
Round5CoreTwilioTests |
Failed: 26, Passed: 0, Total: 26 |
Failed: 0, Passed: 31, Skipped: 0, Total: 31 |
round5-core-red.log, round5-core-final.log |
Round5LedgerTests / LedgerTests |
Total tests: 8; Passed: 1; Failed: 7 |
Total tests: 24; Passed: 24 (includes existing ledger tests) |
round5-ledger-red.log, round5-ledger-final.log |
Round5NotificationTests |
Failed: 10, Passed: 1, Total: 11 |
Failed: 0, Passed: 11, Skipped: 0, Total: 11 |
round5-notify-red.stdout.log, round5-notify-green.stdout.log |
Supplemental red receipts: round5-ledger-policy-red.log (missing mandatory role: one failed); round5-ledger-request-red.log (three malformed ledger request cases failed). The controlled reorder run in round5-core-reorder-mutant.log failed two tests: field order and the newly added malformed-notification test. Restoring field order left only the notification failure (round5-core-restored.log); adding the notification validation guard produced the 31-test green result.
The first complete suite found 18 failures / 523 passes / 541 total, retained in round5-full-initial.stdout.log. These exposed old expectations incompatible with this round's explicit requirements: one-tick valid lifetimes, targets above 64 characters, and provider fan-out before impossible-quorum rejection. The five affected existing test files were updated to retain the invalid cases and add the new inclusive minimum/maximum boundaries. The independent expected-message assertion in TwilioTests.cs was also updated to the required field order. These test changes are intentional and reviewable, not concealed outcome-test edits.
Final verification: actual commands and tails¶
dotnet build --no-restore -warnaserror -p:OutputPath=bin/R5/
(artifacts/round5-final-build.stdout.log):
Build succeeded.
0 Warning(s)
0 Error(s)
Time Elapsed 00:00:13.23
EXIT=0
dotnet test --no-restore -p:OutputPath=bin/R5/ --logger trx;LogFilePrefix=round5 --results-directory artifacts/round5-final-green-results
(artifacts/round5-final-test.stdout.log; stderr empty):
Passed! - Failed: 0, Passed: 554, Skipped: 0, Total: 554, Duration: 31 s - Forge.Approvals.Tests.dll (net10.0)
EXIT=0
powershell.exe -NoLogo -NoProfile -NonInteractive -ExecutionPolicy Bypass -File ci/Assert-TestResults.ps1 -ResultsDirectory artifacts/round5-final-green-results
exited 0:
Test gate passed: 554 discovered tests across 1 result files.
The PowerShell execution-policy flag applies only to these child processes; no machine or fleet configuration changed. Build/test processes ran hidden with telemetry off and no restore. The initial local runner failed to retain a process exit code even though build output said successful; it was corrected to wait through Start-Process, and the final receipts above contain actual zero exit codes.
Ran the built CLI with Approvals__Enabled unset, using
dotnet src/Forge.Approvals.Cli/bin/R5/forge-approve.dll <verb>
(artifacts/round5-smoke.log):
doctor: approvals disabled; configuration incomplete
EXIT=0
request: disabled
EXIT=10
status: disabled
EXIT=10
verify: approvals disabled
EXIT=10
SMOKE_EXIT=0
git diff --check exited 0 with no whitespace errors (Git emitted its existing LF-to-CRLF conversion notices). Changes remain uncommitted and unpushed. Existing review artifacts were preserved.
Verification boundaries¶
- The requested live-doc verification of the Twilio/device viewport cannot be performed under the explicit no-network constraint. A conservative local character budget and field-order regression are not proof of a device's visible viewport. Device testing and authoritative documentation verification remain prerequisites to enabling this scaffold.
- Twilio transport tests use local synthetic responses. They are not verbatim captures from a real producer. Live response shapes, provider expiration constraints, device rendering, SMTP delivery and Pavlok behavior remain unverified.
- Windows junction rejection and the existing 16-writer ledger race ran successfully. The Unix 0700/0600 branch and rejection of a directory owned by a different Windows identity were not exercised on this Windows/current-user run.
- No council service, dependency-advisory service, external scanner or remote CI run is contacted. Local build/test receipts do not imply those gates passed.
- The field-order regression was exercised with a deliberate source mutation and restored afterward. This is a manual mutation receipt, not a Stryker-generated report or mutation score. Existing Stryker configuration includes every Twilio source file and a nonzero failing score threshold; Stryker execution remains unverified in this round.
Review recommendations outside the numbered fix list¶
- Jenny J1, low: outbox recovery, synchronous SQLite busy waits, explicit rollback, Unix library loading. Deferred to executor integration. The existing ledger queues a durable effect; this round does not add a dispatcher or claim external exactly-once execution. Native connection disposal remains the rollback mechanism. Cancellation while waiting on a native lock and Unix loader behavior require separate validation. These are not rejected as impossible issues.
- Jenny J2, low: constructor dependency validation and registry construction diagnostics. Deferred unless explicitly covered in this round's test receipts. These are trusted-configuration diagnostics, distinct from the untrusted request/evidence validation required here.
- Jenny J3: accepting
details.fields: null. Deferred. Without a producer capture or live documentation, this round does not broaden accepted provider evidence on speculation. Omitted fields and an empty array remain the documented local contract; actual provider compatibility is unverified. - Jenny J3: removing the default clock-interface implementation. Deferred. The durable SQLite implementation already supplies an atomic observation override; removing the default body changes every implementation/test double and is outside the numbered fixes. Item 6 covers the explicit timestamp contract on the SQLite implementation.
- Jenny J3, low: configuration identity/timeout binding, SID-prefix validation, recipient defensive copy. Deferred unless separately listed in the final receipts. The production agent CLI loads no provider credentials or executor configuration. Executor integration must address these recommendations before activation. Input/label bounds are within this round.
- Jenny J4, low: eager outbox constructor validation. Deferred. The requested changes address marker error classification and email timeout reporting; configuration-time diagnostics can be handled separately.
The clean reviews are acknowledged as scoped reviews, not proof of live integration or security-gate execution.