Skip to content

FLT-359 fix round 2 (Cedric)

The findings are in docs/review-r2/. Fix every High and P2 item below. The constraints stay the same: approvals disabled by default, no network calls, no secrets, no fleet wiring, no push. Clahadore commits.

False positive to ignore: the Gronktayvius seats said the tests and Stryker configs were missing from the diff. Clahadore left the test files out of their prompt; the tests exist (144). Every other item in their reviews stands.

High

  1. Exit codes never authorize (red team). request, status and verify must return a non-zero code for every outcome, including Approved and Pending. Print the decision as text and say clearly that it's advisory. Add tests that fail if any of these commands ever exits 0 after an approval-related operation.
  2. The executor path is the only thing that consumes approvals (red team).
  3. ExecutorApprovalVerifier is the single consume point, and it consumes in the same transaction as the effect.
  4. status must never report something as actionable.
  5. The agent-side CLI must not consume at all, or the consume is meaningless. Remove verify's consume, or turn verify into a dry run.
  6. Versioned approval ledger for the executor (Gronktayvius, Jenny A2).
  7. Replace the .spent marker files and clock.last with one SQLite ledger: a schema version, plus a migration kept in the repo.
  8. Key it by jti, with these columns: action hash, challenge IDs, approver person IDs and roles, consumed_at.
  9. A missing or bad row means not approved.
  10. The monotonic clock is stored in the same database, transactional, and must be safe under concurrency. Fix Jenny's finding that FileApprovalClock fails closed under normal concurrency.
  11. Add a 16-way concurrent consume test against the ledger.
  12. What the phone shows is built by the verifier (red team).
  13. Build one device-visible Details.Message from kind, effect binding, target, ticket and command hash. HumanSummary is only a short label appended at the end.
  14. If the message exceeds the provider's display limit, refuse to create the challenge. Put the limit in config, defaulting to a conservative value, and mark it needs live-doc verification.
  15. Keep the enable runbook's rule that a captured device payload must show the full effect before enabling.
  16. No Twilio or SMTP secrets on the agent side (Gronktayvius, red team).
  17. Remove AuthToken, ApiKeySid, ApiKeySecret and the SMTP password from the agent CLI's configuration surface.
  18. The executor's configuration takes a challenge-scoped credential.
  19. Reject any configuration that holds only an account-level auth token.
  20. Document the least-privilege key. Twilio's restricted-key scopes need live-doc verification.
  21. Fix m-of-n role matching (Jenny A2). Non-mandatory roles (TeamMember, QaSigner, UxSigner) must be able to satisfy policies that allow them. Persons must stay distinct. Write tests for:
  22. a single-Owner quorum;
  23. a quorum of Owner + QaSigner + UxSigner;
  24. one person trying to fill two roles (denied).
  25. CI and Stryker are actually enforced.
  26. Stryker still fails on this machine with "Failed to analyze project builds" (log: docs/review-r2/clahadore-stryker-core.log). Find the root cause, for example running from the test directory, the solution vs project setting, or --solution usage, and make all 4 configs run.
  27. Pin the dotnet-stryker version (no 4.*).
  28. Set thresholds.break ≥ 60 in each config.
  29. CI fails when the discovered test count is 0.
  30. Add a dependency CVE scan: dotnet list package --vulnerable fails the build on High or Critical.

P2 and Medium

  1. Independent notification timeouts (Cedric P2). Each channel gets its own timeout budget, so a hung Pavlok can't suppress email. Add a test through NotifyPersistedAsync.
  2. Process cancellation hygiene (Jenny B). Make Kill(entireProcessTree: true) best-effort. Honor cancellation at the start of NotifyAsync, and rethrow OperationCanceledException correctly.
  3. Any other Medium items from docs/review-r2/*.md that you agree with. Write a response to each one in docs/review-r2/RESPONSES.md.

Verify

Run dotnet build --no-restore -warnaserror and dotnet test --no-restore. If your sandbox blocks the NuGet config, say so plainly; Clahadore will rerun every gate. Final message: what you changed, plus the real output tails.