Repository navigation
Prepare bounded P07 retirement accounting handoff - #104
Conversation
Record #103 source acceptance and verified main CI, and prepare the existing T013P07 external retirement/watchdog slice. Preserve every runtime, test, matrix, workflow, pin and task checkbox. Implementation, setup and dispatch remain separate; feedback stays deferred.
Reviewer's GuideDocumentationRead the paired accounting proposal and its eligibility evidence together: they define the selected resource graph, bounded pools, clocks and byte limits, owner-loss semantics, and the historical budget failure motivating the amendment.
Review the T013P07 plan and its linked status summaries together to understand the future implementation boundary, compatibility constraints, qualification controls, and the continued separation from operational authority.
Check the inherited source-acceptance and main-CI record across the existing acceptance and planning documents, alongside the machine-readable parent qualification receipt.
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Hey - I've found 3 issues
Prompt for AI Agents
Please address the comments from this code review:
## Individual Comments
### Comment 1
<location path="specs/017-protected-runtime-qualification/p3-retirement-accounting-plan.md" line_range="38" />
<code_context>
+| One original cleanup | 768 | 160 | 512 | 128 | 12 MiB |
+| One independently current read-only observation | 192 | 48 | 128 | 32 | 3 MiB |
+
+Whole fixed maxima:1088/208/768/192 calls and16MiB; no pool/class borrowing.
+The conservative proposed full schedule totals927/168/447/122. It counts both
+authenticated state façade exchanges and physical backend I/O. Failed CAS,
</code_context>
<issue_to_address>
**Cleanup exhausts the read budget**
When the P07 cleanup schedule runs through the existing provider path, `Provider._call` charges calls to the original `ReadBudget`, whose private and ARM limits remain 12 and 24, so the proposed 768 private and 160 ARM calls are refused before cleanup completes; the plan does not specify how prepaid pools account for calls while preserving those refusals.
Specify a P07 accounting path that charges the prepaid pools and preserves the existing `ReadBudget` refusals.
Also at `specs/017-protected-runtime-qualification/p3-retirement-accounting-plan.md:39`, `specs/017-protected-runtime-qualification/p3-retirement-accounting-plan.md:51`.
</issue_to_address>
### Comment 2
<location path="specs/017-protected-runtime-qualification/p3-retirement-accounting-plan.md" line_range="64" />
<code_context>
+pool to one authenticated owner incarnation before handoff/first effect. Live
+before-call counters and complete-byte counts share that original allocation.
+Journal I/O itself consumes journal slots; it does not trigger recursively funded
+debit writes. A failed acknowledgement never refunds an allocation.
+
+The original mutation pool is nontransferable. On owner process/incarnation loss,
</code_context>
<issue_to_address>
**Retries create duplicate allocations**
When the service commits registration but its acknowledgement is lost and the caller retries the same registration, the registration service has no specified idempotent replay rule, so a retry can create a second live allocation for the same reservation; both allocations can then authorize spending beyond the selected fixed pools.
Require registration to be an atomic idempotent operation keyed to the exact reservation and owner incarnation, returning the original allocation on replay and refusing conflicting replays.
</issue_to_address>
### Comment 3
<location path="specs/017-protected-runtime-qualification/p3-retirement-accounting-plan.md" line_range="62" />
<code_context>
+
+The protected external registration service durably prepays each entire fixed
+pool to one authenticated owner incarnation before handoff/first effect. Live
+before-call counters and complete-byte counts share that original allocation.
+Journal I/O itself consumes journal slots; it does not trigger recursively funded
+debit writes. A failed acknowledgement never refunds an allocation.
</code_context>
<issue_to_address>
**Cleanup exceeds its approved call budget**
When two accepted trigger deliveries concurrently debit the same pool when only one slot or byte allowance remains, a non-linearizable shared-pool debit lets both workers commit calls against the same remaining slot, so facade/backend calls or application bytes exceed the fixed allocation instead of one worker refusing.
Require a linearizable reserve-and-charge operation for each pool before any call, or serialize all debits through a single owner.
</issue_to_address>Sourcery assessment
Approval pending. 3 findings to address first.
Blocking findings: specs/017-protected-runtime-qualification/p3-retirement-accounting-plan.md:38, specs/017-protected-runtime-qualification/p3-retirement-accounting-plan.md:64, specs/017-protected-runtime-qualification/p3-retirement-accounting-plan.md:62
|



The original P07 eligibility probes preserve setup-expiry refusal and show ordinary private12 exhaustion before the second resource finishes, with namespace I/O unmetered. This paired source-only handoff prepares the complete bounded policy before dependent implementation.
Factory policy owner: opensoft/openXfactory#1365
Reviewed pair: factory
89dbe6e6640361c36321968725932058aa802e2bwith walletea7a46206413ba5392734fa67def7dcef6861835.The proposed graph has 14 ephemeral resources / 16 dependency edges, with three role-specific NSGs. Separate registration/cleanup/current-observation pools account for facade exchanges, physical backend I/O, complete bytes and original clocks. Each pool has its original owner; mutation loss burns its remainder while an independently current original observer retains its separate read-only pool. The normative factory correction makes handoff exclusion, cleanup-owner binding, serialized admission and the additive intrinsic accounting path explicit.
This 13-document adapter change preserves all product/tests/matrix/profile/pin/workflow/dependency bytes and all61 task checkbox lines. T013P07 stays unchecked. Historical P06 main qualification and original P07 preparation/eligibility retain their original scope.
Validation at this exact wallet head:
Exact paired policy commitment:
sha256:21b62c2621f3d98e5358c1ba4c5b0345a0237d10cfa52e59bea122487688979e. Factory replacement full-suite/Sonar qualification passed at the paired head:10,893 tests plus874 subtests, existing6 skips/338 postgres deselections, zero failures/errors; separate043 source suite958 passed. All12 inventory tests passed and Sonar new-code coverage is89.9% with all conditionsOK.This candidate awaits source-only owner ratification. No source acceptance, merge, dependent P07 implementation, P08/P09, setup/dispatch, service/role appointment or live/human/consumer acceptance is inferred. Feedback deferred; historical blocked writes unreplayed. GitHub Codex connector review is deferred under the user's explicit local-review instruction.
The actual completed factory checkout is synthetic merge
069c9f88b7221119f421be9a9baac2ac594f0ba6, parents51503c98c4e03e7f17b390aa8886a6757d3a681d(main) and reviewed head89dbe6e6640361c36321968725932058aa802e2b. Its tree differs from the reviewed candidate only by the four independently assessed upstream #1364 paths; full suite and Sonar both tested that integration. Artifact source hashes match the reviewed files plus exactly the upstream pin-reader file; all three coverage configs match. This replaces the earlier provisional freshness concern. Recheck refs/checks at any later authorized landing.