Skip to content

spec(022): accepting stage 3 and constructing a production binding (A-69) - #409

Merged
bartekus merged 1 commit into
mainfrom
spec/022-production
Oct 30, 2026
Merged

bartekus merged 1 commit into
mainfrom
spec/022-production

Conversation

@bartekus

Copy link
Copy Markdown
Contributor

Stacked on #402; retarget to main after #402 merges. This drafts the "later change" that 3.7.4.4 leaves open: accepting a recorded stage 3 and constructing a production-eligible binding (A-69). No code changes.

3.7.5

  1. Acceptance: a stage 3 record is accepted only as a Qualification that passes Qualification::check at construction. It must name the binding's exact identity and carry a calls fact that is not stale, the owner's authorization naming its decision row, the dataset rule, and the report and spend references.
  2. Eligibility: production_eligible takes that accepted Qualification. It holds only for a production, direct, pinned binding on the stage 2 direct mapping whose 3.4 facts pass for the day. The Gateway stays ineligible, because 3.3's evidence path is not delivered.
  3. Construction: JevBackend::new_production builds only with the production journal (R-29's production cap), refusing before any credential lookup otherwise. It records the accepted record's digest as qualification and keeps no bytes (R-19).
  4. Batching: batching on is refused until spec 044's increment 8 delivers 3.8 item 4's check.
  5. Plans: check_production_plan takes the accepted qualifications.
  6. Scope: eligibility is not deployment, and the 3.1.4 acts stay the owner's. Stale facts make a binding ineligible until they are re-read.

Section 5 gains the refusal rows, and Acceptance says a production binding is constructed only through 3.7.5.

A-69 records the owner's request and states that this amendment accepts no record. Accepting the first one, for A-68's stage 3 binding (recorded in #406), is a separate owner act. The implementation follows as impl(022), together with spec 044's increment 8 if the owner wants both in one change.

@github-actions

Copy link
Copy Markdown

AI review (no-findings)

Reviewing the two changed files for bugs, security problems, and internal inconsistencies.

docs/decisions/00-founding-decisions.md — A-69

A-69 describes amending spec 022 3.7.5 to define production acceptance. It explicitly states:

  • The amendment accepts no record; the first acceptance is a separate owner act.
  • No deployment, real-user data, release, or spend beyond R-29's caps is authorized.
  • The check runs at construction (not on the host's word).

These are consistent with what 3.7.5 says in the spec.

specs/022-jev-production-transport/spec.md — section 3.7.5 and table updates

3.7.5 is detailed and internally consistent:

  • 3.7.5.1 defines the Qualification document fields (artifact identity, dated calls, owner's authorization naming the decision row, dataset, report and spend journal references with totals) and that Qualification::check runs at construction, not once at acceptance — closing the host-word trust gap.
  • 3.7.5.2 (production_eligible) gates on: 3.4's facts passing for the day, production use, direct transport with a pin, the direct mapping from stage 2, and the qualification passing 3.7.5.1. This is consistent with A-69's "direct-transport production binding with the stage 2 direct mapping."
  • 3.7.5.3 (new_production) constructs only when 3.7.5.2 holds and the journal is the production journal; refuses before any credential lookup otherwise. Retains no request/response bytes (R-19). Consistent with A-69.
  • 3.7.5.4 refuses batching-on until spec 044 3.8 item 4 delivers the check. Consistent with A-69's "unless spec 044 3.8 item 4 allows batching."
  • 3.7.5.5 (check_production_plan) calls 3.7.5.2 for each binding a plan reaches, matching the new refusal table row.
  • 3.7.5.6 states facts going stale make the binding ineligible, keeping production eligibility a live check, not a one-time gate. Consistent with 3.4's "pass for the day" condition in 3.7.5.2.

Error-case table update: The removal of "new_production still refuses" from the stage-3 exchange record row is correct — that clause was the pre-amendment state before 3.7.5 existed. The two replacement rows (explicit new_production refusal conditions; plan-check refusal) are consistent with 3.7.5.3–5.

Acceptance section update: Adding "a production binding is constructed only through 3.7.5" is consistent with the new construction path.

Implementation record: Correctly marks the feature "Pending implementation" and repeats that this amendment accepts no record — consistent with A-69 and 3.7.5.1.

No concrete defects found.

{"head": "1e4ca53a1c018442f46f3100ae9b554d2653b80b", "verdict": "no-findings", "findings": []}

Subject: 894e2cf...1e4ca53, diff digest b774645f4fed3618cb81281706f170d7ae9410e085527ed425632581f0f737b7, 1 call(s). An AI comment is not an approval.

Base automatically changed from spec/022-qualification to main October 30, 2026 04:21
@bartekus
bartekus force-pushed the spec/022-production branch from 1e4ca53 to 2ee69b3 Compare October 30, 2026 04:43
@github-actions

Copy link
Copy Markdown

AI review (no-findings)

Reviewing the two changed files for bugs, security problems, and internal inconsistencies.

docs/decisions/00-founding-decisions.md — A-69

A-69 follows the pattern of prior amendment rows (A-66, A-67, A-68). It explicitly scopes itself: "This amendment accepts no record. Accepting the first one, for A-68's stage 3 binding, is a separate owner act." This is consistent with the spec text, which also says "Accepting the first record … is the owner's act in its own decision row; this amendment accepts none."

specs/022-jev-production-transport/spec.md — 3.7.5

Key properties checked:

  • Credential lookup gating (3.7.5.3): new_production refuses "before any credential lookup" when eligibility conditions fail. Credentials are never fetched speculatively. Good.
  • Qualification-to-binding identity binding (3.7.5.1 + 3.7.5.2): 3.7.5.1 requires the Qualification name the binding's exact identity; 3.7.5.2's production_eligible requires "the qualification passes 1." The chain is closed — a mismatched qualification cannot satisfy eligibility.
  • Recording ≠ acceptance (3.7.5.1): "Recording a record is not accepting it, and the adapter accepts nothing on the host's word: the check runs at construction." The adapter cannot be bypassed by the host claiming acceptance.
  • Stale facts (3.7.5.6): facts that pass valid_through revoke eligibility until re-read and requalified. No persistent eligibility from a one-time check.
  • Eligibility ≠ deployment (3.7.5.6): 3.1.4's acts (privacy decision, production spend cap, deployment approval) remain the owner's, and none is implied by an accepted record.
  • Batching gate (3.7.5.4): refuses any binding with batching not off until spec 044's increment 8 delivers the check. Consistent with A-69's "unless spec 044 3.8 item 4 allows batching."

Scenario table change

The old row "A stage 3 exchange's record | … new_production still refuses" had its "still refuses" clause removed. This could suggest the record alone now enables new_production, but the new rows make the table correct overall: "new_production with no qualification … | Refused at construction" covers the case where only a raw stage 3 record exists (no accepted Qualification). The spec text in 3.7.5.1 is unambiguous. No concrete defect, just a small loss of explicitness that the new rows compensate for.

No concrete defects found in the supplied evidence.

{"head": "2ee69b37dac9c574a97dc551a2abc6f2d346989b", "verdict": "no-findings", "findings": []}

Subject: b7984a4...2ee69b3, diff digest b774645f4fed3618cb81281706f170d7ae9410e085527ed425632581f0f737b7, 1 call(s). An AI comment is not an approval.

@bartekus
bartekus enabled auto-merge October 30, 2026 04:56
@bartekus
bartekus added this pull request to the merge queue Oct 30, 2026
Merged via the queue into main with commit a1e0fd3 Oct 30, 2026
30 checks passed
@bartekus
bartekus deleted the spec/022-production branch October 30, 2026 05:43
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