Skip to content

Record the operator's authorship on quick-tier staked contracts#1264

Merged
ppXD merged 1 commit into
mainfrom
feat/p5-4-staking-authority-provenance
Jul 25, 2026
Merged

Record the operator's authorship on quick-tier staked contracts#1264
ppXD merged 1 commit into
mainfrom
feat/p5-4-staking-authority-provenance

Conversation

@ppXD

@ppXD ppXD commented Jul 25, 2026

Copy link
Copy Markdown
Owner

Summary

  • P5-4 (staking provenance — the spec-compiler arc's foundation): SupervisorUnitContract.BuildStakedRequirements no longer hardcodes ModelProposal onto Required rows — the authority comes from the caller that knows the lane. The quick tier's acceptance is the OPERATOR's launch argv floor and now stakes as Operator; supervisor plan subtasks stay ModelProposal; plan-map items (planner-authored) fold to the ModelProposal default. NA rows stay ServerPolicy regardless — the exemption is the server's policy whoever authored the contract.
  • The carrier is clamp-safe by construction: AgentTask.AcceptanceAuthority (null-omitted) is stamped from a SIBLING config key (acceptanceAuthority) the projection builder writes — never a field inside the acceptance object, so a model-authored plan-map item spec has no path to mint its own authority. The node parses it through a C2-posture allowlist: exactly "Operator" reads Operator; anything else — missing, case-typo, "ServerPolicy", garbage — reads null → staked as ModelProposal. Authority is only ever under-claimed, never inflated.
  • Zero behavioral shift today: no reducer/admission rule keys on a Required row's authority (verified — reducer reads receipt authority at CompletionReducer.cs:29 and NA-pairing at :191 only), and contract hashes are untouched (AgentAcceptanceContract.Hash projects instruction/acceptance/expectsChanges only). This is provenance honesty on the durable ledger, recorded now while volume is low.
  • Known edge (safe direction): an operator hand-editing a projected quick-tier definition through a form that strips unknown keys would drop the sibling key → the floor re-stakes as ModelProposal — an under-claim, never an inflation.

Test plan

  • Unit (6063, +9): staked-table theory now runs under BOTH authorities (Required rows carry the caller's; NA rows pinned ServerPolicy under both) · config sibling-key emission (omitted when null; never inside the acceptance object) · allowlist parse matrix (exact-Operator only; case-typo/ServerPolicy/ModelProposal/garbage/missing → null)
  • Integration (2448, +1): quick-tier-shaped dispatch with AcceptanceAuthority=Operator + read-only declaration → Required acceptance row stakes Operator while NA rows stay ServerPolicy, over real Postgres through the real AgentRunService staking path; the existing no-provenance dispatch test now also pins the ModelProposal default
  • Full suites green

The quick tier's acceptance IS the operator's launch argv floor, but
the staking helper hardcoded ModelProposal authority onto every
Required requirement row — an operator-authored contract was recorded
as a model's proposal. Harmless to today's metrics (no reducer or
admission rule keys on a Required row's authority), but it misstates
provenance on a durable ledger, and the spec-compiler arc builds on
this distinction being honest.

BuildStakedRequirements now takes the Required rows' authority from
the caller that knows the lane: the supervisor spawn passes
ModelProposal (its specs are the plan-author model's), and the
workflow lane reads the task's new AcceptanceAuthority — stamped by
the projection builder as a SIBLING config key (never a field inside
the potentially model-authored acceptance object), parsed through a
C2-posture allowlist (exactly "Operator"; anything else, including a
typo, under-claims to the ModelProposal default). NA rows stay
ServerPolicy regardless — the exemption is the server's policy
whoever authored the contract. Contract hashes are untouched (the
hash projects instruction/acceptance/expectsChanges only).
@ppXD
ppXD merged commit f08dff3 into main Jul 25, 2026
5 checks passed
@ppXD
ppXD deleted the feat/p5-4-staking-authority-provenance branch July 25, 2026 14: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