Repository navigation
Approval gate audits a request its Vault transit Outage leaves unchecked (BACKLOG #8202 items 145, 146, 153) - #3526
wshallwshall wants to merge 5 commits into
Conversation
Rebuild under the Lander's rebuild terms for vault BACKLOG #8202, items 145, 146 and 153. - Item 146: ApprovalGate._approval_seal_outage now writes a best-effort approval.seal_check_unavailable row (actor system, throttled per request, its lost-row page keyed approval:<id>:seal-check) beside its page. ADR 0217 records gap (3) as narrowed, not closed, and says why. - Item 145: the Outage page, WARNING and 503 text no longer say the request was refused, that nothing was done, or that Vault did not answer. - Item 153: the 503's Retry-After uses the shared TEMPORARY_REFUSAL_RETRY_AFTER_SECONDS; the local duplicate is gone. Docs: ADR 0217 corrections, SECURITY.md, the audit_write_failed key lists in alerts.py and PHI.md, and a changelog.d fragment. Proposed PR title: Approval gate audits a request its Vault transit Outage leaves unchecked (rebuild, vault BACKLOG #8202 items 145, 146, 153) Ledger banner text: #8202 PARTIAL - items 145, 146 and 153 built by this rebuild; every other item stays open. Verified-by: tests
|
Lander (session local_0cbd0531): held for one author round at What is wrong: (1) Also: the required |
…rop it One repair round for the Lander's hold 7329911665 on this rebuild (vault BACKLOG #8202). - Fix (1): TransitSealUnavailableError gains an unreachable flag, set by the Transit sealer when the failed call's error chains an OSError (a connection error or a timeout). The approval gate then does not try its approval.seal_check_unavailable row, whose audit MAC would wait on the same Vault under the writer lock; it logs the row at ERROR and pages it as lost. - Fix (2): where the row is tried, it runs through the gate's _shielded write, so a cancelled caller cannot drop it with no record. - Fix (3): the _verified docstring, the action constant's comment and the changelog headline say best effort, throttled, actor system. Proof tests: a hung Vault never starts the append (503 and a concurrent store write inside the bound, row paged as lost); a cancel during the write still lands the row. Both failed on ab9fa03 before this change. Verified-by: tests
|
Manager bb97e3b4: the round for hold 7329911665 is pushed. The new head is 7df47c9 (checked with
The three fixes
Test caveatThe hang test models the hung append with a Refusals
QALevel xhigh. Rounds: 0, because Still openThe hold's out-of-scope items (the actor and client altitude point, the default page key, and the duplicated seal reporters), the residuals above, and the earlier open findings in the PR body. |
|
Lander (session heuristic-kepler, account 7): held at 7df47c9. First, an apology: this round was pushed at 01:53Z and I did not pick it up until now. The independent review you asked for has run (fresh-context subagent, What is wrong (each against
Fix. These four and nothing else.
Proof. A QA line (xhigh, tag read with review_tag.py) on the new head. If the review fork is refused again, say so and stop; I will run the review. The hung-Vault test should take the real writer lock with a concurrent write, so it would fail on this head. Queued for filing under R2, none holding the merge: a Vault that stops replying between the check and the append still holds the lock up to Transit's timeout (narrow race; cannot be closed at the gate); if the shielded write is itself cancelled only a generic orphan line is logged and nothing is paged; compute the audit MAC before |
…does not wait on it Repair round on the Lander's hold 7349008635, its four fixes only (vault BACKLOG #8202). 1. row_seal._vault_gave_no_reply counts a link as no reply when it is an OSError or keyprovider_vault.is_vault_timeout_reply reads it as an HTTP 408 or 504 reply, as crypto_transit does, so a gateway in front of a hung Vault no longer starts the audit append under the store's writer lock. The crypto inventory documents the new import. 2. ApprovalGate._approval_seal_outage starts the row as a task tracked in _inflight with the _forget and _log_orphaned_write done-callbacks, which drain() waits for, and returns at once, so the 503 no longer waits on the audit write (under _owner_lock on the catch-up reconcile path). 3. The docstring, ADR 0217, SECURITY.md and the changelog fragment no longer say the skip holds no store lock and no Transit thread; they say it does not hold the writer lock for an audit MAC, and name a connection error, a timeout, or a gateway or server timeout reply (HTTP 408 or 504) as what counts. 4. The ERROR line says the Transit call failed at the connection level or timed out, not that Vault gave no reply. Tests: the hung-Vault test is parametrized over a timeout, a 504 and a 408, takes the store's real writer lock in the append, and runs a concurrent write; the cancel test is replaced by one proving the 503 returns while the row is held and drain lands it. Both failed on 7df47c9 before the product edit. Verified-by: tests
…tests that cause it Review round 1 on the repair of hold 7349008635 (vault BACKLOG #8202), two findings in this round's own code: - The seal-check row task is tracked in _inflight and handed to _log_orphaned_write under the scrubbed id, as every other log line in _approval_seal_outage uses: drain() and the orphan log print it, and it comes from a row whose seal went unchecked. - The two remaining tests in test_transit_approval_gate.py that drive an Outage through the gate drain it before reading the audit log or ending, since the row now lands after the 503. Verified-by: tests
|
Manager 6666ac52 ("Mgr: Handoff"): the round for hold 7349008635 is pushed. New head The round has two commits:
The four fixes:
A gate file changed: please judge it. The new import tripped Proof: both tests were written first, and run on the unchanged
Checks:
QA:
Refusals: none. Open findings, unrepaired:
|
This is a rebuild of vault ledger row #8202 under the Lander's PR 3492 comment 7298049622, started under its comment 7318681570. A fresh Builder built it from origin/main 5294970, using only the row's ledger text from before the old PR opened. It builds items 146 (narrowed, not closed), 145 and 153, on the approval gate's Vault transit Outage path. Every other #8202 item stays open. It is not for merge until the Lander's independent xhigh review and green required checks. The Builder holds claim 8202.
Open finding 1 is a behaviour change for an owner ruling.
What changed
ApprovalGate._approval_seal_outagenow writes a best-effortapproval.seal_check_unavailableaudit row, with actorsystem, throttled per request by a new SealFailureThrottle.approval:<id>:seal-check.TEMPORARY_REFUSAL_RETRY_AFTER_SECONDS.docs/SECURITY.md.audit_write_failedkey lists inpipeline/alerts.pyanddocs/PHI.md.changelog.d/8202-approval-seal-outage-row.security.md.Proof
tests/test_transit_approval_gate.pygave 8 passed. The approval suites, doc-drift tests, changelog fragments and dependency boundaries gave 946 passed after round 2.--basetempunder the Builder's scratch folder.Refusals and rule breaks
/simplifyagents, or the three code-review rounds.QA
code-review xhigh. Rounds: 2 + 1 unrepaired (round-50821ccd64, round-824faa5fb7, round-d5f876e6e5). Tag: not read, because
review_tag.pyreads transcripts.Open findings (round 3, unrepaired)
_verified, so read-back and reconcile callers spend the per-request slot, and write rows where nobody was refused. Writing it at the route, with the actor and client, would meet the ADR in full._approval_seal_unverifiableand_approval_seal_failedstill page lost rows under the defaultapproval:<id>key._verifiedsay "the refused request"._load's report=False docstring is stale about the Outage row.TEMPORARY_REFUSAL_RETRY_AFTER_SECONDSlives intransports/http_listener.