Repository navigation
Conversation
doublewhy
force-pushed
the
310-participant-interaction-budget-support
branch
from
October 9, 2026 15:59
dfa3580 to
0fe5891
Compare
This was referenced Oct 9, 2026
SEM-223 gives the v3 resource budget its interaction-level meaning from the issue #122 design. Exhaustion is derived from remaining capacity. A reservation that any logical budget cannot admit is a typed reject event, checked across the whole vector before any shared pool, and the governed attempt becomes an undispatched SEM-211 rejected attempt with the resource precondition and the resource_exhausted failure class, settled by the policy's failure disposition. The reject event and the attempt commit together. Shared-pool contention stays a throttle. Settlement is fenced to the reserving generation and happens exactly once. A shared-clock reset reconciles episode-owned dimensions only when it reset the bound episodes. Participant-owned budgets may not count other owners' or other participants' use; the governed participants include agents selected through participant_role_refs, not only those named in participant_refs. The runtime result path and published snapshot conformance reject future, cross-generation, repeated, or rewritten budget events, exhaustion recorded outside SEM-211, disclosed budget identity, and backend-local limits presented as portable exhaustion. This breaks v3 documents and consumers that relied on the old behavior: a v3 behavior specification must now govern exactly one participant, a budget of another owner can no longer name a participant-owned parent, and a logical shortfall is a reject event with a rejected attempt instead of a throttle that failed the scheduler pass. docs/migration/autonomous-execution-v3.md records the migration.
doublewhy
force-pushed
the
310-participant-interaction-budget-support
branch
from
October 9, 2026 19:16
0fe5891 to
413a051
Compare
doublewhy
force-pushed
the
310-participant-interaction-budget-support
branch
from
October 9, 2026 20:29
413a051 to
28e1694
Compare
doublewhy
marked this pull request as ready for review
October 9, 2026 21:28
doublewhy
marked this pull request as draft
October 9, 2026 21:37
DSL-121 lets a v3 resource budget bound participant interaction with the same ADR-097 dimensions. The governed catalog adds interaction_steps, interaction_turns, tool_invocations, and scenario_time with fixed units and compatible accounting modes; tokens keep inference_tokens. The six initial kinds stay required and the interaction kinds are optional. A tool_invocations dimension names the behavior specification's tool affordances and counts only the dispatched action contracts they bind; validation and compilation share that rule. Other attempts reserve zero from it, and a zero quantity never refuses. A scenario_time dimension bounds elapsed time on the policy's shared clock. RAES meters it from the clock history since the latest reset (time_segment) or since initialization (run): each admitted attempt reserves the ticks elapsed since the last charge plus its allowance and commits the elapsed ticks. Host or watchdog meters are rejected on every scenario-time contract. A quota stays hidden unless the policy's observation boundary discloses the dimension through a sensitive resource_budget view rule, including under a namespaced import. A disclosed dimension that rejects an attempt reports its used amount, authored limit, remaining amount, and the request in the attempt's observations, read from this policy's own reject event. The published policy demand can carry the tool scope, and the policy identity of a budget without the new fields is unchanged; a valid and an invalid policy fixture carry a tool_invocations demand with and without action_contract_refs. The thirteen schemas that embed the catalog are rebuilt, each with a ledger entry. The validator runs the owner, tool-scope and disclosure checks through one entry point. Schema factoring also shares repeated propertyNames subschemas, which keeps materialized-scenario-v1 within its publication size budget.
ACT-624 attaches an interaction budget to the behavior-specification aggregate itself, so any participant kind can carry one, not only the v3 autonomous profile. behavior_specifications.<spec>.resource_budget takes the ADR-097 budget policy shape with the DSL-121 kinds and rules. It bounds only the dimensions it declares, counts ticks, segments and windows on its clock_ref, and governs every action attempt of the specification's participants. It compiles into the same owner, demand and fairness IR as a v3 budget. An autonomous profile keeps its own budget, so an aggregate budget beside one is rejected. Aggregate budgets get the owner validation v3 budgets have, over the participants the compiler selects, participant_role_refs included, so a participant-owned dimension cannot count a second participant. A participant that two budget-carrying specifications select is rejected, so no attempt is governed twice. While a participant or role ref is a variable, both participant checks wait for instantiation, which validates the resolved scenario again. A backend declares support in the participant_runtime capability root with the evidence-required interaction_budgets behavior feature and resource-budget capabilities, which then no longer require autonomous execution support. Planner admission refuses an aggregate budget without that declaration and otherwise admits it like a v3 budget, checking pools a v3 policy shares against both limits. A declaration is not proof of enforcement. New conformance diagnostics check that each recorded attempt of a governed participant carries the admission of every budget that governs it, a refusal by any of them standing for all, and that realized budget states keep their compiled dimensions. The reference control plane refuses a manual action of a governed participant unless the backend declares the feature. The SDL and backend-manifest schemas that embed the new member and term are rebuilt, each with a ledger entry, and the new SDL refs are cataloged. The member's schema description is one sentence, which keeps materialized-scenario-v1 within its publication size budget.
doublewhy
force-pushed
the
310-participant-interaction-budget-support
branch
from
October 9, 2026 23:01
28e1694 to
e7df797
Compare
This was referenced Oct 9, 2026
Closed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Stacked on #1467 (DSL-121, #308) at its current head
6da04a44, which is stacked on #1466 (SEM-223, #306) at its current head11fcd577. Those PRs' four commits appear in this diff until they merge; the own commits here are the last two.Implements ACT-624 as the issue #122 design specifies (
specs/formal/participant-episode-model/README.md: the ACT-624 commitments, the issue table row "First-class interaction-budget model member, backend capability declaration, conformance", and the matrix rows for EBM-03, EBM-05 and "First-class attachment across kinds (ACT-623/624)").behavior_specifications.<spec>.resource_budgetis a new member of the behavior aggregate, so a human, scripted, replayed, policy-directed, mixed-control or autonomous-mode participant can carry an interaction budget. It is the ADR-097 budget policy shape (owners, fairness, dimensions) with the DSL-121 kinds and rules. It is not a second budget root and compiles into the same owner, demand and fairness IR as a v3 budget, asParticipantBehaviorSpecificationRuntime.interaction_budget.select_participants): theparticipant_refsand every participant whose effective role is one of theparticipant_role_refs. Unlike the v3 profile it bounds only the dimensions it declares, so action rate, turns, steps, logical time, tokens and tool use can each be bounded alone. A dimension that counts scenario time, resets per time segment, or uses a window needsclock_ref. The SEM-223 owner rules apply, and its quotas stay hidden. A participant-owned dimension on a specification that selects more than one participant is rejected (EBM-03), whether the others are listed or selected by role, and the error names the governed participants; feat!: define participant budget exhaustion and limit-effect semantics #1466 applies the same check to v3 budgets.participant_runtimecapability root with a new evidence-required behavior feature,interaction_budgets, itsfeature_supportentry, andresource_budgetscapabilities. Budget capabilities no longer require autonomous execution support when the feature is declared. Planner admission refuses an aggregate budget unless the backend declares the feature, then admits it the way it admits a v3 budget. A pool that a v3 policy shares with an aggregate budget is checked against both limits.participant_interaction_budget_conformance_diagnostics(new,raes_conformance) reads recorded evidence. Every terminal attempt of a governed participant must carry the budget's admission: areserveevent on every compiled dimension, or arejectorthrottleon one of them. Given budgets that overlap anyway, it checks each attempt against every budget that governs the participant, and a refusal by any of them stands for all. Every realized budget state must keep its compiled dimension's kind, unit, accounting mode, meter, limit and reset. The function is invoked directly, today only by tests.run_target_conformancedoes not call it and theraes_conformancefacade does not export it, as with the ACT-614 probeparticipant_temporal_scenario_case(tracked in Run the participant conformance probes from run_target_conformance #1523).interaction_budgets, the way it already refuses manual submission of shared-time-bound actions. A declaring backend realizes the budget, and conformance checks the evidence it records.The SDL authoring, instantiated, snapshot, materialized and satisfiability schemas change for the new member.
backend-manifest-v2changes for the new feature term. Each has a ledger entry. The new SDL refs are registered inspecs/sdl/references.mdand the catalog parity expectations, and the lineage ledger names the member as RAES-defined.Merge hazard (the schema budget is tracked in #1556):
implementations/python/tests/test_issue_1241_schema_publication_size.pycapscontracts/schemas/sdl/materialized-scenario-v1.jsonat 500 × 1024 = 512,000 bytes, and the repository policy capsraes/validator/_content_objectives.pyat 500 lines. #1467 now shares repeatedpropertyNamessubschemas in that schema, andParticipantInteractionBudget's schema description is one sentence (it was 379 bytes), so the schema is 502,735 bytes here (507,530 at the previous head28e1694c) and_content_objectives.pyis 474 lines. In a local merge of the posted order with every PR's current head, the schema is 511,867 bytes after #1463 and #1465, 507,572 after #1467 and 508,366 after this PR;_content_objectives.pyis 497 lines after #1446, 498 after #1466, 492 after #1467 and 491 after this PR.Because this changes source bound by the research evidence, both captures are republished one release above #1467 (specification coverage 71.0.0, formal validation 72.0.0). Retained outcomes, classifications and claim limits are unchanged.
Requirement UIDs
ACT-624. The branch carries no UID and there is nodocs/governance/requirement-scopes/310.json, so requirement governance is not activated. The requirement record is updated by hand, as feat!: define participant budget exhaustion and limit-effect semantics #1466 and feat: support authored participant interaction budgets #1467 do: status ACTIVE and IMPLEMENTS/TESTS lines. A UID branch would still fail governance after feat!: define participant budget exhaustion and limit-effect semantics #1466 and feat: support authored participant interaction budgets #1467 merge.tools/check_requirement_governance.py --base-rev origin/308-participant-interaction-budgets --requirement-uid ACT-624reports 4 failures at heade7df797f(origin/308-participant-interaction-budgetsis feat: support authored participant interaction budgets #1467's head6da04a44):requirement-ownership-mismatchforcontracts/provenance/sdl-lineage-ledger-v2.json, which is outside theparticipant-modelownership roots, andtraceability-missing-testsfortest_formal_semantic_validation.py,test_issue_989_versioned_evidence.pyandtest_specification_coverage.py, the three evidence modules this PR's republish edits.origin/devthe same command reports 28 failures: the same ledger mismatch, 19 missing IMPLEMENTS links on feat!: define participant budget exhaustion and limit-effect semantics #1466's and feat: support authored participant interaction budgets #1467's source files, and 8 missing TESTS links (the three evidence modules plus the five Participant Budget, Quota, And Exhaustion Semantics (SEM-223) #306, Participant Interaction Budget Surface (DSL-121) #308, Add participant activity resource budgets and shared-service fairness contracts #899 and Backends have no way to attest to what they added in-world; require a post-materialization attestation in valid RAES SDL #1241 test modules those PRs change).Related Issues
Closes #310
ADR Impact
participant_runtimecapability root.Changes
raes/participant_resource_budgets.py:ParticipantInteractionBudget, the budget policy without the v3 complete-vector rule and withclock_ref; its schema description is one sentence and the rest is a code comment. Tool scope now takes its governed actions explicitly: dispatched actions for v3, declared actions for the aggregate.raes/participant_behavior_specification.py: theresource_budgetmember, counted as a behavior surface and rejected beside an autonomous profile.raes/validator/_participant_resource_budget_owners.py: feat!: define participant budget exhaustion and limit-effect semantics #1466's owner rules, over the participantsselect_participantspicks, now also cover aggregate budgets, and a participant that two budget-carrying specifications select is rejected. Both participant checks wait for instantiation while a participant or role ref is a variable._content_objectives.pypasses the effective roles it already computes for the behavior analysis to feat: support authored participant interaction budgets #1467'sparticipant_resource_budget_errors.raes/validator/_participant_resource_budget_scopes.py: tool-scope and clock checks for aggregate budgets;participant_resource_budget_errorspasses the scenario to the owner checks and its clocks to these checks.raes/composition/_behavior.py: aggregate owner refs andclock_refrewritten on namespaced import.raes_processor/compiler/participant_resource_budget_projection.py(new): the budget projection shared by v3 and aggregate budgets, and the aggregate compilation.participant_autonomous_execution.pynow calls it;participant_behaviors.pysets the member.raes_processor/models/participant_resources.py:ParticipantInteractionBudgetRuntime, onParticipantBehaviorSpecificationRuntime.interaction_budget.raes_processor/planner/core.py:participant.interaction-budget-unsupporteddiagnostics.raes_contracts/manifest_authority.pyandcontracts/concept-authority/controlled-vocabularies-v1.json(plus its reference fixture): the evidence-requiredinteraction_budgetsterm and the contracts it requires.raes_contracts/contracts/manifests.pyandraes_backend_protocols/participant_capabilities.py: the term requires budget capabilities, and budget capabilities with the term no longer count as autonomous configuration.raes_backend_protocols/participant_resource_admission.py:participant_interaction_budget_gaps, reusing the v3 admission checks.contracts/fixtures/backend-manifest/backend-manifest-v2/valid/stub.json: the stub's unsupported declaration of the term.raes_runtime/participant_submission_options.py: the manual-submission refusal. The existing shared-time refusal moves into the same helper with its message unchanged.raes_conformance/conformance/participant_interaction_budgets.py(new): the conformance diagnostics. The facade export list is unchanged.schema_bundle(), with 6contracts/schema-publication/entriesrecords.behavior_specifications.*.resource_budgetrows inspecs/sdl/references.md, after themixed_controlrows, with expectations intools/sdl_catalog_parity/_expectations_3.py. Thesdl-field:behavior_specificationsdivergence incontracts/provenance/sdl-lineage-ledger-v2.jsonand an ACT-624 bullet indocs/explain/sdl/lineage.md.specs/formal/participant-semantics/autonomous-execution.md, and the DSL-121 nonclaim it supersedes;docs/explain/sdl/sections.md;docs/requirements/ACT-624/requirement.md;assurance-fulfillment.yaml: Participant Interaction Budgets And Quotas (ACT-624) #310 unit-test and typed-IR artifacts delivered, and Participant Interaction Budgets And Quotas (ACT-624) #310 removed from the waiver;shared-semantic-integrity.md, nowactive.test_issue_310_act_624_participant_interaction_budgets.py(new, 41 tests).execution-snapshot-v71.json,analysis-v71.json, issue-310 bundle) replays the retained matrix against this branch's source.execution-snapshot-v72.json,analysis-v72.json,retest-v72.json) replays the retained formal cases with baseline 71.0.0.tools/check_specification_coverage.py,tools/formal_semantic_validation/, and the three evidence test modules. Both research indexes record the new releases.Test Plan
Unit tests pass
Integration tests pass if applicable
Full completion suite required in CI before merge
No coverage regression
New module.
uv run --project implementations/python --frozen --all-extras python -m pytest implementations/python/tests/test_issue_310_act_624_participant_interaction_budgets.py -q -p no:cacheprovider: 41 passed. With-m integrationor-m fuzz, all 41 are deselected.behavior_modeterms and for a specification without one. It names its participants, satisfies the aggregate alone, and is rejected beside an autonomous profile.greenrole (EBM-03), and its refs stay bound under a namespaced import.red-agentandsupervisor-agent) still compile. A participant named through a variable passes parse-time validation and is checked after instantiation: it compiles when the variable resolves to the onlygreenparticipant, and instantiation rejects the participant-owned dimension once a secondgreenagent exists.interaction_budgetsfrom the evidence-requiredfeatureenum of the publishedparticipant_runtime.feature_supportschema. Planner admission is checked against a backend whose budget support is autonomous-only (the matrix negative "budget available only on the autonomous profile"), a missing kind, and a pool that each family fits alone but not together.plan()reportsparticipant.interaction-budget-unsupportedfor the stub manifest and nothing for a declaring manifest.Regression proof. With the package files set back to feat: support authored participant interaction budgets #1467's head
6da04a44, the module cannot be collected, becauseParticipantInteractionBudget, which it imports, does not exist there. At this head I applied 21 single-point source mutations, one at a time, and restored each before the next run. Each made at least one test of the module fail. They removed the aggregate-surface entry, the autonomous-profile exclusion, the vector exemption, the clock rule, clock resolution, aggregate owner checks, the namespaced clock rewrite, both manifest decouplings, the admission feature check, shared-pool counting, both conformance checks, and the manual-submission guard. They also reverted owner selection to explicit refs, removed the wait for unresolved participant variables, removed the one-budget check, removed the rule that a refusal by one budget stands for all, checked only the first governing budget, swapped the planner call's budget arguments, and discarded the planner's budget diagnostics.Related suites. The Participant Interaction Budgets And Quotas (ACT-624) #310, Participant Interaction Budget Surface (DSL-121) #308, Participant Budget, Quota, And Exhaustion Semantics (SEM-223) #306 (both), Add participant activity resource budgets and shared-service fairness contracts #899 and Backends have no way to attest to what they added in-world; require a post-materialization attestation in valid RAES SDL #1241 modules together: 144 passed. The 272 modules that reference resource budgets, behavior specifications,
schema_bundle, the materialized schema, observation boundaries, view rules, autonomous execution, tool affordances, participant selection or roles,raes_conformance, the planner, backend manifests or participant capabilities, catalog parity or lineage, plustest_sdl_validator.pyand the composition modules: 7,565 passed, 2 skipped (4 xdist workers, 634 s on a loaded machine).Schema and governance checks.
tools/check_generated_schemas.py,tools/check_schema_publication.py --base-rev origin/308-participant-interaction-budgets,make policyandnox -s lintpass; the contracts lane below also runs SDL catalog parity and SDL lineage. Relative to the previous head, the five SDL schemas differ becauseParticipantInteractionBudget's description is shorter, and the materialized schema also because of feat: support authored participant interaction budgets #1467's factoring; their entries keep this PR's summaries with recomputed hashes.Evidence and gates. Both evidence checker CLIs pass. The three evidence modules pass with default markers (209 passed, 19 deselected) and with
-m integration(19 passed), with no formal deviations and no pinned artifact changed.nox -s verify-fast-feedback -- --base-rev origin/308-participant-interaction-budgetspasses (29 stages, requirement governance skipped; the directly changed test modules, this PR's and the three evidence modules: 250 passed, 19 deselected), andnox -s contracts -- --base-rev origin/308-participant-interaction-budgetspasses all 14 contract steps. The republish helper's--checkagainstorigin/308-participant-interaction-budgetsreports the evidence current.Coverage. At head
e7df797fthe SonarCloud PR gate is OK (95.8% new-code coverage, 0 new violations, 0.0% duplication; analysis 2026-10-09T23:23Z), andcanonical / coverage-reducepassed in CI run 38002299710, where all 32 checks pass and deploy is skipped.Ground Control Checks
make policypasses. A pre-push self-review of the own commit ran before the evidence republish. It removed a redundant plan-level refusal in favor of the manual-submission guard, and cut the admission function to three returns. An independent review then found that owner checks counted only listed participants and that two specifications could budget one participant. This revision fixes both, as the What it bounds, One governing budget and Conformance bullets describe. This revision rebases the own commit onto #1467's current head. The owner module, the validator hook, the materialized schema and its ledger entry conflicted: the owner module keeps #1466's participant-scope rules (listed refs and governed participants may be named, and the error lists the governed participants) and adds the aggregate budgets, the one-budget check and the wait for unresolved variables; the hook calls #1467's entry point; the schemas are regenerated. The 21 mutations above, re-run at this head, check that the new tests are not vacuous.Traceability
implementations/python/packages/raes/participant_resource_budgets.py,implementations/python/packages/raes/participant_behavior_specification.py,implementations/python/packages/raes/validator/_participant_resource_budget_owners.py,implementations/python/packages/raes/validator/_participant_resource_budget_scopes.py,implementations/python/packages/raes/validator/_content_objectives.py,implementations/python/packages/raes/composition/_behavior.py,implementations/python/packages/raes_contracts/manifest_authority.py,implementations/python/packages/raes_contracts/contracts/manifests.py,implementations/python/packages/raes_backend_protocols/participant_capabilities.py,implementations/python/packages/raes_backend_protocols/participant_resource_admission.py,implementations/python/packages/raes_processor/models/participant_resources.py,implementations/python/packages/raes_processor/models/behavior_resources.py,implementations/python/packages/raes_processor/models/__init__.py,implementations/python/packages/raes_processor/compiler/participant_resource_budget_projection.py,implementations/python/packages/raes_processor/compiler/participant_autonomous_execution.py,implementations/python/packages/raes_processor/compiler/participant_resource_scopes.py,implementations/python/packages/raes_processor/compiler/participant_behaviors.py,implementations/python/packages/raes_processor/planner/core.py,implementations/python/packages/raes_runtime/participant_submission_options.py,implementations/python/packages/raes_conformance/conformance/participant_interaction_budgets.py(all ACT-624 lines indocs/requirements/ACT-624/requirement.md)implementations/python/tests/test_issue_310_act_624_participant_interaction_budgets.pyChecklist
CHANGELOG.mdfrom it)FM3 (stateful and control semantics), per the #122 design. No executable or runtime adoption is claimed: the reference runtime does not realize an aggregate budget, its control plane refuses a manual bypass, and conformance checks evidence a backend records.
Nonclaims, as stated in the spec:
Documentation
Updated:
specs/formal/participant-semantics/autonomous-execution.md,docs/explain/sdl/sections.md,docs/explain/sdl/lineage.md,specs/sdl/references.md,docs/explain/reference/shared-semantic-integrity.md,docs/requirements/ACT-624/requirement.md,specs/formal/assurance-fulfillment.yaml.