Skip to content

Prepare bounded P07 retirement accounting handoff - #104

Merged
brettheap merged 4 commits into
mainfrom
017-p3-retirement-eligibility
Nov 23, 2026
Merged

brettheap merged 4 commits into
mainfrom
017-p3-retirement-eligibility

Conversation

@brettheap

@brettheap brettheap commented Nov 23, 2026 •

Copy link
Copy Markdown
Contributor

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 89dbe6e6640361c36321968725932058aa802e2b with wallet ea7a46206413ba5392734fa67def7dcef6861835.

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:

  • Six offline preparation gates pass. Actual baseline parsers accept five complete canonical synthetic records below16KiB (largest9,855bytes). Parser/serialization compatibility is distinct from authenticated service provenance and a full P07 positive.
  • Hosted full suite: 3,581 passed plus11 subtests, zero failures/errors/skips. Required offline native conformance:3,159 passed, zero missing/skipped cases.
  • Main coverage partition:3,580 passed plus11 subtests, one separately isolated test passed. Source-conformance and downstream Sonar gate passed. Complete workflow: https://github.com/opensoft/openXwallet/actions/runs/45205563986 .
  • Runtime and gate artifact SHA256 digests match GitHub. Both JUnit reports have zero failures/errors/skips; measurement hashes for102 production files match this checkout. The CI synthetic merge tree equals the reviewed wallet tree.
  • Nine local Codex expert roles plus coordinator clear this exact pair. Factory's final source-policy clarifications are compatible with this handoff; no adapter runtime edit is implied.
  • The local full suite was interrupted at64% by the separately user-authorized bench maintenance stop. It is retained as diagnostic, not a passing full qualification. No bench/runtime restart was attempted; completed hosted checks supply the full/native evidence.

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, parents 51503c98c4e03e7f17b390aa8886a6757d3a681d (main) and reviewed head 89dbe6e6640361c36321968725932058aa802e2b. 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.

Brett Heap added 4 commits November 23, 2026 13:26
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.
@sourcery-ai

sourcery-ai Bot commented Nov 23, 2026 •

Copy link
Copy Markdown

Reviewer's Guide

Documentation

Read 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.

  • specs/017-protected-runtime-qualification/p3-retirement-accounting-plan.md L1-102
  • specs/017-protected-runtime-qualification/p3-retirement-eligibility.json L1-217
  • specs/017-protected-runtime-qualification/p3-retirement-eligibility.md L1-84

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.

  • AGENTS.md L1-56
  • specs/017-protected-runtime-qualification/p3-retirement-plan.md L1-261
  • specs/017-protected-runtime-qualification/plan.md L1-26
  • specs/017-protected-runtime-qualification/spec.md L1-26
  • specs/017-protected-runtime-qualification/tasks.md L1-60

Check the inherited source-acceptance and main-CI record across the existing acceptance and planning documents, alongside the machine-readable parent qualification receipt.

  • specs/017-protected-runtime-qualification/evidence.md L1-58, L4671-4723
  • specs/017-protected-runtime-qualification/p3-azure-composition-plan.md L1-26
  • specs/017-protected-runtime-qualification/p3-design-basis-acceptance.md L1-24, L150-192
  • specs/017-protected-runtime-qualification/p3-issuance-plan.md L1-26
  • specs/017-protected-runtime-qualification/p3-retirement-parent-main-qualification.json L1-287

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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


Sourcery is free for open source - if you like our reviews please consider sharing them ✨

@sonarqubecloud

Copy link
Copy Markdown

@brettheap
brettheap merged commit bfdfba0 into main Nov 23, 2026
17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant