From 41598c4ce3527fe539ae2f30d6f2cd4246faec11 Mon Sep 17 00:00:00 2001 From: Puma Date: Wed, 23 Sep 2026 01:12:40 -0700 Subject: [PATCH 01/26] ci(standards-engine): qualify the purpose-separation branch Run the existing locked Python verification on the dedicated implementation branch. Retain a source-only Git bundle for exact-candidate inspection when the implementation runtime cannot clone GitHub. The job has read-only repository permissions and uses no checkout credentials. This is M0 execution support, not standards-content migration or feature acceptance. --- .../workflows/purpose-separated-engine.yml | 60 +++++++++++++++++++ 1 file changed, 60 insertions(+) create mode 100644 .github/workflows/purpose-separated-engine.yml diff --git a/.github/workflows/purpose-separated-engine.yml b/.github/workflows/purpose-separated-engine.yml new file mode 100644 index 00000000..6f4c06e5 --- /dev/null +++ b/.github/workflows/purpose-separated-engine.yml @@ -0,0 +1,60 @@ +name: Purpose-separated Engine verification + +on: + push: + branches: [implementation/purpose-separated-standards-engine] + pull_request: + branches: [main] + paths: + - 'tools/**' + - '.agents/skills/standards-engine/**' + - 'evaluation/standards-effectiveness/**' + - '.github/workflows/purpose-separated-engine.yml' + +permissions: + contents: read + +jobs: + engine: + runs-on: ubuntu-24.04 + env: + PYTHONPATH: . + CANDIDATE_SHA: ${{ github.sha }} + SOURCE_REPOSITORY: ${{ github.repository }} + steps: + - name: Obtain exact public source without checkout credentials + shell: bash + run: | + set -euo pipefail + git init source + git -C source remote add origin "https://github.com/${SOURCE_REPOSITORY}.git" + git -C source fetch origin "$CANDIDATE_SHA" + git -C source checkout --detach FETCH_HEAD + test "$(git -C source rev-parse HEAD)" = "$CANDIDATE_SHA" + git -C source bundle create ../source.bundle HEAD + - name: Retain exact source for implementation and review + uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 + with: + name: engine-source-${{ github.sha }} + path: source.bundle + if-no-files-found: error + retention-days: 7 + - name: Install the locked Engine environment + working-directory: source + shell: bash + run: | + set -euo pipefail + python3 -c 'import sys; assert sys.version_info[:2] == (3, 12), sys.version' + python3 -m venv "$RUNNER_TEMP/engine-env" + "$RUNNER_TEMP/engine-env/bin/python" -m pip install --require-hashes --only-binary=:all: -r tools/standards_contracts/requirements.lock + - name: Verify implementation and registered structure + working-directory: source + shell: bash + run: | + set -euo pipefail + python="$RUNNER_TEMP/engine-env/bin/python" + "$python" -m unittest discover -s tools/standards_metadata/tests + "$python" -m unittest discover -s tools/standards_policy_impact/tests + PYTHONPATH=.:tools/standards_verifier "$python" -m unittest discover -s tools/standards_verifier/tests + "$python" -m unittest discover -s tools/standards_engine/tests + PYTHONPATH=.:tools/standards_verifier "$python" tools/standards_verifier/verify.py --complete From ea4f643fbed938281e2a03e31963c995f0bcdcbb Mon Sep 17 00:00:00 2001 From: ChatGPT Date: Wed, 23 Sep 2026 10:59:11 +0000 Subject: [PATCH 02/26] feat(engine): separate application content from standards authoring Require a host-selected purpose and generate purpose-specific wire contracts. Bind application exposure to reviewed material, retain reasoning in authoring-only provenance, and publish supporting changes through the existing workflow. Preserve the real standards corpus and begin with empty exposure declarations. The breaking Analysis 7 contract binds explicit preservation or change to the actual candidate revision. Installed locked-client qualification and independent review remain recorded in the plan. --- .agents/skills/standards-engine/SKILL.md | 10 +- .../standards-engine/references/authoring.md | 17 +- .../references/environment.md | 156 ++- .../skills/standards-engine/scripts/invoke.py | 20 +- .../workflows/purpose-separated-engine.yml | 4 +- .../positive-guidance-and-provenance.md | 261 ++++ .../execution-ledger.md | 40 + .../issues.md | 22 + .../plan.md | 344 +++++ .../reports/implementation-evidence.md | 146 +++ .../application-content.toml | 2 + .../decision-provenance.toml | 2 + .../generated/suite-inputs.json | 120 +- .../standards_analysis/__init__.py | 4 + .../standards_analysis/changes.py | 38 +- .../standards_analysis/kernel.py | 9 +- .../standards_analysis/obligations.py | 22 +- .../standards_analysis/state.py | 8 +- .../standards_analysis/tests/test_changes.py | 17 +- tools/standards_analysis/tests/test_impact.py | 1 + .../tests/test_obligations.py | 9 +- tools/standards_analysis/tests/test_state.py | 4 +- tools/standards_contracts/README.md | 9 + .../standards_contracts/__init__.py | 2 + .../standards_contracts/compiler.py | 35 +- .../standards_contracts/model.py | 24 +- .../tests/test_compiler.py | 42 + .../tests/test_projection.py | 4 +- tools/standards_engine/PURPOSE-SEPARATION.md | 181 +++ tools/standards_engine/README.md | 15 +- tools/standards_engine/contracts/README.md | 20 +- .../contracts/a1-contract.schema.json | 1035 ++++++++++++++- .../contracts/a1-interface.toml | 18 +- .../contracts/examples/a1-examples.json | 50 +- .../contracts/generated/agent-tools.json | 1148 +++++++++++++++-- .../contracts/identity-fixtures.json | 6 +- tools/standards_engine/pyproject.toml | 2 +- .../standards_engine/__init__.py | 2 + .../standards_engine/_generated_contract.py | 810 +++++++++++- .../standards_engine/context_projection.py | 277 ++++ .../standards_engine/engine.py | 121 +- .../standards_engine/logical_authoring.py | 105 +- .../standards_engine/standards_engine/mcp.py | 44 +- .../standards_engine/rendering.py | 6 + .../standards_engine/supporting.py | 169 +++ .../standards_engine/supporting_authoring.py | 130 ++ .../standards_engine/tools.py | 18 +- .../tests/codex_navigation_client.py | 32 +- .../tests/mcp_workflow_client.py | 56 +- .../tests/platform_harness.py | 5 +- .../tests/test_agent_navigation.py | 4 +- .../tests/test_agent_workflow.py | 10 +- tools/standards_engine/tests/test_analysis.py | 15 +- .../standards_engine/tests/test_authoring.py | 6 +- .../tests/test_coverage_publication.py | 2 + .../tests/test_evidence_maintenance.py | 1 + .../tests/test_generated_contract.py | 15 +- .../tests/test_logical_authoring.py | 68 +- tools/standards_engine/tests/test_mcp.py | 28 +- .../standards_engine/tests/test_navigation.py | 3 +- .../tests/test_navigation_indexes.py | 6 +- .../tests/test_purpose_projection.py | 250 ++++ .../tests/test_purpose_transport.py | 148 +++ .../standards_engine/tests/test_rendering.py | 11 + .../tests/test_supporting_workflow.py | 134 ++ .../standards_graph/repository.py | 5 + tools/standards_metadata/README.md | 10 + .../standards_metadata/__init__.py | 7 + .../standards_metadata/supporting_content.py | 204 +++ .../tests/test_supporting_content.py | 86 ++ tools/standards_policy_impact/README.md | 8 + .../standards_policy_impact/__init__.py | 3 + .../standards_policy_impact/provenance.py | 33 + 73 files changed, 6227 insertions(+), 452 deletions(-) create mode 100644 docs/guides/positive-guidance-and-provenance.md create mode 100644 docs/plans/purpose-separated-standards-engine/execution-ledger.md create mode 100644 docs/plans/purpose-separated-standards-engine/issues.md create mode 100644 docs/plans/purpose-separated-standards-engine/plan.md create mode 100644 docs/plans/purpose-separated-standards-engine/reports/implementation-evidence.md create mode 100644 evaluation/standards-effectiveness/application-content.toml create mode 100644 evaluation/standards-effectiveness/decision-provenance.toml create mode 100644 tools/standards_engine/PURPOSE-SEPARATION.md create mode 100644 tools/standards_engine/standards_engine/context_projection.py create mode 100644 tools/standards_engine/standards_engine/supporting.py create mode 100644 tools/standards_engine/standards_engine/supporting_authoring.py create mode 100644 tools/standards_engine/tests/test_purpose_projection.py create mode 100644 tools/standards_engine/tests/test_purpose_transport.py create mode 100644 tools/standards_engine/tests/test_supporting_workflow.py create mode 100644 tools/standards_metadata/standards_metadata/supporting_content.py create mode 100644 tools/standards_metadata/tests/test_supporting_content.py create mode 100644 tools/standards_policy_impact/standards_policy_impact/provenance.py diff --git a/.agents/skills/standards-engine/SKILL.md b/.agents/skills/standards-engine/SKILL.md index 39bf5b26..893512fe 100644 --- a/.agents/skills/standards-engine/SKILL.md +++ b/.agents/skills/standards-engine/SKILL.md @@ -1,9 +1,13 @@ --- name: standards-engine -description: Navigate, analyze, and author this repository's coding standards through the Standards Engine. Use when an agent needs to route or read standards, inspect related policies, propose or revise a standards change, review or apply a proposal, verify standards, or recover an application; do not use for ordinary source-code edits. +description: Maintain this repository's coding standards through an authoring-purpose Standards Engine connection. Use when an agent needs to route or read standards, inspect related policies, propose or revise a standards change, review or apply a proposal, verify standards, or recover an application; do not use for ordinary source-code edits. --- -# Standards Engine +# Standards Engine Authoring + +This skill is maintenance material for standards authors. Ordinary application +agents use their application-purpose tool catalog and approved guidance, rather +than loading this authoring skill. Use the generated public Interface. The Engine is the sole writer of standards Markdown, metadata, supplementary projections, SQLite state, and local Git @@ -12,7 +16,7 @@ Engine request into direct file, SQL, or Git mutations. ## Use The Agent Tools -Use the `standards-engine` MCP tools. The client supplies each operation's +Use the `standards-authoring` MCP tools (or the host's explicitly configured authoring-purpose registration). The client supplies each operation's current input schema; call the named tool directly with structured arguments. Tool-name prefixes vary by client; operation names match the Engine contract (for example, `route`, `read`, and `propose`). diff --git a/.agents/skills/standards-engine/references/authoring.md b/.agents/skills/standards-engine/references/authoring.md index a0354950..40a9ca01 100644 --- a/.agents/skills/standards-engine/references/authoring.md +++ b/.agents/skills/standards-engine/references/authoring.md @@ -57,12 +57,17 @@ The closed edit variants are: - `put-routing-fact` / `remove-routing-fact` - `audit-policy-unit` - `rewrite-navigation-index` +- `put-provenance` / `retire-provenance` +- `approve-application-content` / `withdraw-application-content` +- `revise-operational-artifact` Use the `propose` tool definition for their current exact fields. In particular: - whole-standard body changes must include companion policy-unit semantic - decisions when registered policy meaning changes; + decisions when registered policy meaning changes; `scope_updates` supplies a + complete registered-scope disposition when a whole-module rewrite changes + headings or explicitly preserves meaning across structural changes; - preserved policy meaning uses the schema's preserve variant, while changed meaning states accepted and proposed semantic revisions plus intent; - relationship changes state their meaning, applicability, evidence owner, @@ -184,3 +189,13 @@ in the evidence record; unregistered text still receives ordinary whole-artifact change analysis. Use `retire-policy-unit` instead only when the normative policy itself is being retired. Maintenance prunes claims against the final candidate's requirements, including claims invalidated by the registration changes. + +## Purpose-separated supporting content + +Use the [implementation operation map](../../../../tools/standards_engine/PURPOSE-SEPARATION.md#authoring-operation-map) +for the code-to-content handoff. Read operational aids to obtain their captured +authoring target. Submit provenance content and an explicit exposure decision +in the same coherent change as applicable; the Engine binds final candidate +content. Provenance-only maintenance retains unchanged normative revisions. +Application eligibility starts empty and becomes active only after reviewed +publication, not after merely creating a draft. diff --git a/.agents/skills/standards-engine/references/environment.md b/.agents/skills/standards-engine/references/environment.md index 3d7ccb8e..7a86198f 100644 --- a/.agents/skills/standards-engine/references/environment.md +++ b/.agents/skills/standards-engine/references/environment.md @@ -1,102 +1,100 @@ # Agent Tool Connection -Use Python 3.11 or 3.12. Prefer an existing isolated environment that was -installed from `tools/standards_contracts/requirements.lock` with hashes -enforced. - -When no such environment exists, create one outside the repository: +Use Python 3.11 or 3.12 and an isolated environment installed from +`tools/standards_contracts/requirements.lock` with hashes enforced. Preserve the +pins and select the environment explicitly: ```bash -python3 -m venv /tmp/coding-standards-engine -/tmp/coding-standards-engine/bin/python -m pip install \ +python3 -m venv /absolute/path/to/engine-environment +/absolute/path/to/engine-environment/bin/python -m pip install \ --require-hashes --only-binary=:all: \ -r tools/standards_contracts/requirements.lock ``` -Use that environment’s Python executable in the MCP server configuration. Dependency installation may require network or package-cache -authorization; request it when required. If the locked environment cannot be -created, report the dependency boundary as unavailable. Do not install into the -repository, relax hashes, choose alternate versions, or implement a fallback -validator. +Dependency installation requires the operator's available package cache or network +and its relevant authorization. An unavailable locked environment leaves that +qualification pending rather than selecting replacement versions. -## MCP Stdio Server +## Purpose-specific MCP registrations -Register a local stdio server named `standards-engine` in the agent client's -MCP settings. Replace the absolute paths below with the installed interpreter -and repository checkout. `PYTHONPATH` selects the code; `--repo-root` selects -the standards repository, independently of the client's working directory. +Choose purpose in host configuration. Application agents receive the application +registration; standards maintainers use a separate authoring registration. Use a +new application session after authoring. The Engine cannot erase prior context. ```json { "mcpServers": { - "standards-engine": { - "command": "/tmp/coding-standards-engine/bin/python", - "args": [ - "-P", "-m", "tools.standards_engine.standards_engine.mcp", - "--repo-root", "/absolute/path/to/Coding-Standards" - ], + "standards": { + "command": "/absolute/path/to/engine-environment/bin/python", + "args": ["-P", "-m", "tools.standards_engine.standards_engine.mcp", "--repo-root", "/absolute/path/to/Coding-Standards", "--purpose", "application"], + "env": {"PYTHONPATH": "/absolute/path/to/Coding-Standards"} + }, + "standards-authoring": { + "command": "/absolute/path/to/engine-environment/bin/python", + "args": ["-P", "-m", "tools.standards_engine.standards_engine.mcp", "--repo-root", "/absolute/path/to/Coding-Standards", "--purpose", "authoring"], "env": {"PYTHONPATH": "/absolute/path/to/Coding-Standards"} } } } ``` -For Codex, the equivalent entry in `config.toml` is: +These are separate intended audiences, not two registrations every agent should +receive. Translate the command, arguments and environment to the client's actual +configuration format. Reconnect after the breaking contract update. Verify the +application catalog contains navigation and the authoring catalog contains the +required maintenance workflow. `--advanced` adds only operations admitted by the +configured purpose. + +The local server remains synchronous MCP stdio with protocol `2025-11-25`; +requests execute serially and immutable Engine handles survive reconnection. +The current implementation is 0.2.0 and Engine interface 31. No network listener, +paid model turn, remote publication or extra server dependency is introduced. +The existing local authoring authorization adapter is owner-operated and +always-allow; explicit user authorization still governs requested changes. + +The canonical checkout, store and private logs belong behind the host boundary. +An application agent with separate filesystem or database access could bypass +Engine-mediated exposure. This release supplies neither OS sandboxing nor a +remote multi-user permission service. + +## Bootstrap and cutover + +New automatic snapshots read accepted local `main`. The code release initially +contains empty application-approval and provenance manifests. Application reads +therefore return a bounded unavailable result until the separate content work +reviews and publishes the required material. Authoring can read the unchanged +standards once the code candidate is integrated into accepted main. -```toml -[mcp_servers.standards-engine] -command = "/absolute/path/to/engine-environment/bin/python" -args = ["-P", "-m", "tools.standards_engine.standards_engine.mcp", "--repo-root", "/absolute/path/to/Coding-Standards"] -env = { PYTHONPATH = "/absolute/path/to/Coding-Standards" } -tool_timeout_sec = 600 +Use a disposable clone with candidate `main` for pre-merge qualification. Preserve +active installed proposals and recovery obligations before cutover. Old Analysis +records/captures outside the new supported contract are explicitly unsupported; +there is no automatic store deletion or conversion. See the complete +[implementation contract and cutover guide](../../../../tools/standards_engine/PURPOSE-SEPARATION.md). + +## Reference CLI + +The same purpose boundary applies to list, schema, example and invocation: + +```bash +PYTHONPATH=. /absolute/path/to/engine-environment/bin/python -P \ + .agents/skills/standards-engine/scripts/invoke.py \ + --purpose application --list + +printf '%s\n' '{"target":"core"}' | \ + PYTHONPATH=. /absolute/path/to/engine-environment/bin/python -P \ + .agents/skills/standards-engine/scripts/invoke.py \ + --purpose application read ``` -Use a persistent isolated environment for an ongoing installation; `/tmp` is -suitable for a temporary trial. The longer call timeout accommodates proposal -verification and application. See [Codex MCP configuration](https://learn.chatgpt.com/docs/extend/mcp?surface=cli). - -Client configuration formats differ; preserve the command, arguments, and -environment when translating these examples. Reconnect the client after -registration or an Engine contract update. Confirm that `route`, `read`, and -`propose` are available before starting a standards workflow. - -The server supports MCP protocol `2025-11-25` over newline-delimited stdio, -with initialization, ping, tool discovery, and tool calls. It needs no additional -Python dependencies. It runs requests serially and opens the durable Engine -facade for each call; snapshots and proposal handles survive reconnection. -Only protocol messages go to stdout; diagnostics go to stderr. No network -listener or remote publication is introduced. - -Tool schemas are derived from the generated Engine contract, with only reachable -definitions included. Domain results are preserved as `structuredContent` and -JSON text for client compatibility. Rejections set `isError`; pending and -recovery-required states remain typed domain results. Transport failures are -errors with unknown domain outcome, never permission to retry a mutation. - -This is the existing owner-operated local always-allow authorization adapter. -Connecting the server exposes the full authoring interface as well as reading; -user authorization for the requested operation still governs agent behavior. -The server does not supply semantic decisions or implicit review approval. - -For debugging without an MCP client, run the existing `scripts/invoke.py` -transport from the repository root with `PYTHONPATH=.`. Its `--list`, `--schema`, -and `--example` options remain available; routine MCP use needs none of them. - -Protocol references: [tools](https://modelcontextprotocol.io/specification/2025-11-25/server/tools), -[stdio transport](https://modelcontextprotocol.io/specification/2025-11-25/basic/transports), -and [lifecycle](https://modelcontextprotocol.io/specification/2025-11-25/basic/lifecycle). - -## Advanced Native Operations - -The default catalog exposes 15 focused tools. Add `--advanced` to the server -arguments and reconnect when native snapshot administration, accepted-snapshot -Analysis, verification preflight, or evidence maintenance is required. That -catalog exposes all supported generated native and focused operations. The -reference CLI also retains all native operations; there is no automatic fallback -from a rejected focused call to a native mutation. - -Workflow contexts reference existing immutable revision, analysis, or readiness -records. Reconnection requires no transport session recovery or context cache. -`workflow-result` preserves the native outcome and provides Engine-derived next -operations. A rejected nested outcome sets MCP `isError`; pending or recovery -outcomes retain their explicit status. +Use `--purpose authoring` only in the authorized maintenance environment. Inspect +returned domain outcomes; CLI exit zero means the structured invocation completed, +not that a pending claim or rejected operation was accepted. Malformed/unsupported +CLI selection exits with a bounded error. + +## Client qualification + +The real stdio/CLI tests use actual processes and SQLite. The optional official +MCP SDK harness requires the SDK in a separate client environment and the locked +Engine Python supplied through `--engine-python`. The optional Codex test uses +`--server standards-authoring` (or the actual configured authoring name) and does +not start a model turn. These checks do not certify the content's editorial quality. diff --git a/.agents/skills/standards-engine/scripts/invoke.py b/.agents/skills/standards-engine/scripts/invoke.py index 24026ca4..f359c85a 100644 --- a/.agents/skills/standards-engine/scripts/invoke.py +++ b/.agents/skills/standards-engine/scripts/invoke.py @@ -19,6 +19,7 @@ def _parser() -> argparse.ArgumentParser: ) parser.add_argument("operation", nargs="?") parser.add_argument("--repo-root", type=Path, default=Path.cwd()) + parser.add_argument("--purpose", choices=("application", "authoring"), required=True) mode = parser.add_mutually_exclusive_group() mode.add_argument("--list", action="store_true", dest="list_operations") mode.add_argument("--example", action="store_true") @@ -112,7 +113,8 @@ def main(argv: list[str] | None = None) -> int: root = arguments.repo_root.resolve() try: contract = _object(root / GENERATED_CONTRACT) - operations = _operations(contract) + from tools.standards_engine.standards_engine.context_projection import qualified_operations + operations = _operations({"operations": qualified_operations(contract, arguments.purpose)}) if arguments.list_operations: print("\n".join(sorted(operations))) return 0 @@ -137,18 +139,16 @@ def main(argv: list[str] | None = None) -> int: "Engine runtime dependencies are unavailable; read " ".agents/skills/standards-engine/references/environment.md" ) from error - with AgentToolFacade.open_repository(root) as facade: + with AgentToolFacade.open_repository(root, purpose=arguments.purpose) as facade: result = getattr(facade, str(operation["id"]))(request) print(json.dumps(result, indent=2, sort_keys=True)) return 0 - except ( - AttributeError, - json.JSONDecodeError, - OSError, - TypeError, - ValueError, - ) as error: - print(f"standards-engine invocation error: {error}", file=sys.stderr) + except Exception as error: + # The CLI is an output boundary. Application callers receive a bounded + # outcome even when loading malformed private authority fails. + message = ("Application invocation is unavailable; use the published interface contract." + if arguments.purpose == "application" else f"standards-engine invocation error: {error}") + print(message, file=sys.stderr) return 2 diff --git a/.github/workflows/purpose-separated-engine.yml b/.github/workflows/purpose-separated-engine.yml index 6f4c06e5..a589c4b7 100644 --- a/.github/workflows/purpose-separated-engine.yml +++ b/.github/workflows/purpose-separated-engine.yml @@ -29,7 +29,7 @@ jobs: git init source git -C source remote add origin "https://github.com/${SOURCE_REPOSITORY}.git" git -C source fetch origin "$CANDIDATE_SHA" - git -C source checkout --detach FETCH_HEAD + git -C source checkout -b main FETCH_HEAD test "$(git -C source rev-parse HEAD)" = "$CANDIDATE_SHA" git -C source bundle create ../source.bundle HEAD - name: Retain exact source for implementation and review @@ -55,6 +55,8 @@ jobs: python="$RUNNER_TEMP/engine-env/bin/python" "$python" -m unittest discover -s tools/standards_metadata/tests "$python" -m unittest discover -s tools/standards_policy_impact/tests + "$python" -m unittest discover -s tools/standards_contracts/tests + "$python" -m unittest discover -s tools/standards_analysis/tests PYTHONPATH=.:tools/standards_verifier "$python" -m unittest discover -s tools/standards_verifier/tests "$python" -m unittest discover -s tools/standards_engine/tests PYTHONPATH=.:tools/standards_verifier "$python" tools/standards_verifier/verify.py --complete diff --git a/docs/guides/positive-guidance-and-provenance.md b/docs/guides/positive-guidance-and-provenance.md new file mode 100644 index 00000000..45248706 --- /dev/null +++ b/docs/guides/positive-guidance-and-provenance.md @@ -0,0 +1,261 @@ +# Authoring Guide: Positive Guidance and Decision Provenance + +**Guide revision:** 1 +**Status:** Proposed content migration; implementation is gated on the code plan's acceptance +**Prepared:** September 23, 2026 +**Repository baseline inspected:** `MrScripty/Coding-Standards@366c1d90a24bbfb50973f62b155a5f3396c0f107` +**Required predecessor:** [Purpose-Separated Standards Engine implementation plan](../plans/purpose-separated-standards-engine/plan.md) +**Audience:** Standards authors and reviewers; authoring-only material +**Normative status:** This guide proposes changes. It is not an already-published replacement for Core, Router, or their owned requirements. + +## 1. Purpose and sequencing + +Use the accepted Engine to turn the standards into concise, affirmative, broadly applicable operational guidance. Keep implementation examples supplementary and retrieve them only when relevant. Preserve the evidence and reasoning behind standards in revision-bound decision provenance available to standards authors and reviewers. + +The sequence is **code capability → code acceptance → Engine-mediated content migration → real-world effectiveness evaluation**. The code plan may use this guide's prospective practices as its user-approved task contract without first editing the published standards. This guide begins execution only after the Engine can perform all required content operations and enforce the agreed purpose boundary. + +There is one standards authority. Application and authoring interfaces provide different views of that authority, not competing versions of the rules. + +The intended improvement is to devote ordinary agent context to correct actions, useful conditions, and positive examples. Whether that improves model behavior is evaluated in downstream work. Content filtering can control what the Engine supplies; it does not establish that a model never considers a behavior, erases prior context, or changes its training memory. + +## 2. Content classes and authoring responsibilities + +| Content | What it owns | Normal use | +| --- | --- | --- | +| Operational standard | Applicable requirements, correct decisions/actions, preserved invariants, meaningful exceptions, and acceptance conditions. | Included when the actual task makes it applicable and its application exposure has been reviewed. | +| Supplementary reference | A correct implementation example or explanatory aid for a selected language, framework, environment, or technical condition. | Optional, specifically retrieved; it adds no normative obligations. | +| Operational prompt or template | A convenient projection of selected workflow requirements and links to their canonical owners. | Included only after its wording and dependencies are reviewed; it is not a second policy authority. | +| Decision provenance | Origin, evidence, assumptions, alternatives, historical failures, trade-offs, uncertainty, and reconsideration conditions. | Available to standards authors/reviewers; excluded from application reading. | + +Exposure and normative role are separate. A normative authoring workflow may be relevant only to standards maintainers. A reference document may still be unsuitable for ordinary use if it contains historical failure narratives. A read-only standards review may need authoring provenance, while a code review in an adopting project generally needs operational standards. + +The operational rule must be sufficient to apply correctly. Essential preconditions, exclusions, severity, authorization, and failure behavior remain available to the applying agent. Historical reasons for selecting them are the material moved to provenance. + +## 3. Prospective generic practices + +These identifiers are guide-local labels for planning and review. Reuse actual canonical policy IDs when editing the corpus; the labels do not create another standards registry. + +### G1 — Generality follows technical conditions, not the motivating project + +Write rules around a general responsibility, invariant, decision, or evidence need. Select applicability from observable conditions such as shared mutation, external contracts, durable state, or user-visible behavior. + +Use a motivating project as evidence for the rule's reasoning. Keep its repository name, vendor choices, incidental dimensions, particular bug, and file layout in authoring provenance or a clearly scoped reference. A requirement should remain meaningful after those details are removed. + +Where the existing rule already covers the situation, improve its wording, routing, or supplementary help rather than creating a duplicate. A conditional language or boundary profile is appropriate only when it owns a real specialization; broad applicability does not require every rule to apply to every project. + +**Editorial test:** Can an unrelated project with the same relevant technical condition apply the requirement without knowing the original incident? + +### G2 — Express the correct decision and preserve its force + +Prefer direct formulations that state the condition, required action, preserved property, and completion criterion. Use concrete verbs and the owning concern's vocabulary. Keep mandatory obligations mandatory and conditional recommendations conditional. + +For example, a generic operational direction can be expressed as: + +> Retain ownership of asynchronous work through its required completion, cleanup, and result publication. + +This is candidate policy language, not a framework recipe. A demonstration of how to satisfy it in a specific runtime belongs in a separate reference. + +Positive language is not a lexical rule. Factual exclusions, protocol-defined negative outcomes, exact external quotations when necessary, and logically essential boundaries may remain. Review meaning rather than counting words such as “not,” “never,” or “unless.” A grammatical rewrite that drops an exception or weakens authorization is a substantive defect. + +Avoid replacing a precise restriction with vague encouragement. Express the allowed decision space clearly enough that the agent can choose a correct action without reconstructing a catalog of rejected approaches. + +### G3 — Separate application knowledge from maintenance reasoning + +Place historical failure narratives, rejected approaches, comparative arguments, and the origin of a standard in its decision provenance. Retain correct examples in separately classified reference material. Keep ordinary rule bodies focused on what an applying agent needs now. + +The graph associates these records with their actual owners. Prerequisite relationships select required guidance; supplementary relationships provide optional help; provenance relationships support authoring review. A descriptive association does not create a reading prerequisite or a normative dependency. + +Application selection includes a complete required closure or identifies the missing qualification. Detailed reads remain purpose-qualified. A positive title does not make an otherwise mixed document ready for application exposure. + +### G4 — Retain one owner across guidance, prompts, templates, and examples + +Each requirement has one canonical owner. Operational prompts and templates route to it and include only the procedure context needed to use it. Supplementary examples demonstrate the owner's contract without adding unsupported requirements. + +When changing a standard, inspect the declared affected consumer relationships and update the material consumers in the same coherent content change. Distinguish an incomplete relationship inventory from proof that no consumer exists. Add a missing semantic relationship explicitly after review; hyperlinks alone are not evidence of semantic ownership. + +Allow reference content to be specific while keeping its relationship to the generic rule clear. A reference must state the conditions and scope of the example and preserve the required lifecycle, failure, and evidence semantics. + +### G5 — Obtain decisive evidence where it can change implementation + +Refine existing planning/verification guidance, rather than introducing a second end-to-end requirement: + +> Resolve an external-interface or environment assumption that could invalidate the design through the smallest adequate real observation before expanding implementation around it. Continue bounded independently useful work when the unavailable observation cannot change that work's decisions. + +Distinguish the observation needed to select a design from the evidence needed to accept the final outcome. Name the owner and executable procedure for a remaining environment-qualified claim. Hardware, credentials, and vendor services are required only when the actual claim depends on them. + +For consumer-visible behavior, identify the real producer and consumer and prove the required result through their relevant interface. A preview can establish preview behavior; complete consumption requires evidence of the complete consumer result. Specific format, size, framework, and tool examples remain in references. + +### G6 — Keep ordinary repairs inside the current decision boundary + +Clarify the existing replanning trigger: + +> Repair failed checks within the current slice while its objective, ownership, contract, risk, and acceptance meaning remain valid. Replan when the evidence changes those decisions or shows that the admitted slice cannot deliver its outcome. + +A failed test is evidence to interpret, not automatically a new design process. A new file inside an already bounded owner does not itself change the objective. When a finding reveals a shared invariant problem, inspect the affected owner and reachable consumers; finish that inspection when the decision-relevant population has concrete dispositions. + +Clarify human–agent task binding separately from machine API arguments. A follow-up may reuse an unambiguous plan selection after current repository state is checked. Machine interfaces retain their explicitly declared argument requirements. This is a substantive policy clarification and must be reviewed as such, rather than described as wording-only cleanup. + +### G7 — Match effort and evidence to the actual decision + +Build on existing Development Proportionality and Verification guidance: + +> Reuse an established mechanism when it satisfies the affected requirements. Reconsider it when evidence identifies a material mismatch in behavior, ownership, safety, compatibility, or cost. + +Investigate a named uncertainty with a named decision and stopping condition. Prefer reversible implementation when it is the least costly adequate way to resolve the uncertainty. Record durable reasoning in proportion to its consequence. + +Clarify evidence under an existing failing baseline: + +> Use evidence that still reaches and distinguishes the changed behavior. When an existing failure prevents that observation, repair the obstruction, supply a focused discriminator, or retain the affected claim as unverified. + +Preserve explicit debt dispositions while distinguishing them from acceptance. Unchanged failure counts, names, or source locations are not substitutes for a test that can observe the affected result. Generalize this rule across runners and languages; concrete test-framework demonstrations belong in references. + +### G8 — Evolve contracts toward the best supported design + +Express compatibility as a consequence of actual consumer and state requirements: + +> Select one supported contract that satisfies the current product and deployment needs. Replace superseded contracts when the new design provides a better implementation or user experience, with explicit cutover and retained-state dispositions. + +For this repository change, the owner has chosen no backward-compatibility maintenance. That is a project-specific compatibility decision recorded in the implementation plan, not a universal rule requiring every adopting project to break its contracts. + +Generic standards should continue to protect actual retained data, recovery obligations, coordinated deployment, and explicit authority. Removing compatibility code and preserving historical bytes are compatible actions. User authorization to replace an API does not authorize unrelated data destruction or rewriting shared history. + +### G9 — Treat provenance and effectiveness as evidence with limits + +Record what supports a rule and how far that support extends. Separate observations, external requirements, experiments, engineering inference, and owner-selected preferences. An owner's preference can establish a selected design objective without proving that objective improves model behavior. + +A new rationale is maintained against the rule revision it actually supports. A factual correction or evidence update can change provenance without changing operational meaning. A material change to a rule or its assumptions receives a corresponding review of the reasoning. + +Use the existing effectiveness work to evaluate the resulting guidance in actual tasks. Internal graph validity and prose-review completion establish their named properties, not downstream effectiveness. + +## 4. Decision-provenance authoring guide + +Write a concise reviewable record rather than reconstructing an imagined historical narrative. Use the Engine's accepted schema and optional fields; the following is a content checklist, not an additional serialization contract. + +| Question | Record when material | +| --- | --- | +| What property or decision does this rule protect? | Intended outcome and the technical conditions that activate it. | +| Why was this direction selected? | The rationale and its decision-relevant evidence. | +| What is the basis of the account? | Documented original reasoning, reconstructed history, current justification, or unrecorded origin. | +| How strong and broad is the support? | Observation/inference/requirement/preference distinctions, assumptions, uncertainty, and scope limits. | +| Which alternatives mattered? | Relevant alternatives and accepted trade-offs, including negative examples where informative. | +| What would change the decision? | Reconsideration conditions or later evidence that could justify refinement, replacement, or retirement. | + +Preserve precise source attribution when evidence exists. For an external source, record its identity, version/date where meaningful, the property it supports, and a bounded retained excerpt or local evidence artifact when necessary. A URL alone is not a preserved observation. Respect confidentiality and content rights when recording supporting material. + +For an older rule with unknown origins, explicitly record the gap. A current review may justify retaining the rule, but label that justification as current rather than claiming it was the original reason. + +Keep rejected examples out of application-visible references. Authors and reviewers may use them to establish preservation of constraints and the adequacy of a rewrite. Ordinary application agents receive the resulting operational rule, not the editing debate. + +Provenance records do not silently define exceptions. If a condition changes how an agent must apply the rule, that condition belongs in operational guidance or its declared applicability. + +## 5. Engine-only migration procedure + +### H0 — Confirm the code-to-content handoff + +Begin after code claims C1–C10 are accepted. Verify the actual installed purpose-specific catalog and supported versions. Use an authoring-configured client for maintenance. Exercise the handoff's tested operation map; this guide does not invent commands that are not yet implemented. + +Required capabilities are complete module/metadata revision, scoped policy revision with stable identities, reference creation/revision, registered prompt/template editing, provenance maintenance, explicit exposure approval/withdrawal, relationship updates, and coherent reviewed publication. Verify a whole-module rewrite preserves or explicitly dispositions existing policy-unit scopes and previously unmapped content. + +A missing necessary content operation returns to the code workstream as a bounded implementation gap. It is not a reason to bypass the Engine and edit canonical files directly. + +### H1 — Inventory one coherent migration boundary + +Read the actual canonical owner, its rule scopes, metadata, dependencies, and current exposure state through the Engine. Traverse the relevant declared consumer and support relationships. Identify materially affected prompts, templates, references, routing facts/descriptions, and existing evidence owners. + +Inventory all text returned by the selected application view, not merely its principal rule paragraphs. This includes tables, headings, applicability wording, notes, examples, footnotes, and local links. Whole-module eligibility requires reviewing the whole returned module; a clean scoped rule does not establish that the rest of its parent is ready. + +Record current meaning and classify the work as wording-only preservation, structural separation with preserved meaning, or substantive policy change. Keep evidence gaps explicit. Stop inventory when the affected owner and reachable consumers have sufficient dispositions for the current change; do not enumerate unrelated projects or the whole repository by default. + +### H2 — Prepare the smallest complete content change + +Use the existing authoring workflow to revise the operational body, extract reasoning into provenance, and create or revise relevant positive references. Include affected registered prompts/templates and real semantic relationships. Preserve stable policy identities; update heading/locator representation through the Engine. Record intended semantic preservation or the explicit substantive revision. + +Review operational rules for preconditions, authorization, lifecycle, failure behavior, exception scope, and acceptance. For meaning-preserving edits, compare those obligations before and after. For substantive edits, state the newly selected behavior and why it is justified. + +The Engine generates repository projections and technical bindings. Authors provide the content and semantic decisions, not file paths, copied digests, or manually edited generated outputs. + +### H3 — Review the exact candidate and its two views + +Obtain an independent material review using the relevant provenance. Confirm generality, directive clarity, sufficient operational meaning, and accurate evidence. Review declaration changes and downstream consumers against the actual graph; a successful graph compile proves structure, not complete discovery or sound policy. + +Then inspect what an application client will receive from the candidate using the accepted Engine's validation/testing path. Check complete dependency availability, positive example selection, prompt/template consistency, and separation of authoring-only material. Keep draft content in the authoring workflow until publication. + +Approve exposure only for the exact reviewed content and its applicable metadata. A record's presence in a proposal is not application publication. If a content change makes earlier exposure stale, reapprove the new exact content or explicitly withdraw that module and disposition affected routes. + +Repair wording or implementation details within the admitted meaning without reopening the entire design. A changed obligation, applicability decision, or exposure contract receives a material re-review. + +### H4 — Publish coherently and verify readback + +Publish through the existing review/apply workflow. Use its returned continuation for interrupted or uncertain publication. Read the accepted result through both authoring and application interfaces and verify the intended content and relationship behavior. + +A consumer path becomes application-ready when every required member is qualified. Optional examples may be omitted until ready. A missing required module remains explicit; partial traversal does not become complete acceptance. + +Preserve the historical rationale and original source revision in authoring provenance without retaining a second active negative formulation as policy. References, prompts, and templates consume their canonical owner rather than restating an alternative authority. + +### H5 — Continue by owner and evaluate effectiveness + +Start with Core, application-relevant Router/fact wording, and the smallest real task's actual prerequisite closure. This creates one usable application path. Continue in owner-coherent groups selected from actual downstream needs; do not require a rewrite of the entire library before proving the first useful path. + +Keep authoring-only workflows and historical reports separate. The complete graph and authoring view can remain richer than any application view. + +Use the two independent downstream pilots already planned in the effectiveness effort. Prefer unrelated task domains or substantially different technical conditions so the result does not merely fit the motivating repository. Use fresh contexts, comparable model/tool/environment settings, and a reviewer who evaluates the actual artifacts. + +Measure accepted behavior, escaped and review-found defects, repair/intervention effort, unnecessary artifacts, and total task cost. Record reading/context size as an explanatory measure, not a quality verdict. Where inexpensive and informative, distinguish positive wording from rationale removal in the comparison. Otherwise describe the measured change as the combined presentation effect. Small pilots provide directional evidence, not a universal cognitive claim. + +## 6. Priority and ownership of the intended edits + +Review the current owners first; merge improvements into them rather than creating parallel policies. + +| Concern | Existing owner to examine | Intended disposition | +| --- | --- | --- | +| Generic direction and positive wording | Core and applicable topic/workflow owners | Preserve obligations; clarify the correct action and move maintenance reasoning. | +| Early real observation and complete consumption | Planning and Verification | Refine timing and decision relevance; reuse existing path/claim guidance. | +| Ordinary repair versus replanning | Planning and Implementation | Make the distinction explicit and update affected prompts/templates coherently. | +| Prior plan selection versus API admission | Planning, Implementation, operational prompts | Separate conversational task binding from explicit machine argument contracts. | +| Existing failing baselines | Verification and Tooling | Clarify whether the evidence still reaches the changed behavior. | +| Conventional mechanisms and proportional effort | Development Proportionality, Tooling, and Core | Replace repeated catalogs of prohibited defaults with conditional reuse and reconsideration rules. | +| Supplementary implementation help | Existing reference owners and selected profiles | Add positively framed examples only when a concrete applicability need exists. | +| Reasoning provenance and purpose selection | Appropriate standards-authoring guidance, Engine content classification, and actual graph declarations | Record genuine reasoning and keep maintenance discovery separate from application prerequisites. | +| Effectiveness | Existing standards-effectiveness effort | Complete pilots and concision review using real outcomes. | + +The inspected publication still has mixed maintenance instructions in `prompts/implement-plan.md`; include that surface when revising its owning workflows. The current implementation supports `revise-standard` and other logical edits, but the code plan adds the missing complete supporting-content and exposure workflow. These are specific migration facts, not generic requirements to place into Core. + +## 7. Meaning-preservation and content acceptance + +A migrated owner is accepted when all applicable claims below are satisfied. Record evidence once in its normal authoring/review records; this checklist is not a new global certification system. + +| Claim | Required evidence | +| --- | --- | +| Generic applicability | An independent reader can apply the rule to an unrelated project with the same material conditions. Project-specific history stays in provenance or references. | +| Operational sufficiency | The rewritten rule preserves or explicitly revises its obligation strength, preconditions, exclusions, authorization, failure/lifecycle semantics, and acceptance condition. | +| Positive direction | The normal reading path predominantly supplies correct actions and useful conditions; a lexical ban is not used as the oracle. | +| Separation | Application readback includes only reviewed operational content and selected references/aids. Authoring can retrieve the associated reasoning. | +| Reasoning accuracy | Sources and inference are distinguished; unrecorded history remains explicit; a rationale-only correction does not invent policy change. | +| Graph fidelity | Dependencies, specialization, descriptive support, and actual impact relationships retain their distinct meanings. Missing coverage is not represented as completeness. | +| Consumer coherence | Related prompts, templates, examples, routing wording, and generated projections agree with their canonical owner. | +| Publication integrity | The accepted view matches the exact reviewed candidate; stale bindings and partial publication follow the Engine's declared outcomes. | + +The runtime structural checkpoint remains useful, but semantic review and downstream behavior remain independent evidence. Tests of the Engine's exposure mechanism do not certify the migrated prose; prose review does not certify all downstream code. + +## 8. Completion and continuing maintenance + +Content migration completion means the selected published scope has operationally sufficient positive guidance, relevant supplementary examples, truthful available provenance, coherent consumer projections, and a complete qualified application reading path. Remaining unreviewed modules are named and excluded from claims of corpus-wide readiness. + +Complete the effectiveness effort separately when its pilot and review claims are satisfied. A mechanically complete migration can still need wording refinement after real use; such refinement follows the same Engine workflow and evidence boundaries. + +For later work, maintain provenance when the reason, supporting evidence, or applicable assumptions materially change. Reuse unchanged reasoning when review confirms it still applies. Keep routine formatting and implementation choices inexpensive. Retire superseded operational text from current authority while preserving useful history in the authoring view. + +**This guide changes standards content only after code acceptance. It does not authorize runtime rewrites, direct canonical-file edits, or claims that the migration has already occurred.** + +## Source and decision basis + +Repository observations use the inspected commit above: + +- `tools/standards_engine/README.md` and `contracts/README.md`: existing typed navigation, logical authoring, snapshots, and publication. +- `tools/standards_engine/standards_engine/logical_authoring.py`: current standard, policy-unit, routing, and relationship edit forms. +- `tools/standards_policy_impact/README.md` and `contracts/policy-impact-authoring-v2.toml`: distinct relationship semantics and declared coverage limits. +- `CORE-STANDARDS.md`, `workflows/planning.md`, `workflows/implementation.md`, `workflows/verification.md`, `workflows/development-proportionality.md`, `workflows/tooling.md`: current owners for the proposed refinements. +- `prompts/implement-plan.md` and `templates/PLAN-TEMPLATE.md`: operational consumers requiring coordinated editorial treatment. +- `docs/plans/standards-library-effectiveness/plan.md`: existing downstream-pilot and final-review work. + +The positive-context objective, authoring-only reasoning boundary, code-before-content sequencing, and this implementation's compatibility choice come from the user's instructions in this conversation. Their behavioral effectiveness remains a proposition for evaluation, not a historical fact established by this guide. diff --git a/docs/plans/purpose-separated-standards-engine/execution-ledger.md b/docs/plans/purpose-separated-standards-engine/execution-ledger.md new file mode 100644 index 00000000..a3b5baf6 --- /dev/null +++ b/docs/plans/purpose-separated-standards-engine/execution-ledger.md @@ -0,0 +1,40 @@ +# Execution Ledger + +## September 23, 2026 — Planning package prepared + +Prepared the code-first implementation plan and separate standards-authoring guide against published baseline `366c1d90a24bbfb50973f62b155a5f3396c0f107`. + +The user selected generic operational guidance, supplementary examples, authoring-only reasoning provenance, purpose-aware use of existing graph/Engine infrastructure, and freedom to replace older contracts without compatibility maintenance. The plan applies those prospective practices as a task-local design contract while preserving published normative content during code implementation. + +Source inspection identified application exposure through full reads and relationship inspection, mixed navigation/authoring catalogs, reference-CLI schema/example paths, and the need to include registered prompts/templates in the later Engine-mediated migration. + +No repository edits, code implementation, package test execution, real-client qualification, or content migration were performed as part of preparing these documents. All implementation acceptance claims remain pending. M0/S0 is the next implementation slice. + +Document preparation checks confirmed the current plan checker's required headings, fields, acceptance-row states, and design-probe labels, plus local Markdown links and archive integrity. These are document checks, not an execution of the repository's Engine or complete verification checkpoint. + + +## September 23, 2026 — Code implementation and supporting verification + +Reused the dedicated branch at `41598c4c` through its exact-history Git bundle. +The bounded source/consumer map was reconciled and implementation proceeded +independently of the unavailable pinned-client and remote Git transport. The +user selected a changed-files ZIP when remote delivery is unavailable. + +Implemented the purpose boundary, qualified content, provenance association, +coherent authoring, replay, contract projections and local transports. All real +normative bodies and declarations remain unchanged; the two infrastructure +manifests start empty. The separate guide has not been executed. + +The [implementation evidence](reports/implementation-evidence.md) records actual +tests, material repairs and remaining acceptance. It includes actual synthetic +Git/SQLite publication and separate-process CLI/MCP observations. Tests on the +available Python 3.13 are supporting observations, not pinned-platform acceptance. + +The whole-module rewrite path required explicit same-revision preservation and +actual next-revision candidate metadata. This is represented by Analysis 7, with +updated fixtures rather than an old-format compatibility branch. Named wire +variants remain owned by the existing contract compiler. + +The next accepted action is installed qualification and independent review. +Local implementation and artifact packaging do not authorize the standards +content migration while those requirements remain pending. diff --git a/docs/plans/purpose-separated-standards-engine/issues.md b/docs/plans/purpose-separated-standards-engine/issues.md new file mode 100644 index 00000000..e5fd8732 --- /dev/null +++ b/docs/plans/purpose-separated-standards-engine/issues.md @@ -0,0 +1,22 @@ +# Issues and Pending Facts + +These are bounded implementation or rollout facts, not claims of newly reproduced production defects. + +| ID | Status | Owner | Fact or risk | Disposition and deciding evidence | +| --- | --- | --- | --- | --- | +| PSE-01 | resolved | Integration owner | The actual implementation checkout may differ from inspected `366c1d9`. | Reused branch 41598c4c; only its existing CI workflow differed from inspected main. | +| PSE-02 | blocked | Verification owner | Locked-environment and real-client execution have not been performed for this plan. | Source and real local stdio/CLI observations passed on Python 3.13; supported locked Python and official SDK/client qualification remain required. | +| PSE-03 | pending | Installation owner | Active proposals, recovery-required work, and retained old-store obligations are unknown. | Establish explicit dispositions before installed cutover; preserve bytes and history; no runtime compatibility fallback. | +| PSE-04 | known boundary | Content owner | Existing standards contain unreviewed mixed prose. Code alone cannot establish positive application content. | Start the real application-exposure manifest empty; migrate content through the separate guide after code acceptance. | +| PSE-05 | pending | Host owner | An application agent may have independent checkout/store/log access. | Confirm the deployment boundary; Engine-mediated guarantees do not imply OS isolation or context erasure. | +| PSE-06 | implemented | Authoring owner | Prompts/templates and whole-module rewrites must be editable through the final Engine contract. | Runtime and tested operation map include scope_updates and registered prompt/template editing; independent C10 review remains pending. | +| PSE-07 | pending | Verification owner | Existing failures could mask a changed claim. | Record where each affected baseline check stops; repair the obstruction, add a discriminator, or keep the claim unverified. | + +No item authorizes unrelated repository cleanup or a normative-content change during code implementation. Block only the dependent action when its required fact is unavailable. + +## Delivery and review + +Remote Git transport is unavailable; the user explicitly selected a ZIP fallback. +Local Git CLI commits and the exact base remain the delivery authority. +Independent material review and actual installation/store cutover are pending; +source tests and synthetic reviews do not claim them. diff --git a/docs/plans/purpose-separated-standards-engine/plan.md b/docs/plans/purpose-separated-standards-engine/plan.md new file mode 100644 index 00000000..7954eee9 --- /dev/null +++ b/docs/plans/purpose-separated-standards-engine/plan.md @@ -0,0 +1,344 @@ +# Implementation Plan: Purpose-Separated Standards Engine and Decision Provenance + +**Plan status:** `Verifying` +**Current phase:** M3 — qualify the implemented candidate in the supported installed environment +**Next slice:** M3/S3 — complete pinned-client qualification and independent integrated review +**Acceptance status:** `blocked` +**Prepared:** September 23, 2026 +**Repository:** `MrScripty/Coding-Standards` +**Inspected baseline:** `366c1d90a24bbfb50973f62b155a5f3396c0f107` +**Execution ledger:** [execution-ledger.md](execution-ledger.md) +**Issues:** [issues.md](issues.md) +**Separate content guide:** [Positive guidance and decision provenance](../../guides/positive-guidance-and-provenance.md) + +This document owns the implementation plan. Executed source observations and remaining qualification are recorded in [implementation evidence](reports/implementation-evidence.md); complete plan acceptance is still pending. The baseline is a research reference, not a requirement to revert a newer checkout. Reconcile material differences at M0. Runtime/code acceptance precedes standards-content migration. + +## Objective + +Extend the existing Standards Engine so a host can provide either an **application** interface for using standards or an **authoring** interface for maintaining them. Application interfaces expose reviewed operational guidance and selectively requested supplementary examples. Authoring interfaces additionally expose the evidence, assumptions, alternatives, and reasoning behind standards. + +Provide a complete Engine-mediated path for the later content work: read existing material, revise guidance and registered prompts/templates, author supplementary references and provenance, update relationships, review exact candidate content, publish coherently, and reopen the result. Preserve one authoritative standards corpus and the existing graph, snapshot, proposal, and publication machinery. + +The code release establishes representation, discovery, output separation, and authoring capabilities. The separate content migration establishes positive wording, generic applicability, appropriate examples, and the quality of the reasoning. Neither deliverable substitutes for the other. + +### Observable completion + +A real local client can read a reviewed synthetic rule and its selected example through an application server, while its authoring-only rationale is absent from every application response. A separately configured authoring client can read and revise that rationale and the associated rule through the real proposal/review/publication path. After process replacement, each supported snapshot resolves the corresponding captured content and the active interface still enforces its purpose. + +## Governing Practice And Bootstrap Authority + +Apply the user-approved future practices below as this task's explicit design and execution contract. They are prospective requirements for this work, not a claim that unpublished standards are already canonical. Their generic formulations and the intended content migration are in guide revision 1, sections G1–G9. + +| Practice | Application in this plan | +| --- | --- | +| Positive operational direction | Tasks specify the required action, invariant, evidence, and stopping condition. Historical failure arguments belong in authoring material. | +| Generic normative guidance | Product-specific names and mechanisms remain in this implementation plan, fixtures, and implementation documentation. Existing normative bodies remain unchanged. | +| One coherent implementation unit | Each milestone delivers a usable path or independently necessary qualification; file count and commit count do not determine slices. | +| Early decisive evidence | Qualify the current client/environment in M0 and the new read–author–publish path in M1 before extending coverage. | +| Proportional investigation | Investigate only facts that can change the current design or safe cutover; implement reversible choices directly. | +| Ordinary repair versus replanning | Repair within the admitted objective and ownership; replan when evidence changes the contract, scope, risk, or composition. | +| Discriminating verification | Derive expected visibility independently of the selector under test; distinguish existing failing checks from evidence that still reaches the changed behavior. | +| Consumer-driven compatibility | Adopt one supported new contract. Remove superseded compatibility machinery when replacement improves the design or user experience. | +| Purpose-separated reasoning | Apply one explicit exposure boundary to discovery, reads, inspection, continuations, and transport presentation. | + +Retain applicable current requirements for authority, security, integrity, concurrency, persistence, generated contracts, and meaningful acceptance. The user's compatibility direction authorizes contract replacement, not deletion of retained user state or rewriting shared Git history. Any other material conflict with current adopted rules receives an explicit task-local disposition before the affected action. A checker that rejects only a prospective planning convention is not itself authority to rewrite published standards during this phase. + +Use the existing Core/Router and the relevant Implementation, Planning, Verification, Development Proportionality, Architecture, Contracts, Security, Library, Generated Contract, IPC, and Persistence guidance. Select Build, Tooling, Documentation, Commit, and detailed contract/replay guidance where the concrete change activates them. Preserve current Python and test conventions; unrelated language and GUI profiles are outside this work. + +## Scope + +### Code deliverable + +Implement trusted purpose selection; typed application projections; explicit application-content eligibility; provenance records and graph associations; coherent supporting-content authoring; snapshot-bound replay; contract generation; purpose-qualified MCP and reference CLI behavior; focused tests; and deployment/cutover documentation. Update affected implementation registrations and generated evidence through their current owners. + +Runtime schemas, empty infrastructure manifests, test fixtures, transport instructions, and implementation documentation are code-support changes. Actual standards wording, rule applicability, precedence, normative relationships, operational prompt/template wording, historical rationales, and example selection are content decisions reserved for the later guide. + +### Deferred concerns + +Positive rewriting of the real corpus and its operational prompts/templates, provenance backfilling, substantive improvements to individual standards, and real-project examples belong to the content migration. A model-based positivity scorer, automatic prose rewriter, new search/indexing platform, remote authorization system, additional database, and replacement graph engine are outside this implementation. A file-based application distribution is a separate adapter only if an actual consumer requires one; the accepted delivery boundary here is the Engine API and its local transports. + +The feature controls content supplied by the Engine. It does not erase material already present in a model conversation, constrain information learned during training, or prevent an agent with independent filesystem/Git/database access from reading that material. + +## Source-Backed Starting Point + +The inspected implementation provides useful foundations: + +- `agent_navigation.navigate()` implements compact reads by removing relationship rows from an otherwise normal read result. Compactness currently changes detail, not audience. [S1] +- `engine.py` reads complete module bytes or scoped policy-unit content; snapshot-child relationship inspection includes rationale. These paths need one consistent purpose boundary. [S2] +- The MCP focused catalog contains both navigation and authoring operations. `tools.py` opens the local authorizer, while `invoke.py` can list schemas/examples and dispatch generated operations. Catalog filtering alone will not cover these entrypoints. [S3, S4] +- `ChangePurpose` already records summary, rationale, and evidence. `revise-standard`, `revise-policy-unit`, routing edits, and relationship edits already exist. Extend these paths rather than implement a second editor. [S5] +- Policy-impact models separate relation semantics from neutral graph topology. Metadata, snapshots, and the contract compiler already supply the corresponding ownership boundaries. [S6, S7] +- The complete structural checkpoint does not execute Python unit tests or establish prose correctness. Acceptance must run the affected implementation tests separately. [S8] + +## Binding Decisions + +### D1 — Host-selected purpose, independent authorization + +Use exactly two initial purposes: `application` and `authoring`. Require the purpose at the public Engine/facade construction boundary and in MCP/reference-CLI launch configuration. Keep it immutable for the lifetime of that interface. A tool request, handle, query parameter, or detail option cannot change it. + +One implementation can serve separately configured registrations. An application process exposes application operations; an authoring process exposes maintenance operations according to existing authorization. Authoring read access is distinct from permission to mutate, review, apply, recover, or administer state. Preserve the authorization injection point and accurately document the existing owner-operated local always-allow adapter; this work does not turn it into a multi-user permissions service. + +The `--advanced` catalog option, if retained, selects additional operations only within the host's purpose and capabilities. Application snapshot capture may create Engine-owned derived state as part of a read, while standards mutation and snapshot administration remain authoring operations. Tool annotations describe behavior; server dispatch and domain checks enforce it. [S3, S10] + +### D2 — One content authority, explicit application eligibility + +Preserve the existing normative role model. `core`, `workflow`, `topic`, `profile`, and `reference` still describe normative meaning and applicability; they do not establish exposure by themselves. + +Add a small application-exposure manifest owned by the standards-content loading/authoring boundary. An application-eligible entry identifies an existing canonical module or registered prompt/template artifact and binds the exact reviewed content, material metadata, and owned application-facing routing inputs. For the first implementation, qualify complete modules, including their headings, tables, examples, footnotes, and links. A policy-unit read inherits its containing module's eligibility. This avoids a new fragment-redaction language and prevents whole-module reads from exposing unreviewed remainder text. + +Support three derived states: `unreviewed`, `current`, and `needs-review`. A current entry is produced only through explicit content-authoring intent and the existing reviewed publication workflow. The Engine computes the binding from the final candidate; the agent supplies the decision, not a guessed digest. Unchanged eligibility is not automatically renewed after a content change. Withdrawal is an explicit content change with an impact disposition. + +Create an empty manifest for the production corpus in the code phase. Existing normative bytes remain unchanged and initially authoring-readable. Application requests requiring unqualified material return a clear incomplete/unavailable result. This is an intentional clean cutover, not a compatibility fallback. The code tests use their own reviewed synthetic corpus. + +Application eligibility is a reviewed editorial classification. Mechanical validation establishes its binding and completeness, not whether the language is genuinely positive or the reasoning is sound. + +### D3 — A small provenance record model + +Add a typed loader and model for decision-provenance records in the existing content-loading ownership boundary. A proposed internal implementation file is `tools/standards_metadata/standards_metadata/supporting_content.py`; confirm its fit in M0 without creating a new package merely for file organization. + +A record has a stable ID, a canonical module or policy-unit subject, a subject-revision binding, rationale, and evidence references. Optional sections hold assumptions, limits, alternatives/trade-offs, reconsideration conditions, and supersession links. Distinguish documented original reasoning, reconstructed history, a current justification, and an explicitly unrecorded origin. Empty optional sections are valid; an unrecorded origin does not require fabricated evidence or justification. + +Reuse the existing evidence-reference representation when its identity and provider semantics match. Preserve these distinctions: + +- change purpose explains a proposed edit; +- relationship rationale explains a graph association; +- decision provenance explains a standard; +- technical provenance identifies source/snapshot material. + +Provenance is authoring-only by content class. Existing reference modules provide supplementary examples, with explicit application eligibility after content review. Registered prompts and templates are operational aids: their policy meaning remains owned by linked standards, and their application exposure requires the same exact-content review. Real rationale, reference text, and prompt/template rewrites remain absent from code-phase infrastructure manifests. + +### D4 — One source for each graph association + +Extend the standards relationship compiler to express a standard's descriptive association with decision provenance. Register provenance as a supplemental artifact, not a normative rule or dependency. Declare its subject association once in the provenance record; derive the corresponding neutral graph edge from that declaration. Preserve existing source-owned declarations for other relationships. A second editable copy of the subject–record link is unnecessary. + +Use existing reference relationships for supplementary references when their semantics fit. Descriptive provenance associations do not acquire `Requires`/`Specializes` meaning or automatic policy-impact propagation. A separate, explicitly declared impact relationship may require review when evidence undermines a rule; it does not automatically rewrite or invalidate the rule's semantics. + +The generic graph engine remains neutral. The standards-aware layer constructs the view permitted for each purpose and filters traversal before producing results. A hidden intermediate node cannot create a visible application traversal path. Keep authoring impact traversal over the complete relevant graph. + +For a requested application route, compute the actual required dependency closure and establish that its required content is eligible before returning a complete reading plan. Preserve unknown applicability. A required authoring-only dependency produces an unresolved application path; it is not silently dropped. Optional example discovery remains selective and is separate from prerequisite closure. + +### D5 — Application DTOs, not field deletion from authoring results + +Add one purpose-aware projection owner, proposed as `standards_engine/context_projection.py`. It constructs explicit application result types from qualified domain values. Authoring projections retain the material needed for maintenance. Existing compact/full detail is subordinate to purpose. + +Application results may contain reviewed policy content, essential applicability, permitted dependency facts, selected examples, bounded technical identity, and permitted next operations. Authoring rationale, source excerpts from private support records, proposal history, audit discussion, and maintenance targets remain in authoring results. + +Route all public paths through this boundary: focused navigation, native query variants, routing facts, reads, relationship traversal, inspection, summaries, and continuations. Apply operation admission before invoking authoring or administrative behavior. A handle identifies material; it never grants additional exposure or mutation authority. + +MCP JSON text, `structuredContent`, tool descriptions, reachable schema definitions, reference-CLI schemas/examples, registered prompt/template reads, rendered output, and client-visible diagnostics must agree. Renderers accept qualified results; they do not perform independent hiding. Host-private logs remain separate from client-visible output. + +No new search API is required. Any later search or exporter must consume the same qualified content boundary. No cache is added; an affected existing cache must include the purpose and material content binding where relevant. + +### D6 — Coherent authoring and publication + +Extend the existing logical edit algebra with the minimum operations for putting/revising and retiring provenance and for approving or withdrawing application exposure. Existing standard and reference revisions remain the normative/reference content-editing mechanism. Add one bounded edit for an existing registered prompt or template, identified through its existing opaque authoring target. It replaces authored title/body content through that artifact owner, retains or explicitly revises declared consumer relationships, and permits no arbitrary repository path or source-code write. Extend qualified reads to these registered artifacts so the later migration can review and verify them through the Engine. Names are finalized in the public contract in M0/M1; operation behavior is binding here. + +Support provenance-only maintenance and coordinated rule/reference/prompt/template/provenance/exposure changes in one `StandardsChangeSet`. An unordered atomic change set resolves against the final candidate, including references to records created in that same set. Conflicting edits and dangling references reject before publication. + +Use existing proposal, analysis, review, apply, and recovery. Review binds the exact material content and actual consumer/impact dispositions. Application exposure becomes active only when the reviewed candidate is published to accepted authority. Draft proposal reads remain authoring operations. + +Standard revision or movement preserves canonical identity where meaning remains the same, with updated locator and binding. Retirement or division records explicit successor and relationship dispositions. Provenance corrections affect their own content and relevant reviews; they do not automatically advance unrelated normative revisions or renew every consumer certificate. + +### D7 — Replay through the existing store + +Capture exposure declarations, provenance, relationship declarations, and required routing material through the existing `ContentSource`/snapshot machinery. Include them in compilation and frozen replay. Derived historical reads use captured records, never the current working tree as a substitute. Reuse the existing SQLite aggregate/proposal store and Git publication protocol. + +A wording change alters its representation binding. A substantive rule change alters its owned semantic revision. A provenance-only edit changes the supporting record and snapshot but does not change unchanged normative meaning. An opaque snapshot ID may change when hidden captured content changes; constant-time behavior and complete side-channel noninterference are outside the promised exposure guarantee. + +Supported new-contract snapshots remain immutable across process replacement, including their captured exposure decisions. Exposure withdrawal governs newly accepted snapshots; historical snapshots preserve their recorded decisions. Retrospective content revocation and erasure of already delivered context are not promised by this feature. Unsupported older stores or handles receive an explicit outcome. Current purpose checks apply even to a valid handle received from an authoring client. + +### D8 — Clean compatibility cutover + +Maintain one supported post-change interface and representation for each changed boundary. Regenerate native models and tool schemas together; update in-repository consumers in the same coherent change. Retire superseded purpose-less entrypoints, mixed catalogs, duplicate serializers, and compatibility branches made unnecessary by this design. Preserve existing mechanisms that remain the best implementation, rather than removing them solely because they predate the feature. + +Allocate versions from the actual changed wire, persisted, and interpretation contracts. Version 30 is the inspected Engine interface, not permission to hard-code the next number without checking the implementation base. Do not couple unrelated version domains. + +Before installed cutover, identify active proposals, readiness records, and recovery-required applications. Complete required old-version recovery before replacement or retain the affected work with an explicit operator disposition. Preserve old store bytes and Git history. A fresh supported store may capture current canonical Git content; automatic deletion, hidden conversion, old-format readers, dual-write paths, compatibility aliases, and fallback execution are outside the design. An unsupported store is not equivalent to an empty store. + +### D9 — Deployment and context boundary + +Run the canonical checkout and Engine store behind the purpose-configured server. Application agents receive only the application registration and approved results. Authoring sessions are separate; a fresh application session receives only reviewed application material after a standards-authoring task. The Engine does not claim to erase an existing conversation. + +Filesystem/host configuration establishes whether an agent can independently read the checkout, store, or private logs. Document that requirement explicitly. Enforcing OS isolation, remote roles, and a file exporter is outside this local Engine implementation. + +## Responsibility And Change Map + +Paths below are bounded implementation areas, not permission for unrelated rewrites. Before each edit, name its exact files in the task or ledger. A newly discovered file inside the same affected owner can be included without a new planning cycle when objective, contract, risk, and acceptance remain unchanged. + +| Owner / existing area | Allowed change | +| --- | --- | +| `tools/standards_contracts/` | Named operation wire variants within the existing compiler, exact root closure, and capability-coverage tests. | +| `tools/standards_engine/contracts/` and generated contract outputs | Purpose-qualified operation/results, logical supporting-content edits, version allocation, authored examples, regenerated native and tool schemas. | +| `tools/standards_engine/standards_engine/` | Trusted construction context; shared application projection; navigation/inspection; coherent authoring; supporting-content capture and bounded diagnostics. Preserve unrelated runtime behavior. | +| `tools/standards_metadata/standards_metadata/` and relevant schema documentation | Structural supporting-content and exposure loading, canonical bindings, exact source capture; no normative judgment or graph policy. | +| `tools/standards_policy_impact/` | Supplemental provenance artifact/relationship interpretation and validation; one association declaration; purpose-relevant relationship classification. | +| `tools/standards_graph/` | Standards-specific graph composition/view integration only if its current owner is the appropriate seam. | +| `tools/standards_analysis/` | Affected change descriptors, localized impact and evidence binding for the new record/edit kinds. | +| `tools/standards_snapshots/` | Only a demonstrated capture/replay or supported-format change; reuse existing persistence otherwise. | +| `.agents/skills/standards-engine/scripts/invoke.py` and connection references | Required host purpose; filtered list/schema/example and dispatch; accurate installation and cutover procedures. | +| Affected package tests and existing Engine client harnesses | Independent exposure fixtures, real publication/replay, unsupported-contract and purpose-escalation cases. | +| `evaluation/standards-effectiveness/` | Empty `application-content.toml`, empty supporting-content registration as needed, actual implementation graph registrations, affected suite definitions and generated input metadata. No authored real-policy exposure approvals. | +| Plan bundle and touched implementation READMEs | Current plan state, concise evidence/dispositions, and durable implementation contract changes. | + +Normative files in Core, Router, `workflows/`, `topics/`, and `profiles/`, real reference content, real `prompts/` and `templates/` content, and substantive policy declarations are preserved during code implementation. Review those bytes once at final acceptance against the bound implementation base; keep this as task evidence rather than a permanent freeze checker. + +## Simplicity And Ownership Review + +**Applicability:** `applicable` + +- Independent concepts and dimensions: Normative meaning belongs to standards authors; content structure to metadata loading; relationships to the standards graph compiler; exposure to Engine projection; permission to host authorization; storage and publication to existing owners. +- State, identity, value, time, policy, and mechanism: Canonical content and immutable snapshots hold values and revision history. Host construction selects purpose. Purpose is neither a content identity nor a permission grant. There is no mutable global current-purpose state. Each changed wire or persistence contract owns its version; unchanged normative semantics remain unchanged. +- Caller and composition-root knowledge: Callers use canonical IDs and existing opaque handles. The host selects purpose and authorization. Clients do not select paths, private record storage, graph encodings, or sanitization steps. +- Representative change paths and forced owners: A new rationale changes one support record and its derived association; a positive rewrite changes the owning standard plus explicit exposure approval; a new transport consumes the qualified facade; an unrelated provenance edit leaves normative semantic revisions intact. +- Stable Interfaces versus hidden knowledge: Content loaders return typed values; projection consumes those values; serializers render qualified results. The generic graph receives neutral contributions and knows no agent-audience policy. +- Independent evolution, testing, failure, and replacement: Prose review, exposure checks, relationship compilation, and transport tests have separate claims. A missing provenance record can be represented honestly; it does not invalidate a rule unless the authored policy makes that evidence necessary. +- Necessary complexity and containment: Trusted purpose, exact reviewed eligibility, supporting-record capture, and localized impact are necessary to the selected exposure and authoring promises. Existing graph, contract, snapshot, authorization, and publication owners contain their mechanics. User-facing catalogs expose only relevant operations. +- Deletion and cumulative machinery result: Removing purpose enforcement or bound eligibility breaks the exposure promise. A second graph, store, workflow lifecycle, semantic prose detector, or duplicate rationale authority would add incidental complexity and is omitted. Retain two purposes, one small supporting-content representation, one exposure manifest, one projection boundary, and minimal existing contract/authoring extensions. + +The exposure tests address a real boundary that current full reads/inspection do not provide. A new general evidence framework is unnecessary. Synthetic content plus existing integration harnesses is the smallest adequate mechanism. Keep only tests that decide a named behavior; use the existing test runner and failure reporting. + +## Milestones + +### M0 — Bind the baseline and qualify the current path + +**Status:** `Accepted`. **Goal:** remove only uncertainties that could invalidate the code-first implementation or safe cutover. + +**Allowed write set:** this plan bundle; temporary disposable fixtures outside the canonical corpus. Repository source remains unchanged. + +**Tasks:** + +1. Inspect repository status and current revision. Map the advertised Engine/facade, MCP focused/advanced, reference CLI list/schema/example/invocation, generated definitions, and existing client tests. Confirm module-wide standard edits, preservation of existing policy-unit scopes during a whole-module rewrite, metadata/graph owners, and the actual supported Python/environment commands. +2. Run the current minimal navigation/authoring/client path and affected package tests in the locked environment. Record existing failures by identity and where execution stops; determine whether they obscure a later acceptance claim. +3. Record the current client/store consumer matrix and pending-operation dispositions. Finalize proposed internal filenames and the next actual contract version. Reuse the existing authorizer and publication machinery. +4. Stop discovery once every listed public output/mutation path has an owner and disposition and the smallest real client path is executable or precisely blocked. Begin M1 for independent work even when a rollout-only fact is unresolved. + +**Acceptance gate:** a bounded entrypoint map, material baseline differences, current environment result, and concrete cutover facts. This gate does not require a separate research framework or a normative standards edit. + +### M1 — Deliver one complete purpose-separated read–author–publish path + +**Status:** `Implemented`; depends on M0's implementation-relevant facts. **Goal:** prove the architecture with working production code over a small synthetic corpus. + +**Allowed write set:** Engine contracts/runtime/tests; supporting-content loader/tests; policy-impact schema/compiler/tests; affected graph composition; reference CLI/MCP construction; empty infrastructure manifests and strictly affected registrations; plan bundle. + +**Tasks:** + +1. Implement host-purpose construction, typed qualified read/related results, strict application eligibility, and provenance loading/association. Extend the canonical contract and regenerate its consumers in the same slice. +2. Implement provenance, registered prompt/template, and exposure logical edits through existing standard/reference editing and proposal/review/apply. Publish a synthetic rule, reference, operational prompt, template, and rationale together in a disposable Git repository; materialize the actual serialized files through the Engine. +3. Exercise an application read and authoring inspection through the real local transport. Demonstrate that full detail, a direct hidden ID, an authoring handle, and a request-supplied purpose cannot disclose rationale or invoke mutation. +4. Confirm the production corpus's empty eligibility state returns a bounded unavailable result while the authoring path can still read the unchanged real standards. Confirm new edits are reachable, not stubs. + +**Acceptance gate:** C1–C4 on the synthetic path plus focused contract/compiler tests. Review the integrated design now; expand only after the real path demonstrates the selected boundaries. + +### M2 — Complete public-surface coverage, coherent changes, and cold replay + +**Status:** `Implemented`; depends on M1. **Goal:** make the guarantee hold across the complete bounded consumer population. + +**Allowed write set:** the affected M1 owners plus Engine analysis, snapshots only if required, rendering, CLI discovery helpers, client harnesses, and their tests/registrations. + +**Tasks:** + +1. Apply the same admission/projection boundary to native query, routing facts and descriptions, whole-module/policy reads, inspection kinds, continuations, schema closures, CLI examples, diagnostics, and both MCP result encodings. Verify hidden intermediate nodes and invalid required closures. +2. Support provenance-only edits, whole-module rewrites with explicit registered-scope dispositions, same-change-set references, moves, retirements, subject-binding changes, exposure withdrawal, and renewed approval of a materially changed module. Preserve localized semantic revisions and impact obligations. +3. Capture and reopen all supporting inputs in cold processes. Exercise concurrent proposal revisions and interruption at existing publication boundaries; reuse the current recovery contract and actual SQLite/Git guarantees. +4. Retire replaced purpose-less paths and update all in-repository consumers. Verify unsupported old requests/handles/stores are explicit and non-destructive. Keep unrelated historical cleanup outside this work. + +**Acceptance gate:** C2–C7 and C9 pass across all inventoried surfaces; a second process reproduces exact supported-snapshot reads. Newly exposed integration assumptions receive bounded resolution rather than expansion into unrelated infrastructure. + +### M3 — Qualify installation, review, and hand off to content authoring + +**Status:** `Verifying`; depends on M2. **Goal:** deliver the code capability required to carry out the separate guide. + +**Allowed write set:** touched runtime/contract files for ordinary repairs; existing real-client harnesses; installation/cutover documentation; implementation evidence and generated registrations; plan bundle. Normative bodies remain preserved. + +**Tasks:** + +1. Run the revised Engine in its locked installed environment through the real supported MCP client and reference CLI. Inspect actual purpose-specific catalogs and execute application navigation and authoring publication/recovery in disposable repositories. Reconnect clients after the contract change. +2. Run affected package suites, generated freshness/shape checks, and the full structural checkpoint separately. Reconcile existing failing checks with the changed claim paths; preserve unresolved acceptance honestly. +3. Obtain independent integrated review against the prospective practice contract, exposure threat boundary, data preservation, and exact material candidate. Repair findings in the same scope; repeat evidence only where affected. +4. Record cutover commands, consumer/store dispositions, supported new versions, and the content-authoring API operation map. Confirm normative bytes are unchanged, fixtures remain test-only, and every required code claim is satisfied before marking this plan `Accepted`. The handoff map must include every guide operation, including module metadata, registered prompts/templates, reference creation, provenance maintenance, exposure approval, and graph changes; it may not substitute direct file edits for a missing content operation. + +**Acceptance gate:** C1–C10. Code acceptance authorizes the content guide's workflow; it does not certify the real corpus as positively written or application-eligible. + +## Objective Acceptance + +Source evidence is recorded in [implementation evidence](reports/implementation-evidence.md). Pending claims retain their stated qualification limits; the overall plan is blocked on the supported installed environment and independent final review. + +| ID | Observable criterion | Kind / environment / mode | Deciding evidence | Status | Evidence | +| --- | --- | --- | --- | --- | --- | +| C1 | Host purpose is immutable and request input cannot elevate it or grant mutation. | contract + system / representative local host / automated | Independently authored operation matrix; actual facade/MCP/CLI calls; verify rejected mutations produce no canonical change. | `pending` | pending | +| C2 | Application reads, relationships, full detail, inspection, summaries, schemas, examples, and continuations contain only permitted material. | contract + system / representative / automated | Distinctive synthetic markers and expected permitted fields authored independently of projection code; inspect JSON, text, catalogs, and nested fields. | `pending` | pending | +| C3 | Required routing closure is complete or explicitly unavailable; hidden support nodes do not alter permitted traversal paths. | integration / not-applicable / automated | Small explicit graph fixtures, required/optional cases, unknown facts, and hidden intermediary cases. | `pending` | pending | +| C4 | The Engine can publish coordinated guidance/reference/prompt/template/provenance/exposure changes and later provenance-only changes. | system / representative Git + SQLite / automated | Public authoring operations, actual candidate materialization, accepted-ref readback, and independent content assertions. | `pending` | pending | +| C5 | Supported snapshots reopen after process replacement with matching content and current-purpose enforcement. | system / required-real local processes + store / automated | Two-process capture/read; later source mutation; real store reopening; exact requested subject/revision checks. | `pending` | pending | +| C6 | Draft exposure cannot become application-visible before reviewed publication; changed content cannot silently retain stale approval. | integration + system / representative / automated | Before/after publication reads; stale bindings; concurrent revisions; withdrawal; interruption/recovery. | `pending` | pending | +| C7 | One new contract is supported across in-repository consumers; old unsupported formats fail without corrupting retained data. | contract + system / representative / automated | Version/consumer matrix, old-format fixtures, unchanged-store checks, actual startup outcomes. | `pending` | pending | +| C8 | The installed local transports execute the complete supported workflow with correct catalogs and bounded diagnostics. | release-artifact + system / required-real locked environment and actual MCP client / automated | Existing real-client harness extended for both purposes; installed entrypoint and CLI execution. No paid model turn required. | `blocked` | [Environment limits](reports/implementation-evidence.md#remaining-acceptance) | +| C9 | Provenance-only changes leave unchanged normative semantics and unrelated impact requirements stable. | integration / not-applicable / automated | Independent before/after domain revisions and local impact expectations; allow changed opaque snapshot identity. | `pending` | pending | +| C10 | The code release preserves real normative bodies and leaves an executable content-migration path. | acceptance review / inspected repository / manual + automated comparison | One-time scoped diff review; API operation map; empty real-corpus eligibility; independent final review. | `pending` | pending | + +A marker-absence test proves only sampled disclosure paths; pair it with positive field assertions, operation admission, and the complete bounded entrypoint inventory. Codepoint text equality is used where exact returned content is the contract. Generated freshness proves derived files are current, not that the prose is correct or the exposure boundary works. + +For a failing baseline, record whether the same test reaches the changed behavior. An unchanged failure identity or count cannot establish that behavior. Repair an obstructing local check, add a focused discriminator, or leave the affected claim pending. Unrelated debt is separately dispositioned. + +### Execution commands + +Use an existing isolated interpreter installed from `tools/standards_contracts/requirements.lock`, following the current environment instructions [S9]. Commands below illustrate the existing verification entrypoints; M0 records the exact supported invocations and M3 updates examples for the new contract. + +```bash +# Run from the repository root; ENGINE_PYTHON names the locked interpreter. +: "${ENGINE_PYTHON:?Set ENGINE_PYTHON to the locked Engine interpreter}" +PYTHONPATH=. "$ENGINE_PYTHON" -m unittest discover -s tools/standards_engine/tests +PYTHONPATH=. "$ENGINE_PYTHON" -m unittest discover -s tools/standards_metadata/tests +PYTHONPATH=. "$ENGINE_PYTHON" -m unittest discover -s tools/standards_policy_impact/tests +PYTHONPATH=.:tools/standards_verifier "$ENGINE_PYTHON" -m unittest discover -s tools/standards_verifier/tests +``` + +Run additional touched-owner suites from their established READMEs. Execute the repository structural checkpoint separately through the Engine. Regenerate contracts with the existing compiler and generated-input mechanism, then check freshness. The new `--purpose` syntax and new edit schemas are proposed work, not commands claimed to exist today. Retain the supported transport protocol unless a separately evidenced interoperability issue requires changing it. + +## Execution Discipline + +The integration owner maintains this plan and serializes shared contracts, manifests, generated files, and publication. Parallel read-only review is useful. Parallel coding is conditional on actual independent write sets; the default sequence here is one integration owner. Create a branch/worktree for the breaking integration when it provides review or rollback isolation, record its purpose and final disposition, and preserve reachable commits. This plan prescribes no commit topology or count. + +## Re-Plan Triggers + +Ordinary implementation/test repair continues within the admitted contract. Replan only when a newly discovered consumer needs a materially different exposure boundary, existing storage cannot support the replay promise, a required content edit cannot be represented coherently, the host-access assumption is false, or an existing recovery obligation changes safe cutover. A broader proposal to replace the graph/store/authentication system requires a separately justified decision. + +A new implementation file, additional focused assertion, or unchanged review record is not by itself a reason to reopen design admission. Investigation ends when the fact that could change the decision has been resolved. Independent work continues while a real environment or rollout claim is pending. + +## Blockers + +The available Python 3.13 environment is outside the supported locked range. Official MCP SDK/installed-client qualification and independent integrated review remain outstanding. User installation and pending-store recovery facts remain operator-owned. Remote Git push is unavailable; the user selected changed-files ZIP delivery. + +## Code-To-Content Handoff + +Hand off the accepted runtime revision, new supported interface versions, purpose-specific connection commands, the tested operation map, and the authoring workflow demonstrated in a disposable repository. Supply only the reviewed design summary and application artifacts to a later application session; keep this implementation plan and its maintenance evidence in authoring context. + +The first content work should migrate Core, the application-relevant Router/fact presentation, and a minimal ordinary task's true prerequisites as one coherent reviewed application path. Other modules remain explicitly unqualified until their content is reviewed. Detailed sequencing is owned by the separate guide. + +## Final Acceptance + +- Acceptance status: `blocked` +- Final status: `Verifying` +- Deferred follow-ups: normative content migration and downstream effectiveness evaluation, owned by the separate guide and existing effectiveness effort. + +## Source baseline + +All repository sources below were inspected at `366c1d90a24bbfb50973f62b155a5f3396c0f107`. They support observations about existing behavior; the design above is proposed work. + +| ID | Source | +| --- | --- | +| S1 | `tools/standards_engine/standards_engine/agent_navigation.py` — focused navigation and compact reads. | +| S2 | `tools/standards_engine/standards_engine/engine.py` — `_read_value`, `_related_value`, `_relationships_from_targets`, `_inspect_snapshot_child`, snapshot compilation/capture. | +| S3 | `tools/standards_engine/standards_engine/mcp.py`, `tools.py` — catalogs, schema presentation, dispatch, local authorization. | +| S4 | `.agents/skills/standards-engine/scripts/invoke.py` — reference CLI invocation, list, schema, and examples. | +| S5 | `tools/standards_engine/standards_engine/logical_authoring.py` — `ChangePurpose`, logical edits, standard/routing/relationship changes. | +| S6 | `tools/standards_policy_impact/standards_policy_impact/model.py`; `contracts/policy-impact-authoring-v2.toml`; package README. | +| S7 | `tools/standards_metadata/README.md`; metadata schema; `tools/standards_engine/contracts/README.md` and canonical interface/schema files. | +| S8 | `tools/standards_verifier/README.md` — structural checkpoint and separate functional tests. | +| S9 | `.agents/skills/standards-engine/references/environment.md` — locked environment, real transport, and deployment assumptions. | +| S10 | Model Context Protocol maintainers, “Tool Annotations as Risk Vocabulary: What Hints Can and Can't Do,” March 16, 2026 — annotations are hints, not enforcement. | +| S12 | `prompts/implement-plan.md` — current operational instructions requiring later positive rewriting and policy-aligned prompt maintenance. | +| S11 | `CORE-STANDARDS.md`, `STANDARDS-ROUTER.md`, `topics/architecture.md`, `templates/PLAN-TEMPLATE.md`, `workflows/{planning,implementation,verification,development-proportionality,tooling}.md`, `profiles/boundaries/persistence.md`. | + +Repository source form: `https://github.com/MrScripty/Coding-Standards/blob/366c1d90a24bbfb50973f62b155a5f3396c0f107/`. +S10: `https://blog.modelcontextprotocol.io/posts/2026-03-16-tool-annotations/`. diff --git a/docs/plans/purpose-separated-standards-engine/reports/implementation-evidence.md b/docs/plans/purpose-separated-standards-engine/reports/implementation-evidence.md new file mode 100644 index 00000000..905341e7 --- /dev/null +++ b/docs/plans/purpose-separated-standards-engine/reports/implementation-evidence.md @@ -0,0 +1,146 @@ +# Purpose-separated Engine implementation evidence + +Status: source implementation delivered for verification; the plan is not +accepted for standards-content migration. + +## Source and execution boundary + +The work starts from the existing branch +`implementation/purpose-separated-standards-engine` at +`41598c4ce3527fe539ae2f30d6f2cd4246faec11`. Its parent/main baseline is +`366c1d90a24bbfb50973f62b155a5f3396c0f107`. The pre-existing branch change is the +read-only Actions qualification workflow. + +A GitHub Actions source bundle reproduced that exact history through Git CLI. +The source ZIP SHA-256 is +`2b61b32e73ee4d7f48ea265c48ec268fa5d31610296a0e16a9ef6ca198e7faf3`. +All implementation commits use Git CLI. Direct remote Git transport is +unavailable in the execution environment; the user authorized a changed-files +ZIP instead. No remote implementation push or PR is claimed. + +The available interpreter is Python 3.13.5, outside the declared supported +3.11/3.12 range. Installed jsonschema 4.26.0, referencing 0.37.0, attrs 26.1.0 +and jsonschema-specifications 2025.9.1 match their locked versions; local +rpds-py 2026.5.1 differs from pinned 2026.6.3. The dependency lock and supported +range remain unchanged. Results below are supporting source observations, not +substitutes for the locked installed-client acceptance claim. + +## Implemented boundary + +The host selects immutable application or authoring purpose. Engine public +operations and facade/transport dispatch enforce purpose before authoring work. +Application wire variants are declared in the canonical contract, and explicit +application result models are built from qualified domain data. The same view +covers native/focused reads, inspection, relationship traversal, routing facts, +continuations, catalogs, schemas, CLI examples and transport encodings. + +Whole-module exposure binds reviewed content, metadata and applicable routing +inputs. Policy scopes inherit the containing module's review. Registered +prompts/templates bind their actual content and declared owner facts. A filtered +graph precedes traversal, including relationships owned by a module's policy +units; hidden intermediary nodes create no application path. + +Provenance records, operational-aid revisions, explicit exposure and supporting +review obligations compose through the existing proposal/analysis/review/local +publication/recovery machinery. The subject association has one declaration; +its graph edge is derived and descriptive. Captures include all new authorities. +New automatic snapshots read accepted main, not an unpublished checkout branch. + +The real standards, reference bodies, prompts/templates and normative relationship +and policy-unit declarations are preserved. Both new real manifests are empty. +No wording migration or real application qualification was performed. + +## Material implementation decisions + +The existing contract compiler now admits named operation variants. This is a +small extension to its existing representation owner, not an additional schema +validator. The compiler's exact public root closure includes those variants and +preserves submission-capability coverage. This adds +`tools/standards_contracts` to the plan's concretely affected owner set. + +Whole-module positive rewrites require explicit preservation across structural +changes. Previously, preservation required the structural digest to remain +identical, and changed semantics were represented as a separate proposed overlay. +The implemented contract instead analyzes explicit same-revision preservation or +next-revision change against the actual candidate's semantic revision. This +keeps candidate text, metadata, supporting bindings and review subject coherent. +It is a deliberate Analysis interpretation change: request 6, result/state and +Analysis handles 7. Engine interface is 31 and implementation version is 0.2.0. +Unchanged generic identity, Snapshot and store contracts keep their versions. + +The generic graph engine, SQLite store and publication lifecycle were retained. +No automatic prose rewriter, model scorer, additional database, context cache, +remote permission system or compatibility adapter was added. + +## Supporting tests + +Executed test records are summarized below. Final packaging reconciles their +results and any focused repairs. Structural checks do not execute the package +tests or certify prose quality. + +| Observation | Result | +| --- | --- | +| Metadata suite, including new support parsing and staleness cases | 31 passed | +| Existing policy-impact suite | 10 passed | +| Contracts suite after variant capability check | 23 run; successful with one existing interpreter-dependent skip | +| Analysis domain suite, including explicit semantic preservation | 100 passed | +| Logical authoring suite | 23 passed | +| Existing low-level authoring suite | 13 passed | +| Engine analysis/publication workflow suite | 14 passed | +| Generated-contract/facade suite after explicit-purpose fixture repair | 15 passed | +| MCP transport unit suite | 12 passed | +| Purpose projection suite | 14 passed | +| Real CLI/stdin-stdout transport and cold SQLite reads | 4 passed | +| Existing focused agent navigation | 11 passed | +| Existing native navigation | 7 passed | +| Renderer suite after purpose/publication distinction | 10 passed | +| Coordinated publication followed by provenance-only publication | 1 passed using real Git, SQLite and the complete publication checkpoint | +| Full structural checkpoint | 73 suites passed; zero failed or blocked | +| Canonical contract projection freshness | Passed | +| Real normative-body and declaration preservation against branch base | Passed | + +The publication test ran in an isolated candidate repository, using actual +review submissions for synthetic content. It published a rule, reference, +registered prompt/template, provenance and exposure; read the application and +authoring views; then published a rationale-only update while preserving the +rule and historical snapshot content. These fixture decisions do not certify +real standards or replace independent implementation review. + +The explicit purpose contract required updating in-repository test callers. +A remaining purpose-less fake Engine in the generated-contract test was found +by the broader run and corrected; the exact case and the complete 15-test suite then passed. Earlier +findings included graph-source attribution, private imports bypassing public +module interfaces, stale contract examples, and MCP error classification. +Those were repaired rather than suppressed or accepted as baseline debt. + +Candidate `03523e09c10a470f77f4d2f82f4365f34a827ab3` supplied the real publication +observation. Candidate `fe6c88e032ed28715c2ed9aa5240aadea2895873` supplied the broader +package and transport observations. Later focused repairs preserve these +subjects where unaffected and are checked at their changed boundary. These are +private test-candidate commits, not user-repository main updates. + +## Remaining acceptance + +The official MCP SDK and configured Codex client are unavailable here. Their +existing harnesses have been updated for explicit purpose and the supporting +workflow, but execution in the supported locked environment remains required. +No independently delegated material review or inspection of the user's installed +store/pending recovery obligations was performed. + +Candidate `a0a425ce93579ff6b0cabb05cc8a6f9b0ffe5f36` passed the corrected +generated-contract suite and the complete structural checkpoint. A final +formatting-only adjustment to seven test callers preserved their parsed ASTs. + +The plan's C8 installed qualification and C10 independent final review therefore +remain outstanding. Required evidence is not replaced with the local interpreter, +a passing structural checkpoint, or the synthetic provenance review decisions. +The content guide remains gated on code acceptance. + +## Handoff + +The runtime operation and version map, empty-corpus bootstrap, replay limits and +safe cutover are documented in +[the Engine implementation contract](../../../../tools/standards_engine/PURPOSE-SEPARATION.md). +The separate [content guide](../../../guides/positive-guidance-and-provenance.md) +remains an authoring-only proposal. Start its work only after the remaining code +acceptance evidence is supplied. diff --git a/evaluation/standards-effectiveness/application-content.toml b/evaluation/standards-effectiveness/application-content.toml new file mode 100644 index 00000000..7437e191 --- /dev/null +++ b/evaluation/standards-effectiveness/application-content.toml @@ -0,0 +1,2 @@ +schema_version = 1 +entries = [] diff --git a/evaluation/standards-effectiveness/decision-provenance.toml b/evaluation/standards-effectiveness/decision-provenance.toml new file mode 100644 index 00000000..c3560413 --- /dev/null +++ b/evaluation/standards-effectiveness/decision-provenance.toml @@ -0,0 +1,2 @@ +schema_version = 1 +records = [] diff --git a/evaluation/standards-effectiveness/generated/suite-inputs.json b/evaluation/standards-effectiveness/generated/suite-inputs.json index 5c83c316..8a49d925 100644 --- a/evaluation/standards-effectiveness/generated/suite-inputs.json +++ b/evaluation/standards-effectiveness/generated/suite-inputs.json @@ -6452,7 +6452,7 @@ ] }, { - "digest": "sha256:4ad320b9bdbf4b8de17d7868707e5c6de9cdabc66a60783ade41a90022d504db", + "digest": "sha256:1b6cf94ec418a4beee4361e3c25989c002ccc2d0c28580554744c0ccbd25ec9c", "path": "tools/standards_analysis/standards_analysis/__init__.py", "state": "present", "uses": [ @@ -6469,7 +6469,7 @@ ] }, { - "digest": "sha256:216527041fd82f83a7763da5a252e8cb24cbe1811d4b150d6aacb26e8403bcb4", + "digest": "sha256:d2c0343eac19c20b3bff310325eb0f0f53dea91eb95cac2f893f7ba20c684220", "path": "tools/standards_analysis/standards_analysis/changes.py", "state": "present", "uses": [ @@ -6544,7 +6544,7 @@ ] }, { - "digest": "sha256:0443d9c348846d9692f873f6570a1775f779986f4e37d22528bb4d8a75d8fff6", + "digest": "sha256:5dd1ca9ce4eae8a75a16539fb6058d603bc72a83d21bd69324dea71deac793c9", "path": "tools/standards_analysis/standards_analysis/kernel.py", "state": "present", "uses": [ @@ -6578,7 +6578,7 @@ ] }, { - "digest": "sha256:38f2690609000f770bbcfb27880a4de75039ea9fc896e3f31ea133f50ca5b070", + "digest": "sha256:22ed505a1fbe674292cc52540816274bd20f3ab6ed595112be4e8e513d39d454", "path": "tools/standards_analysis/standards_analysis/obligations.py", "state": "present", "uses": [ @@ -6629,7 +6629,7 @@ ] }, { - "digest": "sha256:d5365f22abd9ffcb93a0b661bdecedbaa2836967c6d7d6cf3ddb4120ae390081", + "digest": "sha256:36bd4daa08e02a148398521ca82e0f7bc88a66244b9ef620ac6897224baebd0e", "path": "tools/standards_analysis/standards_analysis/state.py", "state": "present", "uses": [ @@ -6755,7 +6755,7 @@ ] }, { - "digest": "sha256:d05cc4ff963722dc4aa589fbbbf109908b668897b10ff684e330e966eed217f8", + "digest": "sha256:b724416df192965dfec750e7c00a9b5182259e03a58063a0ae97b5985c4c5726", "path": "tools/standards_contracts/standards_contracts/__init__.py", "state": "present", "uses": [ @@ -6772,7 +6772,7 @@ ] }, { - "digest": "sha256:b51fa33378de081e2f6b35b82ade4339d85347e77e9020b29bb5cf1fe78d66e2", + "digest": "sha256:22855756db580e2608ef09537b353feb7fdbb814babc578d568fc1d0263ac7c0", "path": "tools/standards_contracts/standards_contracts/compiler.py", "state": "present", "uses": [ @@ -6806,7 +6806,7 @@ ] }, { - "digest": "sha256:e70b1fae9e34964dced70293750b351ce45ed4d55bab71a79c943e99d9cd2e99", + "digest": "sha256:23f65d4a0243c42abb936d20c3f5b78841923553a02dafcde2d381e4251e4ef0", "path": "tools/standards_contracts/standards_contracts/model.py", "state": "present", "uses": [ @@ -6857,7 +6857,7 @@ ] }, { - "digest": "sha256:03e4956e0949038b93d43d9e2578d5b88c182de5307ced3c85e0a17a77509505", + "digest": "sha256:7763b37f539658e5cd5e7455ea7445c03b8b0996fb193640fc4ffe498de6ac94", "path": "tools/standards_engine/README.md", "state": "present", "uses": [ @@ -6869,7 +6869,7 @@ ] }, { - "digest": "sha256:d95547f049586254409db3748b756f2bcb10ae9fe6ce4255c65f7111c47a08e9", + "digest": "sha256:12608318a1e933210500c6108b1b19c288681d0b9422a6ec7856a7e6b94dacc2", "path": "tools/standards_engine/contracts/README.md", "state": "present", "uses": [ @@ -6881,7 +6881,7 @@ ] }, { - "digest": "sha256:54b812e8c6177cc38c630df0e1e51f15704f00b4b15d4fc87dce925f302442a5", + "digest": "sha256:66c17c61cb0f19a987b0142ee333958f8fb1d955774b654fd33e2de580a7c67b", "path": "tools/standards_engine/contracts/a1-contract.schema.json", "state": "present", "uses": [ @@ -6898,7 +6898,7 @@ ] }, { - "digest": "sha256:90f1703e088d48e7cdf3e5aa6c0249bdcbcddb0a5133c19b70749eacdbcab02b", + "digest": "sha256:6adabee9f9a06b1d75e6f39c059d2f39acd070eafdc8fc881b20a9fcd24d6a14", "path": "tools/standards_engine/contracts/a1-interface.toml", "state": "present", "uses": [ @@ -6915,7 +6915,7 @@ ] }, { - "digest": "sha256:760949f3402d8acbfc934b372ff2897c672e234516bf4fe6c25df51c8a3dc081", + "digest": "sha256:afdbab01ff7ef546815d8c6e62822a21d78c6415d56bc7b77c4ae8b64757410f", "path": "tools/standards_engine/contracts/examples/a1-examples.json", "state": "present", "uses": [ @@ -6932,7 +6932,7 @@ ] }, { - "digest": "sha256:78d4cfd18818ce8b3167cad87a2363cbfaf03e11a6bcb8a0da8e46382a67f149", + "digest": "sha256:66ba0b7b55516b564a88f41d8f4aabaa49f4a245b9c18799cc7e3255d5e3da96", "path": "tools/standards_engine/contracts/generated/agent-tools.json", "state": "present", "uses": [ @@ -6949,7 +6949,7 @@ ] }, { - "digest": "sha256:9ed652b66c521748d9ea78c8fa6cff022c1884b39a01e8cf10f0f8c0e3d1a575", + "digest": "sha256:83adcd9383a1f6756653dd944cb83fe87fc41da74c8906fbb55da632c03d1f4f", "path": "tools/standards_engine/contracts/identity-fixtures.json", "state": "present", "uses": [ @@ -6961,7 +6961,7 @@ ] }, { - "digest": "sha256:42cccc290860cc436132f32d49a83cee6e90177a3e9dcd4ae0c5b898894e33be", + "digest": "sha256:697bd43954c31ef84ec176d42c7c750c46e73a7693076ed07f928a36947f8849", "path": "tools/standards_engine/pyproject.toml", "state": "present", "uses": [ @@ -6978,7 +6978,7 @@ ] }, { - "digest": "sha256:b19af050cf52088c8a540ae804179fdeb4dbff83db1026d0f7e3880551714421", + "digest": "sha256:ab5b76388b636589d0511af6041d5e7bf752fb33fba4ece0f1e2c51d23f74fc4", "path": "tools/standards_engine/standards_engine/__init__.py", "state": "present", "uses": [ @@ -6995,7 +6995,7 @@ ] }, { - "digest": "sha256:a2d56d2161e385a6948a19a373f3234ccb6638dadee1e3f244003f5059656e44", + "digest": "sha256:b4ae2a77dcadb32092fb8eccad07ae6565412d14f2784af6b0ad454bf2677505", "path": "tools/standards_engine/standards_engine/_generated_contract.py", "state": "present", "uses": [ @@ -7053,7 +7053,19 @@ ] }, { - "digest": "sha256:bd9d4c164d3e7762b7658e51789a03df871ed6d7e21e9bfe41732f0642d0f303", + "digest": "sha256:cda2c10e0de915eb09440847e45c22dada2d5092091c55b3a8700a6bfd79d8de", + "path": "tools/standards_engine/standards_engine/context_projection.py", + "state": "present", + "uses": [ + { + "check": "python-package-contract", + "role": "package-contract-input", + "suite": "a1c-public-cutover" + } + ] + }, + { + "digest": "sha256:1c163e2cd93a4354d5ad229ad727b3028d6e00c050a4554c640601e8b1742fbf", "path": "tools/standards_engine/standards_engine/engine.py", "state": "present", "uses": [ @@ -7087,7 +7099,7 @@ ] }, { - "digest": "sha256:4e16ca5d35879bf0ef7576d8c6005b17bab38114e88b27e497ff97d71dadfc75", + "digest": "sha256:2f2159e438f8eeee9881cc9b3f992ae141013340b11d50ac9be887ab9587fd41", "path": "tools/standards_engine/standards_engine/logical_authoring.py", "state": "present", "uses": [ @@ -7099,7 +7111,7 @@ ] }, { - "digest": "sha256:4319e499e0e5ff976cf12a08d8a10600f6a9997a7b4b0829a913817a83ca3f17", + "digest": "sha256:abe942b581905efd080fc8dff845dc92e1f6c27a0e6b5dfc747b02d6544a4881", "path": "tools/standards_engine/standards_engine/mcp.py", "state": "present", "uses": [ @@ -7123,7 +7135,7 @@ ] }, { - "digest": "sha256:3184c31d4e095543cde6028d4e22da9084de3df2efb7e6f2ce9be69caf18b489", + "digest": "sha256:9e7f316e15d9af14228558dc7ed2bb48ab28605204c7d4c22ce9857671546fd4", "path": "tools/standards_engine/standards_engine/rendering.py", "state": "present", "uses": [ @@ -7140,7 +7152,31 @@ ] }, { - "digest": "sha256:f339e366dc49d6e726345d5203497af9d8a99251094774aa05288ac76a6c4e47", + "digest": "sha256:79c8f4d259cb3d0eb2cc214862ece7a28cd2788a0fb8cb63039c3f4a1a5f71d6", + "path": "tools/standards_engine/standards_engine/supporting.py", + "state": "present", + "uses": [ + { + "check": "python-package-contract", + "role": "package-contract-input", + "suite": "a1c-public-cutover" + } + ] + }, + { + "digest": "sha256:0ce567e1aa21330df77e2428babe069723aff840a771724f33bfcc7802f28c44", + "path": "tools/standards_engine/standards_engine/supporting_authoring.py", + "state": "present", + "uses": [ + { + "check": "python-package-contract", + "role": "package-contract-input", + "suite": "a1c-public-cutover" + } + ] + }, + { + "digest": "sha256:dc4e3add4b93dfb2de4c32aca3c838793cdb18eb49d0a953082cae1dcae57c0c", "path": "tools/standards_engine/standards_engine/tools.py", "state": "present", "uses": [ @@ -7157,7 +7193,7 @@ ] }, { - "digest": "sha256:10980fd31d5d76446b67d4324ecc3c1780f9242cd9da11b5b28c9c55d6a17d43", + "digest": "sha256:cf24d14bd144c1a34c18a2b0edbfd2335f813c464d2d4c8e1bd269706236812f", "path": "tools/standards_engine/tests/test_analysis.py", "state": "present", "uses": [ @@ -7169,7 +7205,7 @@ ] }, { - "digest": "sha256:3883949cafd6bdf374b41dbd06891766f4baef6d9de41152af06108e39f02fd4", + "digest": "sha256:b86ec551134d8760de50c59666b10d91b4a9e03311e4b85bb14614c279780f3e", "path": "tools/standards_engine/tests/test_coverage_publication.py", "state": "present", "uses": [ @@ -7181,7 +7217,7 @@ ] }, { - "digest": "sha256:b87e2bd093b0343cbb27d7ac3b813f51ee42e46d61f2b681c7364f3d7035b315", + "digest": "sha256:09464a63f418e196c4e50bf86d83c85139f9f6035becbc22cf2bf44c02917d72", "path": "tools/standards_engine/tests/test_evidence_maintenance.py", "state": "present", "uses": [ @@ -7251,7 +7287,7 @@ ] }, { - "digest": "sha256:f1390d398b08d9b838d4458d79c21dd20f0d30a8f8740caea3d9c22426adbb8f", + "digest": "sha256:89a711ce6e71e5508d5bd2e2f79fc3e2c9189ff90fbaca81a0134cd80f25f0b5", "path": "tools/standards_graph/standards_graph/repository.py", "state": "present", "uses": [ @@ -7365,7 +7401,7 @@ ] }, { - "digest": "sha256:ddce2e808ef7df0892662e8bcaf209abff940d2a5c74abf9916902a97211e319", + "digest": "sha256:c15dd073190a0d427a5d1e8879bd46112fe96343b38de1f7c20a823cbbb305bd", "path": "tools/standards_metadata/standards_metadata/__init__.py", "state": "present", "uses": [ @@ -7502,6 +7538,18 @@ } ] }, + { + "digest": "sha256:e3675974a343e699e30b561a0eb394982920f4805c7d9499993f0245313c2f89", + "path": "tools/standards_metadata/standards_metadata/supporting_content.py", + "state": "present", + "uses": [ + { + "check": "python-package-contract", + "role": "package-contract-input", + "suite": "a1c-public-cutover" + } + ] + }, { "digest": "sha256:9f0c7bdb2212a46fff2318d235563d65421318eea1703e587bb000e125fc4091", "path": "tools/standards_policy_impact/contracts/policy-impact-authoring-v2.toml", @@ -7532,7 +7580,7 @@ ] }, { - "digest": "sha256:072d3e1265c1f3c3f8d8d127aacd2dedb03ab740c7f37e3dd7d0ccb278a42f14", + "digest": "sha256:ee4954dcfa56c051a85ad712dce52d85230cc5bdf4ff5882cf3beff1ee19af20", "path": "tools/standards_policy_impact/standards_policy_impact/__init__.py", "state": "present", "uses": [ @@ -7589,6 +7637,18 @@ } ] }, + { + "digest": "sha256:55d4198beaf10ef36c2e86970e54f7bfc4960117db75b0710a27470f386e185b", + "path": "tools/standards_policy_impact/standards_policy_impact/provenance.py", + "state": "present", + "uses": [ + { + "check": "python-package-contract", + "role": "package-contract-input", + "suite": "a1c-public-cutover" + } + ] + }, { "digest": "sha256:6917ac810081795b9b03d8bf711cdcb5d31f757aef8da858adc32952acf0e39d", "path": "tools/standards_snapshots/README.md", @@ -13194,7 +13254,7 @@ "path": "evaluation/standards-effectiveness/suite-registry.toml" }, "repository_index": { - "digest": "sha256:ba73661c32ce9b09410d9dae786389361e8670386dc2f8c4f7a69decc715ca6f", + "digest": "sha256:81accaad31b34d4cc0f8e6805bd8a92edb63f5957edc30a5ae5a94f67e15a974", "uses": [ { "check": "python-package-contract", diff --git a/tools/standards_analysis/standards_analysis/__init__.py b/tools/standards_analysis/standards_analysis/__init__.py index 5b2174f0..1ba9d241 100644 --- a/tools/standards_analysis/standards_analysis/__init__.py +++ b/tools/standards_analysis/standards_analysis/__init__.py @@ -54,6 +54,8 @@ DecisionFingerprint, Obligation, NavigationIndexAuthority, + SupportingContentAuthority, + generate_supporting_content_obligations, generate_navigation_index_obligations, generate_consumer_review_obligations, generate_unmapped_normative_obligations, @@ -168,6 +170,8 @@ "ImmutableProviderInput", "Obligation", "NavigationIndexAuthority", + "SupportingContentAuthority", + "generate_supporting_content_obligations", "generate_navigation_index_obligations", "ProviderInputRole", "ProviderNoObservation", diff --git a/tools/standards_analysis/standards_analysis/changes.py b/tools/standards_analysis/standards_analysis/changes.py index 2d673765..b1ba0f9b 100644 --- a/tools/standards_analysis/standards_analysis/changes.py +++ b/tools/standards_analysis/standards_analysis/changes.py @@ -19,6 +19,7 @@ class ChangeKind(str, Enum): NAVIGATION_INDEX = "navigation-index" + SUPPORTING_CONTENT = "supporting-content" MODULE = "module" MODIFICATION = "modification" ADDITION = "addition" @@ -258,6 +259,7 @@ def classify_changes( accepted_module_ids: Iterable[str] = (), proposed_module_ids: Iterable[str] = (), changed_navigation_ids: Iterable[str] = (), + changed_supporting_ids: Iterable[str] = (), ) -> tuple[ClassifiedChange, ...]: selected = tuple(descriptors) proposals = tuple(semantic_proposals) @@ -286,6 +288,7 @@ def classify_changes( accepted_modules = set(accepted_module_ids) proposed_modules = set(proposed_module_ids) navigation_ids = set(changed_navigation_ids) + supporting_ids = set(changed_supporting_ids) results: list[ClassifiedChange] = [] for descriptor in selected: identities = set((*descriptor.accepted_ids, *descriptor.proposed_ids)) @@ -322,6 +325,7 @@ def classify_changes( accepted_modules, proposed_modules, navigation_ids, + supporting_ids, ) ) @@ -344,7 +348,15 @@ def _classify_change( accepted_modules: set[str], proposed_modules: set[str], navigation_ids: set[str], + supporting_ids: set[str], ) -> ClassifiedChange: + if descriptor.kind is ChangeKind.SUPPORTING_CONTENT: + if (len(descriptor.accepted_ids) != 1 or descriptor.accepted_ids != descriptor.proposed_ids + or descriptor.accepted_module is not None or descriptor.proposed_module is not None + or descriptor.scope.kind != "whole-artifact" + or descriptor.accepted_ids[0] not in supporting_ids): + raise _shape_error(ChangeKind.SUPPORTING_CONTENT) + return ClassifiedChange(descriptor, (), GraphSeedSelection((), (), (), ())) if descriptor.kind is ChangeKind.NAVIGATION_INDEX: if ( len(descriptor.accepted_ids) != 1 @@ -456,18 +468,20 @@ def _modification( "identity, locator, ownership, or lifecycle changes are not modifications", observed=policy_id, ) - if before.semantic_revision != after.semantic_revision: + if before.semantic_revision != after.semantic_revision and policy_id not in proposals: raise _error( "CHANGE.ACCEPTED_REVISION_MUTATED", - "a proposed snapshot must retain the accepted semantic revision", + "a changed semantic revision requires an exact explicit proposal", observed=policy_id, ) semantic = proposals.get(policy_id) if semantic is not None: _semantic_overlay(semantic, before.semantic_revision, after) - classification = ChangeClassification.SEMANTICALLY_CHANGED - semantic_state = SemanticState.PROPOSED + preserved = semantic.proposed_semantic_revision == before.semantic_revision + classification = (ChangeClassification.REPRESENTATION_ONLY_CANDIDATE if preserved + else ChangeClassification.SEMANTICALLY_CHANGED) + semantic_state = SemanticState.ACCEPTED_UNCHANGED if preserved else SemanticState.PROPOSED proposed_revision = semantic.proposed_semantic_revision elif before.representation_digest == after.representation_digest: classification = ChangeClassification.UNCHANGED @@ -660,10 +674,10 @@ def _move( "a move cannot alter identity aliases or predecessor/successor lifecycle", observed=policy_id, ) - if before.semantic_revision != after.semantic_revision: + if before.semantic_revision != after.semantic_revision and policy_id not in proposals: raise _error( "CHANGE.ACCEPTED_REVISION_MUTATED", - "a proposed move must retain the accepted semantic revision", + "a moved semantic revision requires an exact explicit proposal", observed=policy_id, ) classification, state, proposed_revision = _classify_existing( @@ -888,15 +902,16 @@ def _semantic_overlay( accepted_revision: int | None, proposed: PolicyUnit, ) -> None: - expected = 1 if accepted_revision is None else accepted_revision + 1 + supported = {1} if accepted_revision is None else {accepted_revision, accepted_revision + 1} if ( proposal.accepted_semantic_revision != accepted_revision - or proposal.proposed_semantic_revision != expected + or proposal.proposed_semantic_revision not in supported + or proposal.proposed_semantic_revision != proposed.semantic_revision or proposal.structural_digest != proposed.structural_digest ): raise _error( "CHANGE.SEMANTIC_PROPOSAL_MISMATCH", - "semantic proposal must bind exact accepted revision, next revision, and proposed structure", + "semantic proposal must bind the accepted revision, preservation or next revision, and exact proposed structure", observed=proposal.policy, ) @@ -908,9 +923,10 @@ def _classify_existing( ) -> tuple[ChangeClassification, SemanticState, int | None]: if semantic is not None: _semantic_overlay(semantic, accepted.semantic_revision, proposed) + preserved = semantic.proposed_semantic_revision == accepted.semantic_revision return ( - ChangeClassification.SEMANTICALLY_CHANGED, - SemanticState.PROPOSED, + ChangeClassification.REPRESENTATION_ONLY_CANDIDATE if preserved else ChangeClassification.SEMANTICALLY_CHANGED, + SemanticState.ACCEPTED_UNCHANGED if preserved else SemanticState.PROPOSED, semantic.proposed_semantic_revision, ) if accepted.representation_digest == proposed.representation_digest: diff --git a/tools/standards_analysis/standards_analysis/kernel.py b/tools/standards_analysis/standards_analysis/kernel.py index 2ecc9f8f..fff10517 100644 --- a/tools/standards_analysis/standards_analysis/kernel.py +++ b/tools/standards_analysis/standards_analysis/kernel.py @@ -42,6 +42,8 @@ DecisionFingerprint, Obligation, NavigationIndexAuthority, + SupportingContentAuthority, + generate_supporting_content_obligations, generate_navigation_index_obligations, generate_consumer_review_obligations, generate_unmapped_normative_obligations, @@ -70,6 +72,7 @@ class AnalysisMaterial: policy_impact: CompiledPolicyImpactSet coverage: CoverageDefinitionIndex navigation_indexes: tuple[NavigationIndexAuthority, ...] = () + supporting_content: tuple[SupportingContentAuthority, ...] = () @dataclass(frozen=True, slots=True) @@ -157,6 +160,8 @@ def evaluate_analysis( navigation_obligations = generate_navigation_index_obligations( accepted.navigation_indexes, proposed.navigation_indexes ) + supporting_obligations = generate_supporting_content_obligations( + accepted.supporting_content, proposed.supporting_content) changes = classify_changes( accepted.corpus.policy_unit_corpus, proposed.corpus.policy_unit_corpus, @@ -165,6 +170,7 @@ def evaluate_analysis( accepted_module_ids=(item.module_id for item in accepted.corpus.modules), proposed_module_ids=(item.module_id for item in proposed.corpus.modules), changed_navigation_ids=(item.target for item in navigation_obligations), + changed_supporting_ids=(item.target for item in supporting_obligations), ) context = { "subjects": sorted( @@ -241,6 +247,7 @@ def evaluate_analysis( for item in ( *generate_consumer_review_obligations(selections), *navigation_obligations, + *supporting_obligations, *_coverage_obligations(changes, coverage, accepted, proposed), *generate_unmapped_normative_obligations( accepted.root, @@ -363,7 +370,7 @@ def _coverage( results: dict[str, CoverageProjection] = {} consumed: set[str] = set() for change in changes: - if change.descriptor.kind is ChangeKind.NAVIGATION_INDEX: + if change.descriptor.kind in {ChangeKind.NAVIGATION_INDEX, ChangeKind.SUPPORTING_CONTENT}: continue material = proposed if change.descriptor.proposed_ids else accepted subjects = change.descriptor.proposed_ids or change.descriptor.accepted_ids diff --git a/tools/standards_analysis/standards_analysis/obligations.py b/tools/standards_analysis/standards_analysis/obligations.py index 334062c8..2da639a1 100644 --- a/tools/standards_analysis/standards_analysis/obligations.py +++ b/tools/standards_analysis/standards_analysis/obligations.py @@ -200,6 +200,22 @@ def generate_navigation_index_obligations( accepted: Iterable[NavigationIndexAuthority], proposed: Iterable[NavigationIndexAuthority], ) -> tuple[Obligation, ...]: + return _material_obligations(accepted, proposed, "navigation-index-change") + + +@dataclass(frozen=True, slots=True) +class SupportingContentAuthority: + """One support record and the actual subject/consumer material reviewed with it.""" + id: str + representation_digest: str + review_digest: str + + +def generate_supporting_content_obligations(accepted, proposed) -> tuple[Obligation, ...]: + return _material_obligations(accepted, proposed, "supporting-content-change") + + +def _material_obligations(accepted, proposed, kind: str) -> tuple[Obligation, ...]: before = {item.id: item for item in accepted} after = {item.id: item for item in proposed} obligations = [] @@ -219,11 +235,11 @@ def generate_navigation_index_obligations( if item is not None ) fingerprint = DecisionFingerprint( - "navigation-index-change", - "decision-contract.navigation-index-change.v1", + kind, + f"decision-contract.{kind}.v1", dependencies, ) - reason = {"kind": "navigation-index-change", "source": identity} + reason = {"kind": kind, "source": identity} identifying = { "target": identity, "scope": {"kind": "whole-artifact"}, diff --git a/tools/standards_analysis/standards_analysis/state.py b/tools/standards_analysis/standards_analysis/state.py index 54e4e453..592229e4 100644 --- a/tools/standards_analysis/standards_analysis/state.py +++ b/tools/standards_analysis/standards_analysis/state.py @@ -16,8 +16,8 @@ from .keys import analysis_identity, analysis_key, analysis_key_bytes, raw_digest -ANALYSIS_CONTRACT_VERSION = 6 -ANALYSIS_IDENTITY_DOMAIN = "coding-standards:analysis:v6" +ANALYSIS_CONTRACT_VERSION = 7 +ANALYSIS_IDENTITY_DOMAIN = "coding-standards:analysis:v7" ANALYSIS_AGGREGATE_KIND = "analysis-state" ANALYSIS_STATE_FIELDS = { "base_snapshot", @@ -457,7 +457,7 @@ def analysis_handle(analysis_id: str) -> dict[str, object]: return { "kind": "analysis-handle", "id": analysis_id, - "schema_version": 6, + "schema_version": 7, } @@ -471,7 +471,7 @@ def child_handle( "analysis": analysis_handle(analysis_id), "child_kind": child_kind, "child_id": child_id, - "schema_version": 6, + "schema_version": 7, } diff --git a/tools/standards_analysis/tests/test_changes.py b/tools/standards_analysis/tests/test_changes.py index 343564b0..ebc5679b 100644 --- a/tools/standards_analysis/tests/test_changes.py +++ b/tools/standards_analysis/tests/test_changes.py @@ -86,6 +86,21 @@ def descriptor( class ChangeClassificationTest(unittest.TestCase): + def test_explicit_preservation_binds_new_structure_without_advancing_meaning(self): + before = unit() + after = unit(representation=DIGEST_C, structural=DIGEST_C) + change = descriptor(ChangeKind.MODIFICATION, (before.id,), (before.id,)) + preservation = SemanticProposal(before.id, 3, 3, + "The reviewed wording preserves the obligation.", DIGEST_C) + result = classify_changes(corpus(before), corpus(after), (change,), (preservation,))[0] + selected = result.changed_units[0] + self.assertEqual(selected.classification, ChangeClassification.REPRESENTATION_ONLY_CANDIDATE) + self.assertEqual(selected.semantic_state, SemanticState.ACCEPTED_UNCHANGED) + self.assertEqual(selected.proposed_semantic_revision, 3) + with self.assertRaises(AnalysisError): + classify_changes(corpus(before), corpus(after), (change,), + (SemanticProposal(before.id, 3, 3, "Preserve", DIGEST_B),)) + def test_derives_modification_move_addition_and_removal(self) -> None: modified = unit("workflow.test.modified") moved = unit("workflow.test.moved", heading=("Before",)) @@ -258,7 +273,7 @@ def test_derives_split_and_merge_from_lifecycle_links(self) -> None: def test_semantic_modification_binds_overlay_and_exact_graph_groups(self) -> None: before = unit() - after = unit(representation=DIGEST_B, structural=DIGEST_C) + after = unit(representation=DIGEST_B, structural=DIGEST_C, revision=4) result = classify_changes( corpus(before), corpus(after), diff --git a/tools/standards_analysis/tests/test_impact.py b/tools/standards_analysis/tests/test_impact.py index eedc1372..99816fef 100644 --- a/tools/standards_analysis/tests/test_impact.py +++ b/tools/standards_analysis/tests/test_impact.py @@ -660,6 +660,7 @@ def test_modification_unions_accepted_and_proposed_edges_with_both_traces(self) after = policy_unit( representation="sha256:" + "c" * 64, structural="sha256:" + "d" * 64, + revision=4, ) change = classify_changes( corpus(before), diff --git a/tools/standards_analysis/tests/test_obligations.py b/tools/standards_analysis/tests/test_obligations.py index babe606a..e682ee51 100644 --- a/tools/standards_analysis/tests/test_obligations.py +++ b/tools/standards_analysis/tests/test_obligations.py @@ -26,7 +26,7 @@ def setUp(self) -> None: self.accepted = self.root / "accepted" self.proposed = self.root / "proposed" self.write_fixture(self.accepted, intro="Stable intro.", policy="Policy text.") - self.write_fixture(self.proposed, intro="Stable intro.", policy="Changed policy text.") + self.write_fixture(self.proposed, intro="Stable intro.", policy="Changed policy text.", revision=2) def tearDown(self) -> None: self.temporary.cleanup() @@ -36,7 +36,7 @@ def write(self, root: Path, path: str, content: str) -> None: target.parent.mkdir(parents=True, exist_ok=True) target.write_text(textwrap.dedent(content).lstrip(), encoding="utf-8") - def write_fixture(self, root: Path, *, intro: str, policy: str) -> None: + def write_fixture(self, root: Path, *, intro: str, policy: str, revision: int = 1) -> None: self.write( root, "module.md", @@ -75,14 +75,14 @@ def write_fixture(self, root: Path, *, intro: str, policy: str) -> None: self.write( root, "units/module.toml", - """ + f""" schema_version = 1 [[policy_unit]] id = "workflow.test.policy" module = "workflow.test" heading_path = ["Policy"] - semantic_revision = 1 + semantic_revision = {revision} """, ) @@ -151,6 +151,7 @@ def test_unmapped_document_change_creates_mandatory_whole_artifact_obligation(se self.proposed, intro="Changed unmapped normative text.", policy="Changed policy text.", + revision=2, ) accepted, proposed = self.corpora() obligations = generate_unmapped_normative_obligations( diff --git a/tools/standards_analysis/tests/test_state.py b/tools/standards_analysis/tests/test_state.py index 0d7ce361..13941a25 100644 --- a/tools/standards_analysis/tests/test_state.py +++ b/tools/standards_analysis/tests/test_state.py @@ -21,7 +21,7 @@ "scope": {"kind": "whole-artifact"}, } CONTRACTS = ( - {"id": "analysis", "version": "6"}, + {"id": "analysis", "version": "7"}, {"id": "identity", "version": "2"}, ) EXECUTION = { @@ -129,7 +129,7 @@ def test_malformed_current_state_is_invalid(self) -> None: def test_well_formed_future_state_is_unsupported(self) -> None: value = json.loads(_state().encode()) - value["contract_version"] = 7 + value["contract_version"] += 1 with self.assertRaises(AnalysisError) as caught: AnalysisState.decode( diff --git a/tools/standards_contracts/README.md b/tools/standards_contracts/README.md index 23d0c9d3..7dfe25a7 100644 --- a/tools/standards_contracts/README.md +++ b/tools/standards_contracts/README.md @@ -34,3 +34,12 @@ python -m pip install \ Runtime retrieval, custom vocabularies, validator keyword overrides, and a repository implementation of JSON Schema are outside this module. + +## Named operation variants + +An operation may declare named input/result variants in the canonical interface. +Their roots participate in the same exact reachable schema closure and generated +projection. Variants select wire shape; their names do not grant permissions or +change the operation's capability authority. The Engine host selects the +application variant, while authoring uses the base operation. Transport code +consumes these definitions rather than maintaining a second schema. diff --git a/tools/standards_contracts/standards_contracts/__init__.py b/tools/standards_contracts/standards_contracts/__init__.py index d1231b88..70f29ea8 100644 --- a/tools/standards_contracts/standards_contracts/__init__.py +++ b/tools/standards_contracts/standards_contracts/__init__.py @@ -7,6 +7,7 @@ FieldProjection, InterfaceContract, OperationContract, + OperationVariant, ProjectionArtifacts, ) from .runtime import ( @@ -42,6 +43,7 @@ def projection_main(argv: list[str] | None = None) -> int: "MISSING", "MissingValue", "OperationContract", + "OperationVariant", "ProjectionArtifacts", "compile_contracts", "freeze_json", diff --git a/tools/standards_contracts/standards_contracts/compiler.py b/tools/standards_contracts/standards_contracts/compiler.py index 556889bc..b850d5c4 100644 --- a/tools/standards_contracts/standards_contracts/compiler.py +++ b/tools/standards_contracts/standards_contracts/compiler.py @@ -15,6 +15,7 @@ FieldProjection, InterfaceContract, OperationContract, + OperationVariant, ProjectionArtifacts, ) from .runtime import ContractRuntime @@ -61,6 +62,7 @@ "result_definitions", "capability", "capability_by_submission", + "variants", } ) _ASCII_PATTERN = re.compile(r"\A[\x20-\x7e]*\Z") @@ -150,7 +152,7 @@ def compile_contracts( roots = { definition for operation in parsed_interface.operations - for definition in (operation.input_definition, *operation.result_definitions) + for definition in operation.roots } reachable = _reachable_definitions(definitions, roots) unreachable = sorted(definitions.keys() - reachable) @@ -251,6 +253,7 @@ def _parse_interface( result_definitions=tuple(results), capability=capability if has_capability else None, capability_by_submission=selected_map, + variants=_operation_variants(raw.get("variants", {}), definitions), ) ) operation_ids = [item.id for item in operations] @@ -262,7 +265,9 @@ def _parse_interface( raise failure( "CONTRACT.INVALID_INTERFACE", "operations must have unique nonempty IDs" ) - for operation in operations: + selections = (selected for operation in operations + for selected in (operation, *(operation.select_variant(name) for name in operation.variants))) + for operation in selections: if not operation.capability_by_submission: continue submission = ( @@ -291,6 +296,25 @@ def _parse_interface( ) +def _operation_variants(value: object, definitions: Mapping[str, object]) -> dict[str, OperationVariant]: + if not isinstance(value, dict): + raise failure("CONTRACT.INVALID_INTERFACE", "operation variants must be a mapping") + selected = {} + for name, variant in value.items(): + if (not isinstance(name, str) or re.fullmatch(r"[a-z][a-z0-9-]*", name) is None + or not isinstance(variant, dict) + or set(variant) != {"input_definition", "result_definitions"}): + raise failure("CONTRACT.INVALID_INTERFACE", "operation variant fields are invalid") + input_name, results = variant["input_definition"], variant["result_definitions"] + if (not isinstance(input_name, str) or input_name not in definitions + or not isinstance(results, list) or not results + or not all(isinstance(item, str) and item in definitions for item in results) + or len(set(results)) != len(results)): + raise failure("CONTRACT.INVALID_INTERFACE", "operation variant roots are invalid") + selected[name] = OperationVariant(input_name, tuple(results)) + return selected + + def _union_discriminants( definitions: Mapping[str, object], definition: str ) -> set[str]: @@ -721,6 +745,13 @@ def _agent_tools( selected["capability_by_submission"] = dict( operation.capability_by_submission ) + if operation.variants: + selected["variants"] = { + name: {"input_definition": variant.input_definition, + "result_definitions": list(variant.result_definitions), + "input_schema": {"$ref": f"#/$defs/{variant.input_definition}"}} + for name, variant in operation.variants.items() + } operations.append(selected) return { "schema_version": interface.schema_version, diff --git a/tools/standards_contracts/standards_contracts/model.py b/tools/standards_contracts/standards_contracts/model.py index a7486797..fe0ff266 100644 --- a/tools/standards_contracts/standards_contracts/model.py +++ b/tools/standards_contracts/standards_contracts/model.py @@ -1,11 +1,19 @@ from __future__ import annotations import json -from dataclasses import dataclass +from dataclasses import dataclass, field, replace from types import MappingProxyType from typing import Mapping +@dataclass(frozen=True, slots=True) +class OperationVariant: + """Named wire projection; the composition boundary selects the variant.""" + + input_definition: str + result_definitions: tuple[str, ...] + + @dataclass(frozen=True, slots=True) class OperationContract: id: str @@ -13,8 +21,21 @@ class OperationContract: result_definitions: tuple[str, ...] capability: str | None capability_by_submission: Mapping[str, str] + variants: Mapping[str, OperationVariant] = field(default_factory=dict) + + def select_variant(self, name: str) -> OperationContract: + variant = self.variants[name] + return replace(self, input_definition=variant.input_definition, + result_definitions=variant.result_definitions, variants={}) + + @property + def roots(self) -> tuple[str, ...]: + return (self.input_definition, *self.result_definitions, + *(root for variant in self.variants.values() + for root in (variant.input_definition, *variant.result_definitions))) def __post_init__(self) -> None: + object.__setattr__(self, "variants", MappingProxyType(dict(self.variants))) object.__setattr__( self, "capability_by_submission", @@ -74,5 +95,6 @@ def agent_tools(self) -> Mapping[str, object]: "FieldProjection", "InterfaceContract", "OperationContract", + "OperationVariant", "ProjectionArtifacts", ) diff --git a/tools/standards_contracts/tests/test_compiler.py b/tools/standards_contracts/tests/test_compiler.py index 46c62270..36434c11 100644 --- a/tools/standards_contracts/tests/test_compiler.py +++ b/tools/standards_contracts/tests/test_compiler.py @@ -12,6 +12,15 @@ class ContractCompilerTest(unittest.TestCase): + def test_operation_variants_preserve_submission_capability_coverage(self): + schema, interface = canonical_inputs() + resolve = next(operation for operation in interface["operations"] if operation["id"] == "resolve") + resolve["variants"] = {"mismatched": {"input_definition": "CreateSnapshotCall", + "result_definitions": ["RejectedResult"]}} + with self.assertRaises(ContractError) as rejected: + compile_contracts(schema, interface) + self.assertEqual(rejected.exception.failure.code, "CONTRACT.INVALID_INTERFACE") + def test_canonical_schema_and_interface_have_one_exact_public_closure(self) -> None: schema, interface = canonical_inputs() compiled = compile_contracts(schema, interface) @@ -197,3 +206,36 @@ def test_inputs_are_copied_before_compilation(self) -> None: if __name__ == "__main__": unittest.main() + + +class OperationVariantTest(unittest.TestCase): + def test_variant_has_its_own_closed_roots_and_immutable_selection(self): + schema, interface = canonical_inputs() + compiled = compile_contracts(schema, interface) + read = next(op for op in compiled.interface.operations if op.id == "read") + selected = read.select_variant("application") + self.assertEqual(selected.input_definition, "ApplicationReadCall") + self.assertIn("ApplicationReadResult", selected.result_definitions) + self.assertNotIn("ReadResult", selected.result_definitions) + self.assertEqual(selected.capability, read.capability) + with self.assertRaises(TypeError): + read.variants["other"] = read.variants["application"] + with self.assertRaises(KeyError): + read.select_variant("missing") + projected = compiled.project().agent_tools + projected_read = next(op for op in projected["operations"] if op["id"] == "read") + self.assertEqual(projected_read["variants"]["application"]["input_definition"], selected.input_definition) + + def test_variant_rejects_unknown_definitions_fields_and_duplicate_results(self): + for replacement in ( + {"input_definition": "Missing", "result_definitions": ["ApplicationReadResult"]}, + {"input_definition": "ApplicationReadCall", "result_definitions": ["ApplicationReadResult"] * 2}, + {"input_definition": "ApplicationReadCall", "result_definitions": []}, + {"input_definition": "ApplicationReadCall", "result_definitions": ["ApplicationReadResult"], "capability": "extra"}, + ): + schema, interface = canonical_inputs() + read = next(op for op in interface["operations"] if op["id"] == "read") + read["variants"]["application"] = replacement + with self.subTest(replacement=replacement), self.assertRaises(ContractError) as caught: + compile_contracts(schema, interface) + self.assertEqual(caught.exception.failure.code, "CONTRACT.INVALID_INTERFACE") diff --git a/tools/standards_contracts/tests/test_projection.py b/tools/standards_contracts/tests/test_projection.py index 958fcee7..284640e5 100644 --- a/tools/standards_contracts/tests/test_projection.py +++ b/tools/standards_contracts/tests/test_projection.py @@ -313,8 +313,8 @@ def test_agent_tools_derive_every_operation_and_reachable_definition(self) -> No self.assertEqual( tools["interface_schema_version"], interface["interface_schema_version"] ) - self.assertEqual(tools["request_contract_version"], 5) - self.assertEqual(tools["result_projection_version"], 6) + self.assertEqual(tools["request_contract_version"], interface["request_contract_version"]) + self.assertEqual(tools["result_projection_version"], interface["result_projection_version"]) json.dumps(tools) diff --git a/tools/standards_engine/PURPOSE-SEPARATION.md b/tools/standards_engine/PURPOSE-SEPARATION.md new file mode 100644 index 00000000..4390f35f --- /dev/null +++ b/tools/standards_engine/PURPOSE-SEPARATION.md @@ -0,0 +1,181 @@ +# Purpose-separated Engine contract + +This is implementation and deployment documentation. It describes the Engine +mechanism; it does not classify the real standards as positively written or +ready for application use. + +## Host configuration + +Engine/facade construction and local transport launch require an explicit +`application` or `authoring` purpose. Purpose remains fixed for that interface. +Tool arguments, detail options and handles select material, not purpose. +Authorization remains the existing independent injected contract. The local +facade is an owner-operated always-allow authorization adapter for admitted +authoring operations; this release does not supply a multi-user access service. + +Application operations are `route`, `read`, `related`, `routing_facts`, `query` +and `inspect`. The focused MCP catalog omits native `query`; `--advanced` can +expose it within the same purpose. Authoring retains the complete existing +workflow. Canonical interface operation variants own each purpose's input and +result definitions; MCP and CLI project only their reachable schema closure. + +The public application boundary constructs dedicated result values from +qualified domain material. Full detail remains within that boundary. Both +MCP result encodings carry the same value. Unknown/private identities and +malformed requests receive bounded application outcomes. Detailed operational +failures stay in host-private diagnostics, which the host must keep outside an +application agent's independently readable filesystem. + +## Accepted authority and snapshots + +New snapshots capture the configured local accepted branch, `main`, rather than +the checked-out branch. This prevents an unpublished branch from becoming +application-visible through automatic snapshot capture. Proposal reads use +exact proposal revision authority and are authoring-only. + +The two support manifests are mandatory captured inputs: + +- `evaluation/standards-effectiveness/application-content.toml` +- `evaluation/standards-effectiveness/decision-provenance.toml` + +Both are empty in this code delivery. Existing normative and reference bytes +remain unchanged and authoring-readable after the code candidate is integrated +into accepted `main`. Application reads initially report that the requested +guidance awaits application publication. This is intentional bootstrap behavior, +not an inference that legacy prose was reviewed. + +A supported snapshot contains its exact support records, exposure decisions, +Router inputs and material. Reopening uses those captured bytes. Later exposure +withdrawal affects newly captured accepted authority, while a retained historical +snapshot keeps its original decision. This mechanism does not retroactively +erase context or revoke bytes already delivered to an agent. + +Old captures lacking the support contract return +`SUPPORT.UNSUPPORTED_CAPTURE` (bounded as `APPLICATION.UNSUPPORTED_CAPTURE` in +application output). Old Analysis records are unsupported under Analysis 7. +Existing SQLite storage mechanics and Snapshot handle version 5 remain in use; +there is no automatic deletion, conversion, alternate old reader or dual write. + +## Application qualification + +A declaration identifies an entire canonical module or registered operational +prompt/template and the Engine-derived exact reviewed binding. Scoped policy +reads inherit the containing module's qualification. Whole-module material +includes headings, tables, links, metadata and registered policy declarations; +Router material additionally binds the actual routing facts, rules and bases. +Operational aids bind their source content and registered policy-owner facts. + +The derived states are `unreviewed`, `current` and `needs-review`. Content changes +preserve the old declaration as stale until explicit renewed approval or +withdrawal. An application read requires its selected unit and actual mandatory +prerequisites to be current. Unknown applicability remains a request for facts; +a missing required qualification is an explicit unavailable observation. + +Supplementary relationships remain selective. A prompt's policy-impact +association does not acquire `Requires` semantics. The application graph view +contains permitted endpoints before traversal, so hidden intermediary nodes +cannot connect otherwise disconnected visible material. Whole-module discovery +includes relationships declared by its registered policy units. + +Eligibility is an editorial decision. The runtime checks the declaration, +binding and required closure; it does not classify sentiment or prove prose +quality. No positivity model or lexical prohibition list is part of the runtime. + +## Decision provenance + +Each record owns one descriptive subject association. The standards-aware graph +source derives the `justified-by` edge in `decision-provenance`; no second +editable copy of that association exists. Supersession links form an acyclic +history. Retired records remain readable by authoring callers and can retain +historical subjects, while active records require a current canonical subject. +These relationships have no automatic normative-dependency or impact meaning. + +A record includes its canonical identity and subject, Engine-derived subject +binding, origin, rationale, and the existing four-field evidence representation. +Optional sections hold assumptions, limits, alternatives, reconsideration and +supersession. Historical-origin claims require evidence references. An explicitly +unrecorded origin permits an empty account instead of fabricated history. + +A record can become `needs-review` after its subject changes. Updating rationale +alone changes that support record and its localized review, not unchanged +normative semantic revisions or every unrelated consumer certificate. + +## Authoring operation map + +All edits travel in the existing `StandardsChangeSet` through `propose`/`revise`, +analysis, explicit review and atomic local `apply`. Exact fields are supplied by +the current generated schema; this table is a navigation aid, not a validator. + +| Task | Edit or read | +| --- | --- | +| Read a complete owner or scoped policy | Authoring `read`; inspect metadata/relationships as needed | +| Revise module body and metadata | `revise-standard` | +| Relocate/rescope registered headings in a full rewrite | `revise-standard.scope_updates`, with all existing scope identities and explicit semantics | +| Revise one policy scope | `revise-policy-unit` | +| Create/revise a supplementary reference | `create-standard` / `revise-standard` with the existing reference role | +| Inspect an existing registered prompt/template | Authoring `read` returns its opaque target handle | +| Revise a registered prompt/template | `revise-operational-artifact` using that handle, title and body | +| Record or replace decision reasoning | `put-provenance` | +| Retain a reasoning record as historical | `retire-provenance` | +| Approve exact final application material | `approve-application-content` | +| Withdraw an exposure decision | `withdraw-application-content` | +| Change normative prerequisites/specialization | `replace-standard-relationships` | +| Change other actual consumer relationships | Existing `put-policy-relationship` / `remove-policy-relationship` | +| Change Router decisions or presentation | Existing routing rule/fact edits | +| Inspect a draft | Authoring `query_proposal` against its exact revision | +| Publish the reviewed candidate | Existing explicit `review`, then `apply`; follow `recover` on recovery-required | + +The Engine resolves unordered same-change-set references against the final +candidate. It stages retirement and withdrawal privately before dependent owner +changes, computes approval/provenance bindings after material edits, and validates +the complete result before admitting the proposal revision. Contradictory edits +and dangling active subjects reject without publication. Registered operational +aid handles identify only captured prompt/template registrations; requests do +not authorize arbitrary repository-file or source-code writes. + +Meaning-preserving rewrites may change structural text while keeping the policy's +semantic revision through an explicit `preserve` decision. Substantive changes +select the next revision. The candidate contains the exact intended semantic +revision before review; preservation/next-revision proposals are analyzed against +those same bytes. The Engine does not rewrite semantic versions after review. + +## Versions and coordinated cutover + +Current Engine package/transport implementation: 0.2.0. Engine interface: 31. +Analysis request: 6; result/state and Analysis handles: 7. The semantic-revision +interpretation change belongs to Analysis 7. Unchanged Snapshot, proposal, +readiness, application and generic identity/storage contracts keep their +existing independent versions. Updating one implementation does not couple all +version domains. + +Before replacing an installed Engine, inspect active proposals, readiness and +recovery-required work through its current authoring interface. Complete an +existing recovery obligation with its owning version, or retain its exact store +with an explicit operator disposition. Keep retained store bytes and Git history. +Then install the new code and reconnect clients with purpose-selected launch +configuration. An explicitly chosen fresh store may capture the accepted source; +store selection does not convert old proposal records into new-format state. + +For pre-merge qualification, use a disposable clone whose local `main` identifies +the exact candidate. Avoid retargeting the user's real accepted branch merely to +make a test pass. The code is integrated before the content guide is executed. + +The host controls access to the checkout, database and private logs. A caller +with independent access to those files can read them outside the Engine. Use a +fresh application context after standards authoring; changing an interface does +not remove information already in a model conversation. + +## Verification boundaries + +Focused tests cover qualification, staleness, purpose/handle escalation, hidden +intermediaries, schema closure, scope discovery and bounded diagnostics. Separate +process tests exercise CLI/MCP output and real SQLite reopening. The supporting +workflow test uses real proposal/review/Git publication with synthetic content; +its fixture decisions are not endorsements of real standards. + +Run affected package tests and the structural checkpoint separately. The optional +`tests/mcp_workflow_client.py` additionally exercises the official SDK, both +purposes and interrupted-publication recovery using a separately supplied client +environment. The configured Codex adapter test names the authoring registration +with `--server`. Pinned-platform/client acceptance and independent review are +reported separately from supporting tests in another Python environment. diff --git a/tools/standards_engine/README.md b/tools/standards_engine/README.md index df84d7ed..3f8ae556 100644 --- a/tools/standards_engine/README.md +++ b/tools/standards_engine/README.md @@ -1,5 +1,18 @@ # Standards Engine +## Current purpose-separated interface + +Version 0.2.0 / interface 31 requires host-selected `application` or `authoring` +purpose. Application views use exact reviewed content declarations; the real +corpus intentionally starts unqualified in this code release. Authoring retains +the complete workflow and adds provenance, registered operational-aid editing +and explicit application exposure decisions. Analysis request 6 / state 7 bind +explicit preservation or change to the actual candidate semantic revision. + +See [Purpose separation and code-to-content handoff](PURPOSE-SEPARATION.md) for +the supported operation map, replay guarantees, empty-corpus bootstrap and +breaking cutover. The underlying implementation description follows. + `tools/standards_engine/` is the typed composition facade for standards navigation, immutable analysis, and controlled authoring. Callers use canonical IDs, authored policy title/body content, explicit semantics, and opaque handles. @@ -10,7 +23,7 @@ for evidence catalog maintenance. Agents use the MCP stdio server in `standards_engine/mcp.py`. Its default catalog exposes focused navigation and context-based authoring with generated input/output -schemas. `--advanced` exposes the complete native catalog. See +schemas. `--advanced` exposes native operations within the configured purpose. See [agent connection setup](../../.agents/skills/standards-engine/references/environment.md). The existing `.agents/skills/standards-engine/scripts/invoke.py` remains the reference/debugging transport. diff --git a/tools/standards_engine/contracts/README.md b/tools/standards_engine/contracts/README.md index a7c705a0..231206d6 100644 --- a/tools/standards_engine/contracts/README.md +++ b/tools/standards_engine/contracts/README.md @@ -1,4 +1,22 @@ -# Standards Engine A2 Contracts +# Standards Engine Contracts + +## Current contract: interface 31 + +Required host purpose selects application or authoring operation variants. The +canonical interface declares each variant's exact input/result roots, and the +compiler generates their shared schema authority. Application projections have +closed result fields and bounded errors; their catalogs omit authoring schemas. + +New logical edits maintain decision provenance, registered prompt/template +content, and exact application exposure. Whole-standard revisions can explicitly +update all registered scopes through `scope_updates`. Analysis request 6 / +result-state 7 accept explicit equal-revision preservation or next-revision +semantic change against the actual compiled candidate. Older Analysis records +are not reinterpreted. Unchanged Snapshot/storage primitives retain their own +versions. See [the implementation contract](../PURPOSE-SEPARATION.md). + +The version notes below document earlier design increments, not supported +compatibility paths or the current purpose-less launch contract. This directory owns the serialized public shape of the Standards Engine interface. Runtime policy meaning, identity construction, persistence, diff --git a/tools/standards_engine/contracts/a1-contract.schema.json b/tools/standards_engine/contracts/a1-contract.schema.json index f2226ba3..f98e5c3a 100644 --- a/tools/standards_engine/contracts/a1-contract.schema.json +++ b/tools/standards_engine/contracts/a1-contract.schema.json @@ -5,55 +5,55 @@ "description": "Canonical typed contract for snapshot lifecycle, controlled authoring, navigation, inspection, and immutable standards-change analysis.", "oneOf": [ { - "$ref": "#/$defs/CreateSnapshotCall" + "$ref": "#/$defs/AgentRouteResult" }, { - "$ref": "#/$defs/CreateSnapshotResult" + "$ref": "#/$defs/AnalyzeCall" }, { - "$ref": "#/$defs/RejectedResult" + "$ref": "#/$defs/AnalyzeProposalCall" }, { - "$ref": "#/$defs/FindSnapshotsCall" + "$ref": "#/$defs/ApplicationInspectCall" }, { - "$ref": "#/$defs/FindSnapshotsResult" + "$ref": "#/$defs/ApplicationQueryCall" }, { - "$ref": "#/$defs/DeleteSnapshotCall" + "$ref": "#/$defs/ApplicationReadCall" }, { - "$ref": "#/$defs/DeleteSnapshotResult" + "$ref": "#/$defs/ApplicationReadResult" }, { - "$ref": "#/$defs/UndeleteSnapshotCall" + "$ref": "#/$defs/ApplicationRecoveryRequiredResult" }, { - "$ref": "#/$defs/UndeleteSnapshotResult" + "$ref": "#/$defs/ApplicationRejectedResult" }, { - "$ref": "#/$defs/QueryCall" + "$ref": "#/$defs/ApplicationRelatedResult" }, { - "$ref": "#/$defs/QueryResult" + "$ref": "#/$defs/ApplicationRouteResult" }, { - "$ref": "#/$defs/PrepareCall" + "$ref": "#/$defs/ApplicationRoutingFactsResult" }, { - "$ref": "#/$defs/PendingResult" + "$ref": "#/$defs/ApplyCall" }, { - "$ref": "#/$defs/CompleteResult" + "$ref": "#/$defs/ApplyProposalCall" }, { - "$ref": "#/$defs/ResolveCall" + "$ref": "#/$defs/ApplyProposalResult" }, { - "$ref": "#/$defs/InspectCall" + "$ref": "#/$defs/CompactReadResult" }, { - "$ref": "#/$defs/InspectionResult" + "$ref": "#/$defs/CompleteResult" }, { "$ref": "#/$defs/CreateProposalCall" @@ -62,79 +62,88 @@ "$ref": "#/$defs/CreateProposalResult" }, { - "$ref": "#/$defs/FindProposalsCall" + "$ref": "#/$defs/CreateSnapshotCall" }, { - "$ref": "#/$defs/FindProposalsResult" + "$ref": "#/$defs/CreateSnapshotResult" }, { - "$ref": "#/$defs/ReviseProposalCall" + "$ref": "#/$defs/DeleteSnapshotCall" }, { - "$ref": "#/$defs/ReviseProposalResult" + "$ref": "#/$defs/DeleteSnapshotResult" }, { - "$ref": "#/$defs/QueryProposalCall" + "$ref": "#/$defs/FindProposalsCall" }, { - "$ref": "#/$defs/QueryProposalResult" + "$ref": "#/$defs/FindProposalsResult" }, { - "$ref": "#/$defs/AnalyzeProposalCall" + "$ref": "#/$defs/FindSnapshotsCall" }, { - "$ref": "#/$defs/ReviewProposalCall" + "$ref": "#/$defs/FindSnapshotsResult" }, { - "$ref": "#/$defs/ReviewProposalResult" + "$ref": "#/$defs/InspectCall" }, { - "$ref": "#/$defs/ApplyProposalCall" + "$ref": "#/$defs/InspectionResult" }, { - "$ref": "#/$defs/ApplyProposalResult" + "$ref": "#/$defs/MaintainEvidenceCall" }, { - "$ref": "#/$defs/ApplicationRecoveryRequiredResult" + "$ref": "#/$defs/MaintainEvidenceResult" }, { - "$ref": "#/$defs/RecoverApplicationCall" + "$ref": "#/$defs/NavigationIndexesResult" }, { - "$ref": "#/$defs/RecoverApplicationResult" + "$ref": "#/$defs/OperationalReadResult" }, { - "$ref": "#/$defs/VerifyRepositoryCall" + "$ref": "#/$defs/PendingResult" }, { - "$ref": "#/$defs/VerifyRepositoryResult" + "$ref": "#/$defs/PrepareCall" }, { - "$ref": "#/$defs/VerifyProposalCall" + "$ref": "#/$defs/ProposeCall" }, { - "$ref": "#/$defs/VerifyProposalResult" + "$ref": "#/$defs/ProvenanceReadResult" }, { - "$ref": "#/$defs/MaintainEvidenceCall" + "$ref": "#/$defs/QueryCall" }, { - "$ref": "#/$defs/MaintainEvidenceResult" + "$ref": "#/$defs/QueryProposalCall" }, { - "$ref": "#/$defs/RouteCall" + "$ref": "#/$defs/QueryProposalResult" }, { - "$ref": "#/$defs/AgentRouteResult" + "$ref": "#/$defs/QueryResult" }, { "$ref": "#/$defs/ReadCall" }, { - "$ref": "#/$defs/CompactReadResult" + "$ref": "#/$defs/ReadResult" }, { - "$ref": "#/$defs/ReadResult" + "$ref": "#/$defs/RecoverApplicationCall" + }, + { + "$ref": "#/$defs/RecoverApplicationResult" + }, + { + "$ref": "#/$defs/RecoverCall" + }, + { + "$ref": "#/$defs/RejectedResult" }, { "$ref": "#/$defs/RelatedCall" @@ -143,43 +152,64 @@ "$ref": "#/$defs/RelatedResult" }, { - "$ref": "#/$defs/RoutingFactsCall" + "$ref": "#/$defs/ResolveCall" }, { - "$ref": "#/$defs/RoutingFactsResult" + "$ref": "#/$defs/ResolveWorkflowCall" }, { - "$ref": "#/$defs/ProposeCall" + "$ref": "#/$defs/ResumeCall" }, { - "$ref": "#/$defs/WorkflowResult" + "$ref": "#/$defs/ReviewCall" + }, + { + "$ref": "#/$defs/ReviewProposalCall" + }, + { + "$ref": "#/$defs/ReviewProposalResult" }, { "$ref": "#/$defs/ReviseCall" }, { - "$ref": "#/$defs/AnalyzeCall" + "$ref": "#/$defs/ReviseProposalCall" }, { - "$ref": "#/$defs/ResolveWorkflowCall" + "$ref": "#/$defs/ReviseProposalResult" }, { - "$ref": "#/$defs/ReviewCall" + "$ref": "#/$defs/RouteCall" }, { - "$ref": "#/$defs/ApplyCall" + "$ref": "#/$defs/RoutingFactsCall" }, { - "$ref": "#/$defs/RecoverCall" + "$ref": "#/$defs/RoutingFactsResult" }, { - "$ref": "#/$defs/WorkflowStatusCall" + "$ref": "#/$defs/UndeleteSnapshotCall" }, { - "$ref": "#/$defs/ResumeCall" + "$ref": "#/$defs/UndeleteSnapshotResult" }, { - "$ref": "#/$defs/NavigationIndexesResult" + "$ref": "#/$defs/VerifyProposalCall" + }, + { + "$ref": "#/$defs/VerifyProposalResult" + }, + { + "$ref": "#/$defs/VerifyRepositoryCall" + }, + { + "$ref": "#/$defs/VerifyRepositoryResult" + }, + { + "$ref": "#/$defs/WorkflowResult" + }, + { + "$ref": "#/$defs/WorkflowStatusCall" } ], "$defs": { @@ -596,7 +626,8 @@ "audit-coverage", "unmapped-normative-change", "structured-scope-analysis-unsupported", - "navigation-index-change" + "navigation-index-change", + "supporting-content-change" ] }, "source": { @@ -1172,7 +1203,8 @@ "move", "split", "merge", - "navigation-index" + "navigation-index", + "supporting-content" ] }, "accepted_ids": { @@ -1673,7 +1705,7 @@ "$ref": "#/$defs/AnalysisId" }, "schema_version": { - "const": 6 + "const": 7 } }, "additionalProperties": false @@ -1819,7 +1851,7 @@ "$ref": "#/$defs/ChildId" }, "schema_version": { - "const": 6 + "const": 7 } }, "additionalProperties": false @@ -2227,6 +2259,12 @@ }, "standard": { "$ref": "#/$defs/StandardContent" + }, + "scope_updates": { + "type": "array", + "items": { + "$ref": "#/$defs/PolicyScopeUpdate" + } } }, "additionalProperties": false @@ -2681,6 +2719,21 @@ }, { "$ref": "#/$defs/RewriteNavigationIndexEdit" + }, + { + "$ref": "#/$defs/PutDecisionProvenanceEdit" + }, + { + "$ref": "#/$defs/RetireDecisionProvenanceEdit" + }, + { + "$ref": "#/$defs/ApproveApplicationContentEdit" + }, + { + "$ref": "#/$defs/WithdrawApplicationContentEdit" + }, + { + "$ref": "#/$defs/ReviseOperationalArtifactEdit" } ] }, @@ -3523,6 +3576,15 @@ }, "coverage": { "$ref": "#/$defs/ReadCoverage" + }, + "application_exposure": { + "$ref": "#/$defs/ApplicationExposureState" + }, + "provenance": { + "type": "array", + "items": { + "$ref": "#/$defs/CanonicalId" + } } }, "additionalProperties": false @@ -3611,6 +3673,12 @@ }, { "$ref": "#/$defs/NavigationIndexesResult" + }, + { + "$ref": "#/$defs/ProvenanceReadResult" + }, + { + "$ref": "#/$defs/OperationalReadResult" } ] }, @@ -3713,6 +3781,15 @@ }, "coverage": { "$ref": "#/$defs/ReadCoverage" + }, + "application_exposure": { + "$ref": "#/$defs/ApplicationExposureState" + }, + "provenance": { + "type": "array", + "items": { + "$ref": "#/$defs/CanonicalId" + } } }, "additionalProperties": false @@ -3774,6 +3851,12 @@ }, { "$ref": "#/$defs/NavigationIndexesResult" + }, + { + "$ref": "#/$defs/ProvenanceReadResult" + }, + { + "$ref": "#/$defs/OperationalReadResult" } ] }, @@ -3815,7 +3898,7 @@ "$ref": "#/$defs/AnalysisHandle" }, "contract_version": { - "const": 5 + "const": 6 } }, "additionalProperties": false @@ -4689,7 +4772,7 @@ "$ref": "#/$defs/AnalysisExecutionContractView" }, "contract_version": { - "const": 6 + "const": 7 } }, "additionalProperties": false @@ -5894,6 +5977,15 @@ }, "detail": { "const": "compact" + }, + "application_exposure": { + "$ref": "#/$defs/ApplicationExposureState" + }, + "provenance": { + "type": "array", + "items": { + "$ref": "#/$defs/CanonicalId" + } } }, "additionalProperties": false @@ -6443,6 +6535,831 @@ } }, "additionalProperties": false + }, + "ApplicationNextOperation": { + "type": "object", + "additionalProperties": false, + "required": [ + "operation", + "snapshot" + ], + "properties": { + "operation": { + "enum": [ + "read", + "related", + "routing_facts", + "route", + "query", + "inspect" + ] + }, + "snapshot": { + "$ref": "#/$defs/SnapshotHandle" + }, + "target": { + "$ref": "#/$defs/CanonicalId" + }, + "handle": { + "$ref": "#/$defs/SnapshotChildHandle" + } + } + }, + "ApplicationRejectedResult": { + "type": "object", + "additionalProperties": false, + "required": [ + "kind", + "purpose", + "code", + "outcome", + "message", + "next_operations" + ], + "properties": { + "kind": { + "const": "application-rejected-result" + }, + "purpose": { + "const": "application" + }, + "code": { + "enum": [ + "APPLICATION.CONTENT_UNAVAILABLE", + "APPLICATION.INPUT_INVALID", + "APPLICATION.OPERATION_UNAVAILABLE", + "APPLICATION.INTERNAL_UNAVAILABLE", + "APPLICATION.UNSUPPORTED_CAPTURE" + ] + }, + "outcome": { + "enum": [ + "invalid", + "unsupported", + "unavailable" + ] + }, + "message": { + "type": "string" + }, + "next_operations": { + "type": "array", + "items": { + "$ref": "#/$defs/ApplicationNextOperation" + } + } + } + }, + "ApplicationPolicy": { + "type": "object", + "additionalProperties": false, + "required": [ + "id", + "handle", + "role", + "level" + ], + "properties": { + "id": { + "$ref": "#/$defs/CanonicalId" + }, + "handle": { + "$ref": "#/$defs/SnapshotChildHandle" + }, + "role": { + "enum": [ + "core", + "router", + "topic", + "workflow", + "profile", + "reference", + "prompt", + "template" + ] + }, + "level": { + "enum": [ + "MUST", + "SHOULD", + "PROFILE", + "REFERENCE" + ] + } + } + }, + "ApplicationRelationship": { + "type": "object", + "additionalProperties": false, + "required": [ + "handle", + "source", + "target", + "relation", + "groups", + "direction" + ], + "properties": { + "handle": { + "$ref": "#/$defs/SnapshotChildHandle" + }, + "source": { + "$ref": "#/$defs/CanonicalId" + }, + "target": { + "$ref": "#/$defs/CanonicalId" + }, + "relation": { + "type": "string" + }, + "groups": { + "type": "array", + "items": { + "$ref": "#/$defs/CanonicalId" + } + }, + "direction": { + "enum": [ + "incoming", + "outgoing" + ] + } + } + }, + "ApplicationReadResult": { + "type": "object", + "additionalProperties": false, + "required": [ + "kind", + "purpose", + "snapshot", + "policy", + "content", + "scope", + "requires", + "specializes", + "next_operations" + ], + "properties": { + "kind": { + "const": "application-read-result" + }, + "purpose": { + "const": "application" + }, + "snapshot": { + "$ref": "#/$defs/SnapshotHandle" + }, + "policy": { + "$ref": "#/$defs/ApplicationPolicy" + }, + "content": { + "type": "string" + }, + "scope": { + "$ref": "#/$defs/ReviewScope" + }, + "requires": { + "type": "array", + "items": { + "$ref": "#/$defs/CanonicalId" + } + }, + "specializes": { + "type": "array", + "items": { + "$ref": "#/$defs/CanonicalId" + } + }, + "related": { + "type": "array", + "items": { + "$ref": "#/$defs/ApplicationRelationship" + } + }, + "next_operations": { + "type": "array", + "items": { + "$ref": "#/$defs/ApplicationNextOperation" + } + } + } + }, + "ApplicationRelatedResult": { + "type": "object", + "additionalProperties": false, + "required": [ + "kind", + "purpose", + "snapshot", + "target", + "relationships", + "next_operations" + ], + "properties": { + "kind": { + "const": "application-related-result" + }, + "purpose": { + "const": "application" + }, + "snapshot": { + "$ref": "#/$defs/SnapshotHandle" + }, + "target": { + "$ref": "#/$defs/CanonicalId" + }, + "relationships": { + "type": "array", + "items": { + "$ref": "#/$defs/ApplicationRelationship" + } + }, + "next_operations": { + "type": "array", + "items": { + "$ref": "#/$defs/ApplicationNextOperation" + } + } + } + }, + "ApplicationReadingEntry": { + "type": "object", + "additionalProperties": false, + "required": [ + "target", + "scope", + "authority", + "state" + ], + "properties": { + "target": { + "$ref": "#/$defs/CanonicalId" + }, + "scope": { + "$ref": "#/$defs/ReviewScope" + }, + "authority": { + "enum": [ + "normative", + "contextual" + ] + }, + "state": { + "const": "selected" + } + } + }, + "ApplicationQuestion": { + "type": "object", + "additionalProperties": false, + "required": [ + "fact" + ], + "properties": { + "fact": { + "$ref": "#/$defs/AuthoredRoutingFact" + } + } + }, + "ApplicationRouteResult": { + "type": "object", + "additionalProperties": false, + "required": [ + "kind", + "purpose", + "snapshot", + "status", + "reading_plan", + "unresolved_questions", + "next_operations" + ], + "properties": { + "kind": { + "const": "application-route-result" + }, + "purpose": { + "const": "application" + }, + "snapshot": { + "$ref": "#/$defs/SnapshotHandle" + }, + "status": { + "enum": [ + "complete", + "needs-facts" + ] + }, + "reading_plan": { + "type": "array", + "items": { + "$ref": "#/$defs/ApplicationReadingEntry" + } + }, + "unresolved_questions": { + "type": "array", + "items": { + "$ref": "#/$defs/ApplicationQuestion" + } + }, + "next_operations": { + "type": "array", + "items": { + "$ref": "#/$defs/ApplicationNextOperation" + } + } + } + }, + "ApplicationRoutingFactsResult": { + "type": "object", + "additionalProperties": false, + "required": [ + "kind", + "purpose", + "snapshot", + "facts", + "next_operations" + ], + "properties": { + "kind": { + "const": "application-routing-facts-result" + }, + "purpose": { + "const": "application" + }, + "snapshot": { + "$ref": "#/$defs/SnapshotHandle" + }, + "facts": { + "type": "array", + "items": { + "$ref": "#/$defs/AuthoredRoutingFact" + } + }, + "next_operations": { + "type": "array", + "items": { + "$ref": "#/$defs/ApplicationNextOperation" + } + } + } + }, + "ApplicationReadCall": { + "type": "object", + "additionalProperties": false, + "required": [ + "target" + ], + "properties": { + "target": { + "$ref": "#/$defs/CanonicalId" + }, + "snapshot": { + "$ref": "#/$defs/SnapshotHandle" + }, + "detail": { + "enum": [ + "compact", + "full" + ] + } + } + }, + "ApplicationReadRequest": { + "type": "object", + "additionalProperties": false, + "required": [ + "kind", + "target" + ], + "properties": { + "kind": { + "const": "read" + }, + "target": { + "$ref": "#/$defs/CanonicalId" + }, + "detail": { + "enum": [ + "compact", + "full" + ] + } + } + }, + "ApplicationQueryRequest": { + "oneOf": [ + { + "$ref": "#/$defs/RouteRequest" + }, + { + "$ref": "#/$defs/ApplicationReadRequest" + }, + { + "$ref": "#/$defs/RelatedRequest" + } + ] + }, + "ApplicationQueryCall": { + "type": "object", + "additionalProperties": false, + "required": [ + "snapshot", + "request" + ], + "properties": { + "snapshot": { + "$ref": "#/$defs/SnapshotHandle" + }, + "request": { + "$ref": "#/$defs/ApplicationQueryRequest" + } + } + }, + "ApplicationInspectCall": { + "type": "object", + "additionalProperties": false, + "required": [ + "handle" + ], + "properties": { + "handle": { + "$ref": "#/$defs/SnapshotChildHandle" + } + } + }, + "AuthoredDecisionProvenance": { + "type": "object", + "additionalProperties": false, + "required": [ + "id", + "subject", + "origin", + "rationale", + "evidence" + ], + "properties": { + "id": { + "$ref": "#/$defs/CanonicalId" + }, + "subject": { + "$ref": "#/$defs/CanonicalId" + }, + "origin": { + "enum": [ + "documented-original", + "reconstructed-history", + "current-justification", + "unrecorded" + ] + }, + "rationale": { + "type": "string" + }, + "evidence": { + "type": "array", + "items": { + "$ref": "#/$defs/EvidenceReference" + } + }, + "assumptions": { + "type": "array", + "items": { + "type": "string" + } + }, + "limits": { + "type": "array", + "items": { + "type": "string" + } + }, + "alternatives": { + "type": "array", + "items": { + "type": "string" + } + }, + "reconsideration": { + "type": "array", + "items": { + "type": "string" + } + }, + "supersedes": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "DecisionProvenanceRecord": { + "type": "object", + "additionalProperties": false, + "required": [ + "id", + "subject", + "origin", + "rationale", + "evidence", + "assumptions", + "limits", + "alternatives", + "reconsideration", + "supersedes", + "subject_binding", + "retired" + ], + "properties": { + "id": { + "$ref": "#/$defs/CanonicalId" + }, + "subject": { + "$ref": "#/$defs/CanonicalId" + }, + "origin": { + "enum": [ + "documented-original", + "reconstructed-history", + "current-justification", + "unrecorded" + ] + }, + "rationale": { + "type": "string" + }, + "evidence": { + "type": "array", + "items": { + "$ref": "#/$defs/EvidenceReference" + } + }, + "assumptions": { + "type": "array", + "items": { + "type": "string" + } + }, + "limits": { + "type": "array", + "items": { + "type": "string" + } + }, + "alternatives": { + "type": "array", + "items": { + "type": "string" + } + }, + "reconsideration": { + "type": "array", + "items": { + "type": "string" + } + }, + "supersedes": { + "type": "array", + "items": { + "type": "string" + } + }, + "subject_binding": { + "$ref": "#/$defs/Digest" + }, + "retired": { + "type": "boolean" + } + } + }, + "ApplicationExposureState": { + "enum": [ + "unreviewed", + "current", + "needs-review" + ] + }, + "ProvenanceReadResult": { + "type": "object", + "additionalProperties": false, + "required": [ + "kind", + "authority", + "record", + "state", + "next_operations" + ], + "properties": { + "kind": { + "const": "provenance-read-result" + }, + "authority": { + "oneOf": [ + { + "$ref": "#/$defs/SnapshotHandle" + }, + { + "$ref": "#/$defs/ProposalRevisionHandle" + } + ] + }, + "record": { + "$ref": "#/$defs/DecisionProvenanceRecord" + }, + "state": { + "enum": [ + "current", + "needs-review", + "retired" + ] + }, + "next_operations": { + "type": "array", + "items": { + "$ref": "#/$defs/NextOperation" + } + } + } + }, + "OperationalReadResult": { + "type": "object", + "additionalProperties": false, + "required": [ + "kind", + "authority", + "target", + "canonical_id", + "role", + "content", + "application_exposure", + "next_operations" + ], + "properties": { + "kind": { + "const": "operational-read-result" + }, + "authority": { + "oneOf": [ + { + "$ref": "#/$defs/SnapshotHandle" + }, + { + "$ref": "#/$defs/ProposalRevisionHandle" + } + ] + }, + "target": { + "$ref": "#/$defs/AuthoringTargetHandle" + }, + "canonical_id": { + "$ref": "#/$defs/CanonicalId" + }, + "role": { + "enum": [ + "prompt", + "template" + ] + }, + "content": { + "type": "string" + }, + "application_exposure": { + "$ref": "#/$defs/ApplicationExposureState" + }, + "next_operations": { + "type": "array", + "items": { + "$ref": "#/$defs/NextOperation" + } + } + } + }, + "PutDecisionProvenanceEdit": { + "type": "object", + "additionalProperties": false, + "required": [ + "kind", + "record" + ], + "properties": { + "kind": { + "const": "put-provenance" + }, + "record": { + "$ref": "#/$defs/AuthoredDecisionProvenance" + } + } + }, + "RetireDecisionProvenanceEdit": { + "type": "object", + "additionalProperties": false, + "required": [ + "kind", + "id" + ], + "properties": { + "kind": { + "const": "retire-provenance" + }, + "id": { + "$ref": "#/$defs/CanonicalId" + } + } + }, + "ApproveApplicationContentEdit": { + "type": "object", + "additionalProperties": false, + "required": [ + "kind", + "target" + ], + "properties": { + "kind": { + "const": "approve-application-content" + }, + "target": { + "oneOf": [ + { + "$ref": "#/$defs/CanonicalId" + }, + { + "$ref": "#/$defs/AuthoringTargetHandle" + } + ] + } + } + }, + "WithdrawApplicationContentEdit": { + "type": "object", + "additionalProperties": false, + "required": [ + "kind", + "target" + ], + "properties": { + "kind": { + "const": "withdraw-application-content" + }, + "target": { + "oneOf": [ + { + "$ref": "#/$defs/CanonicalId" + }, + { + "$ref": "#/$defs/AuthoringTargetHandle" + } + ] + } + } + }, + "ReviseOperationalArtifactEdit": { + "type": "object", + "additionalProperties": false, + "required": [ + "kind", + "target", + "title", + "body" + ], + "properties": { + "kind": { + "const": "revise-operational-artifact" + }, + "target": { + "$ref": "#/$defs/AuthoringTargetHandle" + }, + "title": { + "$ref": "#/$defs/NonEmptyString" + }, + "body": { + "type": "string" + } + } + }, + "PolicyScopeUpdate": { + "type": "object", + "additionalProperties": false, + "required": [ + "policy", + "heading_path", + "semantics" + ], + "properties": { + "policy": { + "$ref": "#/$defs/CanonicalId" + }, + "heading_path": { + "type": "array", + "minItems": 1, + "items": { + "$ref": "#/$defs/NonEmptyString" + } + }, + "semantics": { + "$ref": "#/$defs/PolicySemanticIntent" + } + } } } } diff --git a/tools/standards_engine/contracts/a1-interface.toml b/tools/standards_engine/contracts/a1-interface.toml index ad00b47c..568699ed 100644 --- a/tools/standards_engine/contracts/a1-interface.toml +++ b/tools/standards_engine/contracts/a1-interface.toml @@ -1,7 +1,7 @@ schema_version = 1 -interface_schema_version = 30 -request_contract_version = 5 -result_projection_version = 6 +interface_schema_version = 31 +request_contract_version = 6 +result_projection_version = 7 [[operations]] id = "create_snapshot" @@ -32,6 +32,7 @@ id = "query" input_definition = "QueryCall" result_definitions = ["QueryResult", "RejectedResult"] capability = "standards.read" +variants = { "application" = { "input_definition" = "ApplicationQueryCall", "result_definitions" = ["ApplicationRouteResult", "ApplicationReadResult", "ApplicationRelatedResult", "ApplicationRejectedResult"] } } [[operations]] id = "prepare" @@ -43,13 +44,14 @@ capability = "standards.analyze" id = "resolve" input_definition = "ResolveCall" result_definitions = ["PendingResult", "CompleteResult", "RejectedResult"] -capability_by_submission = { provide-fact = "standards.analyze", consumer-disposition = "standards.review.consumer", impact-disposition = "standards.review.impact", coverage-attestation = "standards.review.audit" } +capability_by_submission = { "provide-fact" = "standards.analyze", "consumer-disposition" = "standards.review.consumer", "impact-disposition" = "standards.review.impact", "coverage-attestation" = "standards.review.audit" } [[operations]] id = "inspect" input_definition = "InspectCall" result_definitions = ["InspectionResult", "RejectedResult"] capability = "standards.read" +variants = { "application" = { "input_definition" = "ApplicationInspectCall", "result_definitions" = ["ApplicationReadResult", "ApplicationRelatedResult", "ApplicationRejectedResult"] } } [[operations]] id = "create_proposal" @@ -122,24 +124,28 @@ id = "route" input_definition = "RouteCall" result_definitions = ["AgentRouteResult", "RejectedResult"] capability = "standards.read" +variants = { "application" = { "input_definition" = "RouteCall", "result_definitions" = ["ApplicationRouteResult", "ApplicationRejectedResult"] } } [[operations]] id = "read" input_definition = "ReadCall" -result_definitions = ["CompactReadResult", "ReadResult", "NavigationIndexesResult", "RejectedResult"] +result_definitions = ["CompactReadResult", "ReadResult", "NavigationIndexesResult", "RejectedResult", "ProvenanceReadResult", "OperationalReadResult"] capability = "standards.read" +variants = { "application" = { "input_definition" = "ApplicationReadCall", "result_definitions" = ["ApplicationReadResult", "ApplicationRejectedResult"] } } [[operations]] id = "related" input_definition = "RelatedCall" result_definitions = ["RelatedResult", "RejectedResult"] capability = "standards.read" +variants = { "application" = { "input_definition" = "RelatedCall", "result_definitions" = ["ApplicationRelatedResult", "ApplicationRejectedResult"] } } [[operations]] id = "routing_facts" input_definition = "RoutingFactsCall" result_definitions = ["RoutingFactsResult", "RejectedResult"] capability = "standards.read" +variants = { "application" = { "input_definition" = "RoutingFactsCall", "result_definitions" = ["ApplicationRoutingFactsResult", "ApplicationRejectedResult"] } } [[operations]] id = "propose" @@ -163,7 +169,7 @@ capability = "standards.analyze" id = "resolve_workflow" input_definition = "ResolveWorkflowCall" result_definitions = ["WorkflowResult", "RejectedResult"] -capability_by_submission = { provide-fact = "standards.analyze", consumer-disposition = "standards.review.consumer", impact-disposition = "standards.review.impact", coverage-attestation = "standards.review.audit" } +capability_by_submission = { "provide-fact" = "standards.analyze", "consumer-disposition" = "standards.review.consumer", "impact-disposition" = "standards.review.impact", "coverage-attestation" = "standards.review.audit" } [[operations]] id = "review" diff --git a/tools/standards_engine/contracts/examples/a1-examples.json b/tools/standards_engine/contracts/examples/a1-examples.json index 460c930d..8a543259 100644 --- a/tools/standards_engine/contracts/examples/a1-examples.json +++ b/tools/standards_engine/contracts/examples/a1-examples.json @@ -1,6 +1,6 @@ { "schema_version": 2, - "interface_schema_version": 30, + "interface_schema_version": 31, "examples": [ { "name": "create-snapshot", @@ -164,7 +164,7 @@ "analysis": { "kind": "analysis-handle", "id": "analysis:sha256:aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", - "schema_version": 6 + "schema_version": 7 }, "decisions": [ { @@ -314,7 +314,7 @@ } ], "semantic_proposals": [], - "contract_version": 5 + "contract_version": 6 } } }, @@ -325,7 +325,7 @@ "handle": { "kind": "analysis-handle", "id": "analysis:sha256:aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", - "schema_version": 6 + "schema_version": 7 } } }, @@ -561,7 +561,7 @@ "context": { "kind": "analysis-handle", "id": "analysis:sha256:aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", - "schema_version": 6 + "schema_version": 7 }, "decisions": [ { @@ -649,6 +649,46 @@ "schema_version": 1 } } + }, + { + "name": "application-read", + "definition": "ApplicationReadCall", + "value": { + "target": "core" + } + }, + { + "name": "application-query", + "definition": "ApplicationQueryCall", + "value": { + "snapshot": { + "kind": "snapshot-handle", + "id": "snapshot:v1:00000000-0000-4000-8000-000000000001", + "schema_version": 5 + }, + "request": { + "kind": "read", + "target": "core", + "detail": "full" + } + } + }, + { + "name": "application-inspect", + "definition": "ApplicationInspectCall", + "value": { + "handle": { + "kind": "snapshot-child-handle", + "snapshot": { + "kind": "snapshot-handle", + "id": "snapshot:v1:00000000-0000-4000-8000-000000000001", + "schema_version": 5 + }, + "child_kind": "policy", + "child_id": "core", + "schema_version": 5 + } + } } ] } diff --git a/tools/standards_engine/contracts/generated/agent-tools.json b/tools/standards_engine/contracts/generated/agent-tools.json index bd4d0e50..dde849e8 100644 --- a/tools/standards_engine/contracts/generated/agent-tools.json +++ b/tools/standards_engine/contracts/generated/agent-tools.json @@ -152,7 +152,7 @@ "const": "analysis-child-handle" }, "schema_version": { - "const": 6 + "const": 7 } }, "required": [ @@ -262,7 +262,7 @@ "const": "analysis-handle" }, "schema_version": { - "const": 6 + "const": 7 } }, "required": [ @@ -316,7 +316,7 @@ "type": "array" }, "contract_version": { - "const": 5 + "const": 6 }, "kind": { "const": "analysis-request" @@ -367,7 +367,7 @@ "uniqueItems": true }, "contract_version": { - "const": 6 + "const": 7 }, "coverage_attestations": { "items": { @@ -474,98 +474,557 @@ } }, "required": [ - "operator", - "expressions" + "operator", + "expressions" + ], + "type": "object" + }, + "ApplicabilityExpression": { + "oneOf": [ + { + "$ref": "#/$defs/AlwaysExpression" + }, + { + "$ref": "#/$defs/AllExpression" + }, + { + "$ref": "#/$defs/AnyExpression" + }, + { + "$ref": "#/$defs/NotExpression" + }, + { + "$ref": "#/$defs/EqualsExpression" + }, + { + "$ref": "#/$defs/InExpression" + }, + { + "$ref": "#/$defs/ContainsExpression" + }, + { + "$ref": "#/$defs/ExistsExpression" + } + ] + }, + "ApplicationExposureState": { + "enum": [ + "unreviewed", + "current", + "needs-review" + ] + }, + "ApplicationHandle": { + "additionalProperties": false, + "properties": { + "id": { + "$ref": "#/$defs/ApplicationId" + }, + "kind": { + "const": "application-handle" + }, + "schema_version": { + "const": 1 + } + }, + "required": [ + "kind", + "id", + "schema_version" + ], + "type": "object" + }, + "ApplicationId": { + "pattern": "^application:sha256:[0-9a-f]{64}$", + "type": "string" + }, + "ApplicationInspectCall": { + "additionalProperties": false, + "properties": { + "handle": { + "$ref": "#/$defs/SnapshotChildHandle" + } + }, + "required": [ + "handle" + ], + "type": "object" + }, + "ApplicationNextOperation": { + "additionalProperties": false, + "properties": { + "handle": { + "$ref": "#/$defs/SnapshotChildHandle" + }, + "operation": { + "enum": [ + "read", + "related", + "routing_facts", + "route", + "query", + "inspect" + ] + }, + "snapshot": { + "$ref": "#/$defs/SnapshotHandle" + }, + "target": { + "$ref": "#/$defs/CanonicalId" + } + }, + "required": [ + "operation", + "snapshot" + ], + "type": "object" + }, + "ApplicationPolicy": { + "additionalProperties": false, + "properties": { + "handle": { + "$ref": "#/$defs/SnapshotChildHandle" + }, + "id": { + "$ref": "#/$defs/CanonicalId" + }, + "level": { + "enum": [ + "MUST", + "SHOULD", + "PROFILE", + "REFERENCE" + ] + }, + "role": { + "enum": [ + "core", + "router", + "topic", + "workflow", + "profile", + "reference", + "prompt", + "template" + ] + } + }, + "required": [ + "id", + "handle", + "role", + "level" + ], + "type": "object" + }, + "ApplicationQueryCall": { + "additionalProperties": false, + "properties": { + "request": { + "$ref": "#/$defs/ApplicationQueryRequest" + }, + "snapshot": { + "$ref": "#/$defs/SnapshotHandle" + } + }, + "required": [ + "snapshot", + "request" + ], + "type": "object" + }, + "ApplicationQueryRequest": { + "oneOf": [ + { + "$ref": "#/$defs/RouteRequest" + }, + { + "$ref": "#/$defs/ApplicationReadRequest" + }, + { + "$ref": "#/$defs/RelatedRequest" + } + ] + }, + "ApplicationQuestion": { + "additionalProperties": false, + "properties": { + "fact": { + "$ref": "#/$defs/AuthoredRoutingFact" + } + }, + "required": [ + "fact" + ], + "type": "object" + }, + "ApplicationReadCall": { + "additionalProperties": false, + "properties": { + "detail": { + "enum": [ + "compact", + "full" + ] + }, + "snapshot": { + "$ref": "#/$defs/SnapshotHandle" + }, + "target": { + "$ref": "#/$defs/CanonicalId" + } + }, + "required": [ + "target" + ], + "type": "object" + }, + "ApplicationReadRequest": { + "additionalProperties": false, + "properties": { + "detail": { + "enum": [ + "compact", + "full" + ] + }, + "kind": { + "const": "read" + }, + "target": { + "$ref": "#/$defs/CanonicalId" + } + }, + "required": [ + "kind", + "target" + ], + "type": "object" + }, + "ApplicationReadResult": { + "additionalProperties": false, + "properties": { + "content": { + "type": "string" + }, + "kind": { + "const": "application-read-result" + }, + "next_operations": { + "items": { + "$ref": "#/$defs/ApplicationNextOperation" + }, + "type": "array" + }, + "policy": { + "$ref": "#/$defs/ApplicationPolicy" + }, + "purpose": { + "const": "application" + }, + "related": { + "items": { + "$ref": "#/$defs/ApplicationRelationship" + }, + "type": "array" + }, + "requires": { + "items": { + "$ref": "#/$defs/CanonicalId" + }, + "type": "array" + }, + "scope": { + "$ref": "#/$defs/ReviewScope" + }, + "snapshot": { + "$ref": "#/$defs/SnapshotHandle" + }, + "specializes": { + "items": { + "$ref": "#/$defs/CanonicalId" + }, + "type": "array" + } + }, + "required": [ + "kind", + "purpose", + "snapshot", + "policy", + "content", + "scope", + "requires", + "specializes", + "next_operations" + ], + "type": "object" + }, + "ApplicationReadingEntry": { + "additionalProperties": false, + "properties": { + "authority": { + "enum": [ + "normative", + "contextual" + ] + }, + "scope": { + "$ref": "#/$defs/ReviewScope" + }, + "state": { + "const": "selected" + }, + "target": { + "$ref": "#/$defs/CanonicalId" + } + }, + "required": [ + "target", + "scope", + "authority", + "state" + ], + "type": "object" + }, + "ApplicationRecoveryRequiredResult": { + "additionalProperties": false, + "properties": { + "application": { + "$ref": "#/$defs/ApplicationHandle" + }, + "code": { + "enum": [ + "APPLICATION.PUBLICATION_UNAVAILABLE", + "APPLICATION.OBSERVATION_UNAVAILABLE", + "APPLICATION.OUTCOME_PERSISTENCE_UNAVAILABLE", + "APPLICATION.RECOVERY_TARGET_UNCERTAIN", + "APPLICATION.RECOVERY_TARGET_DIVERGED" + ] + }, + "kind": { + "const": "application-recovery-required-result" + }, + "message": { + "$ref": "#/$defs/NonEmptyString" + }, + "outcome": { + "const": "unavailable" + }, + "status": { + "const": "recovery-required" + } + }, + "required": [ + "kind", + "application", + "status", + "code", + "outcome", + "message" + ], + "type": "object" + }, + "ApplicationRejectedResult": { + "additionalProperties": false, + "properties": { + "code": { + "enum": [ + "APPLICATION.CONTENT_UNAVAILABLE", + "APPLICATION.INPUT_INVALID", + "APPLICATION.OPERATION_UNAVAILABLE", + "APPLICATION.INTERNAL_UNAVAILABLE", + "APPLICATION.UNSUPPORTED_CAPTURE" + ] + }, + "kind": { + "const": "application-rejected-result" + }, + "message": { + "type": "string" + }, + "next_operations": { + "items": { + "$ref": "#/$defs/ApplicationNextOperation" + }, + "type": "array" + }, + "outcome": { + "enum": [ + "invalid", + "unsupported", + "unavailable" + ] + }, + "purpose": { + "const": "application" + } + }, + "required": [ + "kind", + "purpose", + "code", + "outcome", + "message", + "next_operations" + ], + "type": "object" + }, + "ApplicationRelatedResult": { + "additionalProperties": false, + "properties": { + "kind": { + "const": "application-related-result" + }, + "next_operations": { + "items": { + "$ref": "#/$defs/ApplicationNextOperation" + }, + "type": "array" + }, + "purpose": { + "const": "application" + }, + "relationships": { + "items": { + "$ref": "#/$defs/ApplicationRelationship" + }, + "type": "array" + }, + "snapshot": { + "$ref": "#/$defs/SnapshotHandle" + }, + "target": { + "$ref": "#/$defs/CanonicalId" + } + }, + "required": [ + "kind", + "purpose", + "snapshot", + "target", + "relationships", + "next_operations" + ], + "type": "object" + }, + "ApplicationRelationship": { + "additionalProperties": false, + "properties": { + "direction": { + "enum": [ + "incoming", + "outgoing" + ] + }, + "groups": { + "items": { + "$ref": "#/$defs/CanonicalId" + }, + "type": "array" + }, + "handle": { + "$ref": "#/$defs/SnapshotChildHandle" + }, + "relation": { + "type": "string" + }, + "source": { + "$ref": "#/$defs/CanonicalId" + }, + "target": { + "$ref": "#/$defs/CanonicalId" + } + }, + "required": [ + "handle", + "source", + "target", + "relation", + "groups", + "direction" ], "type": "object" }, - "ApplicabilityExpression": { - "oneOf": [ - { - "$ref": "#/$defs/AlwaysExpression" - }, - { - "$ref": "#/$defs/AllExpression" - }, - { - "$ref": "#/$defs/AnyExpression" - }, - { - "$ref": "#/$defs/NotExpression" + "ApplicationRouteResult": { + "additionalProperties": false, + "properties": { + "kind": { + "const": "application-route-result" }, - { - "$ref": "#/$defs/EqualsExpression" + "next_operations": { + "items": { + "$ref": "#/$defs/ApplicationNextOperation" + }, + "type": "array" }, - { - "$ref": "#/$defs/InExpression" + "purpose": { + "const": "application" }, - { - "$ref": "#/$defs/ContainsExpression" + "reading_plan": { + "items": { + "$ref": "#/$defs/ApplicationReadingEntry" + }, + "type": "array" }, - { - "$ref": "#/$defs/ExistsExpression" - } - ] - }, - "ApplicationHandle": { - "additionalProperties": false, - "properties": { - "id": { - "$ref": "#/$defs/ApplicationId" + "snapshot": { + "$ref": "#/$defs/SnapshotHandle" }, - "kind": { - "const": "application-handle" + "status": { + "enum": [ + "complete", + "needs-facts" + ] }, - "schema_version": { - "const": 1 + "unresolved_questions": { + "items": { + "$ref": "#/$defs/ApplicationQuestion" + }, + "type": "array" } }, "required": [ "kind", - "id", - "schema_version" + "purpose", + "snapshot", + "status", + "reading_plan", + "unresolved_questions", + "next_operations" ], "type": "object" }, - "ApplicationId": { - "pattern": "^application:sha256:[0-9a-f]{64}$", - "type": "string" - }, - "ApplicationRecoveryRequiredResult": { + "ApplicationRoutingFactsResult": { "additionalProperties": false, "properties": { - "application": { - "$ref": "#/$defs/ApplicationHandle" - }, - "code": { - "enum": [ - "APPLICATION.PUBLICATION_UNAVAILABLE", - "APPLICATION.OBSERVATION_UNAVAILABLE", - "APPLICATION.OUTCOME_PERSISTENCE_UNAVAILABLE", - "APPLICATION.RECOVERY_TARGET_UNCERTAIN", - "APPLICATION.RECOVERY_TARGET_DIVERGED" - ] + "facts": { + "items": { + "$ref": "#/$defs/AuthoredRoutingFact" + }, + "type": "array" }, "kind": { - "const": "application-recovery-required-result" + "const": "application-routing-facts-result" }, - "message": { - "$ref": "#/$defs/NonEmptyString" + "next_operations": { + "items": { + "$ref": "#/$defs/ApplicationNextOperation" + }, + "type": "array" }, - "outcome": { - "const": "unavailable" + "purpose": { + "const": "application" }, - "status": { - "const": "recovery-required" + "snapshot": { + "$ref": "#/$defs/SnapshotHandle" } }, "required": [ "kind", - "application", - "status", - "code", - "outcome", - "message" + "purpose", + "snapshot", + "facts", + "next_operations" ], "type": "object" }, @@ -617,6 +1076,29 @@ ], "type": "object" }, + "ApproveApplicationContentEdit": { + "additionalProperties": false, + "properties": { + "kind": { + "const": "approve-application-content" + }, + "target": { + "oneOf": [ + { + "$ref": "#/$defs/CanonicalId" + }, + { + "$ref": "#/$defs/AuthoringTargetHandle" + } + ] + } + }, + "required": [ + "kind", + "target" + ], + "type": "object" + }, "AuditPolicyUnitEdit": { "additionalProperties": false, "properties": { @@ -637,6 +1119,72 @@ ], "type": "object" }, + "AuthoredDecisionProvenance": { + "additionalProperties": false, + "properties": { + "alternatives": { + "items": { + "type": "string" + }, + "type": "array" + }, + "assumptions": { + "items": { + "type": "string" + }, + "type": "array" + }, + "evidence": { + "items": { + "$ref": "#/$defs/EvidenceReference" + }, + "type": "array" + }, + "id": { + "$ref": "#/$defs/CanonicalId" + }, + "limits": { + "items": { + "type": "string" + }, + "type": "array" + }, + "origin": { + "enum": [ + "documented-original", + "reconstructed-history", + "current-justification", + "unrecorded" + ] + }, + "rationale": { + "type": "string" + }, + "reconsideration": { + "items": { + "type": "string" + }, + "type": "array" + }, + "subject": { + "$ref": "#/$defs/CanonicalId" + }, + "supersedes": { + "items": { + "type": "string" + }, + "type": "array" + } + }, + "required": [ + "id", + "subject", + "origin", + "rationale", + "evidence" + ], + "type": "object" + }, "AuthoredRoutingFact": { "additionalProperties": false, "properties": { @@ -919,7 +1467,8 @@ "move", "split", "merge", - "navigation-index" + "navigation-index", + "supporting-content" ] }, "proposed_ids": { @@ -1093,6 +1642,9 @@ "CompactReadResult": { "additionalProperties": false, "properties": { + "application_exposure": { + "$ref": "#/$defs/ApplicationExposureState" + }, "content": { "type": "string" }, @@ -1114,6 +1666,12 @@ "policy": { "$ref": "#/$defs/PolicySummary" }, + "provenance": { + "items": { + "$ref": "#/$defs/CanonicalId" + }, + "type": "array" + }, "requires": { "items": { "$ref": "#/$defs/CanonicalId" @@ -1795,25 +2353,104 @@ "decision_contract": { "$ref": "#/$defs/CanonicalId" }, - "decision_kind": { + "decision_kind": { + "$ref": "#/$defs/CanonicalId" + }, + "dependencies": { + "items": { + "$ref": "#/$defs/DecisionDependency" + }, + "minItems": 1, + "type": "array" + }, + "schema_version": { + "const": 1 + } + }, + "required": [ + "decision_kind", + "decision_contract", + "schema_version", + "dependencies" + ], + "type": "object" + }, + "DecisionProvenanceRecord": { + "additionalProperties": false, + "properties": { + "alternatives": { + "items": { + "type": "string" + }, + "type": "array" + }, + "assumptions": { + "items": { + "type": "string" + }, + "type": "array" + }, + "evidence": { + "items": { + "$ref": "#/$defs/EvidenceReference" + }, + "type": "array" + }, + "id": { + "$ref": "#/$defs/CanonicalId" + }, + "limits": { + "items": { + "type": "string" + }, + "type": "array" + }, + "origin": { + "enum": [ + "documented-original", + "reconstructed-history", + "current-justification", + "unrecorded" + ] + }, + "rationale": { + "type": "string" + }, + "reconsideration": { + "items": { + "type": "string" + }, + "type": "array" + }, + "retired": { + "type": "boolean" + }, + "subject": { "$ref": "#/$defs/CanonicalId" }, - "dependencies": { + "subject_binding": { + "$ref": "#/$defs/Digest" + }, + "supersedes": { "items": { - "$ref": "#/$defs/DecisionDependency" + "type": "string" }, - "minItems": 1, "type": "array" - }, - "schema_version": { - "const": 1 } }, "required": [ - "decision_kind", - "decision_contract", - "schema_version", - "dependencies" + "id", + "subject", + "origin", + "rationale", + "evidence", + "assumptions", + "limits", + "alternatives", + "reconsideration", + "supersedes", + "subject_binding", + "retired" ], "type": "object" }, @@ -2605,7 +3242,8 @@ "audit-coverage", "unmapped-normative-change", "structured-scope-analysis-unsupported", - "navigation-index-change" + "navigation-index-change", + "supporting-content-change" ] }, "question": { @@ -3156,6 +3794,59 @@ "pattern": "^obligation:sha256:[0-9a-f]{64}$", "type": "string" }, + "OperationalReadResult": { + "additionalProperties": false, + "properties": { + "application_exposure": { + "$ref": "#/$defs/ApplicationExposureState" + }, + "authority": { + "oneOf": [ + { + "$ref": "#/$defs/SnapshotHandle" + }, + { + "$ref": "#/$defs/ProposalRevisionHandle" + } + ] + }, + "canonical_id": { + "$ref": "#/$defs/CanonicalId" + }, + "content": { + "type": "string" + }, + "kind": { + "const": "operational-read-result" + }, + "next_operations": { + "items": { + "$ref": "#/$defs/NextOperation" + }, + "type": "array" + }, + "role": { + "enum": [ + "prompt", + "template" + ] + }, + "target": { + "$ref": "#/$defs/AuthoringTargetHandle" + } + }, + "required": [ + "kind", + "authority", + "target", + "canonical_id", + "role", + "content", + "application_exposure", + "next_operations" + ], + "type": "object" + }, "PendingResult": { "additionalProperties": false, "properties": { @@ -3475,6 +4166,30 @@ ], "type": "object" }, + "PolicyScopeUpdate": { + "additionalProperties": false, + "properties": { + "heading_path": { + "items": { + "$ref": "#/$defs/NonEmptyString" + }, + "minItems": 1, + "type": "array" + }, + "policy": { + "$ref": "#/$defs/CanonicalId" + }, + "semantics": { + "$ref": "#/$defs/PolicySemanticIntent" + } + }, + "required": [ + "policy", + "heading_path", + "semantics" + ], + "type": "object" + }, "PolicySemanticIntent": { "oneOf": [ { @@ -3680,6 +4395,9 @@ "ProposalReadResult": { "additionalProperties": false, "properties": { + "application_exposure": { + "$ref": "#/$defs/ApplicationExposureState" + }, "content": { "type": "string" }, @@ -3698,6 +4416,12 @@ "policy": { "$ref": "#/$defs/ProposalPolicySummary" }, + "provenance": { + "items": { + "$ref": "#/$defs/CanonicalId" + }, + "type": "array" + }, "related": { "items": { "$ref": "#/$defs/ProposalRelationshipSummary" @@ -3928,6 +4652,48 @@ ], "type": "object" }, + "ProvenanceReadResult": { + "additionalProperties": false, + "properties": { + "authority": { + "oneOf": [ + { + "$ref": "#/$defs/SnapshotHandle" + }, + { + "$ref": "#/$defs/ProposalRevisionHandle" + } + ] + }, + "kind": { + "const": "provenance-read-result" + }, + "next_operations": { + "items": { + "$ref": "#/$defs/NextOperation" + }, + "type": "array" + }, + "record": { + "$ref": "#/$defs/DecisionProvenanceRecord" + }, + "state": { + "enum": [ + "current", + "needs-review", + "retired" + ] + } + }, + "required": [ + "kind", + "authority", + "record", + "state", + "next_operations" + ], + "type": "object" + }, "ProvenanceRecord": { "additionalProperties": false, "properties": { @@ -3997,6 +4763,22 @@ ], "type": "object" }, + "PutDecisionProvenanceEdit": { + "additionalProperties": false, + "properties": { + "kind": { + "const": "put-provenance" + }, + "record": { + "$ref": "#/$defs/AuthoredDecisionProvenance" + } + }, + "required": [ + "kind", + "record" + ], + "type": "object" + }, "PutPolicyRelationshipEdit": { "additionalProperties": false, "properties": { @@ -4180,6 +4962,12 @@ }, { "$ref": "#/$defs/NavigationIndexesResult" + }, + { + "$ref": "#/$defs/ProvenanceReadResult" + }, + { + "$ref": "#/$defs/OperationalReadResult" } ] }, @@ -4209,6 +4997,12 @@ }, { "$ref": "#/$defs/NavigationIndexesResult" + }, + { + "$ref": "#/$defs/ProvenanceReadResult" + }, + { + "$ref": "#/$defs/OperationalReadResult" } ] }, @@ -4325,6 +5119,9 @@ "ReadResult": { "additionalProperties": false, "properties": { + "application_exposure": { + "$ref": "#/$defs/ApplicationExposureState" + }, "content": { "type": "string" }, @@ -4343,6 +5140,12 @@ "policy": { "$ref": "#/$defs/PolicySummary" }, + "provenance": { + "items": { + "$ref": "#/$defs/CanonicalId" + }, + "type": "array" + }, "related": { "items": { "$ref": "#/$defs/RelationshipSummary" @@ -5016,6 +5819,22 @@ ], "type": "object" }, + "RetireDecisionProvenanceEdit": { + "additionalProperties": false, + "properties": { + "id": { + "$ref": "#/$defs/CanonicalId" + }, + "kind": { + "const": "retire-provenance" + } + }, + "required": [ + "kind", + "id" + ], + "type": "object" + }, "RetirePolicyUnitEdit": { "additionalProperties": false, "properties": { @@ -5237,6 +6056,30 @@ ], "type": "object" }, + "ReviseOperationalArtifactEdit": { + "additionalProperties": false, + "properties": { + "body": { + "type": "string" + }, + "kind": { + "const": "revise-operational-artifact" + }, + "target": { + "$ref": "#/$defs/AuthoringTargetHandle" + }, + "title": { + "$ref": "#/$defs/NonEmptyString" + } + }, + "required": [ + "kind", + "target", + "title", + "body" + ], + "type": "object" + }, "RevisePolicyUnitEdit": { "additionalProperties": false, "properties": { @@ -5311,6 +6154,12 @@ "kind": { "const": "revise-standard" }, + "scope_updates": { + "items": { + "$ref": "#/$defs/PolicyScopeUpdate" + }, + "type": "array" + }, "standard": { "$ref": "#/$defs/StandardContent" } @@ -5840,6 +6689,21 @@ }, { "$ref": "#/$defs/RewriteNavigationIndexEdit" + }, + { + "$ref": "#/$defs/PutDecisionProvenanceEdit" + }, + { + "$ref": "#/$defs/RetireDecisionProvenanceEdit" + }, + { + "$ref": "#/$defs/ApproveApplicationContentEdit" + }, + { + "$ref": "#/$defs/WithdrawApplicationContentEdit" + }, + { + "$ref": "#/$defs/ReviseOperationalArtifactEdit" } ] }, @@ -6120,6 +6984,29 @@ ], "type": "object" }, + "WithdrawApplicationContentEdit": { + "additionalProperties": false, + "properties": { + "kind": { + "const": "withdraw-application-content" + }, + "target": { + "oneOf": [ + { + "$ref": "#/$defs/CanonicalId" + }, + { + "$ref": "#/$defs/AuthoringTargetHandle" + } + ] + } + }, + "required": [ + "kind", + "target" + ], + "type": "object" + }, "WorkflowContext": { "oneOf": [ { @@ -6262,7 +7149,7 @@ "type": "object" } }, - "interface_schema_version": 30, + "interface_schema_version": 31, "operations": [ { "capability": "standards.snapshot.create", @@ -6322,7 +7209,21 @@ "result_definitions": [ "QueryResult", "RejectedResult" - ] + ], + "variants": { + "application": { + "input_definition": "ApplicationQueryCall", + "input_schema": { + "$ref": "#/$defs/ApplicationQueryCall" + }, + "result_definitions": [ + "ApplicationRouteResult", + "ApplicationReadResult", + "ApplicationRelatedResult", + "ApplicationRejectedResult" + ] + } + } }, { "capability": "standards.analyze", @@ -6365,7 +7266,20 @@ "result_definitions": [ "InspectionResult", "RejectedResult" - ] + ], + "variants": { + "application": { + "input_definition": "ApplicationInspectCall", + "input_schema": { + "$ref": "#/$defs/ApplicationInspectCall" + }, + "result_definitions": [ + "ApplicationReadResult", + "ApplicationRelatedResult", + "ApplicationRejectedResult" + ] + } + } }, { "capability": "standards.proposal.author", @@ -6512,7 +7426,19 @@ "result_definitions": [ "AgentRouteResult", "RejectedResult" - ] + ], + "variants": { + "application": { + "input_definition": "RouteCall", + "input_schema": { + "$ref": "#/$defs/RouteCall" + }, + "result_definitions": [ + "ApplicationRouteResult", + "ApplicationRejectedResult" + ] + } + } }, { "capability": "standards.read", @@ -6525,8 +7451,22 @@ "CompactReadResult", "ReadResult", "NavigationIndexesResult", - "RejectedResult" - ] + "RejectedResult", + "ProvenanceReadResult", + "OperationalReadResult" + ], + "variants": { + "application": { + "input_definition": "ApplicationReadCall", + "input_schema": { + "$ref": "#/$defs/ApplicationReadCall" + }, + "result_definitions": [ + "ApplicationReadResult", + "ApplicationRejectedResult" + ] + } + } }, { "capability": "standards.read", @@ -6538,7 +7478,19 @@ "result_definitions": [ "RelatedResult", "RejectedResult" - ] + ], + "variants": { + "application": { + "input_definition": "RelatedCall", + "input_schema": { + "$ref": "#/$defs/RelatedCall" + }, + "result_definitions": [ + "ApplicationRelatedResult", + "ApplicationRejectedResult" + ] + } + } }, { "capability": "standards.read", @@ -6550,7 +7502,19 @@ "result_definitions": [ "RoutingFactsResult", "RejectedResult" - ] + ], + "variants": { + "application": { + "input_definition": "RoutingFactsCall", + "input_schema": { + "$ref": "#/$defs/RoutingFactsCall" + }, + "result_definitions": [ + "ApplicationRoutingFactsResult", + "ApplicationRejectedResult" + ] + } + } }, { "capability": "standards.proposal.author", @@ -6666,7 +7630,7 @@ ] } ], - "request_contract_version": 5, - "result_projection_version": 6, + "request_contract_version": 6, + "result_projection_version": 7, "schema_version": 1 } diff --git a/tools/standards_engine/contracts/identity-fixtures.json b/tools/standards_engine/contracts/identity-fixtures.json index 85f53a13..9e1e85dd 100644 --- a/tools/standards_engine/contracts/identity-fixtures.json +++ b/tools/standards_engine/contracts/identity-fixtures.json @@ -145,7 +145,7 @@ "value": { "kind": "analysis-handle", "id": "analysis:sha256:aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", - "schema_version": 6 + "schema_version": 7 } }, { @@ -189,11 +189,11 @@ "analysis": { "kind": "analysis-handle", "id": "analysis:sha256:aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", - "schema_version": 6 + "schema_version": 7 }, "child_kind": "context", "child_id": "sha256:bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb", - "schema_version": 6 + "schema_version": 7 } } ] diff --git a/tools/standards_engine/pyproject.toml b/tools/standards_engine/pyproject.toml index 86f40b07..2aef3f6b 100644 --- a/tools/standards_engine/pyproject.toml +++ b/tools/standards_engine/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "standards-engine" -version = "0.1.0" +version = "0.2.0" description = "Typed standards navigation and analysis facade" requires-python = ">=3.11,<3.13" dependencies = [ diff --git a/tools/standards_engine/standards_engine/__init__.py b/tools/standards_engine/standards_engine/__init__.py index 09bdfc06..89615061 100644 --- a/tools/standards_engine/standards_engine/__init__.py +++ b/tools/standards_engine/standards_engine/__init__.py @@ -2,6 +2,7 @@ from ._generated_contract import * # noqa: F403 from ._generated_contract import __all__ as _contract_all +from .context_projection import Purpose from .engine import StandardsEngine from .rendering import render_text from .tools import AgentToolFacade @@ -9,6 +10,7 @@ __all__ = ( *_contract_all, "AgentToolFacade", + "Purpose", "StandardsEngine", "render_text", ) diff --git a/tools/standards_engine/standards_engine/_generated_contract.py b/tools/standards_engine/standards_engine/_generated_contract.py index e3682f4a..e24adbb1 100644 --- a/tools/standards_engine/standards_engine/_generated_contract.py +++ b/tools/standards_engine/standards_engine/_generated_contract.py @@ -14,8 +14,8 @@ model_as_contract, ) -_SCHEMA = json.loads('{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"https://coding-standards.local/contracts/standards-engine/a2-v24","title":"Standards Engine A2 contract","description":"Canonical typed contract for snapshot lifecycle, controlled authoring, navigation, inspection, and immutable standards-change analysis.","oneOf":[{"$ref":"#/$defs/CreateSnapshotCall"},{"$ref":"#/$defs/CreateSnapshotResult"},{"$ref":"#/$defs/RejectedResult"},{"$ref":"#/$defs/FindSnapshotsCall"},{"$ref":"#/$defs/FindSnapshotsResult"},{"$ref":"#/$defs/DeleteSnapshotCall"},{"$ref":"#/$defs/DeleteSnapshotResult"},{"$ref":"#/$defs/UndeleteSnapshotCall"},{"$ref":"#/$defs/UndeleteSnapshotResult"},{"$ref":"#/$defs/QueryCall"},{"$ref":"#/$defs/QueryResult"},{"$ref":"#/$defs/PrepareCall"},{"$ref":"#/$defs/PendingResult"},{"$ref":"#/$defs/CompleteResult"},{"$ref":"#/$defs/ResolveCall"},{"$ref":"#/$defs/InspectCall"},{"$ref":"#/$defs/InspectionResult"},{"$ref":"#/$defs/CreateProposalCall"},{"$ref":"#/$defs/CreateProposalResult"},{"$ref":"#/$defs/FindProposalsCall"},{"$ref":"#/$defs/FindProposalsResult"},{"$ref":"#/$defs/ReviseProposalCall"},{"$ref":"#/$defs/ReviseProposalResult"},{"$ref":"#/$defs/QueryProposalCall"},{"$ref":"#/$defs/QueryProposalResult"},{"$ref":"#/$defs/AnalyzeProposalCall"},{"$ref":"#/$defs/ReviewProposalCall"},{"$ref":"#/$defs/ReviewProposalResult"},{"$ref":"#/$defs/ApplyProposalCall"},{"$ref":"#/$defs/ApplyProposalResult"},{"$ref":"#/$defs/ApplicationRecoveryRequiredResult"},{"$ref":"#/$defs/RecoverApplicationCall"},{"$ref":"#/$defs/RecoverApplicationResult"},{"$ref":"#/$defs/VerifyRepositoryCall"},{"$ref":"#/$defs/VerifyRepositoryResult"},{"$ref":"#/$defs/VerifyProposalCall"},{"$ref":"#/$defs/VerifyProposalResult"},{"$ref":"#/$defs/MaintainEvidenceCall"},{"$ref":"#/$defs/MaintainEvidenceResult"},{"$ref":"#/$defs/RouteCall"},{"$ref":"#/$defs/AgentRouteResult"},{"$ref":"#/$defs/ReadCall"},{"$ref":"#/$defs/CompactReadResult"},{"$ref":"#/$defs/ReadResult"},{"$ref":"#/$defs/RelatedCall"},{"$ref":"#/$defs/RelatedResult"},{"$ref":"#/$defs/RoutingFactsCall"},{"$ref":"#/$defs/RoutingFactsResult"},{"$ref":"#/$defs/ProposeCall"},{"$ref":"#/$defs/WorkflowResult"},{"$ref":"#/$defs/ReviseCall"},{"$ref":"#/$defs/AnalyzeCall"},{"$ref":"#/$defs/ResolveWorkflowCall"},{"$ref":"#/$defs/ReviewCall"},{"$ref":"#/$defs/ApplyCall"},{"$ref":"#/$defs/RecoverCall"},{"$ref":"#/$defs/WorkflowStatusCall"},{"$ref":"#/$defs/ResumeCall"},{"$ref":"#/$defs/NavigationIndexesResult"}],"$defs":{"NonEmptyString":{"type":"string","minLength":1},"CanonicalId":{"type":"string","pattern":"^[A-Za-z0-9][A-Za-z0-9._:/-]*$"},"EdgeId":{"type":"string","minLength":1},"Digest":{"type":"string","pattern":"^sha256:[0-9a-f]{64}$"},"ObligationId":{"type":"string","pattern":"^obligation:sha256:[0-9a-f]{64}$"},"ImpactTraceId":{"type":"string","pattern":"^impact-trace:sha256:[0-9a-f]{64}$"},"FactRequirementId":{"type":"string","pattern":"^fact-requirement:sha256:[0-9a-f]{64}$"},"ScalarValue":{"oneOf":[{"type":"boolean"},{"type":"integer"},{"type":"string"},{"type":"null"}]},"FactValue":{"oneOf":[{"type":"object","required":["type","state","value"],"properties":{"type":{"const":"boolean"},"state":{"const":"known"},"value":{"type":"boolean"}},"additionalProperties":false},{"type":"object","required":["type","state","value"],"properties":{"type":{"enum":["boolean","enum","string","string-set","enum-set","canonical-id"]},"state":{"const":"known"},"value":{"type":"null"}},"additionalProperties":false},{"type":"object","required":["type","state","value"],"properties":{"type":{"enum":["enum","string","canonical-id"]},"state":{"const":"known"},"value":{"type":"string"}},"additionalProperties":false},{"type":"object","required":["type","state","value"],"properties":{"type":{"enum":["string-set","enum-set"]},"state":{"const":"known"},"value":{"type":"array","items":{"type":"string"},"uniqueItems":true}},"additionalProperties":false},{"type":"object","required":["type","state"],"properties":{"type":{"enum":["boolean","enum","string","string-set","enum-set","canonical-id"]},"state":{"enum":["known-absent","unknown"]}},"additionalProperties":false}]},"FactSet":{"type":"object","additionalProperties":{"$ref":"#/$defs/FactValue"}},"StructuredScope":{"type":"object","required":["kind","heading_path"],"properties":{"kind":{"const":"structured"},"heading_path":{"type":"array","minItems":1,"items":{"$ref":"#/$defs/NonEmptyString"}}},"additionalProperties":false},"WholeArtifactScope":{"type":"object","required":["kind"],"properties":{"kind":{"const":"whole-artifact"}},"additionalProperties":false},"ReviewScope":{"oneOf":[{"$ref":"#/$defs/StructuredScope"},{"$ref":"#/$defs/WholeArtifactScope"}]},"AllExpression":{"type":"object","required":["operator","expressions"],"properties":{"operator":{"const":"all"},"expressions":{"type":"array","minItems":1,"items":{"$ref":"#/$defs/ApplicabilityExpression"}}},"additionalProperties":false},"AnyExpression":{"type":"object","required":["operator","expressions"],"properties":{"operator":{"const":"any"},"expressions":{"type":"array","minItems":1,"items":{"$ref":"#/$defs/ApplicabilityExpression"}}},"additionalProperties":false},"NotExpression":{"type":"object","required":["operator","expression"],"properties":{"operator":{"const":"not"},"expression":{"$ref":"#/$defs/ApplicabilityExpression"}},"additionalProperties":false},"EqualsExpression":{"type":"object","required":["operator","fact","value"],"properties":{"operator":{"const":"equals"},"fact":{"$ref":"#/$defs/CanonicalId"},"value":{"$ref":"#/$defs/ScalarValue"}},"additionalProperties":false},"InExpression":{"type":"object","required":["operator","fact","values"],"properties":{"operator":{"const":"in"},"fact":{"$ref":"#/$defs/CanonicalId"},"values":{"type":"array","minItems":1,"uniqueItems":true,"items":{"$ref":"#/$defs/ScalarValue"}}},"additionalProperties":false},"ContainsExpression":{"type":"object","required":["operator","fact","value"],"properties":{"operator":{"const":"contains"},"fact":{"$ref":"#/$defs/CanonicalId"},"value":{"$ref":"#/$defs/ScalarValue"}},"additionalProperties":false},"ExistsExpression":{"type":"object","required":["operator","fact"],"properties":{"operator":{"const":"exists"},"fact":{"$ref":"#/$defs/CanonicalId"}},"additionalProperties":false},"AlwaysExpression":{"type":"object","required":["operator"],"properties":{"operator":{"const":"always"}},"additionalProperties":false},"ApplicabilityExpression":{"oneOf":[{"$ref":"#/$defs/AlwaysExpression"},{"$ref":"#/$defs/AllExpression"},{"$ref":"#/$defs/AnyExpression"},{"$ref":"#/$defs/NotExpression"},{"$ref":"#/$defs/EqualsExpression"},{"$ref":"#/$defs/InExpression"},{"$ref":"#/$defs/ContainsExpression"},{"$ref":"#/$defs/ExistsExpression"}]},"GeneralSelectionReason":{"type":"object","required":["kind"],"properties":{"kind":{"enum":["routing-fact","requires","specializes","changed-policy","question","audit-coverage","unmapped-normative-change","structured-scope-analysis-unsupported","navigation-index-change"]},"source":{"$ref":"#/$defs/CanonicalId"},"fact":{"$ref":"#/$defs/CanonicalId"},"edge":{"$ref":"#/$defs/EdgeId"},"question":{"$ref":"#/$defs/CanonicalId"}},"additionalProperties":false},"PolicyImpactSelectionReason":{"type":"object","required":["kind","source","edge","relation","evidence_owner","traces"],"properties":{"kind":{"const":"policy-impact-edge"},"source":{"$ref":"#/$defs/CanonicalId"},"edge":{"$ref":"#/$defs/EdgeId"},"relation":{"$ref":"#/$defs/CanonicalId"},"evidence_owner":{"$ref":"#/$defs/CanonicalId"},"traces":{"type":"array","minItems":1,"uniqueItems":true,"items":{"$ref":"#/$defs/ImpactTraceReference"}}},"additionalProperties":false},"SelectionReason":{"oneOf":[{"$ref":"#/$defs/GeneralSelectionReason"},{"$ref":"#/$defs/PolicyImpactSelectionReason"}]},"ImpactTraceReference":{"type":"object","required":["id","graph","applicability"],"properties":{"id":{"$ref":"#/$defs/ImpactTraceId"},"graph":{"enum":["accepted","proposed"]},"applicability":{"enum":["true","false","unknown"]}},"additionalProperties":false},"ConsumerReviewObligationReadingReason":{"type":"object","required":["kind","obligation"],"properties":{"kind":{"const":"consumer-review-obligation"},"obligation":{"$ref":"#/$defs/ObligationId"}},"additionalProperties":false},"RoutingBaseReadingReason":{"type":"object","required":["kind","projection"],"properties":{"kind":{"const":"routing-base"},"projection":{"$ref":"#/$defs/CanonicalId"}},"additionalProperties":false},"RoutingRuleReadingReason":{"type":"object","required":["kind","rule","facts"],"properties":{"kind":{"const":"routing-rule"},"rule":{"$ref":"#/$defs/CanonicalId"},"facts":{"type":"array","uniqueItems":true,"items":{"$ref":"#/$defs/CanonicalId"}}},"additionalProperties":false},"RequiresReadingReason":{"type":"object","required":["kind","edge","source"],"properties":{"kind":{"const":"requires"},"edge":{"$ref":"#/$defs/EdgeId"},"source":{"$ref":"#/$defs/CanonicalId"}},"additionalProperties":false},"SpecializesReadingReason":{"type":"object","required":["kind","edge","source"],"properties":{"kind":{"const":"specializes"},"edge":{"$ref":"#/$defs/EdgeId"},"source":{"$ref":"#/$defs/CanonicalId"}},"additionalProperties":false},"ReadingPlanReason":{"oneOf":[{"$ref":"#/$defs/ConsumerReviewObligationReadingReason"},{"$ref":"#/$defs/RoutingBaseReadingReason"},{"$ref":"#/$defs/RoutingRuleReadingReason"},{"$ref":"#/$defs/RequiresReadingReason"},{"$ref":"#/$defs/SpecializesReadingReason"}]},"ReadingPlanEntry":{"type":"object","required":["target","scope","authority","reasons","state"],"properties":{"target":{"$ref":"#/$defs/CanonicalId"},"scope":{"$ref":"#/$defs/ReviewScope"},"authority":{"enum":["normative","projection","contextual","evidence"]},"reasons":{"type":"array","minItems":1,"uniqueItems":true,"items":{"$ref":"#/$defs/ReadingPlanReason"}},"state":{"enum":["selected","conditional","unresolved"]}},"additionalProperties":false},"RouteRequest":{"type":"object","required":["kind","facts"],"properties":{"kind":{"const":"route"},"facts":{"$ref":"#/$defs/FactSet"}},"additionalProperties":false},"ReadRequest":{"type":"object","required":["kind","target"],"properties":{"kind":{"const":"read"},"target":{"$ref":"#/$defs/CanonicalId"},"include_routing":{"type":"boolean"},"include_coverage":{"type":"boolean","description":"Include current repository attestation status for registered policy units in this read scope."}},"additionalProperties":false},"RelatedRequest":{"type":"object","required":["kind","target","groups","direction","transitive"],"properties":{"kind":{"const":"related"},"target":{"$ref":"#/$defs/CanonicalId"},"groups":{"type":"array","minItems":1,"uniqueItems":true,"items":{"$ref":"#/$defs/CanonicalId"}},"direction":{"enum":["incoming","outgoing","both"]},"transitive":{"type":"boolean","default":false}},"additionalProperties":false},"QueryRequest":{"oneOf":[{"$ref":"#/$defs/RouteRequest"},{"$ref":"#/$defs/ReadRequest"},{"$ref":"#/$defs/RelatedRequest"}]},"PolicyUnitDeclaration":{"type":"object","required":["kind","id","module","heading_path","semantic_revision","lifecycle"],"properties":{"kind":{"const":"policy-unit"},"id":{"$ref":"#/$defs/CanonicalId"},"module":{"$ref":"#/$defs/CanonicalId"},"heading_path":{"type":"array","minItems":1,"items":{"$ref":"#/$defs/NonEmptyString"}},"semantic_revision":{"type":"integer","minimum":1},"lifecycle":{"const":"active"},"aliases":{"type":"array","uniqueItems":true,"items":{"$ref":"#/$defs/CanonicalId"}},"predecessors":{"type":"array","uniqueItems":true,"items":{"$ref":"#/$defs/CanonicalId"}},"successors":{"type":"array","uniqueItems":true,"items":{"$ref":"#/$defs/CanonicalId"}}},"additionalProperties":false},"CanonicalModuleDeclaration":{"type":"object","required":["kind","id","role","level","applies_when","does_not_apply_when","requires","specializes","verification"],"properties":{"kind":{"const":"canonical-module"},"id":{"$ref":"#/$defs/CanonicalId"},"role":{"enum":["core","router","workflow","profile","topic","reference"]},"level":{"enum":["MUST","SHOULD","PROFILE","REFERENCE"]},"applies_when":{"$ref":"#/$defs/NonEmptyString"},"does_not_apply_when":{"$ref":"#/$defs/NonEmptyString"},"requires":{"type":"array","uniqueItems":true,"items":{"$ref":"#/$defs/CanonicalId"}},"specializes":{"type":"array","uniqueItems":true,"items":{"$ref":"#/$defs/CanonicalId"}},"verification":{"$ref":"#/$defs/NonEmptyString"}},"additionalProperties":false},"PolicyRelationshipInspection":{"type":"object","required":["relationship_kind","applicability","source_scope","consumer_scope","propagation","evidence_owner","rationale"],"properties":{"relationship_kind":{"enum":["normative-consumer","router-projection","prompt-projection","template-projection","reference-projection","fixture-projection","enforcement-suite-projection","documentation-projection","implementation-projection"]},"applicability":{"$ref":"#/$defs/ApplicabilityExpression"},"source_scope":{"oneOf":[{"$ref":"#/$defs/ReviewScope"},{"type":"null"}]},"consumer_scope":{"oneOf":[{"$ref":"#/$defs/ReviewScope"},{"type":"null"}]},"propagation":{"const":"source-to-consumer"},"evidence_owner":{"$ref":"#/$defs/CanonicalId"},"rationale":{"$ref":"#/$defs/NonEmptyString"}},"additionalProperties":false},"SemanticProposal":{"type":"object","required":["policy","accepted_semantic_revision","proposed_semantic_revision","intent","structural_digest"],"properties":{"policy":{"$ref":"#/$defs/CanonicalId"},"accepted_semantic_revision":{"oneOf":[{"type":"integer","minimum":1},{"type":"null"}]},"proposed_semantic_revision":{"type":"integer","minimum":1},"intent":{"$ref":"#/$defs/NonEmptyString"},"structural_digest":{"$ref":"#/$defs/Digest"}},"additionalProperties":false},"ChangeDescriptor":{"type":"object","required":["kind","accepted_ids","proposed_ids","scope"],"properties":{"kind":{"enum":["module","modification","addition","removal","move","split","merge","navigation-index"]},"accepted_ids":{"type":"array","uniqueItems":true,"items":{"$ref":"#/$defs/CanonicalId"}},"proposed_ids":{"type":"array","uniqueItems":true,"items":{"$ref":"#/$defs/CanonicalId"}},"scope":{"$ref":"#/$defs/ReviewScope"},"accepted_module":{"$ref":"#/$defs/CanonicalId"},"proposed_module":{"$ref":"#/$defs/CanonicalId"}},"additionalProperties":false},"ChangedPolicyUnit":{"type":"object","required":["policy","change_kind","classification","accepted_representation_digest","proposed_representation_digest","accepted_structural_digest","proposed_structural_digest","accepted_semantic_revision","proposed_semantic_revision","semantic_state","scope"],"properties":{"policy":{"$ref":"#/$defs/CanonicalId"},"change_kind":{"enum":["modification","addition","removal","move","split-predecessor","split-successor","merge-predecessor","merge-successor"]},"classification":{"enum":["unchanged","representation-only-candidate","possibly-semantically-changed","semantically-changed","unresolved"]},"accepted_representation_digest":{"oneOf":[{"$ref":"#/$defs/Digest"},{"type":"null"}]},"proposed_representation_digest":{"oneOf":[{"$ref":"#/$defs/Digest"},{"type":"null"}]},"accepted_structural_digest":{"oneOf":[{"$ref":"#/$defs/Digest"},{"type":"null"}]},"proposed_structural_digest":{"oneOf":[{"$ref":"#/$defs/Digest"},{"type":"null"}]},"accepted_semantic_revision":{"oneOf":[{"type":"integer","minimum":1},{"type":"null"}]},"proposed_semantic_revision":{"oneOf":[{"type":"integer","minimum":1},{"type":"null"}]},"semantic_state":{"enum":["accepted-unchanged","proposed","removed","unresolved"]},"scope":{"$ref":"#/$defs/ReviewScope"}},"additionalProperties":false},"Question":{"type":"object","required":["id","kind","prompt","state","permitted_answers"],"properties":{"id":{"$ref":"#/$defs/CanonicalId"},"kind":{"enum":["applicability-fact","normative-classification","identity-resolution","scope-resolution"]},"prompt":{"$ref":"#/$defs/NonEmptyString"},"state":{"enum":["required","answered","blocked"]},"permitted_answers":{"type":"array","minItems":1,"uniqueItems":true,"items":{"$ref":"#/$defs/NonEmptyString"}}},"additionalProperties":false},"ConsumerReviewContract":{"type":"object","required":["kind","id","version","permitted_dispositions","evidence_contract","authorization_capability","semantics"],"properties":{"kind":{"const":"consumer-review-contract"},"id":{"$ref":"#/$defs/CanonicalId"},"version":{"type":"integer","minimum":1},"permitted_dispositions":{"type":"array","minItems":1,"uniqueItems":true,"items":{"enum":["updated","reviewed-no-change","not-applicable","blocked"]}},"evidence_contract":{"$ref":"#/$defs/CanonicalId"},"authorization_capability":{"$ref":"#/$defs/CanonicalId"},"semantics":{"$ref":"#/$defs/NonEmptyString"}},"additionalProperties":false},"DecisionDependency":{"type":"object","required":["class","identity","digest"],"properties":{"class":{"enum":["policy-unit","semantic-revision","structure","representation","module-locator","applicability-fact","relationship","audit","exception","evidence","provider-contract","applicability-contract","analysis-contract"]},"identity":{"$ref":"#/$defs/NonEmptyString"},"digest":{"$ref":"#/$defs/Digest"}},"additionalProperties":false},"DecisionFingerprint":{"type":"object","required":["decision_kind","decision_contract","schema_version","dependencies"],"properties":{"decision_kind":{"$ref":"#/$defs/CanonicalId"},"decision_contract":{"$ref":"#/$defs/CanonicalId"},"schema_version":{"const":1},"dependencies":{"type":"array","minItems":1,"items":{"$ref":"#/$defs/DecisionDependency"}}},"additionalProperties":false},"FactValueContract":{"type":"object","required":["type","states","nullable"],"properties":{"type":{"enum":["boolean","enum","string","string-set","enum-set","canonical-id"]},"states":{"const":["known","known-absent"]},"nullable":{"type":"boolean"},"values":{"type":"array","minItems":1,"uniqueItems":true,"items":{"type":"string"}}},"additionalProperties":false},"EvidenceReference":{"type":"object","required":["id","digest","provider_contract","provider_contract_version"],"properties":{"id":{"$ref":"#/$defs/CanonicalId"},"digest":{"$ref":"#/$defs/Digest"},"provider_contract":{"$ref":"#/$defs/CanonicalId"},"provider_contract_version":{"$ref":"#/$defs/NonEmptyString"}},"additionalProperties":false},"CompletionProof":{"type":"object","required":["required_coverage_subjects","certificate_subjects","reached_consumer_obligations","disposition_obligations","required_fact_requirements","observed_fact_requirements","non_consumer_obligations_resolved","applicability_resolved","authorization_valid","evidence_valid"],"properties":{"required_coverage_subjects":{"type":"array","uniqueItems":true,"items":{"$ref":"#/$defs/CanonicalId"}},"certificate_subjects":{"type":"array","uniqueItems":true,"items":{"$ref":"#/$defs/CanonicalId"}},"reached_consumer_obligations":{"type":"array","uniqueItems":true,"items":{"$ref":"#/$defs/ObligationId"}},"disposition_obligations":{"type":"array","uniqueItems":true,"items":{"$ref":"#/$defs/ObligationId"}},"required_fact_requirements":{"type":"array","uniqueItems":true,"items":{"$ref":"#/$defs/FactRequirementId"}},"observed_fact_requirements":{"type":"array","uniqueItems":true,"items":{"$ref":"#/$defs/FactRequirementId"}},"non_consumer_obligations_resolved":{"const":true},"applicability_resolved":{"const":true},"authorization_valid":{"const":true},"evidence_valid":{"const":true}},"additionalProperties":false},"Timestamp":{"type":"integer","minimum":0},"SnapshotId":{"type":"string","pattern":"^snapshot:v1:[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"},"AnalysisId":{"type":"string","pattern":"^analysis:sha256:[0-9a-f]{64}$"},"ProposalId":{"type":"string","pattern":"^proposal:v1:[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"},"ProposalRevisionId":{"type":"string","pattern":"^proposal-revision:sha256:[0-9a-f]{64}$"},"ReadinessId":{"type":"string","pattern":"^readiness:sha256:[0-9a-f]{64}$"},"ApplicationId":{"type":"string","pattern":"^application:sha256:[0-9a-f]{64}$"},"ChildId":{"type":"string","pattern":"^sha256:[0-9a-f]{64}$"},"AuthorizationId":{"type":"string","pattern":"^authorization:sha256:[0-9a-f]{64}$"},"SnapshotHandle":{"type":"object","required":["kind","id","schema_version"],"properties":{"kind":{"const":"snapshot-handle"},"id":{"$ref":"#/$defs/SnapshotId"},"schema_version":{"const":5}},"additionalProperties":false},"AnalysisHandle":{"type":"object","required":["kind","id","schema_version"],"properties":{"kind":{"const":"analysis-handle"},"id":{"$ref":"#/$defs/AnalysisId"},"schema_version":{"const":6}},"additionalProperties":false},"ProposalHandle":{"type":"object","required":["kind","id","schema_version"],"properties":{"kind":{"const":"proposal-handle"},"id":{"$ref":"#/$defs/ProposalId"},"schema_version":{"const":1}},"additionalProperties":false},"ProposalRevisionHandle":{"type":"object","required":["kind","id","schema_version"],"properties":{"kind":{"const":"proposal-revision-handle"},"id":{"$ref":"#/$defs/ProposalRevisionId"},"schema_version":{"const":1}},"additionalProperties":false},"ReadinessHandle":{"type":"object","required":["kind","id","schema_version"],"properties":{"kind":{"const":"readiness-handle"},"id":{"$ref":"#/$defs/ReadinessId"},"schema_version":{"const":1}},"additionalProperties":false},"ApplicationHandle":{"type":"object","required":["kind","id","schema_version"],"properties":{"kind":{"const":"application-handle"},"id":{"$ref":"#/$defs/ApplicationId"},"schema_version":{"const":1}},"additionalProperties":false},"SnapshotChildHandle":{"type":"object","required":["kind","snapshot","child_kind","child_id","schema_version"],"properties":{"kind":{"const":"snapshot-child-handle"},"snapshot":{"$ref":"#/$defs/SnapshotHandle"},"child_kind":{"enum":["policy","relationship"]},"child_id":{"$ref":"#/$defs/NonEmptyString"},"schema_version":{"const":5}},"additionalProperties":false},"AnalysisChildHandle":{"type":"object","required":["kind","analysis","child_kind","child_id","schema_version"],"properties":{"kind":{"const":"analysis-child-handle"},"analysis":{"$ref":"#/$defs/AnalysisHandle"},"child_kind":{"enum":["context","fact-requirement","fact-observation","obligation","coverage-requirement","coverage-certificate"]},"child_id":{"$ref":"#/$defs/ChildId"},"schema_version":{"const":6}},"additionalProperties":false},"AnalysisMaterialHandle":{"oneOf":[{"$ref":"#/$defs/SnapshotHandle"},{"$ref":"#/$defs/ProposalRevisionHandle"}]},"InspectableHandle":{"oneOf":[{"$ref":"#/$defs/SnapshotHandle"},{"$ref":"#/$defs/AnalysisHandle"},{"$ref":"#/$defs/SnapshotChildHandle"},{"$ref":"#/$defs/AnalysisChildHandle"}]},"ActiveSnapshotSummary":{"type":"object","required":["snapshot","lifecycle","source_revision","created_at"],"properties":{"snapshot":{"$ref":"#/$defs/SnapshotHandle"},"lifecycle":{"const":"active"},"source_revision":{"$ref":"#/$defs/NonEmptyString"},"created_at":{"$ref":"#/$defs/Timestamp"}},"additionalProperties":false},"QuarantinedSnapshotSummary":{"type":"object","required":["snapshot","lifecycle","source_revision","created_at","purge_deadline"],"properties":{"snapshot":{"$ref":"#/$defs/SnapshotHandle"},"lifecycle":{"const":"quarantined"},"source_revision":{"$ref":"#/$defs/NonEmptyString"},"created_at":{"$ref":"#/$defs/Timestamp"},"purge_deadline":{"$ref":"#/$defs/Timestamp"}},"additionalProperties":false},"SnapshotSummary":{"oneOf":[{"$ref":"#/$defs/ActiveSnapshotSummary"},{"$ref":"#/$defs/QuarantinedSnapshotSummary"}]},"CreateSnapshotCall":{"type":"object","required":["kind"],"properties":{"kind":{"const":"create-snapshot"}},"additionalProperties":false},"CreateSnapshotResult":{"type":"object","required":["kind","snapshot"],"properties":{"kind":{"const":"create-snapshot-result"},"snapshot":{"$ref":"#/$defs/ActiveSnapshotSummary"}},"additionalProperties":false},"FindSnapshotsCall":{"type":"object","required":["kind"],"properties":{"kind":{"const":"find-snapshots"},"lifecycle":{"enum":["active","quarantined"],"default":"active"},"after":{"$ref":"#/$defs/SnapshotHandle"},"limit":{"type":"integer","minimum":1,"default":50}},"additionalProperties":false},"FindSnapshotsResult":{"type":"object","required":["kind","snapshots"],"properties":{"kind":{"const":"find-snapshots-result"},"snapshots":{"type":"array","items":{"$ref":"#/$defs/SnapshotSummary"}},"continuation":{"$ref":"#/$defs/SnapshotHandle"}},"additionalProperties":false},"StandardsChangePurpose":{"type":"object","required":["summary","rationale","evidence"],"properties":{"summary":{"$ref":"#/$defs/NonEmptyString"},"rationale":{"$ref":"#/$defs/NonEmptyString"},"evidence":{"type":"array","minItems":1,"uniqueItems":true,"items":{"$ref":"#/$defs/EvidenceReference"}}},"additionalProperties":false},"StandardContent":{"type":"object","required":["id","title","role","level","applies_when","does_not_apply_when","verification","body"],"properties":{"id":{"$ref":"#/$defs/CanonicalId"},"title":{"$ref":"#/$defs/NonEmptyString"},"role":{"enum":["core","router","workflow","profile","topic","reference"]},"level":{"enum":["MUST","SHOULD","PROFILE","REFERENCE"]},"applies_when":{"$ref":"#/$defs/NonEmptyString"},"does_not_apply_when":{"$ref":"#/$defs/NonEmptyString"},"verification":{"$ref":"#/$defs/NonEmptyString"},"body":{"$ref":"#/$defs/NonEmptyString"}},"additionalProperties":false},"NewPolicyUnit":{"type":"object","required":["id","heading_chain","semantic_revision","intent","aliases","predecessors","successors"],"properties":{"id":{"$ref":"#/$defs/CanonicalId"},"heading_chain":{"type":"array","minItems":1,"items":{"$ref":"#/$defs/NonEmptyString"}},"semantic_revision":{"const":1},"intent":{"$ref":"#/$defs/NonEmptyString"},"aliases":{"type":"array","uniqueItems":true,"items":{"$ref":"#/$defs/CanonicalId"}},"predecessors":{"type":"array","uniqueItems":true,"items":{"$ref":"#/$defs/CanonicalId"}},"successors":{"type":"array","uniqueItems":true,"items":{"$ref":"#/$defs/CanonicalId"}}},"additionalProperties":false},"PreservePolicySemantics":{"type":"object","required":["kind","semantic_revision","intent"],"properties":{"kind":{"const":"preserve"},"semantic_revision":{"type":"integer","minimum":1},"intent":{"$ref":"#/$defs/NonEmptyString"}},"additionalProperties":false},"ChangePolicySemantics":{"type":"object","required":["kind","accepted_semantic_revision","proposed_semantic_revision","intent"],"properties":{"kind":{"const":"change"},"accepted_semantic_revision":{"type":"integer","minimum":1},"proposed_semantic_revision":{"type":"integer","minimum":1},"intent":{"$ref":"#/$defs/NonEmptyString"}},"additionalProperties":false},"PolicySemanticIntent":{"oneOf":[{"$ref":"#/$defs/PreservePolicySemantics"},{"$ref":"#/$defs/ChangePolicySemantics"}]},"CreateStandardEdit":{"type":"object","required":["kind","standard","requires","specializes","policy_units"],"properties":{"kind":{"const":"create-standard"},"standard":{"$ref":"#/$defs/StandardContent"},"requires":{"type":"array","uniqueItems":true,"items":{"$ref":"#/$defs/CanonicalId"}},"specializes":{"type":"array","uniqueItems":true,"items":{"$ref":"#/$defs/CanonicalId"}},"policy_units":{"type":"array","uniqueItems":true,"items":{"$ref":"#/$defs/NewPolicyUnit"}}},"additionalProperties":false},"ReviseStandardEdit":{"type":"object","required":["kind","standard"],"properties":{"kind":{"const":"revise-standard"},"standard":{"$ref":"#/$defs/StandardContent"}},"additionalProperties":false},"RevisePolicyUnitEdit":{"type":"object","required":["kind","policy","title","body","semantics"],"properties":{"kind":{"const":"revise-policy-unit"},"policy":{"$ref":"#/$defs/CanonicalId"},"title":{"$ref":"#/$defs/NonEmptyString"},"body":{"$ref":"#/$defs/NonEmptyString"},"semantics":{"$ref":"#/$defs/PolicySemanticIntent"}},"additionalProperties":false},"MovePolicyUnitEdit":{"type":"object","required":["kind","policy","standard","semantics"],"properties":{"kind":{"const":"move-policy-unit"},"policy":{"$ref":"#/$defs/CanonicalId"},"standard":{"$ref":"#/$defs/CanonicalId"},"after_policy":{"$ref":"#/$defs/CanonicalId"},"semantics":{"$ref":"#/$defs/PolicySemanticIntent"}},"additionalProperties":false},"RetirePolicyUnitEdit":{"type":"object","required":["kind","policy","retired_semantic_revision","successors","relationship_dispositions","evidence"],"properties":{"kind":{"const":"retire-policy-unit"},"policy":{"$ref":"#/$defs/CanonicalId"},"retired_semantic_revision":{"type":"integer","minimum":1},"successors":{"type":"array","uniqueItems":true,"items":{"$ref":"#/$defs/CanonicalId"}},"relationship_dispositions":{"type":"array","uniqueItems":true,"items":{"$ref":"#/$defs/RelationshipDisposition"}},"evidence":{"type":"array","minItems":1,"uniqueItems":true,"items":{"$ref":"#/$defs/EvidenceReference"}}},"additionalProperties":false},"RetireStandardEdit":{"type":"object","required":["kind","standard","successors","relationship_dispositions","evidence"],"properties":{"kind":{"const":"retire-standard"},"standard":{"$ref":"#/$defs/CanonicalId"},"successors":{"type":"array","uniqueItems":true,"items":{"$ref":"#/$defs/CanonicalId"}},"relationship_dispositions":{"type":"array","uniqueItems":true,"items":{"$ref":"#/$defs/RelationshipDisposition"}},"evidence":{"type":"array","minItems":1,"uniqueItems":true,"items":{"$ref":"#/$defs/EvidenceReference"}}},"additionalProperties":false},"ReplaceStandardRelationshipsEdit":{"type":"object","required":["kind","standard","requires","specializes","rationale"],"properties":{"kind":{"const":"replace-standard-relationships"},"standard":{"$ref":"#/$defs/CanonicalId"},"requires":{"type":"array","uniqueItems":true,"items":{"$ref":"#/$defs/CanonicalId"}},"specializes":{"type":"array","uniqueItems":true,"items":{"$ref":"#/$defs/CanonicalId"}},"rationale":{"$ref":"#/$defs/NonEmptyString"}},"additionalProperties":false},"AuthoringTargetHandle":{"type":"object","required":["kind","snapshot","id","schema_version"],"properties":{"kind":{"const":"authoring-target-handle"},"snapshot":{"$ref":"#/$defs/SnapshotHandle"},"id":{"$ref":"#/$defs/ChildId"},"schema_version":{"const":5}},"additionalProperties":false},"RelationshipConsumer":{"oneOf":[{"$ref":"#/$defs/CanonicalId"},{"$ref":"#/$defs/AuthoringTargetHandle"}]},"PolicyRelationship":{"type":"object","required":["source_policy","consumer","relation","applicability","source_scope","consumer_scope","evidence_owner","rationale"],"properties":{"source_policy":{"$ref":"#/$defs/CanonicalId"},"consumer":{"$ref":"#/$defs/RelationshipConsumer"},"relation":{"enum":["normative-consumer","router-projection","prompt-projection","template-projection","reference-projection","fixture-projection","enforcement-suite-projection","documentation-projection","implementation-projection"]},"applicability":{"$ref":"#/$defs/ApplicabilityExpression"},"source_scope":{"oneOf":[{"$ref":"#/$defs/ReviewScope"},{"type":"null"}]},"consumer_scope":{"oneOf":[{"$ref":"#/$defs/ReviewScope"},{"type":"null"}]},"evidence_owner":{"$ref":"#/$defs/CanonicalId"},"rationale":{"$ref":"#/$defs/NonEmptyString"}},"additionalProperties":false},"PutPolicyRelationshipEdit":{"type":"object","required":["kind","relationship"],"properties":{"kind":{"const":"put-policy-relationship"},"relationship":{"$ref":"#/$defs/PolicyRelationship"}},"additionalProperties":false},"RemovePolicyRelationshipEdit":{"type":"object","required":["kind","relationship"],"properties":{"kind":{"const":"remove-policy-relationship"},"relationship":{"$ref":"#/$defs/PolicyRelationship"}},"additionalProperties":false},"ModuleRelationshipKey":{"type":"object","required":["kind","relation","source","target"],"properties":{"kind":{"const":"module-relationship"},"relation":{"enum":["requires","specializes"]},"source":{"$ref":"#/$defs/CanonicalId"},"target":{"$ref":"#/$defs/CanonicalId"}},"additionalProperties":false},"PolicyRelationshipKey":{"type":"object","required":["kind","source_policy","consumer","relation"],"properties":{"kind":{"const":"policy-relationship"},"source_policy":{"$ref":"#/$defs/CanonicalId"},"consumer":{"$ref":"#/$defs/RelationshipConsumer"},"relation":{"$ref":"#/$defs/CanonicalId"}},"additionalProperties":false},"RelationshipKey":{"oneOf":[{"$ref":"#/$defs/ModuleRelationshipKey"},{"$ref":"#/$defs/PolicyRelationshipKey"}]},"RelationshipDisposition":{"type":"object","required":["relationship","disposition","rationale","evidence"],"properties":{"relationship":{"$ref":"#/$defs/RelationshipKey"},"disposition":{"enum":["remove","retarget"]},"replacement_consumer":{"$ref":"#/$defs/RelationshipConsumer"},"rationale":{"$ref":"#/$defs/NonEmptyString"},"evidence":{"type":"array","minItems":1,"uniqueItems":true,"items":{"$ref":"#/$defs/EvidenceReference"}}},"additionalProperties":false},"StandardEdit":{"oneOf":[{"$ref":"#/$defs/CreateStandardEdit"},{"$ref":"#/$defs/ReviseStandardEdit"},{"$ref":"#/$defs/RevisePolicyUnitEdit"},{"$ref":"#/$defs/MovePolicyUnitEdit"},{"$ref":"#/$defs/RetirePolicyUnitEdit"},{"$ref":"#/$defs/RetireStandardEdit"},{"$ref":"#/$defs/ReplaceStandardRelationshipsEdit"},{"$ref":"#/$defs/PutPolicyRelationshipEdit"},{"$ref":"#/$defs/RemovePolicyRelationshipEdit"},{"$ref":"#/$defs/PutRoutingRuleEdit"},{"$ref":"#/$defs/RemoveRoutingRuleEdit"},{"$ref":"#/$defs/PutRoutingFactEdit"},{"$ref":"#/$defs/RemoveRoutingFactEdit"},{"$ref":"#/$defs/AuditPolicyUnitEdit"},{"$ref":"#/$defs/RewriteNavigationIndexEdit"}]},"StandardsChangeSet":{"type":"object","required":["purpose","edits"],"properties":{"purpose":{"$ref":"#/$defs/StandardsChangePurpose"},"edits":{"type":"array","minItems":1,"uniqueItems":true,"items":{"$ref":"#/$defs/StandardEdit"}}},"additionalProperties":false},"ProposalSummary":{"type":"object","required":["proposal","head_revision"],"properties":{"proposal":{"$ref":"#/$defs/ProposalHandle"},"head_revision":{"$ref":"#/$defs/ProposalRevisionHandle"}},"additionalProperties":false},"CreateProposalCall":{"type":"object","required":["kind","base_snapshot","change_set"],"properties":{"kind":{"const":"create-proposal"},"base_snapshot":{"$ref":"#/$defs/SnapshotHandle"},"change_set":{"$ref":"#/$defs/StandardsChangeSet"}},"additionalProperties":false},"CreateProposalResult":{"type":"object","required":["kind","proposal","revision"],"properties":{"kind":{"const":"create-proposal-result"},"proposal":{"$ref":"#/$defs/ProposalHandle"},"revision":{"$ref":"#/$defs/ProposalRevisionHandle"}},"additionalProperties":false},"FindProposalsCall":{"type":"object","required":["kind"],"properties":{"kind":{"const":"find-proposals"},"after":{"$ref":"#/$defs/ProposalHandle"},"limit":{"type":"integer","minimum":1,"default":50}},"additionalProperties":false},"FindProposalsResult":{"type":"object","required":["kind","proposals"],"properties":{"kind":{"const":"find-proposals-result"},"proposals":{"type":"array","items":{"$ref":"#/$defs/ProposalSummary"}},"continuation":{"$ref":"#/$defs/ProposalHandle"}},"additionalProperties":false},"ReviseProposalCall":{"type":"object","required":["kind","expected_revision","change_set"],"properties":{"kind":{"const":"revise-proposal"},"expected_revision":{"$ref":"#/$defs/ProposalRevisionHandle"},"change_set":{"$ref":"#/$defs/StandardsChangeSet"}},"additionalProperties":false},"ReviseProposalResult":{"type":"object","required":["kind","proposal","revision"],"properties":{"kind":{"const":"revise-proposal-result"},"proposal":{"$ref":"#/$defs/ProposalHandle"},"revision":{"$ref":"#/$defs/ProposalRevisionHandle"}},"additionalProperties":false},"DeleteSnapshotCall":{"type":"object","required":["kind","snapshot"],"properties":{"kind":{"const":"delete-snapshot"},"snapshot":{"$ref":"#/$defs/SnapshotHandle"}},"additionalProperties":false},"DeleteSnapshotResult":{"type":"object","required":["kind","snapshot","purge_deadline"],"properties":{"kind":{"const":"delete-snapshot-result"},"snapshot":{"$ref":"#/$defs/SnapshotHandle"},"purge_deadline":{"$ref":"#/$defs/Timestamp"}},"additionalProperties":false},"UndeleteSnapshotCall":{"type":"object","required":["kind","snapshot"],"properties":{"kind":{"const":"undelete-snapshot"},"snapshot":{"$ref":"#/$defs/SnapshotHandle"}},"additionalProperties":false},"UndeleteSnapshotResult":{"type":"object","required":["kind","snapshot"],"properties":{"kind":{"const":"undelete-snapshot-result"},"snapshot":{"$ref":"#/$defs/ActiveSnapshotSummary"}},"additionalProperties":false},"QueryNextOperation":{"type":"object","required":["operation","request_kind","snapshot"],"properties":{"operation":{"const":"query"},"request_kind":{"enum":["route","read","related"]},"target":{"$ref":"#/$defs/CanonicalId"},"snapshot":{"$ref":"#/$defs/SnapshotHandle"}},"additionalProperties":false},"QueryProposalNextOperation":{"type":"object","required":["operation","request_kind","revision"],"properties":{"operation":{"const":"query_proposal"},"request_kind":{"enum":["route","read","related"]},"target":{"$ref":"#/$defs/CanonicalId"},"revision":{"$ref":"#/$defs/ProposalRevisionHandle"}},"additionalProperties":false},"ResolveNextOperation":{"type":"object","required":["operation","request_kind","analysis"],"properties":{"operation":{"const":"resolve"},"request_kind":{"enum":["provide-fact","consumer-disposition","impact-disposition","coverage-attestation"]},"target":{"$ref":"#/$defs/CanonicalId"},"work":{"$ref":"#/$defs/AnalysisChildHandle"},"analysis":{"$ref":"#/$defs/AnalysisHandle"}},"additionalProperties":false},"InspectNextOperation":{"type":"object","required":["operation","request_kind","handle"],"properties":{"operation":{"const":"inspect"},"request_kind":{"const":"inspect"},"handle":{"$ref":"#/$defs/InspectableHandle"}},"additionalProperties":false},"NextOperation":{"oneOf":[{"$ref":"#/$defs/QueryNextOperation"},{"$ref":"#/$defs/ResolveNextOperation"},{"$ref":"#/$defs/InspectNextOperation"},{"$ref":"#/$defs/FocusedQueryNextOperation"}]},"QueryCall":{"type":"object","required":["snapshot","request"],"properties":{"snapshot":{"$ref":"#/$defs/SnapshotHandle"},"request":{"$ref":"#/$defs/QueryRequest"}},"additionalProperties":false},"QueryProposalCall":{"type":"object","required":["revision","request"],"properties":{"revision":{"$ref":"#/$defs/ProposalRevisionHandle"},"request":{"$ref":"#/$defs/QueryRequest"}},"additionalProperties":false},"AnalyzeProposalCall":{"type":"object","required":["revision"],"properties":{"revision":{"$ref":"#/$defs/ProposalRevisionHandle"}},"additionalProperties":false},"ReviewDecision":{"type":"object","required":["owner","decision","rationale","evidence"],"properties":{"owner":{"enum":["consumer","impact","audit"]},"decision":{"const":"accept"},"rationale":{"$ref":"#/$defs/NonEmptyString"},"evidence":{"type":"array","minItems":1,"uniqueItems":true,"items":{"$ref":"#/$defs/EvidenceReference"}}},"additionalProperties":false},"ReviewProposalCall":{"type":"object","required":["kind","analysis","decisions"],"properties":{"kind":{"const":"review-proposal"},"analysis":{"$ref":"#/$defs/AnalysisHandle"},"decisions":{"type":"array","minItems":3,"maxItems":3,"uniqueItems":true,"items":{"$ref":"#/$defs/ReviewDecision"}},"prior_readiness":{"$ref":"#/$defs/ReadinessHandle"}},"additionalProperties":false},"ReviewProposalResult":{"type":"object","required":["kind","readiness","revision","status"],"properties":{"kind":{"const":"review-proposal-result"},"readiness":{"$ref":"#/$defs/ReadinessHandle"},"revision":{"$ref":"#/$defs/ProposalRevisionHandle"},"status":{"const":"ready"}},"additionalProperties":false},"ApplyProposalCall":{"type":"object","required":["kind","readiness"],"properties":{"kind":{"const":"apply-proposal"},"readiness":{"$ref":"#/$defs/ReadinessHandle"}},"additionalProperties":false},"ApplyProposalResult":{"type":"object","required":["kind","application","status"],"properties":{"kind":{"const":"apply-proposal-result"},"application":{"$ref":"#/$defs/ApplicationHandle"},"status":{"const":"applied"}},"additionalProperties":false},"RecoverApplicationCall":{"type":"object","required":["kind","readiness"],"properties":{"kind":{"const":"recover-application"},"readiness":{"$ref":"#/$defs/ReadinessHandle"}},"additionalProperties":false},"RecoverApplicationResult":{"type":"object","required":["kind","application","status"],"properties":{"kind":{"const":"recover-application-result"},"application":{"$ref":"#/$defs/ApplicationHandle"},"status":{"const":"applied"}},"additionalProperties":false},"ApplicationRecoveryRequiredResult":{"type":"object","required":["kind","application","status","code","outcome","message"],"properties":{"kind":{"const":"application-recovery-required-result"},"application":{"$ref":"#/$defs/ApplicationHandle"},"status":{"const":"recovery-required"},"code":{"enum":["APPLICATION.PUBLICATION_UNAVAILABLE","APPLICATION.OBSERVATION_UNAVAILABLE","APPLICATION.OUTCOME_PERSISTENCE_UNAVAILABLE","APPLICATION.RECOVERY_TARGET_UNCERTAIN","APPLICATION.RECOVERY_TARGET_DIVERGED"]},"outcome":{"const":"unavailable"},"message":{"$ref":"#/$defs/NonEmptyString"}},"additionalProperties":false},"PolicySummary":{"type":"object","required":["handle","authority","scope"],"properties":{"handle":{"$ref":"#/$defs/SnapshotChildHandle"},"authority":{"enum":["normative","projection","contextual","evidence"]},"scope":{"$ref":"#/$defs/ReviewScope"}},"additionalProperties":false},"RelationshipSummary":{"type":"object","required":["handle","source","target","relation","groups","direction","traversal_eligible","applicability"],"properties":{"handle":{"$ref":"#/$defs/SnapshotChildHandle"},"source":{"$ref":"#/$defs/CanonicalId"},"target":{"$ref":"#/$defs/CanonicalId"},"relation":{"$ref":"#/$defs/CanonicalId"},"groups":{"type":"array","items":{"$ref":"#/$defs/CanonicalId"},"minItems":1,"uniqueItems":true},"direction":{"enum":["incoming","outgoing"]},"traversal_eligible":{"type":"boolean"},"applicability":{"enum":["true","false","unknown","not-declared"]}},"additionalProperties":false},"ProposalPolicySummary":{"type":"object","required":["id","authority","scope"],"properties":{"id":{"$ref":"#/$defs/CanonicalId"},"authority":{"enum":["normative","projection","contextual","evidence"]},"scope":{"$ref":"#/$defs/ReviewScope"}},"additionalProperties":false},"ProposalRelationshipSummary":{"type":"object","required":["source","target","relation","groups","direction","traversal_eligible","applicability"],"properties":{"source":{"$ref":"#/$defs/CanonicalId"},"target":{"$ref":"#/$defs/CanonicalId"},"relation":{"$ref":"#/$defs/CanonicalId"},"groups":{"type":"array","items":{"$ref":"#/$defs/CanonicalId"},"minItems":1,"uniqueItems":true},"direction":{"enum":["incoming","outgoing"]},"traversal_eligible":{"type":"boolean"},"applicability":{"enum":["true","false","unknown","not-declared"]}},"additionalProperties":false},"RouteResult":{"type":"object","required":["kind","snapshot","reading_plan","unresolved_questions","next_operations"],"properties":{"kind":{"const":"route-result"},"snapshot":{"$ref":"#/$defs/SnapshotHandle"},"reading_plan":{"type":"array","items":{"$ref":"#/$defs/ReadingPlanEntry"}},"unresolved_questions":{"type":"array","items":{"$ref":"#/$defs/Question"}},"next_operations":{"type":"array","items":{"$ref":"#/$defs/NextOperation"}},"summary":{"type":"string"}},"additionalProperties":false},"ReadResult":{"type":"object","required":["kind","snapshot","policy","content","requires","specializes","related","next_operations"],"properties":{"kind":{"const":"read-result"},"snapshot":{"$ref":"#/$defs/SnapshotHandle"},"policy":{"$ref":"#/$defs/PolicySummary"},"content":{"type":"string"},"requires":{"type":"array","items":{"$ref":"#/$defs/CanonicalId"},"uniqueItems":true},"specializes":{"type":"array","items":{"$ref":"#/$defs/CanonicalId"},"uniqueItems":true},"related":{"type":"array","items":{"$ref":"#/$defs/RelationshipSummary"}},"next_operations":{"type":"array","items":{"$ref":"#/$defs/NextOperation"}},"summary":{"type":"string"},"routing":{"$ref":"#/$defs/RoutingConfiguration"},"coverage":{"$ref":"#/$defs/ReadCoverage"}},"additionalProperties":false},"PolicyUnitMapping":{"type":"object","required":["state","policy_units"],"properties":{"state":{"enum":["exact-policy-unit","policy-units-present","incomplete"]},"reason":{"const":"no-policy-units"},"policy_units":{"type":"array","items":{"$ref":"#/$defs/CanonicalId"},"uniqueItems":true}},"additionalProperties":false},"RelatedResult":{"type":"object","required":["kind","snapshot","target","policy_unit_mapping","relationships","next_operations"],"properties":{"kind":{"const":"related-result"},"snapshot":{"$ref":"#/$defs/SnapshotHandle"},"target":{"$ref":"#/$defs/CanonicalId"},"authoring_target":{"$ref":"#/$defs/AuthoringTargetHandle"},"policy_unit_mapping":{"$ref":"#/$defs/PolicyUnitMapping"},"relationships":{"type":"array","items":{"$ref":"#/$defs/RelationshipSummary"}},"next_operations":{"type":"array","items":{"$ref":"#/$defs/NextOperation"}},"summary":{"type":"string"}},"additionalProperties":false},"QueryResult":{"oneOf":[{"$ref":"#/$defs/RouteResult"},{"$ref":"#/$defs/ReadResult"},{"$ref":"#/$defs/RelatedResult"},{"$ref":"#/$defs/NavigationIndexesResult"}]},"ProposalRouteResult":{"type":"object","required":["kind","revision","reading_plan","unresolved_questions","next_operations"],"properties":{"kind":{"const":"proposal-route-result"},"revision":{"$ref":"#/$defs/ProposalRevisionHandle"},"reading_plan":{"type":"array","items":{"$ref":"#/$defs/ReadingPlanEntry"}},"unresolved_questions":{"type":"array","items":{"$ref":"#/$defs/Question"}},"next_operations":{"type":"array","items":{"$ref":"#/$defs/QueryProposalNextOperation"}},"summary":{"type":"string"}},"additionalProperties":false},"ProposalReadResult":{"type":"object","required":["kind","revision","policy","content","requires","specializes","related","next_operations"],"properties":{"kind":{"const":"proposal-read-result"},"revision":{"$ref":"#/$defs/ProposalRevisionHandle"},"policy":{"$ref":"#/$defs/ProposalPolicySummary"},"content":{"type":"string"},"requires":{"type":"array","items":{"$ref":"#/$defs/CanonicalId"},"uniqueItems":true},"specializes":{"type":"array","items":{"$ref":"#/$defs/CanonicalId"},"uniqueItems":true},"related":{"type":"array","items":{"$ref":"#/$defs/ProposalRelationshipSummary"}},"next_operations":{"type":"array","items":{"$ref":"#/$defs/QueryProposalNextOperation"}},"summary":{"type":"string"},"routing":{"$ref":"#/$defs/RoutingConfiguration"},"coverage":{"$ref":"#/$defs/ReadCoverage"}},"additionalProperties":false},"ProposalRelatedResult":{"type":"object","required":["kind","revision","target","policy_unit_mapping","relationships","next_operations"],"properties":{"kind":{"const":"proposal-related-result"},"revision":{"$ref":"#/$defs/ProposalRevisionHandle"},"target":{"$ref":"#/$defs/CanonicalId"},"authoring_target":{"$ref":"#/$defs/AuthoringTargetHandle"},"policy_unit_mapping":{"$ref":"#/$defs/PolicyUnitMapping"},"relationships":{"type":"array","items":{"$ref":"#/$defs/ProposalRelationshipSummary"}},"next_operations":{"type":"array","items":{"$ref":"#/$defs/QueryProposalNextOperation"}},"summary":{"type":"string"}},"additionalProperties":false},"QueryProposalResult":{"oneOf":[{"$ref":"#/$defs/ProposalRouteResult"},{"$ref":"#/$defs/ProposalReadResult"},{"$ref":"#/$defs/ProposalRelatedResult"},{"$ref":"#/$defs/NavigationIndexesResult"}]},"AnalysisRequest":{"type":"object","required":["kind","base_snapshot","proposed_snapshot","changes","semantic_proposals","contract_version"],"properties":{"kind":{"const":"analysis-request"},"base_snapshot":{"$ref":"#/$defs/SnapshotHandle"},"proposed_snapshot":{"$ref":"#/$defs/SnapshotHandle"},"changes":{"type":"array","items":{"$ref":"#/$defs/ChangeDescriptor"},"minItems":1},"semantic_proposals":{"type":"array","items":{"$ref":"#/$defs/SemanticProposal"},"uniqueItems":true},"prior_analysis":{"$ref":"#/$defs/AnalysisHandle"},"contract_version":{"const":5}},"additionalProperties":false},"PrepareCall":{"type":"object","required":["request"],"properties":{"request":{"$ref":"#/$defs/AnalysisRequest"}},"additionalProperties":false},"AnalysisContext":{"type":"object","required":["kind","handle","subjects","changes","semantic_proposals"],"properties":{"kind":{"const":"analysis-context"},"handle":{"$ref":"#/$defs/AnalysisChildHandle"},"subjects":{"type":"array","items":{"$ref":"#/$defs/ChangedPolicyUnit"},"uniqueItems":true},"changes":{"type":"array","items":{"$ref":"#/$defs/ChangeDescriptor"},"minItems":1,"uniqueItems":true},"semantic_proposals":{"type":"array","items":{"$ref":"#/$defs/SemanticProposal"},"uniqueItems":true}},"additionalProperties":false},"AuthorizationReference":{"type":"object","required":["id","issuer","capability","authority_digest"],"properties":{"id":{"$ref":"#/$defs/AuthorizationId"},"issuer":{"$ref":"#/$defs/CanonicalId"},"capability":{"$ref":"#/$defs/CanonicalId"},"authority_digest":{"$ref":"#/$defs/Digest"}},"additionalProperties":false},"ProviderReference":{"type":"object","required":["id","contract","contract_version","input_digest"],"properties":{"id":{"$ref":"#/$defs/CanonicalId"},"contract":{"$ref":"#/$defs/CanonicalId"},"contract_version":{"$ref":"#/$defs/NonEmptyString"},"input_digest":{"$ref":"#/$defs/Digest"}},"additionalProperties":false},"AuthorizationRecord":{"type":"object","required":["reference","issuer_semantic_revision","principal","action","subject_kind","subject_id","authorization_evidence","revocation_authority","revocation_authority_semantic_revision","revocation_evidence"],"properties":{"reference":{"$ref":"#/$defs/AuthorizationReference"},"issuer_semantic_revision":{"type":"integer","minimum":1},"principal":{"$ref":"#/$defs/CanonicalId"},"action":{"$ref":"#/$defs/CanonicalId"},"subject_kind":{"$ref":"#/$defs/CanonicalId"},"subject_id":{"$ref":"#/$defs/NonEmptyString"},"authorization_evidence":{"type":"array","items":{"$ref":"#/$defs/EvidenceReference"},"minItems":1,"uniqueItems":true},"revocation_authority":{"$ref":"#/$defs/CanonicalId"},"revocation_authority_semantic_revision":{"type":"integer","minimum":1},"revocation_evidence":{"type":"array","items":{"$ref":"#/$defs/EvidenceReference"},"minItems":1,"uniqueItems":true}},"additionalProperties":false},"DomainContractReference":{"type":"object","required":["id","version"],"properties":{"id":{"$ref":"#/$defs/CanonicalId"},"version":{"$ref":"#/$defs/NonEmptyString"}},"additionalProperties":false},"AnalysisExecutionContractView":{"type":"object","required":["authorization_authority_digest","providers"],"properties":{"authorization_authority_digest":{"oneOf":[{"$ref":"#/$defs/Digest"},{"type":"null"}]},"providers":{"type":"array","items":{"$ref":"#/$defs/ProviderReference"},"uniqueItems":true}},"additionalProperties":false},"FactRequirement":{"type":"object","required":["kind","handle","fact","fact_semantic_revision","fact_contract_digest","context","value_contract","answer_contract","evidence_contract","authorization_capability"],"properties":{"kind":{"const":"fact-requirement"},"handle":{"$ref":"#/$defs/AnalysisChildHandle"},"fact":{"$ref":"#/$defs/CanonicalId"},"fact_semantic_revision":{"type":"integer","minimum":1},"fact_contract_digest":{"$ref":"#/$defs/Digest"},"context":{"$ref":"#/$defs/AnalysisChildHandle"},"value_contract":{"$ref":"#/$defs/FactValueContract"},"answer_contract":{"$ref":"#/$defs/CanonicalId"},"evidence_contract":{"$ref":"#/$defs/CanonicalId"},"authorization_capability":{"$ref":"#/$defs/CanonicalId"}},"additionalProperties":false},"FactRequirementWork":{"type":"object","required":["requirement","prompt","dependent_programs"],"properties":{"requirement":{"$ref":"#/$defs/FactRequirement"},"prompt":{"$ref":"#/$defs/NonEmptyString"},"dependent_programs":{"type":"array","items":{"$ref":"#/$defs/NonEmptyString"},"minItems":1,"uniqueItems":true}},"additionalProperties":false},"FactObservation":{"type":"object","required":["kind","handle","requirement","value","evidence","authorization"],"properties":{"kind":{"const":"fact-observation"},"handle":{"$ref":"#/$defs/AnalysisChildHandle"},"requirement":{"$ref":"#/$defs/AnalysisChildHandle"},"value":{"$ref":"#/$defs/FactValue"},"evidence":{"type":"array","items":{"$ref":"#/$defs/EvidenceReference"},"minItems":1,"uniqueItems":true},"authorization":{"$ref":"#/$defs/AuthorizationReference"},"provider":{"$ref":"#/$defs/ProviderReference"}},"additionalProperties":false},"Obligation":{"type":"object","required":["handle","kind","target","scope","reasons","state","permitted_submissions","fingerprint"],"properties":{"handle":{"$ref":"#/$defs/AnalysisChildHandle"},"kind":{"enum":["consumer-review","impact-review","lifecycle-impact-review","audit-coverage","unmapped-normative-change"]},"target":{"$ref":"#/$defs/CanonicalId"},"scope":{"$ref":"#/$defs/ReviewScope"},"reasons":{"type":"array","items":{"$ref":"#/$defs/SelectionReason"},"minItems":1,"uniqueItems":true},"state":{"enum":["required","resolved","blocked"]},"applicability":{"enum":["true","false","unknown","not-declared"]},"permitted_submissions":{"type":"array","items":{"enum":["consumer-disposition","impact-disposition","coverage-attestation"]},"minItems":1,"uniqueItems":true},"review_contract":{"$ref":"#/$defs/ConsumerReviewContract"},"fingerprint":{"$ref":"#/$defs/DecisionFingerprint"}},"additionalProperties":false},"ProvideFactSubmission":{"type":"object","required":["kind","requirement","value","evidence"],"properties":{"kind":{"const":"provide-fact"},"requirement":{"$ref":"#/$defs/AnalysisChildHandle"},"value":{"$ref":"#/$defs/FactValue"},"evidence":{"type":"array","items":{"$ref":"#/$defs/EvidenceReference"},"minItems":1,"uniqueItems":true}},"additionalProperties":false},"ConsumerDispositionSubmission":{"type":"object","required":["kind","obligation","result","rationale","evidence","fingerprint"],"properties":{"kind":{"const":"consumer-disposition"},"obligation":{"$ref":"#/$defs/AnalysisChildHandle"},"result":{"enum":["updated","reviewed-no-change","not-applicable","blocked"]},"rationale":{"$ref":"#/$defs/NonEmptyString"},"evidence":{"type":"array","items":{"$ref":"#/$defs/EvidenceReference"},"minItems":1},"fingerprint":{"$ref":"#/$defs/DecisionFingerprint"}},"additionalProperties":false},"ImpactDispositionSubmission":{"type":"object","required":["kind","obligation","result","rationale","evidence","fingerprint"],"properties":{"kind":{"const":"impact-disposition"},"obligation":{"$ref":"#/$defs/AnalysisChildHandle"},"result":{"enum":["confirmed","resolved-no-impact","requires-change","blocked"]},"rationale":{"$ref":"#/$defs/NonEmptyString"},"evidence":{"type":"array","items":{"$ref":"#/$defs/EvidenceReference"},"minItems":1},"fingerprint":{"$ref":"#/$defs/DecisionFingerprint"}},"additionalProperties":false},"CoverageAttestationClaim":{"type":"object","required":["requirement","conclusion","evidence","explicit_exclusions","rationale","auditor_provenance"],"properties":{"requirement":{"$ref":"#/$defs/AnalysisChildHandle"},"conclusion":{"const":"complete"},"evidence":{"type":"array","items":{"$ref":"#/$defs/EvidenceReference"},"minItems":1,"uniqueItems":true},"explicit_exclusions":{"type":"array","items":{"$ref":"#/$defs/EvidenceReference"},"uniqueItems":true},"rationale":{"$ref":"#/$defs/NonEmptyString"},"auditor_provenance":{"$ref":"#/$defs/NonEmptyString"}},"additionalProperties":false},"CoverageAttestationSubmission":{"type":"object","required":["kind","claim"],"properties":{"kind":{"const":"coverage-attestation"},"claim":{"$ref":"#/$defs/CoverageAttestationClaim"}},"additionalProperties":false},"Submission":{"oneOf":[{"$ref":"#/$defs/ProvideFactSubmission"},{"$ref":"#/$defs/ConsumerDispositionSubmission"},{"$ref":"#/$defs/ImpactDispositionSubmission"},{"$ref":"#/$defs/CoverageAttestationSubmission"}]},"ResolveCall":{"type":"object","required":["analysis","submission"],"properties":{"analysis":{"$ref":"#/$defs/AnalysisHandle"},"submission":{"$ref":"#/$defs/Submission"}},"additionalProperties":false},"CoverageRequirement":{"type":"object","required":["kind","handle","subject","owner","semantic_revision","relationship_kinds","horizon","required_evidence_contract"],"properties":{"kind":{"const":"coverage-requirement"},"handle":{"$ref":"#/$defs/AnalysisChildHandle"},"subject":{"$ref":"#/$defs/CanonicalId"},"owner":{"$ref":"#/$defs/CanonicalId"},"semantic_revision":{"type":"integer","minimum":1},"relationship_kinds":{"type":"array","items":{"$ref":"#/$defs/CanonicalId"},"uniqueItems":true},"horizon":{"$ref":"#/$defs/CanonicalId"},"required_evidence_contract":{"$ref":"#/$defs/CanonicalId"}},"additionalProperties":false},"CoverageAttestation":{"type":"object","required":["kind","requirement","conclusion","evidence","explicit_exclusions","rationale","auditor_provenance","schema_version","authorization"],"properties":{"kind":{"const":"coverage-attestation"},"requirement":{"$ref":"#/$defs/AnalysisChildHandle"},"conclusion":{"const":"complete"},"evidence":{"type":"array","items":{"$ref":"#/$defs/EvidenceReference"},"minItems":1},"explicit_exclusions":{"type":"array","items":{"$ref":"#/$defs/EvidenceReference"}},"rationale":{"$ref":"#/$defs/NonEmptyString"},"auditor_provenance":{"$ref":"#/$defs/NonEmptyString"},"schema_version":{"const":4},"authorization":{"$ref":"#/$defs/AuthorizationReference"}},"additionalProperties":false},"CoverageCertificate":{"type":"object","required":["kind","handle","requirement","subject","owner","semantic_revision","horizon_digest","relationship_digest","evidence_digests","fact_schema_digest"],"properties":{"kind":{"const":"coverage-certificate"},"handle":{"$ref":"#/$defs/AnalysisChildHandle"},"requirement":{"$ref":"#/$defs/AnalysisChildHandle"},"subject":{"$ref":"#/$defs/CanonicalId"},"owner":{"$ref":"#/$defs/CanonicalId"},"semantic_revision":{"type":"integer","minimum":1},"horizon_digest":{"$ref":"#/$defs/Digest"},"relationship_digest":{"$ref":"#/$defs/Digest"},"evidence_digests":{"type":"array","items":{"$ref":"#/$defs/Digest"},"uniqueItems":true},"fact_schema_digest":{"$ref":"#/$defs/Digest"}},"additionalProperties":false},"DispositionRecord":{"type":"object","required":["obligation","kind","result","rationale","evidence","authorization","fingerprint"],"properties":{"obligation":{"$ref":"#/$defs/AnalysisChildHandle"},"kind":{"enum":["consumer-disposition","impact-disposition"]},"result":{"$ref":"#/$defs/NonEmptyString"},"rationale":{"$ref":"#/$defs/NonEmptyString"},"evidence":{"type":"array","items":{"$ref":"#/$defs/EvidenceReference"}},"authorization":{"$ref":"#/$defs/AuthorizationReference"},"fingerprint":{"$ref":"#/$defs/DecisionFingerprint"}},"additionalProperties":false},"AnalysisState":{"type":"object","required":["kind","handle","base_snapshot","proposed_reference","changes","semantic_proposals","fact_observations","dispositions","coverage_attestations","authorization_records","domain_contracts","execution_contracts","contract_version"],"properties":{"kind":{"const":"analysis-state"},"handle":{"$ref":"#/$defs/AnalysisHandle"},"base_snapshot":{"$ref":"#/$defs/SnapshotHandle"},"proposed_reference":{"$ref":"#/$defs/AnalysisMaterialHandle"},"changes":{"type":"array","items":{"$ref":"#/$defs/ChangeDescriptor"},"minItems":1,"uniqueItems":true},"semantic_proposals":{"type":"array","items":{"$ref":"#/$defs/SemanticProposal"},"uniqueItems":true},"fact_observations":{"type":"array","items":{"$ref":"#/$defs/FactObservation"},"uniqueItems":true},"dispositions":{"type":"array","items":{"$ref":"#/$defs/DispositionRecord"},"uniqueItems":true},"coverage_attestations":{"type":"array","items":{"$ref":"#/$defs/CoverageAttestation"},"uniqueItems":true},"authorization_records":{"type":"array","items":{"$ref":"#/$defs/AuthorizationRecord"},"uniqueItems":true},"domain_contracts":{"type":"array","items":{"$ref":"#/$defs/DomainContractReference"},"minItems":1,"uniqueItems":true},"execution_contracts":{"$ref":"#/$defs/AnalysisExecutionContractView"},"contract_version":{"const":6}},"additionalProperties":false},"PendingResult":{"type":"object","required":["kind","handle","status","context","changes","changed_units","obligations","fact_requirements","reading_plan","next_operations"],"properties":{"kind":{"const":"pending-result"},"handle":{"$ref":"#/$defs/AnalysisHandle"},"status":{"const":"needs-action"},"context":{"$ref":"#/$defs/AnalysisContext"},"changes":{"type":"array","items":{"$ref":"#/$defs/ChangeDescriptor"}},"changed_units":{"type":"array","items":{"$ref":"#/$defs/ChangedPolicyUnit"}},"obligations":{"type":"array","items":{"$ref":"#/$defs/Obligation"}},"fact_requirements":{"type":"array","items":{"$ref":"#/$defs/FactRequirementWork"}},"reading_plan":{"type":"array","items":{"$ref":"#/$defs/ReadingPlanEntry"}},"next_operations":{"type":"array","items":{"$ref":"#/$defs/NextOperation"}},"summary":{"type":"string"}},"additionalProperties":false},"CompleteResult":{"type":"object","required":["kind","handle","status","context","changes","changed_units","coverage_certificates","fact_observations","dispositions","reading_plan","completion"],"properties":{"kind":{"const":"complete-result"},"handle":{"$ref":"#/$defs/AnalysisHandle"},"status":{"const":"complete"},"context":{"$ref":"#/$defs/AnalysisContext"},"changes":{"type":"array","items":{"$ref":"#/$defs/ChangeDescriptor"}},"changed_units":{"type":"array","items":{"$ref":"#/$defs/ChangedPolicyUnit"}},"coverage_certificates":{"type":"array","items":{"$ref":"#/$defs/CoverageCertificate"},"uniqueItems":true},"fact_observations":{"type":"array","items":{"$ref":"#/$defs/FactObservation"},"uniqueItems":true},"dispositions":{"type":"array","items":{"$ref":"#/$defs/DispositionRecord"}},"reading_plan":{"type":"array","items":{"$ref":"#/$defs/ReadingPlanEntry"}},"completion":{"$ref":"#/$defs/CompletionProof"},"summary":{"type":"string"}},"additionalProperties":false},"RepositoryPath":{"type":"array","items":{"$ref":"#/$defs/NonEmptyString"},"minItems":1},"ProvenanceRecord":{"type":"object","required":["snapshot","path"],"properties":{"snapshot":{"$ref":"#/$defs/SnapshotHandle"},"path":{"$ref":"#/$defs/RepositoryPath"}},"additionalProperties":false},"SnapshotInspectionResult":{"type":"object","required":["kind","snapshot"],"properties":{"kind":{"const":"snapshot-inspection-result"},"snapshot":{"$ref":"#/$defs/SnapshotSummary"}},"additionalProperties":false},"PolicyInspectionResult":{"type":"object","required":["kind","policy","declaration","representation_digest","structural_digest","provenance"],"properties":{"kind":{"const":"policy-inspection-result"},"policy":{"$ref":"#/$defs/SnapshotChildHandle"},"declaration":{"oneOf":[{"$ref":"#/$defs/CanonicalModuleDeclaration"},{"$ref":"#/$defs/PolicyUnitDeclaration"}]},"representation_digest":{"$ref":"#/$defs/Digest"},"structural_digest":{"$ref":"#/$defs/Digest"},"provenance":{"$ref":"#/$defs/ProvenanceRecord"}},"additionalProperties":false},"RelationshipInspectionResult":{"type":"object","required":["kind","relationship","policy_semantics","provenance"],"properties":{"kind":{"const":"relationship-inspection-result"},"relationship":{"$ref":"#/$defs/RelationshipSummary"},"policy_semantics":{"oneOf":[{"$ref":"#/$defs/PolicyRelationshipInspection"},{"type":"null"}]},"provenance":{"$ref":"#/$defs/ProvenanceRecord"}},"additionalProperties":false},"AnalysisInspectionResult":{"type":"object","required":["kind","state"],"properties":{"kind":{"const":"analysis-inspection-result"},"state":{"$ref":"#/$defs/AnalysisState"}},"additionalProperties":false},"AnalysisChildArtifact":{"oneOf":[{"$ref":"#/$defs/AnalysisContext"},{"$ref":"#/$defs/FactRequirement"},{"$ref":"#/$defs/FactObservation"},{"$ref":"#/$defs/Obligation"},{"$ref":"#/$defs/CoverageRequirement"},{"$ref":"#/$defs/CoverageCertificate"}]},"AnalysisChildInspectionResult":{"type":"object","required":["kind","handle","artifact"],"properties":{"kind":{"const":"analysis-child-inspection-result"},"handle":{"$ref":"#/$defs/AnalysisChildHandle"},"artifact":{"$ref":"#/$defs/AnalysisChildArtifact"}},"additionalProperties":false},"InspectionResult":{"oneOf":[{"$ref":"#/$defs/SnapshotInspectionResult"},{"$ref":"#/$defs/PolicyInspectionResult"},{"$ref":"#/$defs/RelationshipInspectionResult"},{"$ref":"#/$defs/AnalysisInspectionResult"},{"$ref":"#/$defs/AnalysisChildInspectionResult"}]},"InspectCall":{"type":"object","required":["handle"],"properties":{"handle":{"$ref":"#/$defs/InspectableHandle"}},"additionalProperties":false},"RejectedResult":{"type":"object","required":["kind","code","outcome","message","details","next_operations"],"properties":{"kind":{"const":"rejected-result"},"code":{"$ref":"#/$defs/CanonicalId"},"outcome":{"enum":["invalid","unavailable","unsupported","unauthorized"]},"target":{"$ref":"#/$defs/NonEmptyString"},"message":{"$ref":"#/$defs/NonEmptyString"},"details":{"type":"object","additionalProperties":{"$ref":"#/$defs/ScalarValue"}},"next_operations":{"type":"array","items":{"$ref":"#/$defs/NextOperation"}}},"additionalProperties":false},"AuthoredRoutingRule":{"type":"object","required":["id","target","when","condition"],"properties":{"id":{"$ref":"#/$defs/CanonicalId"},"target":{"$ref":"#/$defs/CanonicalId"},"when":{"$ref":"#/$defs/ApplicabilityExpression"},"condition":{"$ref":"#/$defs/NonEmptyString"}},"additionalProperties":false},"AuthoredRoutingFact":{"type":"object","required":["id","semantic_revision","type","nullable","values","aliases","meaning","prompt"],"properties":{"id":{"$ref":"#/$defs/CanonicalId"},"semantic_revision":{"type":"integer","minimum":1},"type":{"enum":["boolean","enum","string","string-set","enum-set","canonical-id"]},"nullable":{"type":"boolean"},"values":{"type":"array","items":{"type":"string"},"uniqueItems":true},"aliases":{"type":"array","items":{"$ref":"#/$defs/CanonicalId"},"uniqueItems":true},"meaning":{"$ref":"#/$defs/NonEmptyString"},"prompt":{"$ref":"#/$defs/NonEmptyString"}},"additionalProperties":false},"PutRoutingRuleEdit":{"type":"object","required":["kind","rule","rationale"],"properties":{"kind":{"const":"put-routing-rule"},"rule":{"$ref":"#/$defs/AuthoredRoutingRule"},"rationale":{"$ref":"#/$defs/NonEmptyString"}},"additionalProperties":false},"RemoveRoutingRuleEdit":{"type":"object","required":["kind","rule","rationale"],"properties":{"kind":{"const":"remove-routing-rule"},"rule":{"$ref":"#/$defs/CanonicalId"},"rationale":{"$ref":"#/$defs/NonEmptyString"}},"additionalProperties":false},"PutRoutingFactEdit":{"type":"object","required":["kind","fact","rationale"],"properties":{"kind":{"const":"put-routing-fact"},"fact":{"$ref":"#/$defs/AuthoredRoutingFact"},"rationale":{"$ref":"#/$defs/NonEmptyString"}},"additionalProperties":false},"RemoveRoutingFactEdit":{"type":"object","required":["kind","fact","rationale"],"properties":{"kind":{"const":"remove-routing-fact"},"fact":{"$ref":"#/$defs/CanonicalId"},"rationale":{"$ref":"#/$defs/NonEmptyString"}},"additionalProperties":false},"VerificationFailure":{"type":"object","additionalProperties":false,"required":["code","message","suite","check"],"properties":{"code":{"$ref":"#/$defs/NonEmptyString"},"message":{"$ref":"#/$defs/NonEmptyString"},"suite":{"type":["string","null"]},"check":{"type":["string","null"]}}},"VerificationReport":{"type":"object","additionalProperties":false,"required":["passed","exit_code","suites","checks","failures"],"properties":{"passed":{"type":"boolean"},"exit_code":{"enum":[0,1,2,3,4]},"suites":{"type":"integer","minimum":0},"checks":{"type":"integer","minimum":0},"failures":{"type":"array","items":{"$ref":"#/$defs/VerificationFailure"}}}},"VerifyRepositoryCall":{"type":"object","additionalProperties":false,"required":["kind","refresh_verification_inputs"],"properties":{"kind":{"const":"verify-repository"},"refresh_verification_inputs":{"type":"boolean"}}},"VerifyRepositoryResult":{"type":"object","additionalProperties":false,"required":["kind","refreshed_verification_inputs","verification"],"properties":{"kind":{"const":"verify-repository-result"},"refreshed_verification_inputs":{"type":"boolean"},"verification":{"$ref":"#/$defs/VerificationReport"}}},"VerifyProposalCall":{"type":"object","additionalProperties":false,"required":["kind","revision"],"properties":{"kind":{"const":"verify-proposal"},"revision":{"$ref":"#/$defs/ProposalRevisionHandle"},"readiness":{"$ref":"#/$defs/ReadinessHandle"}}},"VerifyProposalResult":{"type":"object","additionalProperties":false,"required":["kind","revision","verification"],"properties":{"kind":{"const":"verify-proposal-result"},"revision":{"$ref":"#/$defs/ProposalRevisionHandle"},"verification":{"$ref":"#/$defs/VerificationReport"},"readiness":{"$ref":"#/$defs/ReadinessHandle"}}},"RoutingConfiguration":{"type":"object","additionalProperties":false,"required":["facts","rules"],"properties":{"facts":{"type":"array","items":{"$ref":"#/$defs/AuthoredRoutingFact"}},"rules":{"type":"array","items":{"$ref":"#/$defs/AuthoredRoutingRule"}}}},"PolicyCoverageStatus":{"type":"object","required":["subject","requirement_id","status"],"properties":{"subject":{"$ref":"#/$defs/CanonicalId"},"requirement_id":{"$ref":"#/$defs/Digest"},"status":{"enum":["current-attestation","review-required"]},"authority":{"$ref":"#/$defs/CoverageAuditAuthority"}},"additionalProperties":false},"ReadCoverage":{"type":"object","description":"Repository attestation status bound to this snapshot or proposal. Empty subjects means no registered policy units in scope, not complete coverage. Analysis-local attestations are not repository certificates.","required":["subjects"],"properties":{"subjects":{"type":"array","items":{"$ref":"#/$defs/PolicyCoverageStatus"}}},"additionalProperties":false},"AuditPolicyUnitEdit":{"type":"object","required":["kind","policy","rationale"],"properties":{"kind":{"const":"audit-policy-unit"},"policy":{"$ref":"#/$defs/CanonicalId"},"rationale":{"$ref":"#/$defs/NonEmptyString"}},"additionalProperties":false},"CoverageAuditAuthority":{"type":"object","required":["issuer","principal","authorization_id"],"properties":{"issuer":{"$ref":"#/$defs/NonEmptyString"},"principal":{"$ref":"#/$defs/NonEmptyString"},"authorization_id":{"$ref":"#/$defs/NonEmptyString"}},"additionalProperties":false},"EvidenceCheckRetirement":{"type":"object","additionalProperties":false,"required":["suite","check"],"properties":{"suite":{"type":"string","minLength":1},"check":{"type":"string","minLength":1}}},"EvidenceSuiteDescription":{"type":"object","additionalProperties":false,"required":["suite","description"],"properties":{"suite":{"type":"string","minLength":1},"description":{"type":"string","minLength":1}}},"EvidenceRelationshipUpdate":{"type":"object","additionalProperties":false,"required":["source_policy","consumer","relation","evidence_owner","rationale"],"properties":{"source_policy":{"type":"string","minLength":1},"consumer":{"type":"string","minLength":1},"relation":{"type":"string","minLength":1},"evidence_owner":{"type":"string","minLength":1},"rationale":{"type":"string","minLength":1}}},"EvidenceConsumerRegistration":{"type":"object","additionalProperties":false,"required":["path","artifact_kind","source_policies","relation","evidence_owner","rationale"],"properties":{"path":{"type":"string","minLength":1},"artifact_kind":{"type":"string","enum":["implementation-artifact","fixture"]},"source_policies":{"type":"array","items":{"type":"string","minLength":1},"minItems":1,"uniqueItems":true},"relation":{"type":"string","enum":["implementation-projection","fixture-projection"]},"evidence_owner":{"type":"string","minLength":1},"rationale":{"type":"string","minLength":1}}},"EvidenceMaintenancePlan":{"type":"object","additionalProperties":false,"required":["prune_stale_certificates","retire_suites","retire_checks","retire_inputs","suite_descriptions","replacement_evidence_owner","replacement_evidence_rationale","relationship_updates","consumer_registrations"],"properties":{"prune_stale_certificates":{"type":"boolean"},"retire_suites":{"type":"array","items":{"type":"string","minLength":1},"uniqueItems":true},"retire_checks":{"type":"array","items":{"$ref":"#/$defs/EvidenceCheckRetirement"}},"retire_inputs":{"type":"array","items":{"type":"string","minLength":1},"uniqueItems":true},"suite_descriptions":{"type":"array","items":{"$ref":"#/$defs/EvidenceSuiteDescription"}},"replacement_evidence_owner":{"type":"string","minLength":1},"replacement_evidence_rationale":{"type":"string","minLength":1},"relationship_updates":{"type":"array","items":{"$ref":"#/$defs/EvidenceRelationshipUpdate"}},"consumer_registrations":{"type":"array","items":{"$ref":"#/$defs/EvidenceConsumerRegistration"}},"unregister_policy_subjects":{"type":"array","items":{"type":"string","minLength":1},"uniqueItems":true,"description":"Remove selected review-subject registrations and their source relationships while preserving normative Markdown."}}},"MaintainEvidenceCall":{"type":"object","additionalProperties":false,"required":["kind","expected_revision","evidence","plan","apply"],"properties":{"kind":{"const":"maintain-evidence"},"expected_revision":{"type":"string","minLength":1},"evidence":{"type":"array","items":{"$ref":"#/$defs/EvidenceReference"},"minItems":1},"plan":{"$ref":"#/$defs/EvidenceMaintenancePlan"},"apply":{"type":"boolean"}}},"MaintainEvidenceResult":{"type":"object","additionalProperties":false,"required":["kind","applied","changed_files","removed_files","verification"],"properties":{"kind":{"const":"maintain-evidence-result"},"applied":{"type":"boolean"},"changed_files":{"type":"array","items":{"type":"string","minLength":1}},"removed_files":{"type":"array","items":{"type":"string","minLength":1}},"verification":{"$ref":"#/$defs/VerificationReport"}}},"RouteCall":{"type":"object","required":["facts"],"properties":{"facts":{"$ref":"#/$defs/FactSet"},"snapshot":{"$ref":"#/$defs/SnapshotHandle"}},"additionalProperties":false},"ReadCall":{"type":"object","required":["target"],"properties":{"target":{"$ref":"#/$defs/CanonicalId"},"include_routing":{"type":"boolean"},"include_coverage":{"type":"boolean","description":"Include current repository attestation status for registered policy units in this read scope."},"snapshot":{"$ref":"#/$defs/SnapshotHandle"},"detail":{"enum":["compact","full"],"description":"Compact preserves exact policy and essential authority; full includes all relationship rows."}},"additionalProperties":false},"RelatedCall":{"type":"object","required":["target","groups","direction","transitive"],"properties":{"target":{"$ref":"#/$defs/CanonicalId"},"groups":{"type":"array","minItems":1,"uniqueItems":true,"items":{"$ref":"#/$defs/CanonicalId"}},"direction":{"enum":["incoming","outgoing","both"]},"transitive":{"type":"boolean","default":false},"snapshot":{"$ref":"#/$defs/SnapshotHandle"}},"additionalProperties":false},"CompactReadResult":{"type":"object","required":["kind","snapshot","policy","content","requires","specializes","next_operations","detail"],"properties":{"kind":{"const":"compact-read-result"},"snapshot":{"$ref":"#/$defs/SnapshotHandle"},"policy":{"$ref":"#/$defs/PolicySummary"},"content":{"type":"string"},"requires":{"type":"array","items":{"$ref":"#/$defs/CanonicalId"},"uniqueItems":true},"specializes":{"type":"array","items":{"$ref":"#/$defs/CanonicalId"},"uniqueItems":true},"next_operations":{"type":"array","items":{"$ref":"#/$defs/NextOperation"}},"summary":{"type":"string"},"routing":{"$ref":"#/$defs/RoutingConfiguration"},"coverage":{"$ref":"#/$defs/ReadCoverage"},"detail":{"const":"compact"}},"additionalProperties":false},"RoutingFactsCall":{"type":"object","additionalProperties":false,"required":[],"properties":{"snapshot":{"$ref":"#/$defs/SnapshotHandle"}}},"RoutingFactsResult":{"type":"object","additionalProperties":false,"required":["kind","snapshot","facts"],"properties":{"kind":{"const":"routing-facts-result"},"snapshot":{"$ref":"#/$defs/SnapshotHandle"},"facts":{"type":"array","items":{"$ref":"#/$defs/AuthoredRoutingFact"}}}},"RoutingQuestion":{"type":"object","additionalProperties":false,"required":["id","kind","prompt","state","fact"],"properties":{"id":{"$ref":"#/$defs/CanonicalId"},"kind":{"const":"applicability-fact"},"prompt":{"$ref":"#/$defs/NonEmptyString"},"state":{"const":"required"},"fact":{"$ref":"#/$defs/AuthoredRoutingFact"}}},"RoutingRuleExplanation":{"type":"object","additionalProperties":false,"required":["id","target","when","state"],"properties":{"id":{"$ref":"#/$defs/CanonicalId"},"target":{"$ref":"#/$defs/CanonicalId"},"when":{"$ref":"#/$defs/ApplicabilityExpression"},"state":{"enum":["selected","unresolved"]}}},"AgentRouteResult":{"type":"object","required":["kind","snapshot","reading_plan","unresolved_questions","next_operations","facts","rules"],"properties":{"kind":{"const":"agent-route-result"},"snapshot":{"$ref":"#/$defs/SnapshotHandle"},"reading_plan":{"type":"array","items":{"$ref":"#/$defs/ReadingPlanEntry"}},"unresolved_questions":{"type":"array","items":{"$ref":"#/$defs/RoutingQuestion"}},"next_operations":{"type":"array","items":{"$ref":"#/$defs/NextOperation"}},"summary":{"type":"string"},"facts":{"$ref":"#/$defs/FactSet"},"rules":{"type":"array","items":{"$ref":"#/$defs/RoutingRuleExplanation"}}},"additionalProperties":false},"WorkflowContext":{"oneOf":[{"$ref":"#/$defs/ProposalRevisionHandle"},{"$ref":"#/$defs/AnalysisHandle"},{"$ref":"#/$defs/ReadinessHandle"}]},"ProposeCall":{"type":"object","additionalProperties":false,"properties":{"snapshot":{"$ref":"#/$defs/SnapshotHandle"},"change_set":{"$ref":"#/$defs/StandardsChangeSet"}},"required":["change_set"]},"ReviseCall":{"type":"object","additionalProperties":false,"properties":{"context":{"$ref":"#/$defs/WorkflowContext"},"change_set":{"$ref":"#/$defs/StandardsChangeSet"}},"required":["context","change_set"]},"AnalyzeCall":{"type":"object","additionalProperties":false,"properties":{"context":{"$ref":"#/$defs/WorkflowContext"}},"required":["context"]},"ResolveWorkflowCall":{"type":"object","additionalProperties":false,"properties":{"context":{"$ref":"#/$defs/WorkflowContext"},"submission":{"$ref":"#/$defs/Submission"}},"required":["context","submission"]},"ReviewCall":{"type":"object","additionalProperties":false,"properties":{"context":{"$ref":"#/$defs/WorkflowContext"},"decisions":{"type":"array","minItems":3,"maxItems":3,"uniqueItems":true,"items":{"$ref":"#/$defs/ReviewDecision"}}},"required":["context","decisions"]},"ApplyCall":{"type":"object","additionalProperties":false,"properties":{"context":{"$ref":"#/$defs/WorkflowContext"}},"required":["context"]},"RecoverCall":{"type":"object","additionalProperties":false,"properties":{"context":{"$ref":"#/$defs/WorkflowContext"}},"required":["context"]},"WorkflowStatusCall":{"type":"object","additionalProperties":false,"properties":{"context":{"$ref":"#/$defs/WorkflowContext"}},"required":["context"]},"ResumeCall":{"type":"object","additionalProperties":false,"properties":{"context":{"$ref":"#/$defs/WorkflowContext"}},"required":["context"]},"WorkflowContinuation":{"type":"object","additionalProperties":false,"properties":{"operation":{"enum":["revise","analyze","resolve_workflow","review","apply","recover","workflow_status","resume"]},"context":{"$ref":"#/$defs/WorkflowContext"},"required_inputs":{"type":"array","uniqueItems":true,"items":{"enum":["change_set","submission","decisions"]}}},"required":["operation","context","required_inputs"]},"WorkflowOutcome":{"oneOf":[{"$ref":"#/$defs/CreateProposalResult"},{"$ref":"#/$defs/ReviseProposalResult"},{"$ref":"#/$defs/PendingResult"},{"$ref":"#/$defs/CompleteResult"},{"$ref":"#/$defs/ReviewProposalResult"},{"$ref":"#/$defs/ApplyProposalResult"},{"$ref":"#/$defs/ApplicationRecoveryRequiredResult"},{"$ref":"#/$defs/RecoverApplicationResult"},{"$ref":"#/$defs/RejectedResult"}]},"WorkflowResult":{"type":"object","additionalProperties":false,"properties":{"kind":{"const":"workflow-result"},"context":{"$ref":"#/$defs/WorkflowContext"},"proposal":{"$ref":"#/$defs/ProposalHandle"},"revision":{"$ref":"#/$defs/ProposalRevisionHandle"},"status":{"enum":["draft","needs-action","complete","requires-change","ready","recovery-required","applied","rejected","stale"]},"next_operations":{"type":"array","items":{"$ref":"#/$defs/WorkflowContinuation"}},"outcome":{"$ref":"#/$defs/WorkflowOutcome"}},"required":["kind","context","proposal","revision","status","next_operations"]},"FocusedQueryNextOperation":{"type":"object","required":["operation","request_kind","snapshot"],"properties":{"operation":{"enum":["route","read","related"]},"request_kind":{"enum":["route","read","related"]},"target":{"$ref":"#/$defs/CanonicalId"},"snapshot":{"$ref":"#/$defs/SnapshotHandle"}},"additionalProperties":false},"RewriteNavigationIndexEdit":{"type":"object","required":["kind","entrypoint","destinations","rationale"],"properties":{"kind":{"const":"rewrite-navigation-index"},"entrypoint":{"$ref":"#/$defs/AuthoringTargetHandle"},"destinations":{"type":"array","items":{"$ref":"#/$defs/CanonicalId"},"minItems":1,"uniqueItems":true},"rationale":{"$ref":"#/$defs/NonEmptyString"},"retargets":{"type":"array","items":{"$ref":"#/$defs/NavigationRetarget"},"uniqueItems":true}},"additionalProperties":false},"NavigationIndexEntry":{"type":"object","required":["id","entrypoint","destinations"],"properties":{"id":{"$ref":"#/$defs/CanonicalId"},"entrypoint":{"$ref":"#/$defs/AuthoringTargetHandle"},"destinations":{"type":"array","items":{"$ref":"#/$defs/CanonicalId"},"uniqueItems":true},"content":{"$ref":"#/$defs/NonEmptyString"}},"additionalProperties":false},"NavigationIndexesResult":{"type":"object","required":["kind","authority","indexes","next_operations"],"properties":{"kind":{"const":"navigation-indexes-result"},"authority":{"oneOf":[{"$ref":"#/$defs/SnapshotHandle"},{"$ref":"#/$defs/ProposalRevisionHandle"}]},"indexes":{"type":"array","items":{"$ref":"#/$defs/NavigationIndexEntry"},"minItems":1},"next_operations":{"type":"array","items":{"$ref":"#/$defs/NextOperation"},"maxItems":0}},"additionalProperties":false},"NavigationRetarget":{"type":"object","required":["entrypoint","standard"],"properties":{"entrypoint":{"$ref":"#/$defs/AuthoringTargetHandle"},"standard":{"$ref":"#/$defs/CanonicalId"}},"additionalProperties":false}}}') -DEFINITION_METADATA = freeze_json({'ActiveSnapshotSummary': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'lifecycle': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'source_revision': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'created_at': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'AgentRouteResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'reading_plan': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'unresolved_questions': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'next_operations': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'summary': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'facts': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'rules': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'AllExpression': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'operator': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'expressions': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'AlwaysExpression': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'operator': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'AnalysisChildArtifact': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'AnalysisChildHandle': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'analysis': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'child_kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'child_id': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'schema_version': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'AnalysisChildInspectionResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'handle': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'artifact': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'AnalysisContext': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'handle': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'subjects': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'changes': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'semantic_proposals': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'AnalysisExecutionContractView': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'authorization_authority_digest': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'providers': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'AnalysisHandle': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'id': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'schema_version': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'AnalysisId': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'AnalysisInspectionResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'state': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'AnalysisMaterialHandle': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'AnalysisRequest': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'base_snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'proposed_snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'changes': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'semantic_proposals': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'prior_analysis': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'contract_version': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'AnalysisState': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'handle': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'base_snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'proposed_reference': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'changes': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'semantic_proposals': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'fact_observations': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'dispositions': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'coverage_attestations': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'authorization_records': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'domain_contracts': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'execution_contracts': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'contract_version': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'AnalyzeCall': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'context': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'AnalyzeProposalCall': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'revision': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'AnyExpression': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'operator': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'expressions': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ApplicabilityExpression': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'ApplicationHandle': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'id': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'schema_version': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ApplicationId': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'ApplicationRecoveryRequiredResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'application': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'status': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'code': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'outcome': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'message': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ApplyCall': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'context': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ApplyProposalCall': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'readiness': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ApplyProposalResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'application': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'status': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'AuditPolicyUnitEdit': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'policy': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'rationale': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'AuthoredRoutingFact': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'id': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'semantic_revision': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'type': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'nullable': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'values': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'aliases': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'meaning': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'prompt': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'AuthoredRoutingRule': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'id': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'target': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'when': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'condition': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'AuthoringTargetHandle': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'id': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'schema_version': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'AuthorizationId': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'AuthorizationRecord': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'reference': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'issuer_semantic_revision': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'principal': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'action': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'subject_kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'subject_id': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'authorization_evidence': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'revocation_authority': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'revocation_authority_semantic_revision': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'revocation_evidence': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'AuthorizationReference': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'id': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'issuer': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'capability': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'authority_digest': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'CanonicalId': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'CanonicalModuleDeclaration': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'id': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'role': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'level': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'applies_when': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'does_not_apply_when': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'requires': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'specializes': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'verification': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ChangeDescriptor': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'accepted_ids': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'proposed_ids': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'scope': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'accepted_module': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'proposed_module': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ChangePolicySemantics': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'accepted_semantic_revision': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'proposed_semantic_revision': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'intent': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ChangedPolicyUnit': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'policy': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'change_kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'classification': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'accepted_representation_digest': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'proposed_representation_digest': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'accepted_structural_digest': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'proposed_structural_digest': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'accepted_semantic_revision': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'proposed_semantic_revision': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'semantic_state': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'scope': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ChildId': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'CompactReadResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'policy': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'content': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'requires': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'specializes': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'next_operations': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'summary': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'routing': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'coverage': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'detail': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'CompleteResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'handle': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'status': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'context': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'changes': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'changed_units': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'coverage_certificates': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'fact_observations': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'dispositions': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'reading_plan': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'completion': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'summary': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'CompletionProof': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'required_coverage_subjects': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'certificate_subjects': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'reached_consumer_obligations': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'disposition_obligations': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'required_fact_requirements': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'observed_fact_requirements': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'non_consumer_obligations_resolved': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'applicability_resolved': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'authorization_valid': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'evidence_valid': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ConsumerDispositionSubmission': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'obligation': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'result': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'rationale': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'evidence': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'fingerprint': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ConsumerReviewContract': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'id': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'version': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'permitted_dispositions': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'evidence_contract': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'authorization_capability': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'semantics': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ConsumerReviewObligationReadingReason': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'obligation': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ContainsExpression': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'operator': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'fact': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'value': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'CoverageAttestation': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'requirement': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'conclusion': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'evidence': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'explicit_exclusions': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'rationale': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'auditor_provenance': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'schema_version': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'authorization': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'CoverageAttestationClaim': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'requirement': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'conclusion': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'evidence': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'explicit_exclusions': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'rationale': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'auditor_provenance': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'CoverageAttestationSubmission': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'claim': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'CoverageAuditAuthority': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'issuer': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'principal': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'authorization_id': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'CoverageCertificate': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'handle': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'requirement': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'subject': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'owner': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'semantic_revision': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'horizon_digest': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'relationship_digest': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'evidence_digests': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'fact_schema_digest': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'CoverageRequirement': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'handle': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'subject': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'owner': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'semantic_revision': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'relationship_kinds': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'horizon': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'required_evidence_contract': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'CreateProposalCall': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'base_snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'change_set': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'CreateProposalResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'proposal': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'revision': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'CreateSnapshotCall': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'CreateSnapshotResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'CreateStandardEdit': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'standard': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'requires': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'specializes': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'policy_units': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'DecisionDependency': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'class': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'identity': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'digest': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'DecisionFingerprint': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'decision_kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'decision_contract': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'schema_version': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'dependencies': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'DeleteSnapshotCall': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'DeleteSnapshotResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'purge_deadline': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'Digest': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'DispositionRecord': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'obligation': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'result': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'rationale': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'evidence': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'authorization': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'fingerprint': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'DomainContractReference': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'id': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'version': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'EdgeId': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'EqualsExpression': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'operator': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'fact': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'value': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'EvidenceCheckRetirement': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'suite': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'check': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'EvidenceConsumerRegistration': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'path': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'artifact_kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'source_policies': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'relation': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'evidence_owner': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'rationale': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'EvidenceMaintenancePlan': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'prune_stale_certificates': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'retire_suites': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'retire_checks': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'retire_inputs': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'suite_descriptions': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'replacement_evidence_owner': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'replacement_evidence_rationale': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'relationship_updates': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'consumer_registrations': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'unregister_policy_subjects': {'title': None, 'description': 'Remove selected review-subject registrations and their source relationships while preserving normative Markdown.', 'has_default': False, 'default': None}}}, 'EvidenceReference': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'id': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'digest': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'provider_contract': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'provider_contract_version': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'EvidenceRelationshipUpdate': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'source_policy': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'consumer': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'relation': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'evidence_owner': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'rationale': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'EvidenceSuiteDescription': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'suite': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'description': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ExistsExpression': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'operator': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'fact': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'FactObservation': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'handle': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'requirement': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'value': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'evidence': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'authorization': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'provider': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'FactRequirement': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'handle': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'fact': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'fact_semantic_revision': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'fact_contract_digest': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'context': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'value_contract': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'answer_contract': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'evidence_contract': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'authorization_capability': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'FactRequirementId': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'FactRequirementWork': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'requirement': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'prompt': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'dependent_programs': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'FactSet': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'FactValue': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'FactValueContract': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'type': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'states': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'nullable': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'values': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'FindProposalsCall': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'after': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'limit': {'title': None, 'description': None, 'has_default': True, 'default': 50}}}, 'FindProposalsResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'proposals': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'continuation': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'FindSnapshotsCall': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'lifecycle': {'title': None, 'description': None, 'has_default': True, 'default': 'active'}, 'after': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'limit': {'title': None, 'description': None, 'has_default': True, 'default': 50}}}, 'FindSnapshotsResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'snapshots': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'continuation': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'FocusedQueryNextOperation': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'operation': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'request_kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'target': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'GeneralSelectionReason': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'source': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'fact': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'edge': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'question': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ImpactDispositionSubmission': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'obligation': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'result': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'rationale': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'evidence': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'fingerprint': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ImpactTraceId': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'ImpactTraceReference': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'id': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'graph': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'applicability': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'InExpression': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'operator': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'fact': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'values': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'InspectCall': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'handle': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'InspectNextOperation': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'operation': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'request_kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'handle': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'InspectableHandle': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'InspectionResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'MaintainEvidenceCall': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'expected_revision': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'evidence': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'plan': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'apply': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'MaintainEvidenceResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'applied': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'changed_files': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'removed_files': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'verification': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ModuleRelationshipKey': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'relation': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'source': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'target': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'MovePolicyUnitEdit': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'policy': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'standard': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'after_policy': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'semantics': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'NavigationIndexEntry': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'id': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'entrypoint': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'destinations': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'content': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'NavigationIndexesResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'authority': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'indexes': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'next_operations': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'NavigationRetarget': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'entrypoint': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'standard': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'NewPolicyUnit': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'id': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'heading_chain': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'semantic_revision': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'intent': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'aliases': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'predecessors': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'successors': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'NextOperation': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'NonEmptyString': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'NotExpression': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'operator': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'expression': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'Obligation': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'handle': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'target': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'scope': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'reasons': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'state': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'applicability': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'permitted_submissions': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'review_contract': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'fingerprint': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ObligationId': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'PendingResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'handle': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'status': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'context': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'changes': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'changed_units': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'obligations': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'fact_requirements': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'reading_plan': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'next_operations': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'summary': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'PolicyCoverageStatus': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'subject': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'requirement_id': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'status': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'authority': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'PolicyImpactSelectionReason': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'source': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'edge': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'relation': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'evidence_owner': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'traces': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'PolicyInspectionResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'policy': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'declaration': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'representation_digest': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'structural_digest': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'provenance': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'PolicyRelationship': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'source_policy': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'consumer': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'relation': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'applicability': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'source_scope': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'consumer_scope': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'evidence_owner': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'rationale': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'PolicyRelationshipInspection': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'relationship_kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'applicability': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'source_scope': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'consumer_scope': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'propagation': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'evidence_owner': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'rationale': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'PolicyRelationshipKey': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'source_policy': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'consumer': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'relation': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'PolicySemanticIntent': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'PolicySummary': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'handle': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'authority': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'scope': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'PolicyUnitDeclaration': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'id': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'module': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'heading_path': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'semantic_revision': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'lifecycle': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'aliases': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'predecessors': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'successors': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'PolicyUnitMapping': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'state': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'reason': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'policy_units': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'PrepareCall': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'request': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'PreservePolicySemantics': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'semantic_revision': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'intent': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ProposalHandle': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'id': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'schema_version': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ProposalId': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'ProposalPolicySummary': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'id': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'authority': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'scope': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ProposalReadResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'revision': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'policy': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'content': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'requires': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'specializes': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'related': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'next_operations': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'summary': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'routing': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'coverage': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ProposalRelatedResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'revision': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'target': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'authoring_target': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'policy_unit_mapping': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'relationships': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'next_operations': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'summary': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ProposalRelationshipSummary': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'source': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'target': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'relation': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'groups': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'direction': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'traversal_eligible': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'applicability': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ProposalRevisionHandle': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'id': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'schema_version': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ProposalRevisionId': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'ProposalRouteResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'revision': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'reading_plan': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'unresolved_questions': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'next_operations': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'summary': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ProposalSummary': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'proposal': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'head_revision': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ProposeCall': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'change_set': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ProvenanceRecord': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'path': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ProvideFactSubmission': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'requirement': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'value': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'evidence': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ProviderReference': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'id': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'contract': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'contract_version': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'input_digest': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'PutPolicyRelationshipEdit': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'relationship': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'PutRoutingFactEdit': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'fact': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'rationale': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'PutRoutingRuleEdit': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'rule': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'rationale': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'QuarantinedSnapshotSummary': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'lifecycle': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'source_revision': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'created_at': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'purge_deadline': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'QueryCall': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'request': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'QueryNextOperation': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'operation': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'request_kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'target': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'QueryProposalCall': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'revision': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'request': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'QueryProposalNextOperation': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'operation': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'request_kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'target': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'revision': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'QueryProposalResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'QueryRequest': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'QueryResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'Question': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'id': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'prompt': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'state': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'permitted_answers': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ReadCall': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'target': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'include_routing': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'include_coverage': {'title': None, 'description': 'Include current repository attestation status for registered policy units in this read scope.', 'has_default': False, 'default': None}, 'snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'detail': {'title': None, 'description': 'Compact preserves exact policy and essential authority; full includes all relationship rows.', 'has_default': False, 'default': None}}}, 'ReadCoverage': {'title': None, 'description': 'Repository attestation status bound to this snapshot or proposal. Empty subjects means no registered policy units in scope, not complete coverage. Analysis-local attestations are not repository certificates.', 'has_default': False, 'default': None, 'properties': {'subjects': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ReadRequest': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'target': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'include_routing': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'include_coverage': {'title': None, 'description': 'Include current repository attestation status for registered policy units in this read scope.', 'has_default': False, 'default': None}}}, 'ReadResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'policy': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'content': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'requires': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'specializes': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'related': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'next_operations': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'summary': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'routing': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'coverage': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ReadinessHandle': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'id': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'schema_version': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ReadinessId': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'ReadingPlanEntry': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'target': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'scope': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'authority': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'reasons': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'state': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ReadingPlanReason': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'RecoverApplicationCall': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'readiness': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'RecoverApplicationResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'application': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'status': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'RecoverCall': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'context': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'RejectedResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'code': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'outcome': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'target': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'message': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'details': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'next_operations': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'RelatedCall': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'target': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'groups': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'direction': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'transitive': {'title': None, 'description': None, 'has_default': True, 'default': False}, 'snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'RelatedRequest': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'target': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'groups': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'direction': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'transitive': {'title': None, 'description': None, 'has_default': True, 'default': False}}}, 'RelatedResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'target': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'authoring_target': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'policy_unit_mapping': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'relationships': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'next_operations': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'summary': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'RelationshipConsumer': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'RelationshipDisposition': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'relationship': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'disposition': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'replacement_consumer': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'rationale': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'evidence': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'RelationshipInspectionResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'relationship': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'policy_semantics': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'provenance': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'RelationshipKey': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'RelationshipSummary': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'handle': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'source': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'target': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'relation': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'groups': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'direction': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'traversal_eligible': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'applicability': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'RemovePolicyRelationshipEdit': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'relationship': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'RemoveRoutingFactEdit': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'fact': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'rationale': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'RemoveRoutingRuleEdit': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'rule': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'rationale': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ReplaceStandardRelationshipsEdit': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'standard': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'requires': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'specializes': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'rationale': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'RepositoryPath': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'RequiresReadingReason': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'edge': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'source': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ResolveCall': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'analysis': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'submission': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ResolveNextOperation': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'operation': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'request_kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'target': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'work': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'analysis': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ResolveWorkflowCall': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'context': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'submission': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ResumeCall': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'context': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'RetirePolicyUnitEdit': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'policy': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'retired_semantic_revision': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'successors': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'relationship_dispositions': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'evidence': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'RetireStandardEdit': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'standard': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'successors': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'relationship_dispositions': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'evidence': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ReviewCall': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'context': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'decisions': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ReviewDecision': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'owner': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'decision': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'rationale': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'evidence': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ReviewProposalCall': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'analysis': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'decisions': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'prior_readiness': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ReviewProposalResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'readiness': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'revision': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'status': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ReviewScope': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'ReviseCall': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'context': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'change_set': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'RevisePolicyUnitEdit': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'policy': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'title': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'body': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'semantics': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ReviseProposalCall': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'expected_revision': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'change_set': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ReviseProposalResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'proposal': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'revision': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ReviseStandardEdit': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'standard': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'RewriteNavigationIndexEdit': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'entrypoint': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'destinations': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'rationale': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'retargets': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'RouteCall': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'facts': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'RouteRequest': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'facts': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'RouteResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'reading_plan': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'unresolved_questions': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'next_operations': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'summary': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'RoutingBaseReadingReason': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'projection': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'RoutingConfiguration': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'facts': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'rules': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'RoutingFactsCall': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'RoutingFactsResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'facts': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'RoutingQuestion': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'id': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'prompt': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'state': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'fact': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'RoutingRuleExplanation': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'id': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'target': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'when': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'state': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'RoutingRuleReadingReason': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'rule': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'facts': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ScalarValue': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'SelectionReason': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'SemanticProposal': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'policy': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'accepted_semantic_revision': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'proposed_semantic_revision': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'intent': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'structural_digest': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'SnapshotChildHandle': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'child_kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'child_id': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'schema_version': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'SnapshotHandle': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'id': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'schema_version': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'SnapshotId': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'SnapshotInspectionResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'SnapshotSummary': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'SpecializesReadingReason': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'edge': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'source': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'StandardContent': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'id': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'title': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'role': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'level': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'applies_when': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'does_not_apply_when': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'verification': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'body': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'StandardEdit': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'StandardsChangePurpose': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'summary': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'rationale': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'evidence': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'StandardsChangeSet': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'purpose': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'edits': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'StructuredScope': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'heading_path': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'Submission': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'Timestamp': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'UndeleteSnapshotCall': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'UndeleteSnapshotResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'VerificationFailure': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'code': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'message': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'suite': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'check': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'VerificationReport': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'passed': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'exit_code': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'suites': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'checks': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'failures': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'VerifyProposalCall': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'revision': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'readiness': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'VerifyProposalResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'revision': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'verification': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'readiness': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'VerifyRepositoryCall': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'refresh_verification_inputs': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'VerifyRepositoryResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'refreshed_verification_inputs': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'verification': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'WholeArtifactScope': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'WorkflowContext': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'WorkflowContinuation': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'operation': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'context': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'required_inputs': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'WorkflowOutcome': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'WorkflowResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'context': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'proposal': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'revision': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'status': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'next_operations': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'outcome': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'WorkflowStatusCall': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'context': {'title': None, 'description': None, 'has_default': False, 'default': None}}}}) +_SCHEMA = json.loads('{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"https://coding-standards.local/contracts/standards-engine/a2-v24","title":"Standards Engine A2 contract","description":"Canonical typed contract for snapshot lifecycle, controlled authoring, navigation, inspection, and immutable standards-change analysis.","oneOf":[{"$ref":"#/$defs/AgentRouteResult"},{"$ref":"#/$defs/AnalyzeCall"},{"$ref":"#/$defs/AnalyzeProposalCall"},{"$ref":"#/$defs/ApplicationInspectCall"},{"$ref":"#/$defs/ApplicationQueryCall"},{"$ref":"#/$defs/ApplicationReadCall"},{"$ref":"#/$defs/ApplicationReadResult"},{"$ref":"#/$defs/ApplicationRecoveryRequiredResult"},{"$ref":"#/$defs/ApplicationRejectedResult"},{"$ref":"#/$defs/ApplicationRelatedResult"},{"$ref":"#/$defs/ApplicationRouteResult"},{"$ref":"#/$defs/ApplicationRoutingFactsResult"},{"$ref":"#/$defs/ApplyCall"},{"$ref":"#/$defs/ApplyProposalCall"},{"$ref":"#/$defs/ApplyProposalResult"},{"$ref":"#/$defs/CompactReadResult"},{"$ref":"#/$defs/CompleteResult"},{"$ref":"#/$defs/CreateProposalCall"},{"$ref":"#/$defs/CreateProposalResult"},{"$ref":"#/$defs/CreateSnapshotCall"},{"$ref":"#/$defs/CreateSnapshotResult"},{"$ref":"#/$defs/DeleteSnapshotCall"},{"$ref":"#/$defs/DeleteSnapshotResult"},{"$ref":"#/$defs/FindProposalsCall"},{"$ref":"#/$defs/FindProposalsResult"},{"$ref":"#/$defs/FindSnapshotsCall"},{"$ref":"#/$defs/FindSnapshotsResult"},{"$ref":"#/$defs/InspectCall"},{"$ref":"#/$defs/InspectionResult"},{"$ref":"#/$defs/MaintainEvidenceCall"},{"$ref":"#/$defs/MaintainEvidenceResult"},{"$ref":"#/$defs/NavigationIndexesResult"},{"$ref":"#/$defs/OperationalReadResult"},{"$ref":"#/$defs/PendingResult"},{"$ref":"#/$defs/PrepareCall"},{"$ref":"#/$defs/ProposeCall"},{"$ref":"#/$defs/ProvenanceReadResult"},{"$ref":"#/$defs/QueryCall"},{"$ref":"#/$defs/QueryProposalCall"},{"$ref":"#/$defs/QueryProposalResult"},{"$ref":"#/$defs/QueryResult"},{"$ref":"#/$defs/ReadCall"},{"$ref":"#/$defs/ReadResult"},{"$ref":"#/$defs/RecoverApplicationCall"},{"$ref":"#/$defs/RecoverApplicationResult"},{"$ref":"#/$defs/RecoverCall"},{"$ref":"#/$defs/RejectedResult"},{"$ref":"#/$defs/RelatedCall"},{"$ref":"#/$defs/RelatedResult"},{"$ref":"#/$defs/ResolveCall"},{"$ref":"#/$defs/ResolveWorkflowCall"},{"$ref":"#/$defs/ResumeCall"},{"$ref":"#/$defs/ReviewCall"},{"$ref":"#/$defs/ReviewProposalCall"},{"$ref":"#/$defs/ReviewProposalResult"},{"$ref":"#/$defs/ReviseCall"},{"$ref":"#/$defs/ReviseProposalCall"},{"$ref":"#/$defs/ReviseProposalResult"},{"$ref":"#/$defs/RouteCall"},{"$ref":"#/$defs/RoutingFactsCall"},{"$ref":"#/$defs/RoutingFactsResult"},{"$ref":"#/$defs/UndeleteSnapshotCall"},{"$ref":"#/$defs/UndeleteSnapshotResult"},{"$ref":"#/$defs/VerifyProposalCall"},{"$ref":"#/$defs/VerifyProposalResult"},{"$ref":"#/$defs/VerifyRepositoryCall"},{"$ref":"#/$defs/VerifyRepositoryResult"},{"$ref":"#/$defs/WorkflowResult"},{"$ref":"#/$defs/WorkflowStatusCall"}],"$defs":{"NonEmptyString":{"type":"string","minLength":1},"CanonicalId":{"type":"string","pattern":"^[A-Za-z0-9][A-Za-z0-9._:/-]*$"},"EdgeId":{"type":"string","minLength":1},"Digest":{"type":"string","pattern":"^sha256:[0-9a-f]{64}$"},"ObligationId":{"type":"string","pattern":"^obligation:sha256:[0-9a-f]{64}$"},"ImpactTraceId":{"type":"string","pattern":"^impact-trace:sha256:[0-9a-f]{64}$"},"FactRequirementId":{"type":"string","pattern":"^fact-requirement:sha256:[0-9a-f]{64}$"},"ScalarValue":{"oneOf":[{"type":"boolean"},{"type":"integer"},{"type":"string"},{"type":"null"}]},"FactValue":{"oneOf":[{"type":"object","required":["type","state","value"],"properties":{"type":{"const":"boolean"},"state":{"const":"known"},"value":{"type":"boolean"}},"additionalProperties":false},{"type":"object","required":["type","state","value"],"properties":{"type":{"enum":["boolean","enum","string","string-set","enum-set","canonical-id"]},"state":{"const":"known"},"value":{"type":"null"}},"additionalProperties":false},{"type":"object","required":["type","state","value"],"properties":{"type":{"enum":["enum","string","canonical-id"]},"state":{"const":"known"},"value":{"type":"string"}},"additionalProperties":false},{"type":"object","required":["type","state","value"],"properties":{"type":{"enum":["string-set","enum-set"]},"state":{"const":"known"},"value":{"type":"array","items":{"type":"string"},"uniqueItems":true}},"additionalProperties":false},{"type":"object","required":["type","state"],"properties":{"type":{"enum":["boolean","enum","string","string-set","enum-set","canonical-id"]},"state":{"enum":["known-absent","unknown"]}},"additionalProperties":false}]},"FactSet":{"type":"object","additionalProperties":{"$ref":"#/$defs/FactValue"}},"StructuredScope":{"type":"object","required":["kind","heading_path"],"properties":{"kind":{"const":"structured"},"heading_path":{"type":"array","minItems":1,"items":{"$ref":"#/$defs/NonEmptyString"}}},"additionalProperties":false},"WholeArtifactScope":{"type":"object","required":["kind"],"properties":{"kind":{"const":"whole-artifact"}},"additionalProperties":false},"ReviewScope":{"oneOf":[{"$ref":"#/$defs/StructuredScope"},{"$ref":"#/$defs/WholeArtifactScope"}]},"AllExpression":{"type":"object","required":["operator","expressions"],"properties":{"operator":{"const":"all"},"expressions":{"type":"array","minItems":1,"items":{"$ref":"#/$defs/ApplicabilityExpression"}}},"additionalProperties":false},"AnyExpression":{"type":"object","required":["operator","expressions"],"properties":{"operator":{"const":"any"},"expressions":{"type":"array","minItems":1,"items":{"$ref":"#/$defs/ApplicabilityExpression"}}},"additionalProperties":false},"NotExpression":{"type":"object","required":["operator","expression"],"properties":{"operator":{"const":"not"},"expression":{"$ref":"#/$defs/ApplicabilityExpression"}},"additionalProperties":false},"EqualsExpression":{"type":"object","required":["operator","fact","value"],"properties":{"operator":{"const":"equals"},"fact":{"$ref":"#/$defs/CanonicalId"},"value":{"$ref":"#/$defs/ScalarValue"}},"additionalProperties":false},"InExpression":{"type":"object","required":["operator","fact","values"],"properties":{"operator":{"const":"in"},"fact":{"$ref":"#/$defs/CanonicalId"},"values":{"type":"array","minItems":1,"uniqueItems":true,"items":{"$ref":"#/$defs/ScalarValue"}}},"additionalProperties":false},"ContainsExpression":{"type":"object","required":["operator","fact","value"],"properties":{"operator":{"const":"contains"},"fact":{"$ref":"#/$defs/CanonicalId"},"value":{"$ref":"#/$defs/ScalarValue"}},"additionalProperties":false},"ExistsExpression":{"type":"object","required":["operator","fact"],"properties":{"operator":{"const":"exists"},"fact":{"$ref":"#/$defs/CanonicalId"}},"additionalProperties":false},"AlwaysExpression":{"type":"object","required":["operator"],"properties":{"operator":{"const":"always"}},"additionalProperties":false},"ApplicabilityExpression":{"oneOf":[{"$ref":"#/$defs/AlwaysExpression"},{"$ref":"#/$defs/AllExpression"},{"$ref":"#/$defs/AnyExpression"},{"$ref":"#/$defs/NotExpression"},{"$ref":"#/$defs/EqualsExpression"},{"$ref":"#/$defs/InExpression"},{"$ref":"#/$defs/ContainsExpression"},{"$ref":"#/$defs/ExistsExpression"}]},"GeneralSelectionReason":{"type":"object","required":["kind"],"properties":{"kind":{"enum":["routing-fact","requires","specializes","changed-policy","question","audit-coverage","unmapped-normative-change","structured-scope-analysis-unsupported","navigation-index-change","supporting-content-change"]},"source":{"$ref":"#/$defs/CanonicalId"},"fact":{"$ref":"#/$defs/CanonicalId"},"edge":{"$ref":"#/$defs/EdgeId"},"question":{"$ref":"#/$defs/CanonicalId"}},"additionalProperties":false},"PolicyImpactSelectionReason":{"type":"object","required":["kind","source","edge","relation","evidence_owner","traces"],"properties":{"kind":{"const":"policy-impact-edge"},"source":{"$ref":"#/$defs/CanonicalId"},"edge":{"$ref":"#/$defs/EdgeId"},"relation":{"$ref":"#/$defs/CanonicalId"},"evidence_owner":{"$ref":"#/$defs/CanonicalId"},"traces":{"type":"array","minItems":1,"uniqueItems":true,"items":{"$ref":"#/$defs/ImpactTraceReference"}}},"additionalProperties":false},"SelectionReason":{"oneOf":[{"$ref":"#/$defs/GeneralSelectionReason"},{"$ref":"#/$defs/PolicyImpactSelectionReason"}]},"ImpactTraceReference":{"type":"object","required":["id","graph","applicability"],"properties":{"id":{"$ref":"#/$defs/ImpactTraceId"},"graph":{"enum":["accepted","proposed"]},"applicability":{"enum":["true","false","unknown"]}},"additionalProperties":false},"ConsumerReviewObligationReadingReason":{"type":"object","required":["kind","obligation"],"properties":{"kind":{"const":"consumer-review-obligation"},"obligation":{"$ref":"#/$defs/ObligationId"}},"additionalProperties":false},"RoutingBaseReadingReason":{"type":"object","required":["kind","projection"],"properties":{"kind":{"const":"routing-base"},"projection":{"$ref":"#/$defs/CanonicalId"}},"additionalProperties":false},"RoutingRuleReadingReason":{"type":"object","required":["kind","rule","facts"],"properties":{"kind":{"const":"routing-rule"},"rule":{"$ref":"#/$defs/CanonicalId"},"facts":{"type":"array","uniqueItems":true,"items":{"$ref":"#/$defs/CanonicalId"}}},"additionalProperties":false},"RequiresReadingReason":{"type":"object","required":["kind","edge","source"],"properties":{"kind":{"const":"requires"},"edge":{"$ref":"#/$defs/EdgeId"},"source":{"$ref":"#/$defs/CanonicalId"}},"additionalProperties":false},"SpecializesReadingReason":{"type":"object","required":["kind","edge","source"],"properties":{"kind":{"const":"specializes"},"edge":{"$ref":"#/$defs/EdgeId"},"source":{"$ref":"#/$defs/CanonicalId"}},"additionalProperties":false},"ReadingPlanReason":{"oneOf":[{"$ref":"#/$defs/ConsumerReviewObligationReadingReason"},{"$ref":"#/$defs/RoutingBaseReadingReason"},{"$ref":"#/$defs/RoutingRuleReadingReason"},{"$ref":"#/$defs/RequiresReadingReason"},{"$ref":"#/$defs/SpecializesReadingReason"}]},"ReadingPlanEntry":{"type":"object","required":["target","scope","authority","reasons","state"],"properties":{"target":{"$ref":"#/$defs/CanonicalId"},"scope":{"$ref":"#/$defs/ReviewScope"},"authority":{"enum":["normative","projection","contextual","evidence"]},"reasons":{"type":"array","minItems":1,"uniqueItems":true,"items":{"$ref":"#/$defs/ReadingPlanReason"}},"state":{"enum":["selected","conditional","unresolved"]}},"additionalProperties":false},"RouteRequest":{"type":"object","required":["kind","facts"],"properties":{"kind":{"const":"route"},"facts":{"$ref":"#/$defs/FactSet"}},"additionalProperties":false},"ReadRequest":{"type":"object","required":["kind","target"],"properties":{"kind":{"const":"read"},"target":{"$ref":"#/$defs/CanonicalId"},"include_routing":{"type":"boolean"},"include_coverage":{"type":"boolean","description":"Include current repository attestation status for registered policy units in this read scope."}},"additionalProperties":false},"RelatedRequest":{"type":"object","required":["kind","target","groups","direction","transitive"],"properties":{"kind":{"const":"related"},"target":{"$ref":"#/$defs/CanonicalId"},"groups":{"type":"array","minItems":1,"uniqueItems":true,"items":{"$ref":"#/$defs/CanonicalId"}},"direction":{"enum":["incoming","outgoing","both"]},"transitive":{"type":"boolean","default":false}},"additionalProperties":false},"QueryRequest":{"oneOf":[{"$ref":"#/$defs/RouteRequest"},{"$ref":"#/$defs/ReadRequest"},{"$ref":"#/$defs/RelatedRequest"}]},"PolicyUnitDeclaration":{"type":"object","required":["kind","id","module","heading_path","semantic_revision","lifecycle"],"properties":{"kind":{"const":"policy-unit"},"id":{"$ref":"#/$defs/CanonicalId"},"module":{"$ref":"#/$defs/CanonicalId"},"heading_path":{"type":"array","minItems":1,"items":{"$ref":"#/$defs/NonEmptyString"}},"semantic_revision":{"type":"integer","minimum":1},"lifecycle":{"const":"active"},"aliases":{"type":"array","uniqueItems":true,"items":{"$ref":"#/$defs/CanonicalId"}},"predecessors":{"type":"array","uniqueItems":true,"items":{"$ref":"#/$defs/CanonicalId"}},"successors":{"type":"array","uniqueItems":true,"items":{"$ref":"#/$defs/CanonicalId"}}},"additionalProperties":false},"CanonicalModuleDeclaration":{"type":"object","required":["kind","id","role","level","applies_when","does_not_apply_when","requires","specializes","verification"],"properties":{"kind":{"const":"canonical-module"},"id":{"$ref":"#/$defs/CanonicalId"},"role":{"enum":["core","router","workflow","profile","topic","reference"]},"level":{"enum":["MUST","SHOULD","PROFILE","REFERENCE"]},"applies_when":{"$ref":"#/$defs/NonEmptyString"},"does_not_apply_when":{"$ref":"#/$defs/NonEmptyString"},"requires":{"type":"array","uniqueItems":true,"items":{"$ref":"#/$defs/CanonicalId"}},"specializes":{"type":"array","uniqueItems":true,"items":{"$ref":"#/$defs/CanonicalId"}},"verification":{"$ref":"#/$defs/NonEmptyString"}},"additionalProperties":false},"PolicyRelationshipInspection":{"type":"object","required":["relationship_kind","applicability","source_scope","consumer_scope","propagation","evidence_owner","rationale"],"properties":{"relationship_kind":{"enum":["normative-consumer","router-projection","prompt-projection","template-projection","reference-projection","fixture-projection","enforcement-suite-projection","documentation-projection","implementation-projection"]},"applicability":{"$ref":"#/$defs/ApplicabilityExpression"},"source_scope":{"oneOf":[{"$ref":"#/$defs/ReviewScope"},{"type":"null"}]},"consumer_scope":{"oneOf":[{"$ref":"#/$defs/ReviewScope"},{"type":"null"}]},"propagation":{"const":"source-to-consumer"},"evidence_owner":{"$ref":"#/$defs/CanonicalId"},"rationale":{"$ref":"#/$defs/NonEmptyString"}},"additionalProperties":false},"SemanticProposal":{"type":"object","required":["policy","accepted_semantic_revision","proposed_semantic_revision","intent","structural_digest"],"properties":{"policy":{"$ref":"#/$defs/CanonicalId"},"accepted_semantic_revision":{"oneOf":[{"type":"integer","minimum":1},{"type":"null"}]},"proposed_semantic_revision":{"type":"integer","minimum":1},"intent":{"$ref":"#/$defs/NonEmptyString"},"structural_digest":{"$ref":"#/$defs/Digest"}},"additionalProperties":false},"ChangeDescriptor":{"type":"object","required":["kind","accepted_ids","proposed_ids","scope"],"properties":{"kind":{"enum":["module","modification","addition","removal","move","split","merge","navigation-index","supporting-content"]},"accepted_ids":{"type":"array","uniqueItems":true,"items":{"$ref":"#/$defs/CanonicalId"}},"proposed_ids":{"type":"array","uniqueItems":true,"items":{"$ref":"#/$defs/CanonicalId"}},"scope":{"$ref":"#/$defs/ReviewScope"},"accepted_module":{"$ref":"#/$defs/CanonicalId"},"proposed_module":{"$ref":"#/$defs/CanonicalId"}},"additionalProperties":false},"ChangedPolicyUnit":{"type":"object","required":["policy","change_kind","classification","accepted_representation_digest","proposed_representation_digest","accepted_structural_digest","proposed_structural_digest","accepted_semantic_revision","proposed_semantic_revision","semantic_state","scope"],"properties":{"policy":{"$ref":"#/$defs/CanonicalId"},"change_kind":{"enum":["modification","addition","removal","move","split-predecessor","split-successor","merge-predecessor","merge-successor"]},"classification":{"enum":["unchanged","representation-only-candidate","possibly-semantically-changed","semantically-changed","unresolved"]},"accepted_representation_digest":{"oneOf":[{"$ref":"#/$defs/Digest"},{"type":"null"}]},"proposed_representation_digest":{"oneOf":[{"$ref":"#/$defs/Digest"},{"type":"null"}]},"accepted_structural_digest":{"oneOf":[{"$ref":"#/$defs/Digest"},{"type":"null"}]},"proposed_structural_digest":{"oneOf":[{"$ref":"#/$defs/Digest"},{"type":"null"}]},"accepted_semantic_revision":{"oneOf":[{"type":"integer","minimum":1},{"type":"null"}]},"proposed_semantic_revision":{"oneOf":[{"type":"integer","minimum":1},{"type":"null"}]},"semantic_state":{"enum":["accepted-unchanged","proposed","removed","unresolved"]},"scope":{"$ref":"#/$defs/ReviewScope"}},"additionalProperties":false},"Question":{"type":"object","required":["id","kind","prompt","state","permitted_answers"],"properties":{"id":{"$ref":"#/$defs/CanonicalId"},"kind":{"enum":["applicability-fact","normative-classification","identity-resolution","scope-resolution"]},"prompt":{"$ref":"#/$defs/NonEmptyString"},"state":{"enum":["required","answered","blocked"]},"permitted_answers":{"type":"array","minItems":1,"uniqueItems":true,"items":{"$ref":"#/$defs/NonEmptyString"}}},"additionalProperties":false},"ConsumerReviewContract":{"type":"object","required":["kind","id","version","permitted_dispositions","evidence_contract","authorization_capability","semantics"],"properties":{"kind":{"const":"consumer-review-contract"},"id":{"$ref":"#/$defs/CanonicalId"},"version":{"type":"integer","minimum":1},"permitted_dispositions":{"type":"array","minItems":1,"uniqueItems":true,"items":{"enum":["updated","reviewed-no-change","not-applicable","blocked"]}},"evidence_contract":{"$ref":"#/$defs/CanonicalId"},"authorization_capability":{"$ref":"#/$defs/CanonicalId"},"semantics":{"$ref":"#/$defs/NonEmptyString"}},"additionalProperties":false},"DecisionDependency":{"type":"object","required":["class","identity","digest"],"properties":{"class":{"enum":["policy-unit","semantic-revision","structure","representation","module-locator","applicability-fact","relationship","audit","exception","evidence","provider-contract","applicability-contract","analysis-contract"]},"identity":{"$ref":"#/$defs/NonEmptyString"},"digest":{"$ref":"#/$defs/Digest"}},"additionalProperties":false},"DecisionFingerprint":{"type":"object","required":["decision_kind","decision_contract","schema_version","dependencies"],"properties":{"decision_kind":{"$ref":"#/$defs/CanonicalId"},"decision_contract":{"$ref":"#/$defs/CanonicalId"},"schema_version":{"const":1},"dependencies":{"type":"array","minItems":1,"items":{"$ref":"#/$defs/DecisionDependency"}}},"additionalProperties":false},"FactValueContract":{"type":"object","required":["type","states","nullable"],"properties":{"type":{"enum":["boolean","enum","string","string-set","enum-set","canonical-id"]},"states":{"const":["known","known-absent"]},"nullable":{"type":"boolean"},"values":{"type":"array","minItems":1,"uniqueItems":true,"items":{"type":"string"}}},"additionalProperties":false},"EvidenceReference":{"type":"object","required":["id","digest","provider_contract","provider_contract_version"],"properties":{"id":{"$ref":"#/$defs/CanonicalId"},"digest":{"$ref":"#/$defs/Digest"},"provider_contract":{"$ref":"#/$defs/CanonicalId"},"provider_contract_version":{"$ref":"#/$defs/NonEmptyString"}},"additionalProperties":false},"CompletionProof":{"type":"object","required":["required_coverage_subjects","certificate_subjects","reached_consumer_obligations","disposition_obligations","required_fact_requirements","observed_fact_requirements","non_consumer_obligations_resolved","applicability_resolved","authorization_valid","evidence_valid"],"properties":{"required_coverage_subjects":{"type":"array","uniqueItems":true,"items":{"$ref":"#/$defs/CanonicalId"}},"certificate_subjects":{"type":"array","uniqueItems":true,"items":{"$ref":"#/$defs/CanonicalId"}},"reached_consumer_obligations":{"type":"array","uniqueItems":true,"items":{"$ref":"#/$defs/ObligationId"}},"disposition_obligations":{"type":"array","uniqueItems":true,"items":{"$ref":"#/$defs/ObligationId"}},"required_fact_requirements":{"type":"array","uniqueItems":true,"items":{"$ref":"#/$defs/FactRequirementId"}},"observed_fact_requirements":{"type":"array","uniqueItems":true,"items":{"$ref":"#/$defs/FactRequirementId"}},"non_consumer_obligations_resolved":{"const":true},"applicability_resolved":{"const":true},"authorization_valid":{"const":true},"evidence_valid":{"const":true}},"additionalProperties":false},"Timestamp":{"type":"integer","minimum":0},"SnapshotId":{"type":"string","pattern":"^snapshot:v1:[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"},"AnalysisId":{"type":"string","pattern":"^analysis:sha256:[0-9a-f]{64}$"},"ProposalId":{"type":"string","pattern":"^proposal:v1:[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"},"ProposalRevisionId":{"type":"string","pattern":"^proposal-revision:sha256:[0-9a-f]{64}$"},"ReadinessId":{"type":"string","pattern":"^readiness:sha256:[0-9a-f]{64}$"},"ApplicationId":{"type":"string","pattern":"^application:sha256:[0-9a-f]{64}$"},"ChildId":{"type":"string","pattern":"^sha256:[0-9a-f]{64}$"},"AuthorizationId":{"type":"string","pattern":"^authorization:sha256:[0-9a-f]{64}$"},"SnapshotHandle":{"type":"object","required":["kind","id","schema_version"],"properties":{"kind":{"const":"snapshot-handle"},"id":{"$ref":"#/$defs/SnapshotId"},"schema_version":{"const":5}},"additionalProperties":false},"AnalysisHandle":{"type":"object","required":["kind","id","schema_version"],"properties":{"kind":{"const":"analysis-handle"},"id":{"$ref":"#/$defs/AnalysisId"},"schema_version":{"const":7}},"additionalProperties":false},"ProposalHandle":{"type":"object","required":["kind","id","schema_version"],"properties":{"kind":{"const":"proposal-handle"},"id":{"$ref":"#/$defs/ProposalId"},"schema_version":{"const":1}},"additionalProperties":false},"ProposalRevisionHandle":{"type":"object","required":["kind","id","schema_version"],"properties":{"kind":{"const":"proposal-revision-handle"},"id":{"$ref":"#/$defs/ProposalRevisionId"},"schema_version":{"const":1}},"additionalProperties":false},"ReadinessHandle":{"type":"object","required":["kind","id","schema_version"],"properties":{"kind":{"const":"readiness-handle"},"id":{"$ref":"#/$defs/ReadinessId"},"schema_version":{"const":1}},"additionalProperties":false},"ApplicationHandle":{"type":"object","required":["kind","id","schema_version"],"properties":{"kind":{"const":"application-handle"},"id":{"$ref":"#/$defs/ApplicationId"},"schema_version":{"const":1}},"additionalProperties":false},"SnapshotChildHandle":{"type":"object","required":["kind","snapshot","child_kind","child_id","schema_version"],"properties":{"kind":{"const":"snapshot-child-handle"},"snapshot":{"$ref":"#/$defs/SnapshotHandle"},"child_kind":{"enum":["policy","relationship"]},"child_id":{"$ref":"#/$defs/NonEmptyString"},"schema_version":{"const":5}},"additionalProperties":false},"AnalysisChildHandle":{"type":"object","required":["kind","analysis","child_kind","child_id","schema_version"],"properties":{"kind":{"const":"analysis-child-handle"},"analysis":{"$ref":"#/$defs/AnalysisHandle"},"child_kind":{"enum":["context","fact-requirement","fact-observation","obligation","coverage-requirement","coverage-certificate"]},"child_id":{"$ref":"#/$defs/ChildId"},"schema_version":{"const":7}},"additionalProperties":false},"AnalysisMaterialHandle":{"oneOf":[{"$ref":"#/$defs/SnapshotHandle"},{"$ref":"#/$defs/ProposalRevisionHandle"}]},"InspectableHandle":{"oneOf":[{"$ref":"#/$defs/SnapshotHandle"},{"$ref":"#/$defs/AnalysisHandle"},{"$ref":"#/$defs/SnapshotChildHandle"},{"$ref":"#/$defs/AnalysisChildHandle"}]},"ActiveSnapshotSummary":{"type":"object","required":["snapshot","lifecycle","source_revision","created_at"],"properties":{"snapshot":{"$ref":"#/$defs/SnapshotHandle"},"lifecycle":{"const":"active"},"source_revision":{"$ref":"#/$defs/NonEmptyString"},"created_at":{"$ref":"#/$defs/Timestamp"}},"additionalProperties":false},"QuarantinedSnapshotSummary":{"type":"object","required":["snapshot","lifecycle","source_revision","created_at","purge_deadline"],"properties":{"snapshot":{"$ref":"#/$defs/SnapshotHandle"},"lifecycle":{"const":"quarantined"},"source_revision":{"$ref":"#/$defs/NonEmptyString"},"created_at":{"$ref":"#/$defs/Timestamp"},"purge_deadline":{"$ref":"#/$defs/Timestamp"}},"additionalProperties":false},"SnapshotSummary":{"oneOf":[{"$ref":"#/$defs/ActiveSnapshotSummary"},{"$ref":"#/$defs/QuarantinedSnapshotSummary"}]},"CreateSnapshotCall":{"type":"object","required":["kind"],"properties":{"kind":{"const":"create-snapshot"}},"additionalProperties":false},"CreateSnapshotResult":{"type":"object","required":["kind","snapshot"],"properties":{"kind":{"const":"create-snapshot-result"},"snapshot":{"$ref":"#/$defs/ActiveSnapshotSummary"}},"additionalProperties":false},"FindSnapshotsCall":{"type":"object","required":["kind"],"properties":{"kind":{"const":"find-snapshots"},"lifecycle":{"enum":["active","quarantined"],"default":"active"},"after":{"$ref":"#/$defs/SnapshotHandle"},"limit":{"type":"integer","minimum":1,"default":50}},"additionalProperties":false},"FindSnapshotsResult":{"type":"object","required":["kind","snapshots"],"properties":{"kind":{"const":"find-snapshots-result"},"snapshots":{"type":"array","items":{"$ref":"#/$defs/SnapshotSummary"}},"continuation":{"$ref":"#/$defs/SnapshotHandle"}},"additionalProperties":false},"StandardsChangePurpose":{"type":"object","required":["summary","rationale","evidence"],"properties":{"summary":{"$ref":"#/$defs/NonEmptyString"},"rationale":{"$ref":"#/$defs/NonEmptyString"},"evidence":{"type":"array","minItems":1,"uniqueItems":true,"items":{"$ref":"#/$defs/EvidenceReference"}}},"additionalProperties":false},"StandardContent":{"type":"object","required":["id","title","role","level","applies_when","does_not_apply_when","verification","body"],"properties":{"id":{"$ref":"#/$defs/CanonicalId"},"title":{"$ref":"#/$defs/NonEmptyString"},"role":{"enum":["core","router","workflow","profile","topic","reference"]},"level":{"enum":["MUST","SHOULD","PROFILE","REFERENCE"]},"applies_when":{"$ref":"#/$defs/NonEmptyString"},"does_not_apply_when":{"$ref":"#/$defs/NonEmptyString"},"verification":{"$ref":"#/$defs/NonEmptyString"},"body":{"$ref":"#/$defs/NonEmptyString"}},"additionalProperties":false},"NewPolicyUnit":{"type":"object","required":["id","heading_chain","semantic_revision","intent","aliases","predecessors","successors"],"properties":{"id":{"$ref":"#/$defs/CanonicalId"},"heading_chain":{"type":"array","minItems":1,"items":{"$ref":"#/$defs/NonEmptyString"}},"semantic_revision":{"const":1},"intent":{"$ref":"#/$defs/NonEmptyString"},"aliases":{"type":"array","uniqueItems":true,"items":{"$ref":"#/$defs/CanonicalId"}},"predecessors":{"type":"array","uniqueItems":true,"items":{"$ref":"#/$defs/CanonicalId"}},"successors":{"type":"array","uniqueItems":true,"items":{"$ref":"#/$defs/CanonicalId"}}},"additionalProperties":false},"PreservePolicySemantics":{"type":"object","required":["kind","semantic_revision","intent"],"properties":{"kind":{"const":"preserve"},"semantic_revision":{"type":"integer","minimum":1},"intent":{"$ref":"#/$defs/NonEmptyString"}},"additionalProperties":false},"ChangePolicySemantics":{"type":"object","required":["kind","accepted_semantic_revision","proposed_semantic_revision","intent"],"properties":{"kind":{"const":"change"},"accepted_semantic_revision":{"type":"integer","minimum":1},"proposed_semantic_revision":{"type":"integer","minimum":1},"intent":{"$ref":"#/$defs/NonEmptyString"}},"additionalProperties":false},"PolicySemanticIntent":{"oneOf":[{"$ref":"#/$defs/PreservePolicySemantics"},{"$ref":"#/$defs/ChangePolicySemantics"}]},"CreateStandardEdit":{"type":"object","required":["kind","standard","requires","specializes","policy_units"],"properties":{"kind":{"const":"create-standard"},"standard":{"$ref":"#/$defs/StandardContent"},"requires":{"type":"array","uniqueItems":true,"items":{"$ref":"#/$defs/CanonicalId"}},"specializes":{"type":"array","uniqueItems":true,"items":{"$ref":"#/$defs/CanonicalId"}},"policy_units":{"type":"array","uniqueItems":true,"items":{"$ref":"#/$defs/NewPolicyUnit"}}},"additionalProperties":false},"ReviseStandardEdit":{"type":"object","required":["kind","standard"],"properties":{"kind":{"const":"revise-standard"},"standard":{"$ref":"#/$defs/StandardContent"},"scope_updates":{"type":"array","items":{"$ref":"#/$defs/PolicyScopeUpdate"}}},"additionalProperties":false},"RevisePolicyUnitEdit":{"type":"object","required":["kind","policy","title","body","semantics"],"properties":{"kind":{"const":"revise-policy-unit"},"policy":{"$ref":"#/$defs/CanonicalId"},"title":{"$ref":"#/$defs/NonEmptyString"},"body":{"$ref":"#/$defs/NonEmptyString"},"semantics":{"$ref":"#/$defs/PolicySemanticIntent"}},"additionalProperties":false},"MovePolicyUnitEdit":{"type":"object","required":["kind","policy","standard","semantics"],"properties":{"kind":{"const":"move-policy-unit"},"policy":{"$ref":"#/$defs/CanonicalId"},"standard":{"$ref":"#/$defs/CanonicalId"},"after_policy":{"$ref":"#/$defs/CanonicalId"},"semantics":{"$ref":"#/$defs/PolicySemanticIntent"}},"additionalProperties":false},"RetirePolicyUnitEdit":{"type":"object","required":["kind","policy","retired_semantic_revision","successors","relationship_dispositions","evidence"],"properties":{"kind":{"const":"retire-policy-unit"},"policy":{"$ref":"#/$defs/CanonicalId"},"retired_semantic_revision":{"type":"integer","minimum":1},"successors":{"type":"array","uniqueItems":true,"items":{"$ref":"#/$defs/CanonicalId"}},"relationship_dispositions":{"type":"array","uniqueItems":true,"items":{"$ref":"#/$defs/RelationshipDisposition"}},"evidence":{"type":"array","minItems":1,"uniqueItems":true,"items":{"$ref":"#/$defs/EvidenceReference"}}},"additionalProperties":false},"RetireStandardEdit":{"type":"object","required":["kind","standard","successors","relationship_dispositions","evidence"],"properties":{"kind":{"const":"retire-standard"},"standard":{"$ref":"#/$defs/CanonicalId"},"successors":{"type":"array","uniqueItems":true,"items":{"$ref":"#/$defs/CanonicalId"}},"relationship_dispositions":{"type":"array","uniqueItems":true,"items":{"$ref":"#/$defs/RelationshipDisposition"}},"evidence":{"type":"array","minItems":1,"uniqueItems":true,"items":{"$ref":"#/$defs/EvidenceReference"}}},"additionalProperties":false},"ReplaceStandardRelationshipsEdit":{"type":"object","required":["kind","standard","requires","specializes","rationale"],"properties":{"kind":{"const":"replace-standard-relationships"},"standard":{"$ref":"#/$defs/CanonicalId"},"requires":{"type":"array","uniqueItems":true,"items":{"$ref":"#/$defs/CanonicalId"}},"specializes":{"type":"array","uniqueItems":true,"items":{"$ref":"#/$defs/CanonicalId"}},"rationale":{"$ref":"#/$defs/NonEmptyString"}},"additionalProperties":false},"AuthoringTargetHandle":{"type":"object","required":["kind","snapshot","id","schema_version"],"properties":{"kind":{"const":"authoring-target-handle"},"snapshot":{"$ref":"#/$defs/SnapshotHandle"},"id":{"$ref":"#/$defs/ChildId"},"schema_version":{"const":5}},"additionalProperties":false},"RelationshipConsumer":{"oneOf":[{"$ref":"#/$defs/CanonicalId"},{"$ref":"#/$defs/AuthoringTargetHandle"}]},"PolicyRelationship":{"type":"object","required":["source_policy","consumer","relation","applicability","source_scope","consumer_scope","evidence_owner","rationale"],"properties":{"source_policy":{"$ref":"#/$defs/CanonicalId"},"consumer":{"$ref":"#/$defs/RelationshipConsumer"},"relation":{"enum":["normative-consumer","router-projection","prompt-projection","template-projection","reference-projection","fixture-projection","enforcement-suite-projection","documentation-projection","implementation-projection"]},"applicability":{"$ref":"#/$defs/ApplicabilityExpression"},"source_scope":{"oneOf":[{"$ref":"#/$defs/ReviewScope"},{"type":"null"}]},"consumer_scope":{"oneOf":[{"$ref":"#/$defs/ReviewScope"},{"type":"null"}]},"evidence_owner":{"$ref":"#/$defs/CanonicalId"},"rationale":{"$ref":"#/$defs/NonEmptyString"}},"additionalProperties":false},"PutPolicyRelationshipEdit":{"type":"object","required":["kind","relationship"],"properties":{"kind":{"const":"put-policy-relationship"},"relationship":{"$ref":"#/$defs/PolicyRelationship"}},"additionalProperties":false},"RemovePolicyRelationshipEdit":{"type":"object","required":["kind","relationship"],"properties":{"kind":{"const":"remove-policy-relationship"},"relationship":{"$ref":"#/$defs/PolicyRelationship"}},"additionalProperties":false},"ModuleRelationshipKey":{"type":"object","required":["kind","relation","source","target"],"properties":{"kind":{"const":"module-relationship"},"relation":{"enum":["requires","specializes"]},"source":{"$ref":"#/$defs/CanonicalId"},"target":{"$ref":"#/$defs/CanonicalId"}},"additionalProperties":false},"PolicyRelationshipKey":{"type":"object","required":["kind","source_policy","consumer","relation"],"properties":{"kind":{"const":"policy-relationship"},"source_policy":{"$ref":"#/$defs/CanonicalId"},"consumer":{"$ref":"#/$defs/RelationshipConsumer"},"relation":{"$ref":"#/$defs/CanonicalId"}},"additionalProperties":false},"RelationshipKey":{"oneOf":[{"$ref":"#/$defs/ModuleRelationshipKey"},{"$ref":"#/$defs/PolicyRelationshipKey"}]},"RelationshipDisposition":{"type":"object","required":["relationship","disposition","rationale","evidence"],"properties":{"relationship":{"$ref":"#/$defs/RelationshipKey"},"disposition":{"enum":["remove","retarget"]},"replacement_consumer":{"$ref":"#/$defs/RelationshipConsumer"},"rationale":{"$ref":"#/$defs/NonEmptyString"},"evidence":{"type":"array","minItems":1,"uniqueItems":true,"items":{"$ref":"#/$defs/EvidenceReference"}}},"additionalProperties":false},"StandardEdit":{"oneOf":[{"$ref":"#/$defs/CreateStandardEdit"},{"$ref":"#/$defs/ReviseStandardEdit"},{"$ref":"#/$defs/RevisePolicyUnitEdit"},{"$ref":"#/$defs/MovePolicyUnitEdit"},{"$ref":"#/$defs/RetirePolicyUnitEdit"},{"$ref":"#/$defs/RetireStandardEdit"},{"$ref":"#/$defs/ReplaceStandardRelationshipsEdit"},{"$ref":"#/$defs/PutPolicyRelationshipEdit"},{"$ref":"#/$defs/RemovePolicyRelationshipEdit"},{"$ref":"#/$defs/PutRoutingRuleEdit"},{"$ref":"#/$defs/RemoveRoutingRuleEdit"},{"$ref":"#/$defs/PutRoutingFactEdit"},{"$ref":"#/$defs/RemoveRoutingFactEdit"},{"$ref":"#/$defs/AuditPolicyUnitEdit"},{"$ref":"#/$defs/RewriteNavigationIndexEdit"},{"$ref":"#/$defs/PutDecisionProvenanceEdit"},{"$ref":"#/$defs/RetireDecisionProvenanceEdit"},{"$ref":"#/$defs/ApproveApplicationContentEdit"},{"$ref":"#/$defs/WithdrawApplicationContentEdit"},{"$ref":"#/$defs/ReviseOperationalArtifactEdit"}]},"StandardsChangeSet":{"type":"object","required":["purpose","edits"],"properties":{"purpose":{"$ref":"#/$defs/StandardsChangePurpose"},"edits":{"type":"array","minItems":1,"uniqueItems":true,"items":{"$ref":"#/$defs/StandardEdit"}}},"additionalProperties":false},"ProposalSummary":{"type":"object","required":["proposal","head_revision"],"properties":{"proposal":{"$ref":"#/$defs/ProposalHandle"},"head_revision":{"$ref":"#/$defs/ProposalRevisionHandle"}},"additionalProperties":false},"CreateProposalCall":{"type":"object","required":["kind","base_snapshot","change_set"],"properties":{"kind":{"const":"create-proposal"},"base_snapshot":{"$ref":"#/$defs/SnapshotHandle"},"change_set":{"$ref":"#/$defs/StandardsChangeSet"}},"additionalProperties":false},"CreateProposalResult":{"type":"object","required":["kind","proposal","revision"],"properties":{"kind":{"const":"create-proposal-result"},"proposal":{"$ref":"#/$defs/ProposalHandle"},"revision":{"$ref":"#/$defs/ProposalRevisionHandle"}},"additionalProperties":false},"FindProposalsCall":{"type":"object","required":["kind"],"properties":{"kind":{"const":"find-proposals"},"after":{"$ref":"#/$defs/ProposalHandle"},"limit":{"type":"integer","minimum":1,"default":50}},"additionalProperties":false},"FindProposalsResult":{"type":"object","required":["kind","proposals"],"properties":{"kind":{"const":"find-proposals-result"},"proposals":{"type":"array","items":{"$ref":"#/$defs/ProposalSummary"}},"continuation":{"$ref":"#/$defs/ProposalHandle"}},"additionalProperties":false},"ReviseProposalCall":{"type":"object","required":["kind","expected_revision","change_set"],"properties":{"kind":{"const":"revise-proposal"},"expected_revision":{"$ref":"#/$defs/ProposalRevisionHandle"},"change_set":{"$ref":"#/$defs/StandardsChangeSet"}},"additionalProperties":false},"ReviseProposalResult":{"type":"object","required":["kind","proposal","revision"],"properties":{"kind":{"const":"revise-proposal-result"},"proposal":{"$ref":"#/$defs/ProposalHandle"},"revision":{"$ref":"#/$defs/ProposalRevisionHandle"}},"additionalProperties":false},"DeleteSnapshotCall":{"type":"object","required":["kind","snapshot"],"properties":{"kind":{"const":"delete-snapshot"},"snapshot":{"$ref":"#/$defs/SnapshotHandle"}},"additionalProperties":false},"DeleteSnapshotResult":{"type":"object","required":["kind","snapshot","purge_deadline"],"properties":{"kind":{"const":"delete-snapshot-result"},"snapshot":{"$ref":"#/$defs/SnapshotHandle"},"purge_deadline":{"$ref":"#/$defs/Timestamp"}},"additionalProperties":false},"UndeleteSnapshotCall":{"type":"object","required":["kind","snapshot"],"properties":{"kind":{"const":"undelete-snapshot"},"snapshot":{"$ref":"#/$defs/SnapshotHandle"}},"additionalProperties":false},"UndeleteSnapshotResult":{"type":"object","required":["kind","snapshot"],"properties":{"kind":{"const":"undelete-snapshot-result"},"snapshot":{"$ref":"#/$defs/ActiveSnapshotSummary"}},"additionalProperties":false},"QueryNextOperation":{"type":"object","required":["operation","request_kind","snapshot"],"properties":{"operation":{"const":"query"},"request_kind":{"enum":["route","read","related"]},"target":{"$ref":"#/$defs/CanonicalId"},"snapshot":{"$ref":"#/$defs/SnapshotHandle"}},"additionalProperties":false},"QueryProposalNextOperation":{"type":"object","required":["operation","request_kind","revision"],"properties":{"operation":{"const":"query_proposal"},"request_kind":{"enum":["route","read","related"]},"target":{"$ref":"#/$defs/CanonicalId"},"revision":{"$ref":"#/$defs/ProposalRevisionHandle"}},"additionalProperties":false},"ResolveNextOperation":{"type":"object","required":["operation","request_kind","analysis"],"properties":{"operation":{"const":"resolve"},"request_kind":{"enum":["provide-fact","consumer-disposition","impact-disposition","coverage-attestation"]},"target":{"$ref":"#/$defs/CanonicalId"},"work":{"$ref":"#/$defs/AnalysisChildHandle"},"analysis":{"$ref":"#/$defs/AnalysisHandle"}},"additionalProperties":false},"InspectNextOperation":{"type":"object","required":["operation","request_kind","handle"],"properties":{"operation":{"const":"inspect"},"request_kind":{"const":"inspect"},"handle":{"$ref":"#/$defs/InspectableHandle"}},"additionalProperties":false},"NextOperation":{"oneOf":[{"$ref":"#/$defs/QueryNextOperation"},{"$ref":"#/$defs/ResolveNextOperation"},{"$ref":"#/$defs/InspectNextOperation"},{"$ref":"#/$defs/FocusedQueryNextOperation"}]},"QueryCall":{"type":"object","required":["snapshot","request"],"properties":{"snapshot":{"$ref":"#/$defs/SnapshotHandle"},"request":{"$ref":"#/$defs/QueryRequest"}},"additionalProperties":false},"QueryProposalCall":{"type":"object","required":["revision","request"],"properties":{"revision":{"$ref":"#/$defs/ProposalRevisionHandle"},"request":{"$ref":"#/$defs/QueryRequest"}},"additionalProperties":false},"AnalyzeProposalCall":{"type":"object","required":["revision"],"properties":{"revision":{"$ref":"#/$defs/ProposalRevisionHandle"}},"additionalProperties":false},"ReviewDecision":{"type":"object","required":["owner","decision","rationale","evidence"],"properties":{"owner":{"enum":["consumer","impact","audit"]},"decision":{"const":"accept"},"rationale":{"$ref":"#/$defs/NonEmptyString"},"evidence":{"type":"array","minItems":1,"uniqueItems":true,"items":{"$ref":"#/$defs/EvidenceReference"}}},"additionalProperties":false},"ReviewProposalCall":{"type":"object","required":["kind","analysis","decisions"],"properties":{"kind":{"const":"review-proposal"},"analysis":{"$ref":"#/$defs/AnalysisHandle"},"decisions":{"type":"array","minItems":3,"maxItems":3,"uniqueItems":true,"items":{"$ref":"#/$defs/ReviewDecision"}},"prior_readiness":{"$ref":"#/$defs/ReadinessHandle"}},"additionalProperties":false},"ReviewProposalResult":{"type":"object","required":["kind","readiness","revision","status"],"properties":{"kind":{"const":"review-proposal-result"},"readiness":{"$ref":"#/$defs/ReadinessHandle"},"revision":{"$ref":"#/$defs/ProposalRevisionHandle"},"status":{"const":"ready"}},"additionalProperties":false},"ApplyProposalCall":{"type":"object","required":["kind","readiness"],"properties":{"kind":{"const":"apply-proposal"},"readiness":{"$ref":"#/$defs/ReadinessHandle"}},"additionalProperties":false},"ApplyProposalResult":{"type":"object","required":["kind","application","status"],"properties":{"kind":{"const":"apply-proposal-result"},"application":{"$ref":"#/$defs/ApplicationHandle"},"status":{"const":"applied"}},"additionalProperties":false},"RecoverApplicationCall":{"type":"object","required":["kind","readiness"],"properties":{"kind":{"const":"recover-application"},"readiness":{"$ref":"#/$defs/ReadinessHandle"}},"additionalProperties":false},"RecoverApplicationResult":{"type":"object","required":["kind","application","status"],"properties":{"kind":{"const":"recover-application-result"},"application":{"$ref":"#/$defs/ApplicationHandle"},"status":{"const":"applied"}},"additionalProperties":false},"ApplicationRecoveryRequiredResult":{"type":"object","required":["kind","application","status","code","outcome","message"],"properties":{"kind":{"const":"application-recovery-required-result"},"application":{"$ref":"#/$defs/ApplicationHandle"},"status":{"const":"recovery-required"},"code":{"enum":["APPLICATION.PUBLICATION_UNAVAILABLE","APPLICATION.OBSERVATION_UNAVAILABLE","APPLICATION.OUTCOME_PERSISTENCE_UNAVAILABLE","APPLICATION.RECOVERY_TARGET_UNCERTAIN","APPLICATION.RECOVERY_TARGET_DIVERGED"]},"outcome":{"const":"unavailable"},"message":{"$ref":"#/$defs/NonEmptyString"}},"additionalProperties":false},"PolicySummary":{"type":"object","required":["handle","authority","scope"],"properties":{"handle":{"$ref":"#/$defs/SnapshotChildHandle"},"authority":{"enum":["normative","projection","contextual","evidence"]},"scope":{"$ref":"#/$defs/ReviewScope"}},"additionalProperties":false},"RelationshipSummary":{"type":"object","required":["handle","source","target","relation","groups","direction","traversal_eligible","applicability"],"properties":{"handle":{"$ref":"#/$defs/SnapshotChildHandle"},"source":{"$ref":"#/$defs/CanonicalId"},"target":{"$ref":"#/$defs/CanonicalId"},"relation":{"$ref":"#/$defs/CanonicalId"},"groups":{"type":"array","items":{"$ref":"#/$defs/CanonicalId"},"minItems":1,"uniqueItems":true},"direction":{"enum":["incoming","outgoing"]},"traversal_eligible":{"type":"boolean"},"applicability":{"enum":["true","false","unknown","not-declared"]}},"additionalProperties":false},"ProposalPolicySummary":{"type":"object","required":["id","authority","scope"],"properties":{"id":{"$ref":"#/$defs/CanonicalId"},"authority":{"enum":["normative","projection","contextual","evidence"]},"scope":{"$ref":"#/$defs/ReviewScope"}},"additionalProperties":false},"ProposalRelationshipSummary":{"type":"object","required":["source","target","relation","groups","direction","traversal_eligible","applicability"],"properties":{"source":{"$ref":"#/$defs/CanonicalId"},"target":{"$ref":"#/$defs/CanonicalId"},"relation":{"$ref":"#/$defs/CanonicalId"},"groups":{"type":"array","items":{"$ref":"#/$defs/CanonicalId"},"minItems":1,"uniqueItems":true},"direction":{"enum":["incoming","outgoing"]},"traversal_eligible":{"type":"boolean"},"applicability":{"enum":["true","false","unknown","not-declared"]}},"additionalProperties":false},"RouteResult":{"type":"object","required":["kind","snapshot","reading_plan","unresolved_questions","next_operations"],"properties":{"kind":{"const":"route-result"},"snapshot":{"$ref":"#/$defs/SnapshotHandle"},"reading_plan":{"type":"array","items":{"$ref":"#/$defs/ReadingPlanEntry"}},"unresolved_questions":{"type":"array","items":{"$ref":"#/$defs/Question"}},"next_operations":{"type":"array","items":{"$ref":"#/$defs/NextOperation"}},"summary":{"type":"string"}},"additionalProperties":false},"ReadResult":{"type":"object","required":["kind","snapshot","policy","content","requires","specializes","related","next_operations"],"properties":{"kind":{"const":"read-result"},"snapshot":{"$ref":"#/$defs/SnapshotHandle"},"policy":{"$ref":"#/$defs/PolicySummary"},"content":{"type":"string"},"requires":{"type":"array","items":{"$ref":"#/$defs/CanonicalId"},"uniqueItems":true},"specializes":{"type":"array","items":{"$ref":"#/$defs/CanonicalId"},"uniqueItems":true},"related":{"type":"array","items":{"$ref":"#/$defs/RelationshipSummary"}},"next_operations":{"type":"array","items":{"$ref":"#/$defs/NextOperation"}},"summary":{"type":"string"},"routing":{"$ref":"#/$defs/RoutingConfiguration"},"coverage":{"$ref":"#/$defs/ReadCoverage"},"application_exposure":{"$ref":"#/$defs/ApplicationExposureState"},"provenance":{"type":"array","items":{"$ref":"#/$defs/CanonicalId"}}},"additionalProperties":false},"PolicyUnitMapping":{"type":"object","required":["state","policy_units"],"properties":{"state":{"enum":["exact-policy-unit","policy-units-present","incomplete"]},"reason":{"const":"no-policy-units"},"policy_units":{"type":"array","items":{"$ref":"#/$defs/CanonicalId"},"uniqueItems":true}},"additionalProperties":false},"RelatedResult":{"type":"object","required":["kind","snapshot","target","policy_unit_mapping","relationships","next_operations"],"properties":{"kind":{"const":"related-result"},"snapshot":{"$ref":"#/$defs/SnapshotHandle"},"target":{"$ref":"#/$defs/CanonicalId"},"authoring_target":{"$ref":"#/$defs/AuthoringTargetHandle"},"policy_unit_mapping":{"$ref":"#/$defs/PolicyUnitMapping"},"relationships":{"type":"array","items":{"$ref":"#/$defs/RelationshipSummary"}},"next_operations":{"type":"array","items":{"$ref":"#/$defs/NextOperation"}},"summary":{"type":"string"}},"additionalProperties":false},"QueryResult":{"oneOf":[{"$ref":"#/$defs/RouteResult"},{"$ref":"#/$defs/ReadResult"},{"$ref":"#/$defs/RelatedResult"},{"$ref":"#/$defs/NavigationIndexesResult"},{"$ref":"#/$defs/ProvenanceReadResult"},{"$ref":"#/$defs/OperationalReadResult"}]},"ProposalRouteResult":{"type":"object","required":["kind","revision","reading_plan","unresolved_questions","next_operations"],"properties":{"kind":{"const":"proposal-route-result"},"revision":{"$ref":"#/$defs/ProposalRevisionHandle"},"reading_plan":{"type":"array","items":{"$ref":"#/$defs/ReadingPlanEntry"}},"unresolved_questions":{"type":"array","items":{"$ref":"#/$defs/Question"}},"next_operations":{"type":"array","items":{"$ref":"#/$defs/QueryProposalNextOperation"}},"summary":{"type":"string"}},"additionalProperties":false},"ProposalReadResult":{"type":"object","required":["kind","revision","policy","content","requires","specializes","related","next_operations"],"properties":{"kind":{"const":"proposal-read-result"},"revision":{"$ref":"#/$defs/ProposalRevisionHandle"},"policy":{"$ref":"#/$defs/ProposalPolicySummary"},"content":{"type":"string"},"requires":{"type":"array","items":{"$ref":"#/$defs/CanonicalId"},"uniqueItems":true},"specializes":{"type":"array","items":{"$ref":"#/$defs/CanonicalId"},"uniqueItems":true},"related":{"type":"array","items":{"$ref":"#/$defs/ProposalRelationshipSummary"}},"next_operations":{"type":"array","items":{"$ref":"#/$defs/QueryProposalNextOperation"}},"summary":{"type":"string"},"routing":{"$ref":"#/$defs/RoutingConfiguration"},"coverage":{"$ref":"#/$defs/ReadCoverage"},"application_exposure":{"$ref":"#/$defs/ApplicationExposureState"},"provenance":{"type":"array","items":{"$ref":"#/$defs/CanonicalId"}}},"additionalProperties":false},"ProposalRelatedResult":{"type":"object","required":["kind","revision","target","policy_unit_mapping","relationships","next_operations"],"properties":{"kind":{"const":"proposal-related-result"},"revision":{"$ref":"#/$defs/ProposalRevisionHandle"},"target":{"$ref":"#/$defs/CanonicalId"},"authoring_target":{"$ref":"#/$defs/AuthoringTargetHandle"},"policy_unit_mapping":{"$ref":"#/$defs/PolicyUnitMapping"},"relationships":{"type":"array","items":{"$ref":"#/$defs/ProposalRelationshipSummary"}},"next_operations":{"type":"array","items":{"$ref":"#/$defs/QueryProposalNextOperation"}},"summary":{"type":"string"}},"additionalProperties":false},"QueryProposalResult":{"oneOf":[{"$ref":"#/$defs/ProposalRouteResult"},{"$ref":"#/$defs/ProposalReadResult"},{"$ref":"#/$defs/ProposalRelatedResult"},{"$ref":"#/$defs/NavigationIndexesResult"},{"$ref":"#/$defs/ProvenanceReadResult"},{"$ref":"#/$defs/OperationalReadResult"}]},"AnalysisRequest":{"type":"object","required":["kind","base_snapshot","proposed_snapshot","changes","semantic_proposals","contract_version"],"properties":{"kind":{"const":"analysis-request"},"base_snapshot":{"$ref":"#/$defs/SnapshotHandle"},"proposed_snapshot":{"$ref":"#/$defs/SnapshotHandle"},"changes":{"type":"array","items":{"$ref":"#/$defs/ChangeDescriptor"},"minItems":1},"semantic_proposals":{"type":"array","items":{"$ref":"#/$defs/SemanticProposal"},"uniqueItems":true},"prior_analysis":{"$ref":"#/$defs/AnalysisHandle"},"contract_version":{"const":6}},"additionalProperties":false},"PrepareCall":{"type":"object","required":["request"],"properties":{"request":{"$ref":"#/$defs/AnalysisRequest"}},"additionalProperties":false},"AnalysisContext":{"type":"object","required":["kind","handle","subjects","changes","semantic_proposals"],"properties":{"kind":{"const":"analysis-context"},"handle":{"$ref":"#/$defs/AnalysisChildHandle"},"subjects":{"type":"array","items":{"$ref":"#/$defs/ChangedPolicyUnit"},"uniqueItems":true},"changes":{"type":"array","items":{"$ref":"#/$defs/ChangeDescriptor"},"minItems":1,"uniqueItems":true},"semantic_proposals":{"type":"array","items":{"$ref":"#/$defs/SemanticProposal"},"uniqueItems":true}},"additionalProperties":false},"AuthorizationReference":{"type":"object","required":["id","issuer","capability","authority_digest"],"properties":{"id":{"$ref":"#/$defs/AuthorizationId"},"issuer":{"$ref":"#/$defs/CanonicalId"},"capability":{"$ref":"#/$defs/CanonicalId"},"authority_digest":{"$ref":"#/$defs/Digest"}},"additionalProperties":false},"ProviderReference":{"type":"object","required":["id","contract","contract_version","input_digest"],"properties":{"id":{"$ref":"#/$defs/CanonicalId"},"contract":{"$ref":"#/$defs/CanonicalId"},"contract_version":{"$ref":"#/$defs/NonEmptyString"},"input_digest":{"$ref":"#/$defs/Digest"}},"additionalProperties":false},"AuthorizationRecord":{"type":"object","required":["reference","issuer_semantic_revision","principal","action","subject_kind","subject_id","authorization_evidence","revocation_authority","revocation_authority_semantic_revision","revocation_evidence"],"properties":{"reference":{"$ref":"#/$defs/AuthorizationReference"},"issuer_semantic_revision":{"type":"integer","minimum":1},"principal":{"$ref":"#/$defs/CanonicalId"},"action":{"$ref":"#/$defs/CanonicalId"},"subject_kind":{"$ref":"#/$defs/CanonicalId"},"subject_id":{"$ref":"#/$defs/NonEmptyString"},"authorization_evidence":{"type":"array","items":{"$ref":"#/$defs/EvidenceReference"},"minItems":1,"uniqueItems":true},"revocation_authority":{"$ref":"#/$defs/CanonicalId"},"revocation_authority_semantic_revision":{"type":"integer","minimum":1},"revocation_evidence":{"type":"array","items":{"$ref":"#/$defs/EvidenceReference"},"minItems":1,"uniqueItems":true}},"additionalProperties":false},"DomainContractReference":{"type":"object","required":["id","version"],"properties":{"id":{"$ref":"#/$defs/CanonicalId"},"version":{"$ref":"#/$defs/NonEmptyString"}},"additionalProperties":false},"AnalysisExecutionContractView":{"type":"object","required":["authorization_authority_digest","providers"],"properties":{"authorization_authority_digest":{"oneOf":[{"$ref":"#/$defs/Digest"},{"type":"null"}]},"providers":{"type":"array","items":{"$ref":"#/$defs/ProviderReference"},"uniqueItems":true}},"additionalProperties":false},"FactRequirement":{"type":"object","required":["kind","handle","fact","fact_semantic_revision","fact_contract_digest","context","value_contract","answer_contract","evidence_contract","authorization_capability"],"properties":{"kind":{"const":"fact-requirement"},"handle":{"$ref":"#/$defs/AnalysisChildHandle"},"fact":{"$ref":"#/$defs/CanonicalId"},"fact_semantic_revision":{"type":"integer","minimum":1},"fact_contract_digest":{"$ref":"#/$defs/Digest"},"context":{"$ref":"#/$defs/AnalysisChildHandle"},"value_contract":{"$ref":"#/$defs/FactValueContract"},"answer_contract":{"$ref":"#/$defs/CanonicalId"},"evidence_contract":{"$ref":"#/$defs/CanonicalId"},"authorization_capability":{"$ref":"#/$defs/CanonicalId"}},"additionalProperties":false},"FactRequirementWork":{"type":"object","required":["requirement","prompt","dependent_programs"],"properties":{"requirement":{"$ref":"#/$defs/FactRequirement"},"prompt":{"$ref":"#/$defs/NonEmptyString"},"dependent_programs":{"type":"array","items":{"$ref":"#/$defs/NonEmptyString"},"minItems":1,"uniqueItems":true}},"additionalProperties":false},"FactObservation":{"type":"object","required":["kind","handle","requirement","value","evidence","authorization"],"properties":{"kind":{"const":"fact-observation"},"handle":{"$ref":"#/$defs/AnalysisChildHandle"},"requirement":{"$ref":"#/$defs/AnalysisChildHandle"},"value":{"$ref":"#/$defs/FactValue"},"evidence":{"type":"array","items":{"$ref":"#/$defs/EvidenceReference"},"minItems":1,"uniqueItems":true},"authorization":{"$ref":"#/$defs/AuthorizationReference"},"provider":{"$ref":"#/$defs/ProviderReference"}},"additionalProperties":false},"Obligation":{"type":"object","required":["handle","kind","target","scope","reasons","state","permitted_submissions","fingerprint"],"properties":{"handle":{"$ref":"#/$defs/AnalysisChildHandle"},"kind":{"enum":["consumer-review","impact-review","lifecycle-impact-review","audit-coverage","unmapped-normative-change"]},"target":{"$ref":"#/$defs/CanonicalId"},"scope":{"$ref":"#/$defs/ReviewScope"},"reasons":{"type":"array","items":{"$ref":"#/$defs/SelectionReason"},"minItems":1,"uniqueItems":true},"state":{"enum":["required","resolved","blocked"]},"applicability":{"enum":["true","false","unknown","not-declared"]},"permitted_submissions":{"type":"array","items":{"enum":["consumer-disposition","impact-disposition","coverage-attestation"]},"minItems":1,"uniqueItems":true},"review_contract":{"$ref":"#/$defs/ConsumerReviewContract"},"fingerprint":{"$ref":"#/$defs/DecisionFingerprint"}},"additionalProperties":false},"ProvideFactSubmission":{"type":"object","required":["kind","requirement","value","evidence"],"properties":{"kind":{"const":"provide-fact"},"requirement":{"$ref":"#/$defs/AnalysisChildHandle"},"value":{"$ref":"#/$defs/FactValue"},"evidence":{"type":"array","items":{"$ref":"#/$defs/EvidenceReference"},"minItems":1,"uniqueItems":true}},"additionalProperties":false},"ConsumerDispositionSubmission":{"type":"object","required":["kind","obligation","result","rationale","evidence","fingerprint"],"properties":{"kind":{"const":"consumer-disposition"},"obligation":{"$ref":"#/$defs/AnalysisChildHandle"},"result":{"enum":["updated","reviewed-no-change","not-applicable","blocked"]},"rationale":{"$ref":"#/$defs/NonEmptyString"},"evidence":{"type":"array","items":{"$ref":"#/$defs/EvidenceReference"},"minItems":1},"fingerprint":{"$ref":"#/$defs/DecisionFingerprint"}},"additionalProperties":false},"ImpactDispositionSubmission":{"type":"object","required":["kind","obligation","result","rationale","evidence","fingerprint"],"properties":{"kind":{"const":"impact-disposition"},"obligation":{"$ref":"#/$defs/AnalysisChildHandle"},"result":{"enum":["confirmed","resolved-no-impact","requires-change","blocked"]},"rationale":{"$ref":"#/$defs/NonEmptyString"},"evidence":{"type":"array","items":{"$ref":"#/$defs/EvidenceReference"},"minItems":1},"fingerprint":{"$ref":"#/$defs/DecisionFingerprint"}},"additionalProperties":false},"CoverageAttestationClaim":{"type":"object","required":["requirement","conclusion","evidence","explicit_exclusions","rationale","auditor_provenance"],"properties":{"requirement":{"$ref":"#/$defs/AnalysisChildHandle"},"conclusion":{"const":"complete"},"evidence":{"type":"array","items":{"$ref":"#/$defs/EvidenceReference"},"minItems":1,"uniqueItems":true},"explicit_exclusions":{"type":"array","items":{"$ref":"#/$defs/EvidenceReference"},"uniqueItems":true},"rationale":{"$ref":"#/$defs/NonEmptyString"},"auditor_provenance":{"$ref":"#/$defs/NonEmptyString"}},"additionalProperties":false},"CoverageAttestationSubmission":{"type":"object","required":["kind","claim"],"properties":{"kind":{"const":"coverage-attestation"},"claim":{"$ref":"#/$defs/CoverageAttestationClaim"}},"additionalProperties":false},"Submission":{"oneOf":[{"$ref":"#/$defs/ProvideFactSubmission"},{"$ref":"#/$defs/ConsumerDispositionSubmission"},{"$ref":"#/$defs/ImpactDispositionSubmission"},{"$ref":"#/$defs/CoverageAttestationSubmission"}]},"ResolveCall":{"type":"object","required":["analysis","submission"],"properties":{"analysis":{"$ref":"#/$defs/AnalysisHandle"},"submission":{"$ref":"#/$defs/Submission"}},"additionalProperties":false},"CoverageRequirement":{"type":"object","required":["kind","handle","subject","owner","semantic_revision","relationship_kinds","horizon","required_evidence_contract"],"properties":{"kind":{"const":"coverage-requirement"},"handle":{"$ref":"#/$defs/AnalysisChildHandle"},"subject":{"$ref":"#/$defs/CanonicalId"},"owner":{"$ref":"#/$defs/CanonicalId"},"semantic_revision":{"type":"integer","minimum":1},"relationship_kinds":{"type":"array","items":{"$ref":"#/$defs/CanonicalId"},"uniqueItems":true},"horizon":{"$ref":"#/$defs/CanonicalId"},"required_evidence_contract":{"$ref":"#/$defs/CanonicalId"}},"additionalProperties":false},"CoverageAttestation":{"type":"object","required":["kind","requirement","conclusion","evidence","explicit_exclusions","rationale","auditor_provenance","schema_version","authorization"],"properties":{"kind":{"const":"coverage-attestation"},"requirement":{"$ref":"#/$defs/AnalysisChildHandle"},"conclusion":{"const":"complete"},"evidence":{"type":"array","items":{"$ref":"#/$defs/EvidenceReference"},"minItems":1},"explicit_exclusions":{"type":"array","items":{"$ref":"#/$defs/EvidenceReference"}},"rationale":{"$ref":"#/$defs/NonEmptyString"},"auditor_provenance":{"$ref":"#/$defs/NonEmptyString"},"schema_version":{"const":4},"authorization":{"$ref":"#/$defs/AuthorizationReference"}},"additionalProperties":false},"CoverageCertificate":{"type":"object","required":["kind","handle","requirement","subject","owner","semantic_revision","horizon_digest","relationship_digest","evidence_digests","fact_schema_digest"],"properties":{"kind":{"const":"coverage-certificate"},"handle":{"$ref":"#/$defs/AnalysisChildHandle"},"requirement":{"$ref":"#/$defs/AnalysisChildHandle"},"subject":{"$ref":"#/$defs/CanonicalId"},"owner":{"$ref":"#/$defs/CanonicalId"},"semantic_revision":{"type":"integer","minimum":1},"horizon_digest":{"$ref":"#/$defs/Digest"},"relationship_digest":{"$ref":"#/$defs/Digest"},"evidence_digests":{"type":"array","items":{"$ref":"#/$defs/Digest"},"uniqueItems":true},"fact_schema_digest":{"$ref":"#/$defs/Digest"}},"additionalProperties":false},"DispositionRecord":{"type":"object","required":["obligation","kind","result","rationale","evidence","authorization","fingerprint"],"properties":{"obligation":{"$ref":"#/$defs/AnalysisChildHandle"},"kind":{"enum":["consumer-disposition","impact-disposition"]},"result":{"$ref":"#/$defs/NonEmptyString"},"rationale":{"$ref":"#/$defs/NonEmptyString"},"evidence":{"type":"array","items":{"$ref":"#/$defs/EvidenceReference"}},"authorization":{"$ref":"#/$defs/AuthorizationReference"},"fingerprint":{"$ref":"#/$defs/DecisionFingerprint"}},"additionalProperties":false},"AnalysisState":{"type":"object","required":["kind","handle","base_snapshot","proposed_reference","changes","semantic_proposals","fact_observations","dispositions","coverage_attestations","authorization_records","domain_contracts","execution_contracts","contract_version"],"properties":{"kind":{"const":"analysis-state"},"handle":{"$ref":"#/$defs/AnalysisHandle"},"base_snapshot":{"$ref":"#/$defs/SnapshotHandle"},"proposed_reference":{"$ref":"#/$defs/AnalysisMaterialHandle"},"changes":{"type":"array","items":{"$ref":"#/$defs/ChangeDescriptor"},"minItems":1,"uniqueItems":true},"semantic_proposals":{"type":"array","items":{"$ref":"#/$defs/SemanticProposal"},"uniqueItems":true},"fact_observations":{"type":"array","items":{"$ref":"#/$defs/FactObservation"},"uniqueItems":true},"dispositions":{"type":"array","items":{"$ref":"#/$defs/DispositionRecord"},"uniqueItems":true},"coverage_attestations":{"type":"array","items":{"$ref":"#/$defs/CoverageAttestation"},"uniqueItems":true},"authorization_records":{"type":"array","items":{"$ref":"#/$defs/AuthorizationRecord"},"uniqueItems":true},"domain_contracts":{"type":"array","items":{"$ref":"#/$defs/DomainContractReference"},"minItems":1,"uniqueItems":true},"execution_contracts":{"$ref":"#/$defs/AnalysisExecutionContractView"},"contract_version":{"const":7}},"additionalProperties":false},"PendingResult":{"type":"object","required":["kind","handle","status","context","changes","changed_units","obligations","fact_requirements","reading_plan","next_operations"],"properties":{"kind":{"const":"pending-result"},"handle":{"$ref":"#/$defs/AnalysisHandle"},"status":{"const":"needs-action"},"context":{"$ref":"#/$defs/AnalysisContext"},"changes":{"type":"array","items":{"$ref":"#/$defs/ChangeDescriptor"}},"changed_units":{"type":"array","items":{"$ref":"#/$defs/ChangedPolicyUnit"}},"obligations":{"type":"array","items":{"$ref":"#/$defs/Obligation"}},"fact_requirements":{"type":"array","items":{"$ref":"#/$defs/FactRequirementWork"}},"reading_plan":{"type":"array","items":{"$ref":"#/$defs/ReadingPlanEntry"}},"next_operations":{"type":"array","items":{"$ref":"#/$defs/NextOperation"}},"summary":{"type":"string"}},"additionalProperties":false},"CompleteResult":{"type":"object","required":["kind","handle","status","context","changes","changed_units","coverage_certificates","fact_observations","dispositions","reading_plan","completion"],"properties":{"kind":{"const":"complete-result"},"handle":{"$ref":"#/$defs/AnalysisHandle"},"status":{"const":"complete"},"context":{"$ref":"#/$defs/AnalysisContext"},"changes":{"type":"array","items":{"$ref":"#/$defs/ChangeDescriptor"}},"changed_units":{"type":"array","items":{"$ref":"#/$defs/ChangedPolicyUnit"}},"coverage_certificates":{"type":"array","items":{"$ref":"#/$defs/CoverageCertificate"},"uniqueItems":true},"fact_observations":{"type":"array","items":{"$ref":"#/$defs/FactObservation"},"uniqueItems":true},"dispositions":{"type":"array","items":{"$ref":"#/$defs/DispositionRecord"}},"reading_plan":{"type":"array","items":{"$ref":"#/$defs/ReadingPlanEntry"}},"completion":{"$ref":"#/$defs/CompletionProof"},"summary":{"type":"string"}},"additionalProperties":false},"RepositoryPath":{"type":"array","items":{"$ref":"#/$defs/NonEmptyString"},"minItems":1},"ProvenanceRecord":{"type":"object","required":["snapshot","path"],"properties":{"snapshot":{"$ref":"#/$defs/SnapshotHandle"},"path":{"$ref":"#/$defs/RepositoryPath"}},"additionalProperties":false},"SnapshotInspectionResult":{"type":"object","required":["kind","snapshot"],"properties":{"kind":{"const":"snapshot-inspection-result"},"snapshot":{"$ref":"#/$defs/SnapshotSummary"}},"additionalProperties":false},"PolicyInspectionResult":{"type":"object","required":["kind","policy","declaration","representation_digest","structural_digest","provenance"],"properties":{"kind":{"const":"policy-inspection-result"},"policy":{"$ref":"#/$defs/SnapshotChildHandle"},"declaration":{"oneOf":[{"$ref":"#/$defs/CanonicalModuleDeclaration"},{"$ref":"#/$defs/PolicyUnitDeclaration"}]},"representation_digest":{"$ref":"#/$defs/Digest"},"structural_digest":{"$ref":"#/$defs/Digest"},"provenance":{"$ref":"#/$defs/ProvenanceRecord"}},"additionalProperties":false},"RelationshipInspectionResult":{"type":"object","required":["kind","relationship","policy_semantics","provenance"],"properties":{"kind":{"const":"relationship-inspection-result"},"relationship":{"$ref":"#/$defs/RelationshipSummary"},"policy_semantics":{"oneOf":[{"$ref":"#/$defs/PolicyRelationshipInspection"},{"type":"null"}]},"provenance":{"$ref":"#/$defs/ProvenanceRecord"}},"additionalProperties":false},"AnalysisInspectionResult":{"type":"object","required":["kind","state"],"properties":{"kind":{"const":"analysis-inspection-result"},"state":{"$ref":"#/$defs/AnalysisState"}},"additionalProperties":false},"AnalysisChildArtifact":{"oneOf":[{"$ref":"#/$defs/AnalysisContext"},{"$ref":"#/$defs/FactRequirement"},{"$ref":"#/$defs/FactObservation"},{"$ref":"#/$defs/Obligation"},{"$ref":"#/$defs/CoverageRequirement"},{"$ref":"#/$defs/CoverageCertificate"}]},"AnalysisChildInspectionResult":{"type":"object","required":["kind","handle","artifact"],"properties":{"kind":{"const":"analysis-child-inspection-result"},"handle":{"$ref":"#/$defs/AnalysisChildHandle"},"artifact":{"$ref":"#/$defs/AnalysisChildArtifact"}},"additionalProperties":false},"InspectionResult":{"oneOf":[{"$ref":"#/$defs/SnapshotInspectionResult"},{"$ref":"#/$defs/PolicyInspectionResult"},{"$ref":"#/$defs/RelationshipInspectionResult"},{"$ref":"#/$defs/AnalysisInspectionResult"},{"$ref":"#/$defs/AnalysisChildInspectionResult"}]},"InspectCall":{"type":"object","required":["handle"],"properties":{"handle":{"$ref":"#/$defs/InspectableHandle"}},"additionalProperties":false},"RejectedResult":{"type":"object","required":["kind","code","outcome","message","details","next_operations"],"properties":{"kind":{"const":"rejected-result"},"code":{"$ref":"#/$defs/CanonicalId"},"outcome":{"enum":["invalid","unavailable","unsupported","unauthorized"]},"target":{"$ref":"#/$defs/NonEmptyString"},"message":{"$ref":"#/$defs/NonEmptyString"},"details":{"type":"object","additionalProperties":{"$ref":"#/$defs/ScalarValue"}},"next_operations":{"type":"array","items":{"$ref":"#/$defs/NextOperation"}}},"additionalProperties":false},"AuthoredRoutingRule":{"type":"object","required":["id","target","when","condition"],"properties":{"id":{"$ref":"#/$defs/CanonicalId"},"target":{"$ref":"#/$defs/CanonicalId"},"when":{"$ref":"#/$defs/ApplicabilityExpression"},"condition":{"$ref":"#/$defs/NonEmptyString"}},"additionalProperties":false},"AuthoredRoutingFact":{"type":"object","required":["id","semantic_revision","type","nullable","values","aliases","meaning","prompt"],"properties":{"id":{"$ref":"#/$defs/CanonicalId"},"semantic_revision":{"type":"integer","minimum":1},"type":{"enum":["boolean","enum","string","string-set","enum-set","canonical-id"]},"nullable":{"type":"boolean"},"values":{"type":"array","items":{"type":"string"},"uniqueItems":true},"aliases":{"type":"array","items":{"$ref":"#/$defs/CanonicalId"},"uniqueItems":true},"meaning":{"$ref":"#/$defs/NonEmptyString"},"prompt":{"$ref":"#/$defs/NonEmptyString"}},"additionalProperties":false},"PutRoutingRuleEdit":{"type":"object","required":["kind","rule","rationale"],"properties":{"kind":{"const":"put-routing-rule"},"rule":{"$ref":"#/$defs/AuthoredRoutingRule"},"rationale":{"$ref":"#/$defs/NonEmptyString"}},"additionalProperties":false},"RemoveRoutingRuleEdit":{"type":"object","required":["kind","rule","rationale"],"properties":{"kind":{"const":"remove-routing-rule"},"rule":{"$ref":"#/$defs/CanonicalId"},"rationale":{"$ref":"#/$defs/NonEmptyString"}},"additionalProperties":false},"PutRoutingFactEdit":{"type":"object","required":["kind","fact","rationale"],"properties":{"kind":{"const":"put-routing-fact"},"fact":{"$ref":"#/$defs/AuthoredRoutingFact"},"rationale":{"$ref":"#/$defs/NonEmptyString"}},"additionalProperties":false},"RemoveRoutingFactEdit":{"type":"object","required":["kind","fact","rationale"],"properties":{"kind":{"const":"remove-routing-fact"},"fact":{"$ref":"#/$defs/CanonicalId"},"rationale":{"$ref":"#/$defs/NonEmptyString"}},"additionalProperties":false},"VerificationFailure":{"type":"object","additionalProperties":false,"required":["code","message","suite","check"],"properties":{"code":{"$ref":"#/$defs/NonEmptyString"},"message":{"$ref":"#/$defs/NonEmptyString"},"suite":{"type":["string","null"]},"check":{"type":["string","null"]}}},"VerificationReport":{"type":"object","additionalProperties":false,"required":["passed","exit_code","suites","checks","failures"],"properties":{"passed":{"type":"boolean"},"exit_code":{"enum":[0,1,2,3,4]},"suites":{"type":"integer","minimum":0},"checks":{"type":"integer","minimum":0},"failures":{"type":"array","items":{"$ref":"#/$defs/VerificationFailure"}}}},"VerifyRepositoryCall":{"type":"object","additionalProperties":false,"required":["kind","refresh_verification_inputs"],"properties":{"kind":{"const":"verify-repository"},"refresh_verification_inputs":{"type":"boolean"}}},"VerifyRepositoryResult":{"type":"object","additionalProperties":false,"required":["kind","refreshed_verification_inputs","verification"],"properties":{"kind":{"const":"verify-repository-result"},"refreshed_verification_inputs":{"type":"boolean"},"verification":{"$ref":"#/$defs/VerificationReport"}}},"VerifyProposalCall":{"type":"object","additionalProperties":false,"required":["kind","revision"],"properties":{"kind":{"const":"verify-proposal"},"revision":{"$ref":"#/$defs/ProposalRevisionHandle"},"readiness":{"$ref":"#/$defs/ReadinessHandle"}}},"VerifyProposalResult":{"type":"object","additionalProperties":false,"required":["kind","revision","verification"],"properties":{"kind":{"const":"verify-proposal-result"},"revision":{"$ref":"#/$defs/ProposalRevisionHandle"},"verification":{"$ref":"#/$defs/VerificationReport"},"readiness":{"$ref":"#/$defs/ReadinessHandle"}}},"RoutingConfiguration":{"type":"object","additionalProperties":false,"required":["facts","rules"],"properties":{"facts":{"type":"array","items":{"$ref":"#/$defs/AuthoredRoutingFact"}},"rules":{"type":"array","items":{"$ref":"#/$defs/AuthoredRoutingRule"}}}},"PolicyCoverageStatus":{"type":"object","required":["subject","requirement_id","status"],"properties":{"subject":{"$ref":"#/$defs/CanonicalId"},"requirement_id":{"$ref":"#/$defs/Digest"},"status":{"enum":["current-attestation","review-required"]},"authority":{"$ref":"#/$defs/CoverageAuditAuthority"}},"additionalProperties":false},"ReadCoverage":{"type":"object","description":"Repository attestation status bound to this snapshot or proposal. Empty subjects means no registered policy units in scope, not complete coverage. Analysis-local attestations are not repository certificates.","required":["subjects"],"properties":{"subjects":{"type":"array","items":{"$ref":"#/$defs/PolicyCoverageStatus"}}},"additionalProperties":false},"AuditPolicyUnitEdit":{"type":"object","required":["kind","policy","rationale"],"properties":{"kind":{"const":"audit-policy-unit"},"policy":{"$ref":"#/$defs/CanonicalId"},"rationale":{"$ref":"#/$defs/NonEmptyString"}},"additionalProperties":false},"CoverageAuditAuthority":{"type":"object","required":["issuer","principal","authorization_id"],"properties":{"issuer":{"$ref":"#/$defs/NonEmptyString"},"principal":{"$ref":"#/$defs/NonEmptyString"},"authorization_id":{"$ref":"#/$defs/NonEmptyString"}},"additionalProperties":false},"EvidenceCheckRetirement":{"type":"object","additionalProperties":false,"required":["suite","check"],"properties":{"suite":{"type":"string","minLength":1},"check":{"type":"string","minLength":1}}},"EvidenceSuiteDescription":{"type":"object","additionalProperties":false,"required":["suite","description"],"properties":{"suite":{"type":"string","minLength":1},"description":{"type":"string","minLength":1}}},"EvidenceRelationshipUpdate":{"type":"object","additionalProperties":false,"required":["source_policy","consumer","relation","evidence_owner","rationale"],"properties":{"source_policy":{"type":"string","minLength":1},"consumer":{"type":"string","minLength":1},"relation":{"type":"string","minLength":1},"evidence_owner":{"type":"string","minLength":1},"rationale":{"type":"string","minLength":1}}},"EvidenceConsumerRegistration":{"type":"object","additionalProperties":false,"required":["path","artifact_kind","source_policies","relation","evidence_owner","rationale"],"properties":{"path":{"type":"string","minLength":1},"artifact_kind":{"type":"string","enum":["implementation-artifact","fixture"]},"source_policies":{"type":"array","items":{"type":"string","minLength":1},"minItems":1,"uniqueItems":true},"relation":{"type":"string","enum":["implementation-projection","fixture-projection"]},"evidence_owner":{"type":"string","minLength":1},"rationale":{"type":"string","minLength":1}}},"EvidenceMaintenancePlan":{"type":"object","additionalProperties":false,"required":["prune_stale_certificates","retire_suites","retire_checks","retire_inputs","suite_descriptions","replacement_evidence_owner","replacement_evidence_rationale","relationship_updates","consumer_registrations"],"properties":{"prune_stale_certificates":{"type":"boolean"},"retire_suites":{"type":"array","items":{"type":"string","minLength":1},"uniqueItems":true},"retire_checks":{"type":"array","items":{"$ref":"#/$defs/EvidenceCheckRetirement"}},"retire_inputs":{"type":"array","items":{"type":"string","minLength":1},"uniqueItems":true},"suite_descriptions":{"type":"array","items":{"$ref":"#/$defs/EvidenceSuiteDescription"}},"replacement_evidence_owner":{"type":"string","minLength":1},"replacement_evidence_rationale":{"type":"string","minLength":1},"relationship_updates":{"type":"array","items":{"$ref":"#/$defs/EvidenceRelationshipUpdate"}},"consumer_registrations":{"type":"array","items":{"$ref":"#/$defs/EvidenceConsumerRegistration"}},"unregister_policy_subjects":{"type":"array","items":{"type":"string","minLength":1},"uniqueItems":true,"description":"Remove selected review-subject registrations and their source relationships while preserving normative Markdown."}}},"MaintainEvidenceCall":{"type":"object","additionalProperties":false,"required":["kind","expected_revision","evidence","plan","apply"],"properties":{"kind":{"const":"maintain-evidence"},"expected_revision":{"type":"string","minLength":1},"evidence":{"type":"array","items":{"$ref":"#/$defs/EvidenceReference"},"minItems":1},"plan":{"$ref":"#/$defs/EvidenceMaintenancePlan"},"apply":{"type":"boolean"}}},"MaintainEvidenceResult":{"type":"object","additionalProperties":false,"required":["kind","applied","changed_files","removed_files","verification"],"properties":{"kind":{"const":"maintain-evidence-result"},"applied":{"type":"boolean"},"changed_files":{"type":"array","items":{"type":"string","minLength":1}},"removed_files":{"type":"array","items":{"type":"string","minLength":1}},"verification":{"$ref":"#/$defs/VerificationReport"}}},"RouteCall":{"type":"object","required":["facts"],"properties":{"facts":{"$ref":"#/$defs/FactSet"},"snapshot":{"$ref":"#/$defs/SnapshotHandle"}},"additionalProperties":false},"ReadCall":{"type":"object","required":["target"],"properties":{"target":{"$ref":"#/$defs/CanonicalId"},"include_routing":{"type":"boolean"},"include_coverage":{"type":"boolean","description":"Include current repository attestation status for registered policy units in this read scope."},"snapshot":{"$ref":"#/$defs/SnapshotHandle"},"detail":{"enum":["compact","full"],"description":"Compact preserves exact policy and essential authority; full includes all relationship rows."}},"additionalProperties":false},"RelatedCall":{"type":"object","required":["target","groups","direction","transitive"],"properties":{"target":{"$ref":"#/$defs/CanonicalId"},"groups":{"type":"array","minItems":1,"uniqueItems":true,"items":{"$ref":"#/$defs/CanonicalId"}},"direction":{"enum":["incoming","outgoing","both"]},"transitive":{"type":"boolean","default":false},"snapshot":{"$ref":"#/$defs/SnapshotHandle"}},"additionalProperties":false},"CompactReadResult":{"type":"object","required":["kind","snapshot","policy","content","requires","specializes","next_operations","detail"],"properties":{"kind":{"const":"compact-read-result"},"snapshot":{"$ref":"#/$defs/SnapshotHandle"},"policy":{"$ref":"#/$defs/PolicySummary"},"content":{"type":"string"},"requires":{"type":"array","items":{"$ref":"#/$defs/CanonicalId"},"uniqueItems":true},"specializes":{"type":"array","items":{"$ref":"#/$defs/CanonicalId"},"uniqueItems":true},"next_operations":{"type":"array","items":{"$ref":"#/$defs/NextOperation"}},"summary":{"type":"string"},"routing":{"$ref":"#/$defs/RoutingConfiguration"},"coverage":{"$ref":"#/$defs/ReadCoverage"},"detail":{"const":"compact"},"application_exposure":{"$ref":"#/$defs/ApplicationExposureState"},"provenance":{"type":"array","items":{"$ref":"#/$defs/CanonicalId"}}},"additionalProperties":false},"RoutingFactsCall":{"type":"object","additionalProperties":false,"required":[],"properties":{"snapshot":{"$ref":"#/$defs/SnapshotHandle"}}},"RoutingFactsResult":{"type":"object","additionalProperties":false,"required":["kind","snapshot","facts"],"properties":{"kind":{"const":"routing-facts-result"},"snapshot":{"$ref":"#/$defs/SnapshotHandle"},"facts":{"type":"array","items":{"$ref":"#/$defs/AuthoredRoutingFact"}}}},"RoutingQuestion":{"type":"object","additionalProperties":false,"required":["id","kind","prompt","state","fact"],"properties":{"id":{"$ref":"#/$defs/CanonicalId"},"kind":{"const":"applicability-fact"},"prompt":{"$ref":"#/$defs/NonEmptyString"},"state":{"const":"required"},"fact":{"$ref":"#/$defs/AuthoredRoutingFact"}}},"RoutingRuleExplanation":{"type":"object","additionalProperties":false,"required":["id","target","when","state"],"properties":{"id":{"$ref":"#/$defs/CanonicalId"},"target":{"$ref":"#/$defs/CanonicalId"},"when":{"$ref":"#/$defs/ApplicabilityExpression"},"state":{"enum":["selected","unresolved"]}}},"AgentRouteResult":{"type":"object","required":["kind","snapshot","reading_plan","unresolved_questions","next_operations","facts","rules"],"properties":{"kind":{"const":"agent-route-result"},"snapshot":{"$ref":"#/$defs/SnapshotHandle"},"reading_plan":{"type":"array","items":{"$ref":"#/$defs/ReadingPlanEntry"}},"unresolved_questions":{"type":"array","items":{"$ref":"#/$defs/RoutingQuestion"}},"next_operations":{"type":"array","items":{"$ref":"#/$defs/NextOperation"}},"summary":{"type":"string"},"facts":{"$ref":"#/$defs/FactSet"},"rules":{"type":"array","items":{"$ref":"#/$defs/RoutingRuleExplanation"}}},"additionalProperties":false},"WorkflowContext":{"oneOf":[{"$ref":"#/$defs/ProposalRevisionHandle"},{"$ref":"#/$defs/AnalysisHandle"},{"$ref":"#/$defs/ReadinessHandle"}]},"ProposeCall":{"type":"object","additionalProperties":false,"properties":{"snapshot":{"$ref":"#/$defs/SnapshotHandle"},"change_set":{"$ref":"#/$defs/StandardsChangeSet"}},"required":["change_set"]},"ReviseCall":{"type":"object","additionalProperties":false,"properties":{"context":{"$ref":"#/$defs/WorkflowContext"},"change_set":{"$ref":"#/$defs/StandardsChangeSet"}},"required":["context","change_set"]},"AnalyzeCall":{"type":"object","additionalProperties":false,"properties":{"context":{"$ref":"#/$defs/WorkflowContext"}},"required":["context"]},"ResolveWorkflowCall":{"type":"object","additionalProperties":false,"properties":{"context":{"$ref":"#/$defs/WorkflowContext"},"submission":{"$ref":"#/$defs/Submission"}},"required":["context","submission"]},"ReviewCall":{"type":"object","additionalProperties":false,"properties":{"context":{"$ref":"#/$defs/WorkflowContext"},"decisions":{"type":"array","minItems":3,"maxItems":3,"uniqueItems":true,"items":{"$ref":"#/$defs/ReviewDecision"}}},"required":["context","decisions"]},"ApplyCall":{"type":"object","additionalProperties":false,"properties":{"context":{"$ref":"#/$defs/WorkflowContext"}},"required":["context"]},"RecoverCall":{"type":"object","additionalProperties":false,"properties":{"context":{"$ref":"#/$defs/WorkflowContext"}},"required":["context"]},"WorkflowStatusCall":{"type":"object","additionalProperties":false,"properties":{"context":{"$ref":"#/$defs/WorkflowContext"}},"required":["context"]},"ResumeCall":{"type":"object","additionalProperties":false,"properties":{"context":{"$ref":"#/$defs/WorkflowContext"}},"required":["context"]},"WorkflowContinuation":{"type":"object","additionalProperties":false,"properties":{"operation":{"enum":["revise","analyze","resolve_workflow","review","apply","recover","workflow_status","resume"]},"context":{"$ref":"#/$defs/WorkflowContext"},"required_inputs":{"type":"array","uniqueItems":true,"items":{"enum":["change_set","submission","decisions"]}}},"required":["operation","context","required_inputs"]},"WorkflowOutcome":{"oneOf":[{"$ref":"#/$defs/CreateProposalResult"},{"$ref":"#/$defs/ReviseProposalResult"},{"$ref":"#/$defs/PendingResult"},{"$ref":"#/$defs/CompleteResult"},{"$ref":"#/$defs/ReviewProposalResult"},{"$ref":"#/$defs/ApplyProposalResult"},{"$ref":"#/$defs/ApplicationRecoveryRequiredResult"},{"$ref":"#/$defs/RecoverApplicationResult"},{"$ref":"#/$defs/RejectedResult"}]},"WorkflowResult":{"type":"object","additionalProperties":false,"properties":{"kind":{"const":"workflow-result"},"context":{"$ref":"#/$defs/WorkflowContext"},"proposal":{"$ref":"#/$defs/ProposalHandle"},"revision":{"$ref":"#/$defs/ProposalRevisionHandle"},"status":{"enum":["draft","needs-action","complete","requires-change","ready","recovery-required","applied","rejected","stale"]},"next_operations":{"type":"array","items":{"$ref":"#/$defs/WorkflowContinuation"}},"outcome":{"$ref":"#/$defs/WorkflowOutcome"}},"required":["kind","context","proposal","revision","status","next_operations"]},"FocusedQueryNextOperation":{"type":"object","required":["operation","request_kind","snapshot"],"properties":{"operation":{"enum":["route","read","related"]},"request_kind":{"enum":["route","read","related"]},"target":{"$ref":"#/$defs/CanonicalId"},"snapshot":{"$ref":"#/$defs/SnapshotHandle"}},"additionalProperties":false},"RewriteNavigationIndexEdit":{"type":"object","required":["kind","entrypoint","destinations","rationale"],"properties":{"kind":{"const":"rewrite-navigation-index"},"entrypoint":{"$ref":"#/$defs/AuthoringTargetHandle"},"destinations":{"type":"array","items":{"$ref":"#/$defs/CanonicalId"},"minItems":1,"uniqueItems":true},"rationale":{"$ref":"#/$defs/NonEmptyString"},"retargets":{"type":"array","items":{"$ref":"#/$defs/NavigationRetarget"},"uniqueItems":true}},"additionalProperties":false},"NavigationIndexEntry":{"type":"object","required":["id","entrypoint","destinations"],"properties":{"id":{"$ref":"#/$defs/CanonicalId"},"entrypoint":{"$ref":"#/$defs/AuthoringTargetHandle"},"destinations":{"type":"array","items":{"$ref":"#/$defs/CanonicalId"},"uniqueItems":true},"content":{"$ref":"#/$defs/NonEmptyString"}},"additionalProperties":false},"NavigationIndexesResult":{"type":"object","required":["kind","authority","indexes","next_operations"],"properties":{"kind":{"const":"navigation-indexes-result"},"authority":{"oneOf":[{"$ref":"#/$defs/SnapshotHandle"},{"$ref":"#/$defs/ProposalRevisionHandle"}]},"indexes":{"type":"array","items":{"$ref":"#/$defs/NavigationIndexEntry"},"minItems":1},"next_operations":{"type":"array","items":{"$ref":"#/$defs/NextOperation"},"maxItems":0}},"additionalProperties":false},"NavigationRetarget":{"type":"object","required":["entrypoint","standard"],"properties":{"entrypoint":{"$ref":"#/$defs/AuthoringTargetHandle"},"standard":{"$ref":"#/$defs/CanonicalId"}},"additionalProperties":false},"ApplicationNextOperation":{"type":"object","additionalProperties":false,"required":["operation","snapshot"],"properties":{"operation":{"enum":["read","related","routing_facts","route","query","inspect"]},"snapshot":{"$ref":"#/$defs/SnapshotHandle"},"target":{"$ref":"#/$defs/CanonicalId"},"handle":{"$ref":"#/$defs/SnapshotChildHandle"}}},"ApplicationRejectedResult":{"type":"object","additionalProperties":false,"required":["kind","purpose","code","outcome","message","next_operations"],"properties":{"kind":{"const":"application-rejected-result"},"purpose":{"const":"application"},"code":{"enum":["APPLICATION.CONTENT_UNAVAILABLE","APPLICATION.INPUT_INVALID","APPLICATION.OPERATION_UNAVAILABLE","APPLICATION.INTERNAL_UNAVAILABLE","APPLICATION.UNSUPPORTED_CAPTURE"]},"outcome":{"enum":["invalid","unsupported","unavailable"]},"message":{"type":"string"},"next_operations":{"type":"array","items":{"$ref":"#/$defs/ApplicationNextOperation"}}}},"ApplicationPolicy":{"type":"object","additionalProperties":false,"required":["id","handle","role","level"],"properties":{"id":{"$ref":"#/$defs/CanonicalId"},"handle":{"$ref":"#/$defs/SnapshotChildHandle"},"role":{"enum":["core","router","topic","workflow","profile","reference","prompt","template"]},"level":{"enum":["MUST","SHOULD","PROFILE","REFERENCE"]}}},"ApplicationRelationship":{"type":"object","additionalProperties":false,"required":["handle","source","target","relation","groups","direction"],"properties":{"handle":{"$ref":"#/$defs/SnapshotChildHandle"},"source":{"$ref":"#/$defs/CanonicalId"},"target":{"$ref":"#/$defs/CanonicalId"},"relation":{"type":"string"},"groups":{"type":"array","items":{"$ref":"#/$defs/CanonicalId"}},"direction":{"enum":["incoming","outgoing"]}}},"ApplicationReadResult":{"type":"object","additionalProperties":false,"required":["kind","purpose","snapshot","policy","content","scope","requires","specializes","next_operations"],"properties":{"kind":{"const":"application-read-result"},"purpose":{"const":"application"},"snapshot":{"$ref":"#/$defs/SnapshotHandle"},"policy":{"$ref":"#/$defs/ApplicationPolicy"},"content":{"type":"string"},"scope":{"$ref":"#/$defs/ReviewScope"},"requires":{"type":"array","items":{"$ref":"#/$defs/CanonicalId"}},"specializes":{"type":"array","items":{"$ref":"#/$defs/CanonicalId"}},"related":{"type":"array","items":{"$ref":"#/$defs/ApplicationRelationship"}},"next_operations":{"type":"array","items":{"$ref":"#/$defs/ApplicationNextOperation"}}}},"ApplicationRelatedResult":{"type":"object","additionalProperties":false,"required":["kind","purpose","snapshot","target","relationships","next_operations"],"properties":{"kind":{"const":"application-related-result"},"purpose":{"const":"application"},"snapshot":{"$ref":"#/$defs/SnapshotHandle"},"target":{"$ref":"#/$defs/CanonicalId"},"relationships":{"type":"array","items":{"$ref":"#/$defs/ApplicationRelationship"}},"next_operations":{"type":"array","items":{"$ref":"#/$defs/ApplicationNextOperation"}}}},"ApplicationReadingEntry":{"type":"object","additionalProperties":false,"required":["target","scope","authority","state"],"properties":{"target":{"$ref":"#/$defs/CanonicalId"},"scope":{"$ref":"#/$defs/ReviewScope"},"authority":{"enum":["normative","contextual"]},"state":{"const":"selected"}}},"ApplicationQuestion":{"type":"object","additionalProperties":false,"required":["fact"],"properties":{"fact":{"$ref":"#/$defs/AuthoredRoutingFact"}}},"ApplicationRouteResult":{"type":"object","additionalProperties":false,"required":["kind","purpose","snapshot","status","reading_plan","unresolved_questions","next_operations"],"properties":{"kind":{"const":"application-route-result"},"purpose":{"const":"application"},"snapshot":{"$ref":"#/$defs/SnapshotHandle"},"status":{"enum":["complete","needs-facts"]},"reading_plan":{"type":"array","items":{"$ref":"#/$defs/ApplicationReadingEntry"}},"unresolved_questions":{"type":"array","items":{"$ref":"#/$defs/ApplicationQuestion"}},"next_operations":{"type":"array","items":{"$ref":"#/$defs/ApplicationNextOperation"}}}},"ApplicationRoutingFactsResult":{"type":"object","additionalProperties":false,"required":["kind","purpose","snapshot","facts","next_operations"],"properties":{"kind":{"const":"application-routing-facts-result"},"purpose":{"const":"application"},"snapshot":{"$ref":"#/$defs/SnapshotHandle"},"facts":{"type":"array","items":{"$ref":"#/$defs/AuthoredRoutingFact"}},"next_operations":{"type":"array","items":{"$ref":"#/$defs/ApplicationNextOperation"}}}},"ApplicationReadCall":{"type":"object","additionalProperties":false,"required":["target"],"properties":{"target":{"$ref":"#/$defs/CanonicalId"},"snapshot":{"$ref":"#/$defs/SnapshotHandle"},"detail":{"enum":["compact","full"]}}},"ApplicationReadRequest":{"type":"object","additionalProperties":false,"required":["kind","target"],"properties":{"kind":{"const":"read"},"target":{"$ref":"#/$defs/CanonicalId"},"detail":{"enum":["compact","full"]}}},"ApplicationQueryRequest":{"oneOf":[{"$ref":"#/$defs/RouteRequest"},{"$ref":"#/$defs/ApplicationReadRequest"},{"$ref":"#/$defs/RelatedRequest"}]},"ApplicationQueryCall":{"type":"object","additionalProperties":false,"required":["snapshot","request"],"properties":{"snapshot":{"$ref":"#/$defs/SnapshotHandle"},"request":{"$ref":"#/$defs/ApplicationQueryRequest"}}},"ApplicationInspectCall":{"type":"object","additionalProperties":false,"required":["handle"],"properties":{"handle":{"$ref":"#/$defs/SnapshotChildHandle"}}},"AuthoredDecisionProvenance":{"type":"object","additionalProperties":false,"required":["id","subject","origin","rationale","evidence"],"properties":{"id":{"$ref":"#/$defs/CanonicalId"},"subject":{"$ref":"#/$defs/CanonicalId"},"origin":{"enum":["documented-original","reconstructed-history","current-justification","unrecorded"]},"rationale":{"type":"string"},"evidence":{"type":"array","items":{"$ref":"#/$defs/EvidenceReference"}},"assumptions":{"type":"array","items":{"type":"string"}},"limits":{"type":"array","items":{"type":"string"}},"alternatives":{"type":"array","items":{"type":"string"}},"reconsideration":{"type":"array","items":{"type":"string"}},"supersedes":{"type":"array","items":{"type":"string"}}}},"DecisionProvenanceRecord":{"type":"object","additionalProperties":false,"required":["id","subject","origin","rationale","evidence","assumptions","limits","alternatives","reconsideration","supersedes","subject_binding","retired"],"properties":{"id":{"$ref":"#/$defs/CanonicalId"},"subject":{"$ref":"#/$defs/CanonicalId"},"origin":{"enum":["documented-original","reconstructed-history","current-justification","unrecorded"]},"rationale":{"type":"string"},"evidence":{"type":"array","items":{"$ref":"#/$defs/EvidenceReference"}},"assumptions":{"type":"array","items":{"type":"string"}},"limits":{"type":"array","items":{"type":"string"}},"alternatives":{"type":"array","items":{"type":"string"}},"reconsideration":{"type":"array","items":{"type":"string"}},"supersedes":{"type":"array","items":{"type":"string"}},"subject_binding":{"$ref":"#/$defs/Digest"},"retired":{"type":"boolean"}}},"ApplicationExposureState":{"enum":["unreviewed","current","needs-review"]},"ProvenanceReadResult":{"type":"object","additionalProperties":false,"required":["kind","authority","record","state","next_operations"],"properties":{"kind":{"const":"provenance-read-result"},"authority":{"oneOf":[{"$ref":"#/$defs/SnapshotHandle"},{"$ref":"#/$defs/ProposalRevisionHandle"}]},"record":{"$ref":"#/$defs/DecisionProvenanceRecord"},"state":{"enum":["current","needs-review","retired"]},"next_operations":{"type":"array","items":{"$ref":"#/$defs/NextOperation"}}}},"OperationalReadResult":{"type":"object","additionalProperties":false,"required":["kind","authority","target","canonical_id","role","content","application_exposure","next_operations"],"properties":{"kind":{"const":"operational-read-result"},"authority":{"oneOf":[{"$ref":"#/$defs/SnapshotHandle"},{"$ref":"#/$defs/ProposalRevisionHandle"}]},"target":{"$ref":"#/$defs/AuthoringTargetHandle"},"canonical_id":{"$ref":"#/$defs/CanonicalId"},"role":{"enum":["prompt","template"]},"content":{"type":"string"},"application_exposure":{"$ref":"#/$defs/ApplicationExposureState"},"next_operations":{"type":"array","items":{"$ref":"#/$defs/NextOperation"}}}},"PutDecisionProvenanceEdit":{"type":"object","additionalProperties":false,"required":["kind","record"],"properties":{"kind":{"const":"put-provenance"},"record":{"$ref":"#/$defs/AuthoredDecisionProvenance"}}},"RetireDecisionProvenanceEdit":{"type":"object","additionalProperties":false,"required":["kind","id"],"properties":{"kind":{"const":"retire-provenance"},"id":{"$ref":"#/$defs/CanonicalId"}}},"ApproveApplicationContentEdit":{"type":"object","additionalProperties":false,"required":["kind","target"],"properties":{"kind":{"const":"approve-application-content"},"target":{"oneOf":[{"$ref":"#/$defs/CanonicalId"},{"$ref":"#/$defs/AuthoringTargetHandle"}]}}},"WithdrawApplicationContentEdit":{"type":"object","additionalProperties":false,"required":["kind","target"],"properties":{"kind":{"const":"withdraw-application-content"},"target":{"oneOf":[{"$ref":"#/$defs/CanonicalId"},{"$ref":"#/$defs/AuthoringTargetHandle"}]}}},"ReviseOperationalArtifactEdit":{"type":"object","additionalProperties":false,"required":["kind","target","title","body"],"properties":{"kind":{"const":"revise-operational-artifact"},"target":{"$ref":"#/$defs/AuthoringTargetHandle"},"title":{"$ref":"#/$defs/NonEmptyString"},"body":{"type":"string"}}},"PolicyScopeUpdate":{"type":"object","additionalProperties":false,"required":["policy","heading_path","semantics"],"properties":{"policy":{"$ref":"#/$defs/CanonicalId"},"heading_path":{"type":"array","minItems":1,"items":{"$ref":"#/$defs/NonEmptyString"}},"semantics":{"$ref":"#/$defs/PolicySemanticIntent"}}}}}') +DEFINITION_METADATA = freeze_json({'ActiveSnapshotSummary': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'lifecycle': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'source_revision': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'created_at': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'AgentRouteResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'reading_plan': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'unresolved_questions': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'next_operations': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'summary': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'facts': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'rules': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'AllExpression': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'operator': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'expressions': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'AlwaysExpression': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'operator': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'AnalysisChildArtifact': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'AnalysisChildHandle': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'analysis': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'child_kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'child_id': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'schema_version': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'AnalysisChildInspectionResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'handle': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'artifact': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'AnalysisContext': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'handle': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'subjects': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'changes': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'semantic_proposals': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'AnalysisExecutionContractView': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'authorization_authority_digest': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'providers': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'AnalysisHandle': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'id': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'schema_version': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'AnalysisId': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'AnalysisInspectionResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'state': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'AnalysisMaterialHandle': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'AnalysisRequest': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'base_snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'proposed_snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'changes': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'semantic_proposals': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'prior_analysis': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'contract_version': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'AnalysisState': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'handle': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'base_snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'proposed_reference': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'changes': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'semantic_proposals': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'fact_observations': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'dispositions': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'coverage_attestations': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'authorization_records': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'domain_contracts': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'execution_contracts': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'contract_version': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'AnalyzeCall': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'context': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'AnalyzeProposalCall': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'revision': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'AnyExpression': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'operator': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'expressions': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ApplicabilityExpression': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'ApplicationExposureState': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'ApplicationHandle': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'id': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'schema_version': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ApplicationId': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'ApplicationInspectCall': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'handle': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ApplicationNextOperation': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'operation': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'target': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'handle': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ApplicationPolicy': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'id': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'handle': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'role': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'level': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ApplicationQueryCall': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'request': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ApplicationQueryRequest': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'ApplicationQuestion': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'fact': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ApplicationReadCall': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'target': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'detail': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ApplicationReadRequest': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'target': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'detail': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ApplicationReadResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'purpose': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'policy': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'content': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'scope': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'requires': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'specializes': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'related': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'next_operations': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ApplicationReadingEntry': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'target': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'scope': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'authority': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'state': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ApplicationRecoveryRequiredResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'application': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'status': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'code': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'outcome': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'message': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ApplicationRejectedResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'purpose': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'code': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'outcome': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'message': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'next_operations': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ApplicationRelatedResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'purpose': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'target': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'relationships': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'next_operations': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ApplicationRelationship': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'handle': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'source': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'target': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'relation': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'groups': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'direction': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ApplicationRouteResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'purpose': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'status': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'reading_plan': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'unresolved_questions': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'next_operations': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ApplicationRoutingFactsResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'purpose': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'facts': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'next_operations': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ApplyCall': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'context': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ApplyProposalCall': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'readiness': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ApplyProposalResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'application': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'status': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ApproveApplicationContentEdit': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'target': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'AuditPolicyUnitEdit': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'policy': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'rationale': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'AuthoredDecisionProvenance': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'id': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'subject': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'origin': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'rationale': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'evidence': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'assumptions': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'limits': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'alternatives': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'reconsideration': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'supersedes': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'AuthoredRoutingFact': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'id': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'semantic_revision': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'type': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'nullable': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'values': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'aliases': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'meaning': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'prompt': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'AuthoredRoutingRule': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'id': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'target': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'when': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'condition': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'AuthoringTargetHandle': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'id': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'schema_version': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'AuthorizationId': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'AuthorizationRecord': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'reference': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'issuer_semantic_revision': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'principal': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'action': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'subject_kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'subject_id': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'authorization_evidence': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'revocation_authority': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'revocation_authority_semantic_revision': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'revocation_evidence': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'AuthorizationReference': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'id': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'issuer': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'capability': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'authority_digest': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'CanonicalId': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'CanonicalModuleDeclaration': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'id': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'role': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'level': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'applies_when': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'does_not_apply_when': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'requires': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'specializes': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'verification': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ChangeDescriptor': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'accepted_ids': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'proposed_ids': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'scope': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'accepted_module': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'proposed_module': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ChangePolicySemantics': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'accepted_semantic_revision': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'proposed_semantic_revision': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'intent': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ChangedPolicyUnit': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'policy': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'change_kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'classification': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'accepted_representation_digest': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'proposed_representation_digest': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'accepted_structural_digest': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'proposed_structural_digest': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'accepted_semantic_revision': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'proposed_semantic_revision': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'semantic_state': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'scope': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ChildId': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'CompactReadResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'policy': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'content': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'requires': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'specializes': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'next_operations': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'summary': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'routing': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'coverage': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'detail': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'application_exposure': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'provenance': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'CompleteResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'handle': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'status': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'context': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'changes': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'changed_units': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'coverage_certificates': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'fact_observations': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'dispositions': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'reading_plan': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'completion': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'summary': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'CompletionProof': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'required_coverage_subjects': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'certificate_subjects': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'reached_consumer_obligations': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'disposition_obligations': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'required_fact_requirements': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'observed_fact_requirements': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'non_consumer_obligations_resolved': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'applicability_resolved': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'authorization_valid': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'evidence_valid': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ConsumerDispositionSubmission': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'obligation': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'result': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'rationale': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'evidence': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'fingerprint': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ConsumerReviewContract': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'id': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'version': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'permitted_dispositions': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'evidence_contract': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'authorization_capability': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'semantics': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ConsumerReviewObligationReadingReason': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'obligation': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ContainsExpression': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'operator': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'fact': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'value': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'CoverageAttestation': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'requirement': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'conclusion': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'evidence': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'explicit_exclusions': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'rationale': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'auditor_provenance': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'schema_version': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'authorization': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'CoverageAttestationClaim': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'requirement': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'conclusion': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'evidence': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'explicit_exclusions': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'rationale': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'auditor_provenance': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'CoverageAttestationSubmission': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'claim': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'CoverageAuditAuthority': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'issuer': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'principal': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'authorization_id': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'CoverageCertificate': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'handle': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'requirement': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'subject': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'owner': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'semantic_revision': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'horizon_digest': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'relationship_digest': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'evidence_digests': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'fact_schema_digest': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'CoverageRequirement': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'handle': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'subject': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'owner': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'semantic_revision': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'relationship_kinds': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'horizon': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'required_evidence_contract': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'CreateProposalCall': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'base_snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'change_set': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'CreateProposalResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'proposal': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'revision': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'CreateSnapshotCall': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'CreateSnapshotResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'CreateStandardEdit': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'standard': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'requires': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'specializes': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'policy_units': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'DecisionDependency': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'class': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'identity': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'digest': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'DecisionFingerprint': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'decision_kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'decision_contract': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'schema_version': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'dependencies': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'DecisionProvenanceRecord': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'id': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'subject': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'origin': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'rationale': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'evidence': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'assumptions': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'limits': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'alternatives': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'reconsideration': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'supersedes': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'subject_binding': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'retired': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'DeleteSnapshotCall': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'DeleteSnapshotResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'purge_deadline': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'Digest': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'DispositionRecord': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'obligation': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'result': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'rationale': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'evidence': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'authorization': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'fingerprint': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'DomainContractReference': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'id': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'version': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'EdgeId': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'EqualsExpression': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'operator': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'fact': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'value': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'EvidenceCheckRetirement': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'suite': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'check': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'EvidenceConsumerRegistration': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'path': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'artifact_kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'source_policies': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'relation': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'evidence_owner': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'rationale': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'EvidenceMaintenancePlan': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'prune_stale_certificates': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'retire_suites': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'retire_checks': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'retire_inputs': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'suite_descriptions': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'replacement_evidence_owner': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'replacement_evidence_rationale': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'relationship_updates': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'consumer_registrations': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'unregister_policy_subjects': {'title': None, 'description': 'Remove selected review-subject registrations and their source relationships while preserving normative Markdown.', 'has_default': False, 'default': None}}}, 'EvidenceReference': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'id': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'digest': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'provider_contract': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'provider_contract_version': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'EvidenceRelationshipUpdate': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'source_policy': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'consumer': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'relation': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'evidence_owner': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'rationale': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'EvidenceSuiteDescription': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'suite': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'description': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ExistsExpression': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'operator': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'fact': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'FactObservation': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'handle': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'requirement': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'value': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'evidence': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'authorization': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'provider': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'FactRequirement': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'handle': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'fact': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'fact_semantic_revision': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'fact_contract_digest': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'context': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'value_contract': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'answer_contract': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'evidence_contract': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'authorization_capability': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'FactRequirementId': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'FactRequirementWork': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'requirement': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'prompt': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'dependent_programs': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'FactSet': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'FactValue': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'FactValueContract': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'type': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'states': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'nullable': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'values': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'FindProposalsCall': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'after': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'limit': {'title': None, 'description': None, 'has_default': True, 'default': 50}}}, 'FindProposalsResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'proposals': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'continuation': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'FindSnapshotsCall': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'lifecycle': {'title': None, 'description': None, 'has_default': True, 'default': 'active'}, 'after': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'limit': {'title': None, 'description': None, 'has_default': True, 'default': 50}}}, 'FindSnapshotsResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'snapshots': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'continuation': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'FocusedQueryNextOperation': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'operation': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'request_kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'target': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'GeneralSelectionReason': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'source': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'fact': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'edge': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'question': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ImpactDispositionSubmission': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'obligation': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'result': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'rationale': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'evidence': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'fingerprint': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ImpactTraceId': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'ImpactTraceReference': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'id': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'graph': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'applicability': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'InExpression': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'operator': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'fact': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'values': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'InspectCall': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'handle': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'InspectNextOperation': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'operation': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'request_kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'handle': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'InspectableHandle': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'InspectionResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'MaintainEvidenceCall': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'expected_revision': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'evidence': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'plan': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'apply': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'MaintainEvidenceResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'applied': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'changed_files': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'removed_files': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'verification': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ModuleRelationshipKey': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'relation': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'source': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'target': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'MovePolicyUnitEdit': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'policy': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'standard': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'after_policy': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'semantics': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'NavigationIndexEntry': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'id': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'entrypoint': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'destinations': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'content': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'NavigationIndexesResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'authority': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'indexes': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'next_operations': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'NavigationRetarget': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'entrypoint': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'standard': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'NewPolicyUnit': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'id': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'heading_chain': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'semantic_revision': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'intent': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'aliases': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'predecessors': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'successors': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'NextOperation': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'NonEmptyString': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'NotExpression': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'operator': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'expression': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'Obligation': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'handle': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'target': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'scope': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'reasons': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'state': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'applicability': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'permitted_submissions': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'review_contract': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'fingerprint': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ObligationId': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'OperationalReadResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'authority': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'target': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'canonical_id': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'role': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'content': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'application_exposure': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'next_operations': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'PendingResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'handle': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'status': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'context': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'changes': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'changed_units': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'obligations': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'fact_requirements': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'reading_plan': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'next_operations': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'summary': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'PolicyCoverageStatus': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'subject': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'requirement_id': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'status': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'authority': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'PolicyImpactSelectionReason': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'source': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'edge': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'relation': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'evidence_owner': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'traces': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'PolicyInspectionResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'policy': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'declaration': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'representation_digest': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'structural_digest': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'provenance': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'PolicyRelationship': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'source_policy': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'consumer': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'relation': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'applicability': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'source_scope': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'consumer_scope': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'evidence_owner': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'rationale': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'PolicyRelationshipInspection': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'relationship_kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'applicability': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'source_scope': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'consumer_scope': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'propagation': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'evidence_owner': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'rationale': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'PolicyRelationshipKey': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'source_policy': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'consumer': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'relation': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'PolicyScopeUpdate': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'policy': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'heading_path': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'semantics': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'PolicySemanticIntent': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'PolicySummary': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'handle': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'authority': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'scope': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'PolicyUnitDeclaration': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'id': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'module': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'heading_path': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'semantic_revision': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'lifecycle': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'aliases': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'predecessors': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'successors': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'PolicyUnitMapping': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'state': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'reason': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'policy_units': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'PrepareCall': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'request': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'PreservePolicySemantics': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'semantic_revision': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'intent': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ProposalHandle': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'id': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'schema_version': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ProposalId': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'ProposalPolicySummary': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'id': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'authority': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'scope': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ProposalReadResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'revision': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'policy': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'content': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'requires': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'specializes': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'related': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'next_operations': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'summary': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'routing': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'coverage': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'application_exposure': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'provenance': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ProposalRelatedResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'revision': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'target': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'authoring_target': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'policy_unit_mapping': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'relationships': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'next_operations': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'summary': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ProposalRelationshipSummary': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'source': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'target': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'relation': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'groups': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'direction': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'traversal_eligible': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'applicability': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ProposalRevisionHandle': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'id': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'schema_version': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ProposalRevisionId': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'ProposalRouteResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'revision': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'reading_plan': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'unresolved_questions': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'next_operations': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'summary': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ProposalSummary': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'proposal': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'head_revision': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ProposeCall': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'change_set': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ProvenanceReadResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'authority': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'record': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'state': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'next_operations': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ProvenanceRecord': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'path': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ProvideFactSubmission': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'requirement': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'value': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'evidence': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ProviderReference': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'id': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'contract': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'contract_version': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'input_digest': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'PutDecisionProvenanceEdit': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'record': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'PutPolicyRelationshipEdit': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'relationship': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'PutRoutingFactEdit': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'fact': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'rationale': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'PutRoutingRuleEdit': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'rule': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'rationale': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'QuarantinedSnapshotSummary': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'lifecycle': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'source_revision': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'created_at': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'purge_deadline': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'QueryCall': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'request': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'QueryNextOperation': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'operation': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'request_kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'target': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'QueryProposalCall': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'revision': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'request': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'QueryProposalNextOperation': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'operation': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'request_kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'target': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'revision': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'QueryProposalResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'QueryRequest': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'QueryResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'Question': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'id': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'prompt': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'state': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'permitted_answers': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ReadCall': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'target': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'include_routing': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'include_coverage': {'title': None, 'description': 'Include current repository attestation status for registered policy units in this read scope.', 'has_default': False, 'default': None}, 'snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'detail': {'title': None, 'description': 'Compact preserves exact policy and essential authority; full includes all relationship rows.', 'has_default': False, 'default': None}}}, 'ReadCoverage': {'title': None, 'description': 'Repository attestation status bound to this snapshot or proposal. Empty subjects means no registered policy units in scope, not complete coverage. Analysis-local attestations are not repository certificates.', 'has_default': False, 'default': None, 'properties': {'subjects': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ReadRequest': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'target': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'include_routing': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'include_coverage': {'title': None, 'description': 'Include current repository attestation status for registered policy units in this read scope.', 'has_default': False, 'default': None}}}, 'ReadResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'policy': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'content': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'requires': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'specializes': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'related': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'next_operations': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'summary': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'routing': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'coverage': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'application_exposure': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'provenance': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ReadinessHandle': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'id': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'schema_version': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ReadinessId': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'ReadingPlanEntry': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'target': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'scope': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'authority': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'reasons': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'state': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ReadingPlanReason': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'RecoverApplicationCall': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'readiness': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'RecoverApplicationResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'application': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'status': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'RecoverCall': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'context': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'RejectedResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'code': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'outcome': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'target': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'message': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'details': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'next_operations': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'RelatedCall': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'target': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'groups': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'direction': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'transitive': {'title': None, 'description': None, 'has_default': True, 'default': False}, 'snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'RelatedRequest': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'target': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'groups': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'direction': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'transitive': {'title': None, 'description': None, 'has_default': True, 'default': False}}}, 'RelatedResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'target': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'authoring_target': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'policy_unit_mapping': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'relationships': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'next_operations': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'summary': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'RelationshipConsumer': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'RelationshipDisposition': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'relationship': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'disposition': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'replacement_consumer': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'rationale': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'evidence': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'RelationshipInspectionResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'relationship': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'policy_semantics': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'provenance': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'RelationshipKey': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'RelationshipSummary': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'handle': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'source': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'target': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'relation': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'groups': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'direction': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'traversal_eligible': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'applicability': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'RemovePolicyRelationshipEdit': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'relationship': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'RemoveRoutingFactEdit': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'fact': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'rationale': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'RemoveRoutingRuleEdit': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'rule': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'rationale': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ReplaceStandardRelationshipsEdit': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'standard': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'requires': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'specializes': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'rationale': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'RepositoryPath': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'RequiresReadingReason': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'edge': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'source': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ResolveCall': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'analysis': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'submission': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ResolveNextOperation': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'operation': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'request_kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'target': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'work': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'analysis': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ResolveWorkflowCall': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'context': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'submission': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ResumeCall': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'context': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'RetireDecisionProvenanceEdit': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'id': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'RetirePolicyUnitEdit': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'policy': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'retired_semantic_revision': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'successors': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'relationship_dispositions': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'evidence': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'RetireStandardEdit': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'standard': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'successors': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'relationship_dispositions': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'evidence': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ReviewCall': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'context': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'decisions': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ReviewDecision': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'owner': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'decision': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'rationale': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'evidence': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ReviewProposalCall': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'analysis': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'decisions': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'prior_readiness': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ReviewProposalResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'readiness': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'revision': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'status': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ReviewScope': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'ReviseCall': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'context': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'change_set': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ReviseOperationalArtifactEdit': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'target': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'title': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'body': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'RevisePolicyUnitEdit': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'policy': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'title': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'body': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'semantics': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ReviseProposalCall': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'expected_revision': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'change_set': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ReviseProposalResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'proposal': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'revision': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ReviseStandardEdit': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'standard': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'scope_updates': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'RewriteNavigationIndexEdit': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'entrypoint': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'destinations': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'rationale': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'retargets': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'RouteCall': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'facts': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'RouteRequest': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'facts': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'RouteResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'reading_plan': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'unresolved_questions': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'next_operations': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'summary': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'RoutingBaseReadingReason': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'projection': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'RoutingConfiguration': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'facts': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'rules': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'RoutingFactsCall': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'RoutingFactsResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'facts': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'RoutingQuestion': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'id': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'prompt': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'state': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'fact': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'RoutingRuleExplanation': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'id': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'target': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'when': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'state': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'RoutingRuleReadingReason': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'rule': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'facts': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ScalarValue': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'SelectionReason': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'SemanticProposal': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'policy': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'accepted_semantic_revision': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'proposed_semantic_revision': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'intent': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'structural_digest': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'SnapshotChildHandle': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'child_kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'child_id': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'schema_version': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'SnapshotHandle': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'id': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'schema_version': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'SnapshotId': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'SnapshotInspectionResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'SnapshotSummary': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'SpecializesReadingReason': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'edge': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'source': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'StandardContent': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'id': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'title': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'role': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'level': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'applies_when': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'does_not_apply_when': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'verification': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'body': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'StandardEdit': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'StandardsChangePurpose': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'summary': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'rationale': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'evidence': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'StandardsChangeSet': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'purpose': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'edits': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'StructuredScope': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'heading_path': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'Submission': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'Timestamp': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'UndeleteSnapshotCall': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'UndeleteSnapshotResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'VerificationFailure': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'code': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'message': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'suite': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'check': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'VerificationReport': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'passed': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'exit_code': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'suites': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'checks': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'failures': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'VerifyProposalCall': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'revision': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'readiness': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'VerifyProposalResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'revision': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'verification': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'readiness': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'VerifyRepositoryCall': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'refresh_verification_inputs': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'VerifyRepositoryResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'refreshed_verification_inputs': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'verification': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'WholeArtifactScope': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'WithdrawApplicationContentEdit': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'target': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'WorkflowContext': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'WorkflowContinuation': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'operation': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'context': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'required_inputs': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'WorkflowOutcome': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'WorkflowResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'context': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'proposal': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'revision': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'status': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'next_operations': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'outcome': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'WorkflowStatusCall': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'context': {'title': None, 'description': None, 'has_default': False, 'default': None}}}}) @dataclass(frozen=True, slots=True) class ActiveSnapshotSummary: @@ -461,30 +461,434 @@ def from_value(cls, value: object) -> ApplicationHandle: def as_contract(self) -> dict[str, object]: return model_as_contract(self) +@dataclass(frozen=True, slots=True) +class ApplicationInspectCall: + '' + __definition__: ClassVar[str] = 'ApplicationInspectCall' + __contract_fields__: ClassVar = MappingProxyType({ + 'handle': 'handle', + }) + handle: SnapshotChildHandle + + def __post_init__(self) -> None: + _RUNTIME.normalize_model(self) + + @classmethod + def from_value(cls, value: object) -> ApplicationInspectCall: + selected = _RUNTIME.decode(cls.__definition__, value) + if not isinstance(selected, cls): + raise TypeError('decoded value has the wrong generated type') + return selected + + def as_contract(self) -> dict[str, object]: + return model_as_contract(self) + +@dataclass(frozen=True, slots=True) +class ApplicationNextOperation: + '' + __definition__: ClassVar[str] = 'ApplicationNextOperation' + __contract_fields__: ClassVar = MappingProxyType({ + 'operation': 'operation', + 'snapshot': 'snapshot', + 'target': 'target', + 'handle': 'handle', + }) + operation: Literal['read', 'related', 'routing_facts', 'route', 'query', 'inspect'] + snapshot: SnapshotHandle + target: CanonicalId | MissingValue = MISSING + handle: SnapshotChildHandle | MissingValue = MISSING + + def __post_init__(self) -> None: + _RUNTIME.normalize_model(self) + + @classmethod + def from_value(cls, value: object) -> ApplicationNextOperation: + selected = _RUNTIME.decode(cls.__definition__, value) + if not isinstance(selected, cls): + raise TypeError('decoded value has the wrong generated type') + return selected + + def as_contract(self) -> dict[str, object]: + return model_as_contract(self) + +@dataclass(frozen=True, slots=True) +class ApplicationPolicy: + '' + __definition__: ClassVar[str] = 'ApplicationPolicy' + __contract_fields__: ClassVar = MappingProxyType({ + 'id': 'id', + 'handle': 'handle', + 'role': 'role', + 'level': 'level', + }) + id: CanonicalId + handle: SnapshotChildHandle + role: Literal['core', 'router', 'topic', 'workflow', 'profile', 'reference', 'prompt', 'template'] + level: Literal['MUST', 'SHOULD', 'PROFILE', 'REFERENCE'] + + def __post_init__(self) -> None: + _RUNTIME.normalize_model(self) + + @classmethod + def from_value(cls, value: object) -> ApplicationPolicy: + selected = _RUNTIME.decode(cls.__definition__, value) + if not isinstance(selected, cls): + raise TypeError('decoded value has the wrong generated type') + return selected + + def as_contract(self) -> dict[str, object]: + return model_as_contract(self) + +@dataclass(frozen=True, slots=True) +class ApplicationQueryCall: + '' + __definition__: ClassVar[str] = 'ApplicationQueryCall' + __contract_fields__: ClassVar = MappingProxyType({ + 'snapshot': 'snapshot', + 'request': 'request', + }) + snapshot: SnapshotHandle + request: ApplicationQueryRequest + + def __post_init__(self) -> None: + _RUNTIME.normalize_model(self) + + @classmethod + def from_value(cls, value: object) -> ApplicationQueryCall: + selected = _RUNTIME.decode(cls.__definition__, value) + if not isinstance(selected, cls): + raise TypeError('decoded value has the wrong generated type') + return selected + + def as_contract(self) -> dict[str, object]: + return model_as_contract(self) + +@dataclass(frozen=True, slots=True) +class ApplicationQuestion: + '' + __definition__: ClassVar[str] = 'ApplicationQuestion' + __contract_fields__: ClassVar = MappingProxyType({ + 'fact': 'fact', + }) + fact: AuthoredRoutingFact + + def __post_init__(self) -> None: + _RUNTIME.normalize_model(self) + + @classmethod + def from_value(cls, value: object) -> ApplicationQuestion: + selected = _RUNTIME.decode(cls.__definition__, value) + if not isinstance(selected, cls): + raise TypeError('decoded value has the wrong generated type') + return selected + + def as_contract(self) -> dict[str, object]: + return model_as_contract(self) + +@dataclass(frozen=True, slots=True) +class ApplicationReadCall: + '' + __definition__: ClassVar[str] = 'ApplicationReadCall' + __contract_fields__: ClassVar = MappingProxyType({ + 'target': 'target', + 'snapshot': 'snapshot', + 'detail': 'detail', + }) + target: CanonicalId + snapshot: SnapshotHandle | MissingValue = MISSING + detail: Literal['compact', 'full'] | MissingValue = MISSING + + def __post_init__(self) -> None: + _RUNTIME.normalize_model(self) + + @classmethod + def from_value(cls, value: object) -> ApplicationReadCall: + selected = _RUNTIME.decode(cls.__definition__, value) + if not isinstance(selected, cls): + raise TypeError('decoded value has the wrong generated type') + return selected + + def as_contract(self) -> dict[str, object]: + return model_as_contract(self) + +@dataclass(frozen=True, slots=True) +class ApplicationReadRequest: + '' + __definition__: ClassVar[str] = 'ApplicationReadRequest' + __contract_fields__: ClassVar = MappingProxyType({ + 'kind': 'kind', + 'target': 'target', + 'detail': 'detail', + }) + kind: Literal['read'] + target: CanonicalId + detail: Literal['compact', 'full'] | MissingValue = MISSING + + def __post_init__(self) -> None: + _RUNTIME.normalize_model(self) + + @classmethod + def from_value(cls, value: object) -> ApplicationReadRequest: + selected = _RUNTIME.decode(cls.__definition__, value) + if not isinstance(selected, cls): + raise TypeError('decoded value has the wrong generated type') + return selected + + def as_contract(self) -> dict[str, object]: + return model_as_contract(self) + +@dataclass(frozen=True, slots=True) +class ApplicationReadResult: + '' + __definition__: ClassVar[str] = 'ApplicationReadResult' + __contract_fields__: ClassVar = MappingProxyType({ + 'kind': 'kind', + 'purpose': 'purpose', + 'snapshot': 'snapshot', + 'policy': 'policy', + 'content': 'content', + 'scope': 'scope', + 'requires': 'requires', + 'specializes': 'specializes', + 'related': 'related', + 'next_operations': 'next_operations', + }) + kind: Literal['application-read-result'] + purpose: Literal['application'] + snapshot: SnapshotHandle + policy: ApplicationPolicy + content: str + scope: ReviewScope + requires: tuple[CanonicalId, ...] + specializes: tuple[CanonicalId, ...] + next_operations: tuple[ApplicationNextOperation, ...] + related: tuple[ApplicationRelationship, ...] | MissingValue = MISSING + + def __post_init__(self) -> None: + _RUNTIME.normalize_model(self) + + @classmethod + def from_value(cls, value: object) -> ApplicationReadResult: + selected = _RUNTIME.decode(cls.__definition__, value) + if not isinstance(selected, cls): + raise TypeError('decoded value has the wrong generated type') + return selected + + def as_contract(self) -> dict[str, object]: + return model_as_contract(self) + +@dataclass(frozen=True, slots=True) +class ApplicationReadingEntry: + '' + __definition__: ClassVar[str] = 'ApplicationReadingEntry' + __contract_fields__: ClassVar = MappingProxyType({ + 'target': 'target', + 'scope': 'scope', + 'authority': 'authority', + 'state': 'state', + }) + target: CanonicalId + scope: ReviewScope + authority: Literal['normative', 'contextual'] + state: Literal['selected'] + + def __post_init__(self) -> None: + _RUNTIME.normalize_model(self) + + @classmethod + def from_value(cls, value: object) -> ApplicationReadingEntry: + selected = _RUNTIME.decode(cls.__definition__, value) + if not isinstance(selected, cls): + raise TypeError('decoded value has the wrong generated type') + return selected + + def as_contract(self) -> dict[str, object]: + return model_as_contract(self) + @dataclass(frozen=True, slots=True) class ApplicationRecoveryRequiredResult: '' - __definition__: ClassVar[str] = 'ApplicationRecoveryRequiredResult' + __definition__: ClassVar[str] = 'ApplicationRecoveryRequiredResult' + __contract_fields__: ClassVar = MappingProxyType({ + 'kind': 'kind', + 'application': 'application', + 'status': 'status', + 'code': 'code', + 'outcome': 'outcome', + 'message': 'message', + }) + kind: Literal['application-recovery-required-result'] + application: ApplicationHandle + status: Literal['recovery-required'] + code: Literal['APPLICATION.PUBLICATION_UNAVAILABLE', 'APPLICATION.OBSERVATION_UNAVAILABLE', 'APPLICATION.OUTCOME_PERSISTENCE_UNAVAILABLE', 'APPLICATION.RECOVERY_TARGET_UNCERTAIN', 'APPLICATION.RECOVERY_TARGET_DIVERGED'] + outcome: Literal['unavailable'] + message: NonEmptyString + + def __post_init__(self) -> None: + _RUNTIME.normalize_model(self) + + @classmethod + def from_value(cls, value: object) -> ApplicationRecoveryRequiredResult: + selected = _RUNTIME.decode(cls.__definition__, value) + if not isinstance(selected, cls): + raise TypeError('decoded value has the wrong generated type') + return selected + + def as_contract(self) -> dict[str, object]: + return model_as_contract(self) + +@dataclass(frozen=True, slots=True) +class ApplicationRejectedResult: + '' + __definition__: ClassVar[str] = 'ApplicationRejectedResult' + __contract_fields__: ClassVar = MappingProxyType({ + 'kind': 'kind', + 'purpose': 'purpose', + 'code': 'code', + 'outcome': 'outcome', + 'message': 'message', + 'next_operations': 'next_operations', + }) + kind: Literal['application-rejected-result'] + purpose: Literal['application'] + code: Literal['APPLICATION.CONTENT_UNAVAILABLE', 'APPLICATION.INPUT_INVALID', 'APPLICATION.OPERATION_UNAVAILABLE', 'APPLICATION.INTERNAL_UNAVAILABLE', 'APPLICATION.UNSUPPORTED_CAPTURE'] + outcome: Literal['invalid', 'unsupported', 'unavailable'] + message: str + next_operations: tuple[ApplicationNextOperation, ...] + + def __post_init__(self) -> None: + _RUNTIME.normalize_model(self) + + @classmethod + def from_value(cls, value: object) -> ApplicationRejectedResult: + selected = _RUNTIME.decode(cls.__definition__, value) + if not isinstance(selected, cls): + raise TypeError('decoded value has the wrong generated type') + return selected + + def as_contract(self) -> dict[str, object]: + return model_as_contract(self) + +@dataclass(frozen=True, slots=True) +class ApplicationRelatedResult: + '' + __definition__: ClassVar[str] = 'ApplicationRelatedResult' + __contract_fields__: ClassVar = MappingProxyType({ + 'kind': 'kind', + 'purpose': 'purpose', + 'snapshot': 'snapshot', + 'target': 'target', + 'relationships': 'relationships', + 'next_operations': 'next_operations', + }) + kind: Literal['application-related-result'] + purpose: Literal['application'] + snapshot: SnapshotHandle + target: CanonicalId + relationships: tuple[ApplicationRelationship, ...] + next_operations: tuple[ApplicationNextOperation, ...] + + def __post_init__(self) -> None: + _RUNTIME.normalize_model(self) + + @classmethod + def from_value(cls, value: object) -> ApplicationRelatedResult: + selected = _RUNTIME.decode(cls.__definition__, value) + if not isinstance(selected, cls): + raise TypeError('decoded value has the wrong generated type') + return selected + + def as_contract(self) -> dict[str, object]: + return model_as_contract(self) + +@dataclass(frozen=True, slots=True) +class ApplicationRelationship: + '' + __definition__: ClassVar[str] = 'ApplicationRelationship' + __contract_fields__: ClassVar = MappingProxyType({ + 'handle': 'handle', + 'source': 'source', + 'target': 'target', + 'relation': 'relation', + 'groups': 'groups', + 'direction': 'direction', + }) + handle: SnapshotChildHandle + source: CanonicalId + target: CanonicalId + relation: str + groups: tuple[CanonicalId, ...] + direction: Literal['incoming', 'outgoing'] + + def __post_init__(self) -> None: + _RUNTIME.normalize_model(self) + + @classmethod + def from_value(cls, value: object) -> ApplicationRelationship: + selected = _RUNTIME.decode(cls.__definition__, value) + if not isinstance(selected, cls): + raise TypeError('decoded value has the wrong generated type') + return selected + + def as_contract(self) -> dict[str, object]: + return model_as_contract(self) + +@dataclass(frozen=True, slots=True) +class ApplicationRouteResult: + '' + __definition__: ClassVar[str] = 'ApplicationRouteResult' + __contract_fields__: ClassVar = MappingProxyType({ + 'kind': 'kind', + 'purpose': 'purpose', + 'snapshot': 'snapshot', + 'status': 'status', + 'reading_plan': 'reading_plan', + 'unresolved_questions': 'unresolved_questions', + 'next_operations': 'next_operations', + }) + kind: Literal['application-route-result'] + purpose: Literal['application'] + snapshot: SnapshotHandle + status: Literal['complete', 'needs-facts'] + reading_plan: tuple[ApplicationReadingEntry, ...] + unresolved_questions: tuple[ApplicationQuestion, ...] + next_operations: tuple[ApplicationNextOperation, ...] + + def __post_init__(self) -> None: + _RUNTIME.normalize_model(self) + + @classmethod + def from_value(cls, value: object) -> ApplicationRouteResult: + selected = _RUNTIME.decode(cls.__definition__, value) + if not isinstance(selected, cls): + raise TypeError('decoded value has the wrong generated type') + return selected + + def as_contract(self) -> dict[str, object]: + return model_as_contract(self) + +@dataclass(frozen=True, slots=True) +class ApplicationRoutingFactsResult: + '' + __definition__: ClassVar[str] = 'ApplicationRoutingFactsResult' __contract_fields__: ClassVar = MappingProxyType({ 'kind': 'kind', - 'application': 'application', - 'status': 'status', - 'code': 'code', - 'outcome': 'outcome', - 'message': 'message', + 'purpose': 'purpose', + 'snapshot': 'snapshot', + 'facts': 'facts', + 'next_operations': 'next_operations', }) - kind: Literal['application-recovery-required-result'] - application: ApplicationHandle - status: Literal['recovery-required'] - code: Literal['APPLICATION.PUBLICATION_UNAVAILABLE', 'APPLICATION.OBSERVATION_UNAVAILABLE', 'APPLICATION.OUTCOME_PERSISTENCE_UNAVAILABLE', 'APPLICATION.RECOVERY_TARGET_UNCERTAIN', 'APPLICATION.RECOVERY_TARGET_DIVERGED'] - outcome: Literal['unavailable'] - message: NonEmptyString + kind: Literal['application-routing-facts-result'] + purpose: Literal['application'] + snapshot: SnapshotHandle + facts: tuple[AuthoredRoutingFact, ...] + next_operations: tuple[ApplicationNextOperation, ...] def __post_init__(self) -> None: _RUNTIME.normalize_model(self) @classmethod - def from_value(cls, value: object) -> ApplicationRecoveryRequiredResult: + def from_value(cls, value: object) -> ApplicationRoutingFactsResult: selected = _RUNTIME.decode(cls.__definition__, value) if not isinstance(selected, cls): raise TypeError('decoded value has the wrong generated type') @@ -565,6 +969,30 @@ def from_value(cls, value: object) -> ApplyProposalResult: def as_contract(self) -> dict[str, object]: return model_as_contract(self) +@dataclass(frozen=True, slots=True) +class ApproveApplicationContentEdit: + '' + __definition__: ClassVar[str] = 'ApproveApplicationContentEdit' + __contract_fields__: ClassVar = MappingProxyType({ + 'kind': 'kind', + 'target': 'target', + }) + kind: Literal['approve-application-content'] + target: CanonicalId | AuthoringTargetHandle + + def __post_init__(self) -> None: + _RUNTIME.normalize_model(self) + + @classmethod + def from_value(cls, value: object) -> ApproveApplicationContentEdit: + selected = _RUNTIME.decode(cls.__definition__, value) + if not isinstance(selected, cls): + raise TypeError('decoded value has the wrong generated type') + return selected + + def as_contract(self) -> dict[str, object]: + return model_as_contract(self) + @dataclass(frozen=True, slots=True) class AuditPolicyUnitEdit: '' @@ -591,6 +1019,46 @@ def from_value(cls, value: object) -> AuditPolicyUnitEdit: def as_contract(self) -> dict[str, object]: return model_as_contract(self) +@dataclass(frozen=True, slots=True) +class AuthoredDecisionProvenance: + '' + __definition__: ClassVar[str] = 'AuthoredDecisionProvenance' + __contract_fields__: ClassVar = MappingProxyType({ + 'id': 'id', + 'subject': 'subject', + 'origin': 'origin', + 'rationale': 'rationale', + 'evidence': 'evidence', + 'assumptions': 'assumptions', + 'limits': 'limits', + 'alternatives': 'alternatives', + 'reconsideration': 'reconsideration', + 'supersedes': 'supersedes', + }) + id: CanonicalId + subject: CanonicalId + origin: Literal['documented-original', 'reconstructed-history', 'current-justification', 'unrecorded'] + rationale: str + evidence: tuple[EvidenceReference, ...] + assumptions: tuple[str, ...] | MissingValue = MISSING + limits: tuple[str, ...] | MissingValue = MISSING + alternatives: tuple[str, ...] | MissingValue = MISSING + reconsideration: tuple[str, ...] | MissingValue = MISSING + supersedes: tuple[str, ...] | MissingValue = MISSING + + def __post_init__(self) -> None: + _RUNTIME.normalize_model(self) + + @classmethod + def from_value(cls, value: object) -> AuthoredDecisionProvenance: + selected = _RUNTIME.decode(cls.__definition__, value) + if not isinstance(selected, cls): + raise TypeError('decoded value has the wrong generated type') + return selected + + def as_contract(self) -> dict[str, object]: + return model_as_contract(self) + @dataclass(frozen=True, slots=True) class AuthoredRoutingFact: '' @@ -801,7 +1269,7 @@ class ChangeDescriptor: 'accepted_module': 'accepted_module', 'proposed_module': 'proposed_module', }) - kind: Literal['module', 'modification', 'addition', 'removal', 'move', 'split', 'merge', 'navigation-index'] + kind: Literal['module', 'modification', 'addition', 'removal', 'move', 'split', 'merge', 'navigation-index', 'supporting-content'] accepted_ids: tuple[CanonicalId, ...] proposed_ids: tuple[CanonicalId, ...] scope: ReviewScope @@ -907,6 +1375,8 @@ class CompactReadResult: 'routing': 'routing', 'coverage': 'coverage', 'detail': 'detail', + 'application_exposure': 'application_exposure', + 'provenance': 'provenance', }) kind: Literal['compact-read-result'] snapshot: SnapshotHandle @@ -919,6 +1389,8 @@ class CompactReadResult: summary: str | MissingValue = MISSING routing: RoutingConfiguration | MissingValue = MISSING coverage: ReadCoverage | MissingValue = MISSING + application_exposure: ApplicationExposureState | MissingValue = MISSING + provenance: tuple[CanonicalId, ...] | MissingValue = MISSING def __post_init__(self) -> None: _RUNTIME.normalize_model(self) @@ -1511,6 +1983,50 @@ def from_value(cls, value: object) -> DecisionFingerprint: def as_contract(self) -> dict[str, object]: return model_as_contract(self) +@dataclass(frozen=True, slots=True) +class DecisionProvenanceRecord: + '' + __definition__: ClassVar[str] = 'DecisionProvenanceRecord' + __contract_fields__: ClassVar = MappingProxyType({ + 'id': 'id', + 'subject': 'subject', + 'origin': 'origin', + 'rationale': 'rationale', + 'evidence': 'evidence', + 'assumptions': 'assumptions', + 'limits': 'limits', + 'alternatives': 'alternatives', + 'reconsideration': 'reconsideration', + 'supersedes': 'supersedes', + 'subject_binding': 'subject_binding', + 'retired': 'retired', + }) + id: CanonicalId + subject: CanonicalId + origin: Literal['documented-original', 'reconstructed-history', 'current-justification', 'unrecorded'] + rationale: str + evidence: tuple[EvidenceReference, ...] + assumptions: tuple[str, ...] + limits: tuple[str, ...] + alternatives: tuple[str, ...] + reconsideration: tuple[str, ...] + supersedes: tuple[str, ...] + subject_binding: Digest + retired: bool + + def __post_init__(self) -> None: + _RUNTIME.normalize_model(self) + + @classmethod + def from_value(cls, value: object) -> DecisionProvenanceRecord: + selected = _RUNTIME.decode(cls.__definition__, value) + if not isinstance(selected, cls): + raise TypeError('decoded value has the wrong generated type') + return selected + + def as_contract(self) -> dict[str, object]: + return model_as_contract(self) + @dataclass(frozen=True, slots=True) class DeleteSnapshotCall: '' @@ -2120,7 +2636,7 @@ class GeneralSelectionReason: 'edge': 'edge', 'question': 'question', }) - kind: Literal['routing-fact', 'requires', 'specializes', 'changed-policy', 'question', 'audit-coverage', 'unmapped-normative-change', 'structured-scope-analysis-unsupported', 'navigation-index-change'] + kind: Literal['routing-fact', 'requires', 'specializes', 'changed-policy', 'question', 'audit-coverage', 'unmapped-normative-change', 'structured-scope-analysis-unsupported', 'navigation-index-change', 'supporting-content-change'] source: CanonicalId | MissingValue = MISSING fact: CanonicalId | MissingValue = MISSING edge: EdgeId | MissingValue = MISSING @@ -2567,6 +3083,42 @@ def from_value(cls, value: object) -> Obligation: def as_contract(self) -> dict[str, object]: return model_as_contract(self) +@dataclass(frozen=True, slots=True) +class OperationalReadResult: + '' + __definition__: ClassVar[str] = 'OperationalReadResult' + __contract_fields__: ClassVar = MappingProxyType({ + 'kind': 'kind', + 'authority': 'authority', + 'target': 'target', + 'canonical_id': 'canonical_id', + 'role': 'role', + 'content': 'content', + 'application_exposure': 'application_exposure', + 'next_operations': 'next_operations', + }) + kind: Literal['operational-read-result'] + authority: SnapshotHandle | ProposalRevisionHandle + target: AuthoringTargetHandle + canonical_id: CanonicalId + role: Literal['prompt', 'template'] + content: str + application_exposure: ApplicationExposureState + next_operations: tuple[NextOperation, ...] + + def __post_init__(self) -> None: + _RUNTIME.normalize_model(self) + + @classmethod + def from_value(cls, value: object) -> OperationalReadResult: + selected = _RUNTIME.decode(cls.__definition__, value) + if not isinstance(selected, cls): + raise TypeError('decoded value has the wrong generated type') + return selected + + def as_contract(self) -> dict[str, object]: + return model_as_contract(self) + @dataclass(frozen=True, slots=True) class PendingResult: '' @@ -2799,6 +3351,32 @@ def from_value(cls, value: object) -> PolicyRelationshipKey: def as_contract(self) -> dict[str, object]: return model_as_contract(self) +@dataclass(frozen=True, slots=True) +class PolicyScopeUpdate: + '' + __definition__: ClassVar[str] = 'PolicyScopeUpdate' + __contract_fields__: ClassVar = MappingProxyType({ + 'policy': 'policy', + 'heading_path': 'heading_path', + 'semantics': 'semantics', + }) + policy: CanonicalId + heading_path: tuple[NonEmptyString, ...] + semantics: PolicySemanticIntent + + def __post_init__(self) -> None: + _RUNTIME.normalize_model(self) + + @classmethod + def from_value(cls, value: object) -> PolicyScopeUpdate: + selected = _RUNTIME.decode(cls.__definition__, value) + if not isinstance(selected, cls): + raise TypeError('decoded value has the wrong generated type') + return selected + + def as_contract(self) -> dict[str, object]: + return model_as_contract(self) + @dataclass(frozen=True, slots=True) class PolicySummary: '' @@ -3005,6 +3583,8 @@ class ProposalReadResult: 'summary': 'summary', 'routing': 'routing', 'coverage': 'coverage', + 'application_exposure': 'application_exposure', + 'provenance': 'provenance', }) kind: Literal['proposal-read-result'] revision: ProposalRevisionHandle @@ -3017,6 +3597,8 @@ class ProposalReadResult: summary: str | MissingValue = MISSING routing: RoutingConfiguration | MissingValue = MISSING coverage: ReadCoverage | MissingValue = MISSING + application_exposure: ApplicationExposureState | MissingValue = MISSING + provenance: tuple[CanonicalId, ...] | MissingValue = MISSING def __post_init__(self) -> None: _RUNTIME.normalize_model(self) @@ -3207,6 +3789,36 @@ def from_value(cls, value: object) -> ProposeCall: def as_contract(self) -> dict[str, object]: return model_as_contract(self) +@dataclass(frozen=True, slots=True) +class ProvenanceReadResult: + '' + __definition__: ClassVar[str] = 'ProvenanceReadResult' + __contract_fields__: ClassVar = MappingProxyType({ + 'kind': 'kind', + 'authority': 'authority', + 'record': 'record', + 'state': 'state', + 'next_operations': 'next_operations', + }) + kind: Literal['provenance-read-result'] + authority: SnapshotHandle | ProposalRevisionHandle + record: DecisionProvenanceRecord + state: Literal['current', 'needs-review', 'retired'] + next_operations: tuple[NextOperation, ...] + + def __post_init__(self) -> None: + _RUNTIME.normalize_model(self) + + @classmethod + def from_value(cls, value: object) -> ProvenanceReadResult: + selected = _RUNTIME.decode(cls.__definition__, value) + if not isinstance(selected, cls): + raise TypeError('decoded value has the wrong generated type') + return selected + + def as_contract(self) -> dict[str, object]: + return model_as_contract(self) + @dataclass(frozen=True, slots=True) class ProvenanceRecord: '' @@ -3287,6 +3899,30 @@ def from_value(cls, value: object) -> ProviderReference: def as_contract(self) -> dict[str, object]: return model_as_contract(self) +@dataclass(frozen=True, slots=True) +class PutDecisionProvenanceEdit: + '' + __definition__: ClassVar[str] = 'PutDecisionProvenanceEdit' + __contract_fields__: ClassVar = MappingProxyType({ + 'kind': 'kind', + 'record': 'record', + }) + kind: Literal['put-provenance'] + record: AuthoredDecisionProvenance + + def __post_init__(self) -> None: + _RUNTIME.normalize_model(self) + + @classmethod + def from_value(cls, value: object) -> PutDecisionProvenanceEdit: + selected = _RUNTIME.decode(cls.__definition__, value) + if not isinstance(selected, cls): + raise TypeError('decoded value has the wrong generated type') + return selected + + def as_contract(self) -> dict[str, object]: + return model_as_contract(self) + @dataclass(frozen=True, slots=True) class PutPolicyRelationshipEdit: '' @@ -3623,6 +4259,8 @@ class ReadResult: 'summary': 'summary', 'routing': 'routing', 'coverage': 'coverage', + 'application_exposure': 'application_exposure', + 'provenance': 'provenance', }) kind: Literal['read-result'] snapshot: SnapshotHandle @@ -3635,6 +4273,8 @@ class ReadResult: summary: str | MissingValue = MISSING routing: RoutingConfiguration | MissingValue = MISSING coverage: ReadCoverage | MissingValue = MISSING + application_exposure: ApplicationExposureState | MissingValue = MISSING + provenance: tuple[CanonicalId, ...] | MissingValue = MISSING def __post_init__(self) -> None: _RUNTIME.normalize_model(self) @@ -4233,6 +4873,30 @@ def from_value(cls, value: object) -> ResumeCall: def as_contract(self) -> dict[str, object]: return model_as_contract(self) +@dataclass(frozen=True, slots=True) +class RetireDecisionProvenanceEdit: + '' + __definition__: ClassVar[str] = 'RetireDecisionProvenanceEdit' + __contract_fields__: ClassVar = MappingProxyType({ + 'kind': 'kind', + 'id': 'id', + }) + kind: Literal['retire-provenance'] + id: CanonicalId + + def __post_init__(self) -> None: + _RUNTIME.normalize_model(self) + + @classmethod + def from_value(cls, value: object) -> RetireDecisionProvenanceEdit: + selected = _RUNTIME.decode(cls.__definition__, value) + if not isinstance(selected, cls): + raise TypeError('decoded value has the wrong generated type') + return selected + + def as_contract(self) -> dict[str, object]: + return model_as_contract(self) + @dataclass(frozen=True, slots=True) class RetirePolicyUnitEdit: '' @@ -4427,6 +5091,34 @@ def from_value(cls, value: object) -> ReviseCall: def as_contract(self) -> dict[str, object]: return model_as_contract(self) +@dataclass(frozen=True, slots=True) +class ReviseOperationalArtifactEdit: + '' + __definition__: ClassVar[str] = 'ReviseOperationalArtifactEdit' + __contract_fields__: ClassVar = MappingProxyType({ + 'kind': 'kind', + 'target': 'target', + 'title': 'title', + 'body': 'body', + }) + kind: Literal['revise-operational-artifact'] + target: AuthoringTargetHandle + title: NonEmptyString + body: str + + def __post_init__(self) -> None: + _RUNTIME.normalize_model(self) + + @classmethod + def from_value(cls, value: object) -> ReviseOperationalArtifactEdit: + selected = _RUNTIME.decode(cls.__definition__, value) + if not isinstance(selected, cls): + raise TypeError('decoded value has the wrong generated type') + return selected + + def as_contract(self) -> dict[str, object]: + return model_as_contract(self) + @dataclass(frozen=True, slots=True) class RevisePolicyUnitEdit: '' @@ -4516,9 +5208,11 @@ class ReviseStandardEdit: __contract_fields__: ClassVar = MappingProxyType({ 'kind': 'kind', 'standard': 'standard', + 'scope_updates': 'scope_updates', }) kind: Literal['revise-standard'] standard: StandardContent + scope_updates: tuple[PolicyScopeUpdate, ...] | MissingValue = MISSING def __post_init__(self) -> None: _RUNTIME.normalize_model(self) @@ -5301,6 +5995,30 @@ def from_value(cls, value: object) -> WholeArtifactScope: def as_contract(self) -> dict[str, object]: return model_as_contract(self) +@dataclass(frozen=True, slots=True) +class WithdrawApplicationContentEdit: + '' + __definition__: ClassVar[str] = 'WithdrawApplicationContentEdit' + __contract_fields__: ClassVar = MappingProxyType({ + 'kind': 'kind', + 'target': 'target', + }) + kind: Literal['withdraw-application-content'] + target: CanonicalId | AuthoringTargetHandle + + def __post_init__(self) -> None: + _RUNTIME.normalize_model(self) + + @classmethod + def from_value(cls, value: object) -> WithdrawApplicationContentEdit: + selected = _RUNTIME.decode(cls.__definition__, value) + if not isinstance(selected, cls): + raise TypeError('decoded value has the wrong generated type') + return selected + + def as_contract(self) -> dict[str, object]: + return model_as_contract(self) + @dataclass(frozen=True, slots=True) class WorkflowContinuation: '' @@ -5387,7 +6105,9 @@ def as_contract(self) -> dict[str, object]: AnalysisId: TypeAlias = str AnalysisMaterialHandle: TypeAlias = SnapshotHandle | ProposalRevisionHandle ApplicabilityExpression: TypeAlias = AlwaysExpression | AllExpression | AnyExpression | NotExpression | EqualsExpression | InExpression | ContainsExpression | ExistsExpression +ApplicationExposureState: TypeAlias = Literal['unreviewed', 'current', 'needs-review'] ApplicationId: TypeAlias = str +ApplicationQueryRequest: TypeAlias = RouteRequest | ApplicationReadRequest | RelatedRequest AuthorizationId: TypeAlias = str CanonicalId: TypeAlias = str ChildId: TypeAlias = str @@ -5405,9 +6125,9 @@ def as_contract(self) -> dict[str, object]: PolicySemanticIntent: TypeAlias = PreservePolicySemantics | ChangePolicySemantics ProposalId: TypeAlias = str ProposalRevisionId: TypeAlias = str -QueryProposalResult: TypeAlias = ProposalRouteResult | ProposalReadResult | ProposalRelatedResult | NavigationIndexesResult +QueryProposalResult: TypeAlias = ProposalRouteResult | ProposalReadResult | ProposalRelatedResult | NavigationIndexesResult | ProvenanceReadResult | OperationalReadResult QueryRequest: TypeAlias = RouteRequest | ReadRequest | RelatedRequest -QueryResult: TypeAlias = RouteResult | ReadResult | RelatedResult | NavigationIndexesResult +QueryResult: TypeAlias = RouteResult | ReadResult | RelatedResult | NavigationIndexesResult | ProvenanceReadResult | OperationalReadResult ReadinessId: TypeAlias = str ReadingPlanReason: TypeAlias = ConsumerReviewObligationReadingReason | RoutingBaseReadingReason | RoutingRuleReadingReason | RequiresReadingReason | SpecializesReadingReason RelationshipConsumer: TypeAlias = CanonicalId | AuthoringTargetHandle @@ -5418,7 +6138,7 @@ def as_contract(self) -> dict[str, object]: SelectionReason: TypeAlias = GeneralSelectionReason | PolicyImpactSelectionReason SnapshotId: TypeAlias = str SnapshotSummary: TypeAlias = ActiveSnapshotSummary | QuarantinedSnapshotSummary -StandardEdit: TypeAlias = CreateStandardEdit | ReviseStandardEdit | RevisePolicyUnitEdit | MovePolicyUnitEdit | RetirePolicyUnitEdit | RetireStandardEdit | ReplaceStandardRelationshipsEdit | PutPolicyRelationshipEdit | RemovePolicyRelationshipEdit | PutRoutingRuleEdit | RemoveRoutingRuleEdit | PutRoutingFactEdit | RemoveRoutingFactEdit | AuditPolicyUnitEdit | RewriteNavigationIndexEdit +StandardEdit: TypeAlias = CreateStandardEdit | ReviseStandardEdit | RevisePolicyUnitEdit | MovePolicyUnitEdit | RetirePolicyUnitEdit | RetireStandardEdit | ReplaceStandardRelationshipsEdit | PutPolicyRelationshipEdit | RemovePolicyRelationshipEdit | PutRoutingRuleEdit | RemoveRoutingRuleEdit | PutRoutingFactEdit | RemoveRoutingFactEdit | AuditPolicyUnitEdit | RewriteNavigationIndexEdit | PutDecisionProvenanceEdit | RetireDecisionProvenanceEdit | ApproveApplicationContentEdit | WithdrawApplicationContentEdit | ReviseOperationalArtifactEdit Submission: TypeAlias = ProvideFactSubmission | ConsumerDispositionSubmission | ImpactDispositionSubmission | CoverageAttestationSubmission Timestamp: TypeAlias = int | float WorkflowContext: TypeAlias = ProposalRevisionHandle | AnalysisHandle | ReadinessHandle @@ -5441,11 +6161,27 @@ def as_contract(self) -> dict[str, object]: 'AnalyzeProposalCall': AnalyzeProposalCall, 'AnyExpression': AnyExpression, 'ApplicationHandle': ApplicationHandle, + 'ApplicationInspectCall': ApplicationInspectCall, + 'ApplicationNextOperation': ApplicationNextOperation, + 'ApplicationPolicy': ApplicationPolicy, + 'ApplicationQueryCall': ApplicationQueryCall, + 'ApplicationQuestion': ApplicationQuestion, + 'ApplicationReadCall': ApplicationReadCall, + 'ApplicationReadRequest': ApplicationReadRequest, + 'ApplicationReadResult': ApplicationReadResult, + 'ApplicationReadingEntry': ApplicationReadingEntry, 'ApplicationRecoveryRequiredResult': ApplicationRecoveryRequiredResult, + 'ApplicationRejectedResult': ApplicationRejectedResult, + 'ApplicationRelatedResult': ApplicationRelatedResult, + 'ApplicationRelationship': ApplicationRelationship, + 'ApplicationRouteResult': ApplicationRouteResult, + 'ApplicationRoutingFactsResult': ApplicationRoutingFactsResult, 'ApplyCall': ApplyCall, 'ApplyProposalCall': ApplyProposalCall, 'ApplyProposalResult': ApplyProposalResult, + 'ApproveApplicationContentEdit': ApproveApplicationContentEdit, 'AuditPolicyUnitEdit': AuditPolicyUnitEdit, + 'AuthoredDecisionProvenance': AuthoredDecisionProvenance, 'AuthoredRoutingFact': AuthoredRoutingFact, 'AuthoredRoutingRule': AuthoredRoutingRule, 'AuthoringTargetHandle': AuthoringTargetHandle, @@ -5475,6 +6211,7 @@ def as_contract(self) -> dict[str, object]: 'CreateStandardEdit': CreateStandardEdit, 'DecisionDependency': DecisionDependency, 'DecisionFingerprint': DecisionFingerprint, + 'DecisionProvenanceRecord': DecisionProvenanceRecord, 'DeleteSnapshotCall': DeleteSnapshotCall, 'DeleteSnapshotResult': DeleteSnapshotResult, 'DispositionRecord': DispositionRecord, @@ -5512,6 +6249,7 @@ def as_contract(self) -> dict[str, object]: 'NewPolicyUnit': NewPolicyUnit, 'NotExpression': NotExpression, 'Obligation': Obligation, + 'OperationalReadResult': OperationalReadResult, 'PendingResult': PendingResult, 'PolicyCoverageStatus': PolicyCoverageStatus, 'PolicyImpactSelectionReason': PolicyImpactSelectionReason, @@ -5519,6 +6257,7 @@ def as_contract(self) -> dict[str, object]: 'PolicyRelationship': PolicyRelationship, 'PolicyRelationshipInspection': PolicyRelationshipInspection, 'PolicyRelationshipKey': PolicyRelationshipKey, + 'PolicyScopeUpdate': PolicyScopeUpdate, 'PolicySummary': PolicySummary, 'PolicyUnitDeclaration': PolicyUnitDeclaration, 'PolicyUnitMapping': PolicyUnitMapping, @@ -5533,9 +6272,11 @@ def as_contract(self) -> dict[str, object]: 'ProposalRouteResult': ProposalRouteResult, 'ProposalSummary': ProposalSummary, 'ProposeCall': ProposeCall, + 'ProvenanceReadResult': ProvenanceReadResult, 'ProvenanceRecord': ProvenanceRecord, 'ProvideFactSubmission': ProvideFactSubmission, 'ProviderReference': ProviderReference, + 'PutDecisionProvenanceEdit': PutDecisionProvenanceEdit, 'PutPolicyRelationshipEdit': PutPolicyRelationshipEdit, 'PutRoutingFactEdit': PutRoutingFactEdit, 'PutRoutingRuleEdit': PutRoutingRuleEdit, @@ -5570,6 +6311,7 @@ def as_contract(self) -> dict[str, object]: 'ResolveNextOperation': ResolveNextOperation, 'ResolveWorkflowCall': ResolveWorkflowCall, 'ResumeCall': ResumeCall, + 'RetireDecisionProvenanceEdit': RetireDecisionProvenanceEdit, 'RetirePolicyUnitEdit': RetirePolicyUnitEdit, 'RetireStandardEdit': RetireStandardEdit, 'ReviewCall': ReviewCall, @@ -5577,6 +6319,7 @@ def as_contract(self) -> dict[str, object]: 'ReviewProposalCall': ReviewProposalCall, 'ReviewProposalResult': ReviewProposalResult, 'ReviseCall': ReviseCall, + 'ReviseOperationalArtifactEdit': ReviseOperationalArtifactEdit, 'RevisePolicyUnitEdit': RevisePolicyUnitEdit, 'ReviseProposalCall': ReviseProposalCall, 'ReviseProposalResult': ReviseProposalResult, @@ -5610,6 +6353,7 @@ def as_contract(self) -> dict[str, object]: 'VerifyRepositoryCall': VerifyRepositoryCall, 'VerifyRepositoryResult': VerifyRepositoryResult, 'WholeArtifactScope': WholeArtifactScope, + 'WithdrawApplicationContentEdit': WithdrawApplicationContentEdit, 'WorkflowContinuation': WorkflowContinuation, 'WorkflowResult': WorkflowResult, 'WorkflowStatusCall': WorkflowStatusCall, @@ -5639,13 +6383,31 @@ def decode_contract(definition: str, value: object) -> object: 'AnalyzeProposalCall', 'AnyExpression', 'ApplicabilityExpression', + 'ApplicationExposureState', 'ApplicationHandle', 'ApplicationId', + 'ApplicationInspectCall', + 'ApplicationNextOperation', + 'ApplicationPolicy', + 'ApplicationQueryCall', + 'ApplicationQueryRequest', + 'ApplicationQuestion', + 'ApplicationReadCall', + 'ApplicationReadRequest', + 'ApplicationReadResult', + 'ApplicationReadingEntry', 'ApplicationRecoveryRequiredResult', + 'ApplicationRejectedResult', + 'ApplicationRelatedResult', + 'ApplicationRelationship', + 'ApplicationRouteResult', + 'ApplicationRoutingFactsResult', 'ApplyCall', 'ApplyProposalCall', 'ApplyProposalResult', + 'ApproveApplicationContentEdit', 'AuditPolicyUnitEdit', + 'AuthoredDecisionProvenance', 'AuthoredRoutingFact', 'AuthoredRoutingRule', 'AuthoringTargetHandle', @@ -5678,6 +6440,7 @@ def decode_contract(definition: str, value: object) -> object: 'CreateStandardEdit', 'DecisionDependency', 'DecisionFingerprint', + 'DecisionProvenanceRecord', 'DeleteSnapshotCall', 'DeleteSnapshotResult', 'Digest', @@ -5726,6 +6489,7 @@ def decode_contract(definition: str, value: object) -> object: 'NotExpression', 'Obligation', 'ObligationId', + 'OperationalReadResult', 'PendingResult', 'PolicyCoverageStatus', 'PolicyImpactSelectionReason', @@ -5733,6 +6497,7 @@ def decode_contract(definition: str, value: object) -> object: 'PolicyRelationship', 'PolicyRelationshipInspection', 'PolicyRelationshipKey', + 'PolicyScopeUpdate', 'PolicySemanticIntent', 'PolicySummary', 'PolicyUnitDeclaration', @@ -5750,9 +6515,11 @@ def decode_contract(definition: str, value: object) -> object: 'ProposalRouteResult', 'ProposalSummary', 'ProposeCall', + 'ProvenanceReadResult', 'ProvenanceRecord', 'ProvideFactSubmission', 'ProviderReference', + 'PutDecisionProvenanceEdit', 'PutPolicyRelationshipEdit', 'PutRoutingFactEdit', 'PutRoutingRuleEdit', @@ -5795,6 +6562,7 @@ def decode_contract(definition: str, value: object) -> object: 'ResolveNextOperation', 'ResolveWorkflowCall', 'ResumeCall', + 'RetireDecisionProvenanceEdit', 'RetirePolicyUnitEdit', 'RetireStandardEdit', 'ReviewCall', @@ -5803,6 +6571,7 @@ def decode_contract(definition: str, value: object) -> object: 'ReviewProposalResult', 'ReviewScope', 'ReviseCall', + 'ReviseOperationalArtifactEdit', 'RevisePolicyUnitEdit', 'ReviseProposalCall', 'ReviseProposalResult', @@ -5843,6 +6612,7 @@ def decode_contract(definition: str, value: object) -> object: 'VerifyRepositoryCall', 'VerifyRepositoryResult', 'WholeArtifactScope', + 'WithdrawApplicationContentEdit', 'WorkflowContext', 'WorkflowContinuation', 'WorkflowOutcome', diff --git a/tools/standards_engine/standards_engine/context_projection.py b/tools/standards_engine/standards_engine/context_projection.py new file mode 100644 index 00000000..0b122f6d --- /dev/null +++ b/tools/standards_engine/standards_engine/context_projection.py @@ -0,0 +1,277 @@ +"""Host purpose and the single application-output construction boundary.""" +from __future__ import annotations + +import logging +from enum import Enum +from functools import wraps +from pathlib import Path +from typing import Callable, TYPE_CHECKING + +from tools.graph_engine.graph_engine import Direction, EdgeRegistry, GraphContribution, GraphError +from tools.standards_graph.standards_graph import Provider +from tools.standards_contracts.standards_contracts import ContractError + +from . import _generated_contract as c +from .supporting import resolve_material + +if TYPE_CHECKING: + from .engine import CompiledSnapshot, StandardsEngine + + +class Purpose(str, Enum): + APPLICATION = "application" + AUTHORING = "authoring" + + +APPLICATION_CALLS = { + "route": c.RouteCall, + "read": c.ApplicationReadCall, + "related": c.RelatedCall, + "routing_facts": c.RoutingFactsCall, + "query": c.ApplicationQueryCall, + "inspect": c.ApplicationInspectCall, +} + + +def application_rejection(code: str = "APPLICATION.CONTENT_UNAVAILABLE", outcome: str = "unavailable"): + messages = { + "APPLICATION.CONTENT_UNAVAILABLE": "The requested guidance is awaiting application publication.", + "APPLICATION.INPUT_INVALID": "Supply arguments from this interface's published contract.", + "APPLICATION.OPERATION_UNAVAILABLE": "This interface provides application navigation operations.", + "APPLICATION.INTERNAL_UNAVAILABLE": "The requested application observation could not be established.", + "APPLICATION.UNSUPPORTED_CAPTURE": "Use a snapshot captured by the supported content contract.", + } + return c.ApplicationRejectedResult.from_value({ + "kind": "application-rejected-result", "purpose": "application", + "code": code, "outcome": outcome, "message": messages[code], "next_operations": [], + }) + + +def public_operation(function: Callable) -> Callable: + """Admit application work before invoking any authoring implementation.""" + @wraps(function) + def invoke(engine, call): + if engine.purpose is Purpose.APPLICATION: + try: + return application_dispatch(engine, function.__name__, call) + except Exception: + logging.getLogger(__name__).exception("Application observation failed") + return application_rejection("APPLICATION.INTERNAL_UNAVAILABLE") + return function(engine, call) + return invoke + + +class _UnqualifiedContent(Exception): + pass + + +class ApplicationView: + """Build application values from the qualified portion of one snapshot.""" + + def __init__(self, compiled: CompiledSnapshot, snapshot: c.SnapshotHandle): + self.compiled = compiled + self.snapshot = snapshot.as_contract() + self.eligible = frozenset( + identity for identity, material in compiled.materials.items() + if compiled.supporting.exposure_state(identity, material.binding) == "current" + ) + visible = set(self.eligible) + visible.update(unit.id for unit in compiled.corpus.policy_units if unit.module in self.eligible) + groups = {key: value for key, value in compiled.graph.groups.items() if key in { + "standards-requires", "standards-specializes", "standards-dependencies", "policy-impact", "semantic", + }} + edges = tuple(edge for edge in compiled.graph.edges.values() + if edge.source in visible and edge.target in visible + and set(edge.groups) <= groups.keys()) + nodes = tuple(node for key, node in compiled.graph.nodes.items() if key in visible) + # Retain each original declaration's technical provenance while taking + # a view. A projection is not a new author of those graph facts. + by_source = {} + for index, records in enumerate((nodes, tuple(groups.values()), edges)): + for record in records: + by_source.setdefault(record.provenance.source_id, ([], [], []))[index].append(record) + sources = tuple(Provider(identity, GraphContribution(*(tuple(rows) for rows in records))) + for identity, records in sorted(by_source.items())) + self.graph = EdgeRegistry(Path("/"), sources, + logical_artifacts=(compiled.materials[key].path for key in self.eligible)) + + def _require(self, target: str): + selected = resolve_material(self.compiled, target) + if selected is None: + raise _UnqualifiedContent() + material, unit = selected + pending, checked = [material.id], set() + while pending: + identity = pending.pop() + if identity in checked: + continue + if identity not in self.eligible: + raise _UnqualifiedContent() + checked.add(identity) + owner = self.compiled.materials[identity] + pending.extend((*owner.requires, *owner.specializes)) + return material, unit + + def _child(self, kind: str, identity: str) -> dict: + return {"kind": "snapshot-child-handle", "snapshot": self.snapshot, + "child_kind": kind, "child_id": identity, "schema_version": 5} + + def _next_read(self, identity: str) -> dict: + return {"operation": "read", "target": identity, "snapshot": self.snapshot} + + def _result(self, kind: str, **fields) -> dict: + return {"kind": kind, "purpose": "application", "snapshot": self.snapshot, **fields} + + def read(self, target: str, detail: str = "compact"): + material, unit = self._require(target) + identity = unit.id if unit is not None else material.id + value = self._result( + "application-read-result", + policy={"id": identity, "handle": self._child("policy", identity), + "role": material.role, "level": material.level}, + content=unit.content if unit is not None else material.content, + scope={"kind": "structured", "heading_path": list(unit.heading_path)} if unit else {"kind": "whole-artifact"}, + requires=list(material.requires), specializes=list(material.specializes), + next_operations=[self._next_read(item) for item in dict.fromkeys((*material.requires, *material.specializes))], + ) + if detail == "full": + value["related"] = self.relationships(identity, None, Direction.BOTH, False) + return c.ApplicationReadResult.from_value(value) + + def _scope_targets(self, target: str) -> tuple[str, ...]: + module = self.compiled.corpus.resolve_module(target) + if module is None: + return (target,) + return (module.module_id, *(unit.id for unit in + self.compiled.corpus.policy_unit_corpus.for_module(module.module_id))) + + def relationships(self, target: str, groups, direction: Direction, transitive: bool) -> list[dict]: + selected = {} + for identity in self._scope_targets(target): + if identity not in self.graph.nodes: + continue + if transitive: + pairs = ((step.edge, step.direction) for group in groups + for step in self.graph.traverse_group(identity, group, direction, transitive=True).steps) + else: + views = (self.graph.incoming(identity, groups) if direction is Direction.INCOMING + else self.graph.outgoing(identity, groups) if direction is Direction.OUTGOING + else self.graph.incident(identity, groups)) + pairs = ((view.edge, view.direction) for view in views) + for edge, way in pairs: + key = f"{way.value}:{edge.id}" + selected[key] = {"handle": self._child("relationship", key), + "source": edge.source, "target": edge.target, + "relation": edge.relation, "groups": list(edge.groups), "direction": way.value} + return [selected[key] for key in sorted(selected)] + + def related(self, target: str, groups: tuple[str, ...], direction: str, transitive: bool): + material, unit = self._require(target) + identity = unit.id if unit else material.id + relationships = self.relationships(identity, groups, Direction.parse(direction), transitive) + neighbors = sorted({entry[key] for entry in relationships for key in ("source", "target")} - set(self._scope_targets(identity))) + return c.ApplicationRelatedResult.from_value(self._result( + "application-related-result", target=identity, relationships=relationships, + next_operations=[self._next_read(item) for item in neighbors], + )) + + def inspect(self, handle): + if handle.child_kind == "policy": + return self.read(handle.child_id, "full") + way, _, edge_id = handle.child_id.partition(":") + if way not in {"incoming", "outgoing"}: + raise _UnqualifiedContent() + edge = self.graph.edge(edge_id) + self._require(edge.source) + self._require(edge.target) + target = edge.target if way == "incoming" else edge.source + relationships = [entry for entry in self.relationships(target, tuple(edge.groups), Direction.parse(way), False) + if entry["handle"]["child_id"] == handle.child_id] + return c.ApplicationRelatedResult.from_value(self._result( + "application-related-result", target=target, relationships=relationships, + next_operations=[self._next_read(edge.source), self._next_read(edge.target)], + )) + + def routing_facts(self): + from .agent_navigation import fact_definitions + self._require("router") + return c.ApplicationRoutingFactsResult.from_value(self._result( + "application-routing-facts-result", facts=fact_definitions(self.compiled.router), next_operations=[], + )) + + def route(self, engine, call): + from .agent_navigation import fact_definitions + self._require("router") + _facts, _rules, _ordered, entries, unresolved = engine._routing_selection(self.compiled, call) + reading = [] + for entry in entries: + if entry.state != "selected": + continue + self._require(entry.target) + reading.append({"target": entry.target, "scope": entry.scope.as_contract(), + "authority": entry.authority, "state": "selected"}) + facts = {fact["id"]: fact for fact in fact_definitions(self.compiled.router)} + return c.ApplicationRouteResult.from_value(self._result( + "application-route-result", status="needs-facts" if unresolved else "complete", + reading_plan=reading, unresolved_questions=[{"fact": facts[key]} for key in sorted(unresolved)], + next_operations=[self._next_read(entry["target"]) for entry in reading], + )) + + +def application_dispatch(engine: StandardsEngine, operation: str, call): + call_type = APPLICATION_CALLS.get(operation) + if call_type is None: + return application_rejection("APPLICATION.OPERATION_UNAVAILABLE", "unsupported") + try: + # Native callers obey the same input schema as the transport facade. + checked = call_type.from_value(call.as_contract()) + except (ContractError, AttributeError, TypeError, ValueError): + return application_rejection("APPLICATION.INPUT_INVALID", "invalid") + try: + values = checked.as_contract() + if operation == "inspect": + snapshot = checked.handle.snapshot + elif "snapshot" in values: + snapshot = c.SnapshotHandle.from_value(values["snapshot"]) + else: + captured = engine._capture_snapshot(c.CreateSnapshotCall(kind="create-snapshot")) + if isinstance(captured, c.RejectedResult): + code = "APPLICATION.UNSUPPORTED_CAPTURE" if captured.outcome == "unsupported" else "APPLICATION.INTERNAL_UNAVAILABLE" + return application_rejection(code, captured.outcome) + snapshot = c.SnapshotHandle.from_value(captured.as_contract()["snapshot"]["snapshot"]) + compiled = engine._compiled_snapshot(engine._snapshot_id(snapshot)) + view = ApplicationView(compiled, snapshot) + if operation == "query": + values = checked.request.as_contract() + operation = values.pop("kind") + checked = checked.request + if operation == "read": + return view.read(values["target"], values.get("detail", "compact")) + if operation == "related": + return view.related(values["target"], tuple(values["groups"]), values["direction"], values["transitive"]) + if operation == "route": + return view.route(engine, checked) + if operation == "routing_facts": + return view.routing_facts() + return view.inspect(checked.handle) + except (_UnqualifiedContent, GraphError): + return application_rejection() + except engine._domain_errors() as error: + failure = getattr(error, "failure", None) + if getattr(failure, "outcome", None) == "unsupported": + return application_rejection("APPLICATION.UNSUPPORTED_CAPTURE", "unsupported") + return application_rejection("APPLICATION.INTERNAL_UNAVAILABLE") + + +def qualified_operations(contract: dict, purpose: Purpose | str) -> list[dict]: + """Select canonical operation roots before projecting schemas or examples.""" + selected = Purpose(purpose) + result = [] + for operation in contract["operations"]: + if selected is Purpose.AUTHORING: + result.append(operation) + continue + variant = operation.get("variants", {}).get("application") + if variant is not None: + result.append({"id": operation["id"], "capability": operation["capability"], **variant}) + return result diff --git a/tools/standards_engine/standards_engine/engine.py b/tools/standards_engine/standards_engine/engine.py index e02fb7b9..d079282b 100644 --- a/tools/standards_engine/standards_engine/engine.py +++ b/tools/standards_engine/standards_engine/engine.py @@ -85,6 +85,8 @@ ModuleMetadata, PolicyUnit, RecordingContentSource, + SupportingContent, + load_supporting_content, load_canonical_standards_corpus, markdown_structural_digest, ) @@ -138,6 +140,8 @@ MaintainEvidenceCall, MaintainEvidenceResult, NavigationIndexesResult, + ProvenanceReadResult, + OperationalReadResult, VerifyRepositoryCall, VerifyRepositoryResult, VerifyProposalCall, @@ -214,6 +218,7 @@ authoring_target_id, ) from .navigation_indexes import NavigationIndex +from .context_projection import Purpose, public_operation DEFAULT_STORE = ".standards-engine/snapshots-v1.sqlite3" @@ -229,6 +234,8 @@ class CompiledSnapshot: router: RouterProjection coverage: CoverageDefinitionIndex repository_coverage: RepositoryCoverageDecisions + supporting: SupportingContent + materials: Mapping[str, object] navigation_indexes: tuple[NavigationIndex, ...] = () def semantic_signature(self) -> tuple[object, ...]: @@ -242,6 +249,8 @@ def semantic_signature(self) -> tuple[object, ...]: self.coverage, self.repository_coverage, self.navigation_indexes, + self.supporting, + self.materials, ) @@ -416,9 +425,11 @@ def __init__( repository: GitRepository, snapshots: SnapshotModule, *, + purpose: Purpose | str, execution_context: AnalysisExecutionContext | None = None, temporary_store: tempfile.TemporaryDirectory[str] | None = None, ) -> None: + self._purpose = Purpose(purpose) self._repository = repository self._snapshots = snapshots self._logical_authoring = LogicalAuthoringCompiler(self._compile) @@ -438,8 +449,10 @@ def open_repository( *, durable: bool = True, store_path: Path | None = None, + purpose: Purpose | str, execution_context: AnalysisExecutionContext | None = None, ) -> StandardsEngine: + selected_purpose = Purpose(purpose) selected_root = root.resolve() temporary = None if store_path is None: @@ -451,10 +464,15 @@ def open_repository( return cls( GitRepository(selected_root), SnapshotModule.open(store_path.resolve()), + purpose=selected_purpose, execution_context=execution_context, temporary_store=temporary, ) + @property + def purpose(self) -> Purpose: + return self._purpose + def close(self) -> None: self._snapshots.close() if self._temporary_store is not None: @@ -467,12 +485,18 @@ def __enter__(self) -> StandardsEngine: def __exit__(self, *_: object) -> None: self.close() + @public_operation def create_snapshot( self, call: CreateSnapshotCall + ) -> CreateSnapshotResult | RejectedResult: + return self._capture_snapshot(call) + + def _capture_snapshot( + self, call: CreateSnapshotCall ) -> CreateSnapshotResult | RejectedResult: del call try: - revision = self._repository.current_revision() + revision = self._repository.branch_revision(CANONICAL_TARGET_BRANCH) recording = RecordingContentSource( _GitRevisionSource(self._repository, revision) ) @@ -513,6 +537,7 @@ def create_snapshot( except self._domain_errors() as error: return self._domain_rejection(error) + @public_operation def maintain_evidence( self, call: MaintainEvidenceCall ) -> MaintainEvidenceResult | RejectedResult: @@ -649,6 +674,7 @@ def maintain_evidence( "Evidence maintenance could not complete; inspect working-tree state before retrying.", ) + @public_operation def verify_repository( self, call: VerifyRepositoryCall ) -> VerifyRepositoryResult | RejectedResult: @@ -685,6 +711,7 @@ def verify_repository( "Repository verification could not execute.", ) + @public_operation def verify_proposal( self, call: VerifyProposalCall ) -> VerifyProposalResult | RejectedResult: @@ -771,6 +798,7 @@ def verify_proposal( "Proposal verification could not execute.", ) + @public_operation def find_snapshots( self, call: FindSnapshotsCall ) -> FindSnapshotsResult | RejectedResult: @@ -797,6 +825,7 @@ def find_snapshots( except SnapshotError as error: return self._domain_rejection(error) + @public_operation def create_proposal( self, call: CreateProposalCall ) -> CreateProposalResult | RejectedResult: @@ -815,6 +844,7 @@ def create_proposal( except self._domain_errors() as error: return self._domain_rejection(error) + @public_operation def find_proposals( self, call: FindProposalsCall ) -> FindProposalsResult | RejectedResult: @@ -836,6 +866,7 @@ def find_proposals( except self._domain_errors() as error: return self._domain_rejection(error) + @public_operation def revise_proposal( self, call: ReviseProposalCall ) -> ReviseProposalResult | RejectedResult: @@ -854,6 +885,7 @@ def revise_proposal( except self._domain_errors() as error: return self._domain_rejection(error) + @public_operation def delete_snapshot( self, call: DeleteSnapshotCall ) -> DeleteSnapshotResult | RejectedResult: @@ -869,6 +901,7 @@ def delete_snapshot( except SnapshotError as error: return self._domain_rejection(error) + @public_operation def undelete_snapshot( self, call: UndeleteSnapshotCall ) -> UndeleteSnapshotResult | RejectedResult: @@ -882,71 +915,85 @@ def undelete_snapshot( except SnapshotError as error: return self._domain_rejection(error) + @public_operation def propose(self, call: ProposeCall) -> WorkflowResult | RejectedResult: from .agent_workflow import propose return propose(self, call) + @public_operation def revise(self, call: ReviseCall) -> WorkflowResult | RejectedResult: from .agent_workflow import advance return advance(self, "revise", call) + @public_operation def analyze(self, call: AnalyzeCall) -> WorkflowResult | RejectedResult: from .agent_workflow import advance return advance(self, "analyze", call) + @public_operation def resolve_workflow(self, call: ResolveWorkflowCall) -> WorkflowResult | RejectedResult: from .agent_workflow import advance return advance(self, "resolve_workflow", call) + @public_operation def review(self, call: ReviewCall) -> WorkflowResult | RejectedResult: from .agent_workflow import advance return advance(self, "review", call) + @public_operation def apply(self, call: ApplyCall) -> WorkflowResult | RejectedResult: from .agent_workflow import advance return advance(self, "apply", call) + @public_operation def recover(self, call: RecoverCall) -> WorkflowResult | RejectedResult: from .agent_workflow import advance return advance(self, "recover", call) + @public_operation def workflow_status(self, call: WorkflowStatusCall) -> WorkflowResult | RejectedResult: from .agent_workflow import advance return advance(self, "workflow_status", call) + @public_operation def resume(self, call: ResumeCall) -> WorkflowResult | RejectedResult: from .agent_workflow import advance return advance(self, "resume", call) + @public_operation def route(self, call: RouteCall) -> AgentRouteResult | RejectedResult: from .agent_navigation import navigate return navigate(self, "route", call) + @public_operation def routing_facts(self, call: RoutingFactsCall) -> RoutingFactsResult | RejectedResult: from .agent_navigation import routing_facts return routing_facts(self, call) + @public_operation def read(self, call: ReadCall) -> ReadResult | CompactReadResult | RejectedResult: from .agent_navigation import navigate return navigate(self, "read", call) + @public_operation def related(self, call: RelatedCall) -> RelatedResult | RejectedResult: from .agent_navigation import navigate return navigate(self, "related", call) + @public_operation def query(self, call: QueryCall) -> QueryResult | RejectedResult: try: compiled = self._compiled_snapshot(self._snapshot_id(call.snapshot)) @@ -964,6 +1011,7 @@ def query(self, call: QueryCall) -> QueryResult | RejectedResult: except self._domain_errors() as error: return self._domain_rejection(error) + @public_operation def query_proposal( self, call: QueryProposalCall ) -> QueryProposalResult | RejectedResult: @@ -987,6 +1035,10 @@ def query_proposal( if isinstance(value, RejectedResult) else NavigationIndexesResult.from_value(value) if value["kind"] == "navigation-indexes-result" + else ProvenanceReadResult.from_value(value) + if value["kind"] == "provenance-read-result" + else OperationalReadResult.from_value(value) + if value["kind"] == "operational-read-result" else ProposalReadResult.from_value(value) ) if isinstance(call.request, RelatedRequest): @@ -1004,6 +1056,7 @@ def query_proposal( except self._domain_errors() as error: return self._domain_rejection(error) + @public_operation def analyze_proposal( self, call: AnalyzeProposalCall ) -> PendingResult | CompleteResult | RejectedResult: @@ -1050,6 +1103,7 @@ def analyze_proposal( def _review_requires_change(cls, state: DomainAnalysisState) -> bool: return any(cls._plain(item).get("result") == "requires-change" for item in state.dispositions) + @public_operation def review_proposal( self, call: ReviewProposalCall ) -> ReviewProposalResult | RejectedResult: @@ -1126,6 +1180,7 @@ def review_proposal( except self._domain_errors() as error: return self._domain_rejection(error) + @public_operation def apply_proposal( self, call: ApplyProposalCall ) -> ApplyProposalResult | ApplicationRecoveryRequiredResult | RejectedResult: @@ -1466,6 +1521,7 @@ def _coverage_audit_subjects(revision: ProposalRevision) -> tuple[str, ...]: ) ) + @public_operation def recover_application( self, call: RecoverApplicationCall ) -> RecoverApplicationResult | ApplicationRecoveryRequiredResult | RejectedResult: @@ -1523,6 +1579,7 @@ def recover_application( except self._domain_errors() as error: return self._domain_rejection(error) + @public_operation def prepare( self, call: PrepareCall ) -> PendingResult | CompleteResult | RejectedResult: @@ -1554,6 +1611,7 @@ def prepare( except self._domain_errors() as error: return self._domain_rejection(error) + @public_operation def resolve( self, call: ResolveCall ) -> PendingResult | CompleteResult | RejectedResult: @@ -1564,6 +1622,7 @@ def resolve( except self._domain_errors() as error: return self._domain_rejection(error) + @public_operation def inspect(self, call: InspectCall) -> InspectionResult | RejectedResult: try: handle = call.handle @@ -1646,10 +1705,13 @@ def _compile(source: ContentSource) -> CompiledSnapshot: corpus = load_canonical_standards_corpus(source) impact = compile_policy_impact(source, corpus) + supporting = load_supporting_content(source) graph = standards_navigation_registry( - source, corpus, compiled_policy_impact=impact + source, corpus, compiled_policy_impact=impact, supporting=supporting ) router = load_router_projection(source, corpus.module_corpus) + from .supporting import build_materials + materials = build_materials(source, corpus, impact, router, supporting) coverage = compile_coverage_definitions( corpus, impact, load_coverage_horizon(source, corpus, impact) ) @@ -1662,6 +1724,8 @@ def _compile(source: ContentSource) -> CompiledSnapshot: router, coverage, repository_coverage, + supporting, + materials, load_indexes(source, corpus), ) @@ -1743,6 +1807,7 @@ def _analysis_material( reference: SnapshotMaterialRef | ProjectedRevisionMaterialRef, compiled: CompiledSnapshot, ) -> AnalysisMaterial: + from .supporting import review_authorities return AnalysisMaterial( reference, compiled.source, @@ -1751,6 +1816,7 @@ def _analysis_material( compiled.policy_impact, compiled.coverage, tuple(item.review for item in compiled.navigation_indexes), + review_authorities(compiled), ) def _validate_projected_inputs( @@ -1837,7 +1903,12 @@ def _proposal_change_descriptors( and item.review.representation_digest != before_indexes[item.id].review.representation_digest ) - changes = (*policy_changes, *module_changes, *navigation_changes) + from .supporting import review_authorities + from tools.standards_analysis.standards_analysis import generate_supporting_content_obligations + supporting_changes = tuple( + ChangeDescriptor(ChangeKind.SUPPORTING_CONTENT, (item.target,), (item.target,), scope) + for item in generate_supporting_content_obligations(review_authorities(accepted), review_authorities(proposed))) + changes = (*policy_changes, *module_changes, *navigation_changes, *supporting_changes) if not changes: return derive_change_descriptors( accepted.corpus.policy_unit_corpus, @@ -2683,7 +2754,7 @@ def _analysis_handle(analysis_id: str) -> dict[str, object]: return { "kind": "analysis-handle", "id": analysis_id, - "schema_version": 6, + "schema_version": 7, } @classmethod @@ -2698,7 +2769,7 @@ def _analysis_child_handle( "analysis": cls._analysis_handle(analysis_id), "child_kind": child_kind, "child_id": child_id, - "schema_version": 6, + "schema_version": 7, } @staticmethod @@ -2749,14 +2820,8 @@ def _route( self._route_value(_QueryProjection.snapshot(snapshot), compiled, request) ) - def _route_value( - self, - projection: _QueryProjection, - compiled: CompiledSnapshot, - request: RouteRequest, - *, - explain: bool = False, - ) -> dict[str, object]: + @staticmethod + def _routing_selection(compiled: CompiledSnapshot, request): facts = compiled.router.fact_schema.bind(request.as_contract()["facts"]) selected = set(compiled.router.base_modules) unresolved: set[str] = set() @@ -2826,6 +2891,17 @@ def _route_value( target, compiled.corpus, compiled.graph ), ) + return facts, rule_results, ordered, entries, unresolved + + def _route_value( + self, + projection: _QueryProjection, + compiled: CompiledSnapshot, + request: RouteRequest, + *, + explain: bool = False, + ) -> dict[str, object]: + facts, rule_results, ordered, entries, unresolved = self._routing_selection(compiled, request) reading_plan = [ projection.reading_plan_entry(item.as_contract()) for item in entries ] @@ -2878,6 +2954,10 @@ def _read( if isinstance(value, RejectedResult) else NavigationIndexesResult.from_value(value) if value["kind"] == "navigation-indexes-result" + else ProvenanceReadResult.from_value(value) + if value["kind"] == "provenance-read-result" + else OperationalReadResult.from_value(value) + if value["kind"] == "operational-read-result" else ReadResult.from_value(value) ) @@ -2888,7 +2968,11 @@ def _read_value( request: ReadRequest, ) -> dict[str, object] | RejectedResult: from .navigation_indexes import DIRECTORY + from .supporting import read_supporting + support = read_supporting(compiled, projection, request.target) + if support is not None: + return support if request.target == DIRECTORY or request.target.startswith("navigation."): indexes = tuple( item @@ -3032,6 +3116,9 @@ def _read_value( scope, ), "content": content, + "application_exposure": compiled.supporting.exposure_state(module.module_id, compiled.materials[module.module_id].binding), + "provenance": [item.id for item in compiled.supporting.provenance.values() + if item.subject in {target, module.module_id}], "requires": list(module.requires), "specializes": list(module.specializes), "related": relationships, @@ -3079,6 +3166,14 @@ def _related_value( request: RelatedRequest, ) -> dict[str, object] | RejectedResult: selected = _resolve_policy(compiled.corpus, request.target) + if selected is None and request.target in compiled.supporting.provenance: + relationships = self._relationships_from_targets( + projection, compiled, (request.target,), tuple(request.groups), + Direction.parse(request.direction), request.transitive) + return {**projection.result("related"), "target": request.target, + "policy_unit_mapping": {"state": "incomplete", "reason": "no-policy-units", "policy_units": []}, + "relationships": relationships, "next_operations": [], + "summary": f"Found {len(relationships)} declared relationships."} if selected is None: artifact = compiled.policy_impact.artifacts.get(request.target) if artifact is None: diff --git a/tools/standards_engine/standards_engine/logical_authoring.py b/tools/standards_engine/standards_engine/logical_authoring.py index 8ee3a78a..3c86cd5c 100644 --- a/tools/standards_engine/standards_engine/logical_authoring.py +++ b/tools/standards_engine/standards_engine/logical_authoring.py @@ -367,6 +367,9 @@ def as_contract(self) -> dict[str, object]: def _edit(value: object) -> LogicalEdit: raw = _mapping(value, "logical edit") kind = raw.get("kind") + from .supporting_authoring import SUPPORT_EDIT_KINDS, parse_edit + if kind in SUPPORT_EDIT_KINDS: + return parse_edit(raw) if kind == "revise-policy-unit": return RevisePolicyUnit.from_mapping(raw) if kind == "replace-standard-relationships": @@ -456,7 +459,20 @@ def _edit(value: object) -> LogicalEdit: _text(raw["rationale"], "coverage audit rationale") return _structured(raw, target=policy, facet="coverage-audit") if kind == "revise-standard": - _exact(raw, {"kind", "standard"}, "revise-standard edit") + fields = {"kind", "standard"} | ({"scope_updates"} if "scope_updates" in raw else set()) + _exact(raw, fields, "revise-standard edit") + if "scope_updates" in raw: + if not isinstance(raw["scope_updates"], list): + raise _invalid("AUTHORING.INVALID_SCOPE", "Scope updates require an array.") + for update in raw["scope_updates"]: + update = _mapping(update, "scope update") + _exact(update, {"policy", "heading_path", "semantics"}, "scope update") + _semantic_id(update["policy"], "policy") + if not isinstance(update["heading_path"], list) or not update["heading_path"]: + raise _invalid("AUTHORING.INVALID_SCOPE", "A scope needs a heading path.") + for heading in update["heading_path"]: + _text(heading, "heading") + _semantic_intent(update["semantics"]) standard = _standard_content(raw["standard"]) return _structured(raw, target=str(standard["id"]), facet="standard") if kind == "rewrite-navigation-index": @@ -931,13 +947,18 @@ def compile_current(current: dict[str, bytes]) -> Any: repository_paths = selected_repository_paths for change_set in program.change_sets: before = dict(files) + from .supporting_authoring import SUPPORT_EDIT_KINDS, begin_edits, finish_edits + support_edits = [edit.as_contract() for edit in change_set.edits + if edit.as_contract()["kind"] in SUPPORT_EDIT_KINDS] + begin_edits(files, support_edits, base_compiled, base_snapshot) routing_edits = [ edit.as_contract() for edit in change_set.edits if edit.as_contract()["kind"] in _ROUTING_EDITS ] routing_applied = False - for edit in sorted(change_set.edits, key=_projection_order): + for edit in sorted((edit for edit in change_set.edits + if edit.as_contract()["kind"] not in SUPPORT_EDIT_KINDS), key=_projection_order): if edit.as_contract()["kind"] in _ROUTING_EDITS: if not routing_applied: _edit_routing(files, routing_edits) @@ -950,6 +971,7 @@ def compile_current(current: dict[str, bytes]) -> Any: base_snapshot, compile_current, ) + finish_edits(files, support_edits, base_compiled, base_snapshot, compile_current) if files == before and not any( edit.as_contract()["kind"] == "audit-policy-unit" for edit in change_set.edits @@ -1017,7 +1039,7 @@ def _apply_edit( elif kind == "create-standard": self._create_standard(files, raw) elif kind == "revise-standard": - self._revise_standard(files, raw) + self._revise_standard(files, raw, base_compiled.corpus) elif kind == "rewrite-navigation-index": from .navigation_indexes import rewrite_index @@ -1120,6 +1142,7 @@ def _create_standard( def _revise_standard( files: dict[str, bytes], edit: Mapping[str, object], + base_corpus: Any, ) -> None: corpus = load_canonical_standards_corpus(FrozenContentSource(files)) standard = _mapping(edit["standard"], "standard content") @@ -1142,6 +1165,23 @@ def _revise_standard( module.specializes, module.path, ) + if "scope_updates" in edit: + updates = edit["scope_updates"] + units = corpus.policy_unit_corpus.for_module(module.module_id) + if ({item["policy"] for item in updates} != {unit.id for unit in units} + or len(updates) != len(units)): + raise _invalid("AUTHORING.SCOPE_DISPOSITIONS_REQUIRED", + "A whole-module rescope addresses each registered policy exactly once.") + by_id = {unit.id: unit for unit in units} + for update in updates: + unit = by_id[update["policy"]] + active, retired = _policy_sidecar(files[unit.source]) + declaration = _active_declaration(active, unit.id) + declaration["heading_path"] = list(update["heading_path"]) + declaration["semantic_revision"] = _semantic_revision( + unit.id, unit, update["semantics"], base_corpus) + files[unit.source] = _render_policy_sidecar(active, retired) + @staticmethod def _replace_standard_relationships( @@ -1900,16 +1940,16 @@ def _semantic_revision( if ( semantics["accepted_semantic_revision"] != accepted.semantic_revision or semantics["proposed_semantic_revision"] != accepted.semantic_revision + 1 - or current.semantic_revision != accepted.semantic_revision + or current.semantic_revision not in {accepted.semantic_revision, accepted.semantic_revision + 1} ): raise _invalid( "AUTHORING.INVALID_SEMANTIC_REVISION", "semantic change must bind the base accepted revision and its single proposed successor", ) - # A1c keeps the accepted semantic revision in the proposed corpus. The - # requested successor is carried separately by SemanticProposal until an - # accepted application materializes it. - return accepted.semantic_revision + # The proposed corpus is the exact publication candidate. Its declared + # revision already carries the reviewed successor, so publication does not + # rewrite metadata or invalidate application/provenance bindings afterward. + return int(semantics["proposed_semantic_revision"]) def _impact_registry(content: bytes) -> dict[str, object]: @@ -2257,28 +2297,35 @@ def _semantic_proposals( compiled: Any, program: LogicalProgram, ) -> tuple[dict[str, object], ...]: - semantic_intents: dict[str, tuple[int | None, str]] = {} + # Revision equality is an explicit preservation decision; a next revision + # declares changed meaning. Both bind exact candidate structure for review. + semantic_intents: dict[str, tuple[int | None, int, str]] = {} + + def retain(policy: str, semantics: Mapping[str, object]) -> None: + if semantics["kind"] == "change": + semantic_intents[policy] = ( + int(semantics["accepted_semantic_revision"]), + int(semantics["proposed_semantic_revision"]), str(semantics["intent"]), + ) + elif policy not in semantic_intents: + revision = int(semantics["semantic_revision"]) + semantic_intents[policy] = (revision, revision, str(semantics["intent"])) + for change_set in program.change_sets: for edit in change_set.edits: if isinstance(edit, RevisePolicyUnit): - if edit.semantics["kind"] == "change": - semantic_intents[edit.policy] = ( - int(edit.semantics["accepted_semantic_revision"]), - str(edit.semantics["intent"]), - ) + retain(edit.policy, edit.semantics) elif isinstance(edit, StructuredEdit): raw = edit.as_contract() if raw["kind"] == "create-standard": - for unit_value in raw["policy_units"]: # type: ignore[union-attr] + for unit_value in raw["policy_units"]: unit = _mapping(unit_value, "new policy unit") - semantic_intents[str(unit["id"])] = (None, str(unit["intent"])) + semantic_intents[str(unit["id"])] = (None, 1, str(unit["intent"])) + elif raw["kind"] == "revise-standard": + for update in raw.get("scope_updates", []): + retain(update["policy"], update["semantics"]) elif raw["kind"] == "move-policy-unit": - semantics = _mapping(raw["semantics"], "policy semantic intent") - if semantics["kind"] == "change": - semantic_intents[str(raw["policy"])] = ( - int(semantics["accepted_semantic_revision"]), - str(semantics["intent"]), - ) + retain(str(raw["policy"]), _mapping(raw["semantics"], "policy semantic intent")) base_corpus = base_compiled.corpus proposed_corpus = compiled.corpus proposals: list[dict[str, object]] = [] @@ -2301,8 +2348,11 @@ def _semantic_proposals( ) if semantic is None: continue - accepted_revision, intent = semantic - expected_revision = 1 if accepted is None else accepted.semantic_revision + 1 + accepted_revision, proposed_revision, intent = semantic + allowed_revisions = {1} if accepted is None else { + accepted.semantic_revision, accepted.semantic_revision + 1} + if proposed_revision not in allowed_revisions: + raise _invalid("AUTHORING.INVALID_SEMANTIC_REVISION", "Bind preservation or the next semantic revision.") if accepted_revision != ( None if accepted is None else accepted.semantic_revision ): @@ -2310,17 +2360,16 @@ def _semantic_proposals( "AUTHORING.INVALID_SEMANTIC_REVISION", f"semantic intent for {policy!r} does not bind the base revision", ) - corpus_revision = 1 if accepted is None else accepted.semantic_revision - if proposed.semantic_revision != corpus_revision: + if proposed.semantic_revision != proposed_revision: raise _invalid( "AUTHORING.INVALID_SEMANTIC_REVISION", - f"proposed corpus for {policy!r} must retain accepted revision {corpus_revision}", + f"proposed corpus for {policy!r} must contain declared revision {proposed_revision}", ) proposals.append( { "policy": policy, "accepted_semantic_revision": accepted_revision, - "proposed_semantic_revision": expected_revision, + "proposed_semantic_revision": proposed_revision, "intent": intent, "structural_digest": proposed.structural_digest, } diff --git a/tools/standards_engine/standards_engine/mcp.py b/tools/standards_engine/standards_engine/mcp.py index acd1e155..06a95c75 100644 --- a/tools/standards_engine/standards_engine/mcp.py +++ b/tools/standards_engine/standards_engine/mcp.py @@ -15,6 +15,7 @@ from typing import TextIO from .tools import AgentToolFacade +from .context_projection import Purpose, qualified_operations PROTOCOL_VERSION = "2025-11-25" @@ -90,6 +91,16 @@ } +APPLICATION_DESCRIPTIONS = { + "route": "Select applicable guidance from registered facts and a complete qualified dependency closure. Reuse the returned snapshot.", + "read": "Read a reviewed standard, example, or operational aid by identity. Full detail adds permitted relationships.", + "related": "Discover selected relationships among qualified guidance and examples in one snapshot.", + "routing_facts": "Read the reviewed vocabulary for routing a task. Supply known facts and retain unresolved conditions.", + "query": "Route, read, or traverse qualified guidance within the supplied snapshot.", + "inspect": "Inspect a permitted policy or relationship handle within its captured snapshot.", +} + + def schema_closure(root: dict, definitions: dict) -> dict: """Make a standalone schema containing only reachable local definitions.""" selected: dict = {} @@ -112,15 +123,16 @@ def visit(value: object) -> None: return {**root, "$defs": selected} -def tool_catalog(root: Path, *, advanced: bool = False) -> list[dict]: +def tool_catalog(root: Path, *, purpose: Purpose | str, advanced: bool = False) -> list[dict]: contract = json.loads((root / CONTRACT_PATH).read_text(encoding="utf-8")) definitions = contract["$defs"] result = [] - for operation in contract["operations"]: + purpose = Purpose(purpose) + for operation in qualified_operations(contract, purpose): name = operation["id"] if not advanced and name not in FOCUSED_OPERATIONS: continue - description = DESCRIPTIONS[name] + description = APPLICATION_DESCRIPTIONS[name] if purpose is Purpose.APPLICATION else DESCRIPTIONS[name] if name in INPUT_CONTRACT_DESCRIPTIONS: schema = schema_closure( definitions[operation["input_definition"]], definitions @@ -137,7 +149,7 @@ def tool_catalog(root: Path, *, advanced: bool = False) -> list[dict]: { "name": name, "description": description, - "annotations": {"readOnlyHint": name in READ_ONLY_OPERATIONS}, + "annotations": {"readOnlyHint": purpose is Purpose.APPLICATION or name in READ_ONLY_OPERATIONS}, "inputSchema": input_schema( definitions[operation["input_definition"]], definitions ), @@ -193,14 +205,19 @@ def __init__(self, code: int, message: str) -> None: class MCPServer: - def __init__(self, root: Path, *, advanced: bool = False) -> None: + def __init__(self, root: Path, *, purpose: Purpose | str, advanced: bool = False) -> None: self.root = root.resolve() + self._purpose = Purpose(purpose) self.advanced = advanced - self.tools = tool_catalog(self.root, advanced=advanced) + self.tools = tool_catalog(self.root, purpose=self.purpose, advanced=advanced) self.names = {tool["name"] for tool in self.tools} self.initialized = False self.ready = False + @property + def purpose(self) -> Purpose: + return self._purpose + def dispatch(self, message: object) -> dict | None: identifier = None try: @@ -253,8 +270,10 @@ def _request(self, method: str, params: dict) -> dict: return { "protocolVersion": PROTOCOL_VERSION, "capabilities": {"tools": {"listChanged": False}}, - "serverInfo": {"name": "standards-engine", "version": "0.1.0"}, + "serverInfo": {"name": "standards-engine", "version": "0.2.0"}, "instructions": ( + "Use route and read to obtain applicable guidance. Reuse returned snapshots for consistent observations." + if self.purpose is Purpose.APPLICATION else "Use explicit routing facts and preserve opaque handles. Follow typed Engine outcomes and next_operations. Standards mutations belong to the Engine. Recovery-required continues through recover with the same context, never an apply retry." + ( " Native advanced operations use recover_application with readiness." @@ -281,10 +300,12 @@ def _request(self, method: str, params: dict) -> dict: # Opening per call matches the reference transport and avoids keeping # store state alive across idle client sessions. No operation retries. with redirect_stdout(sys.stderr): - with AgentToolFacade.open_repository(self.root) as facade: + with AgentToolFacade.open_repository(self.root, purpose=self.purpose) as facade: value = getattr(facade, name)(arguments) except Exception: traceback.print_exc(file=sys.stderr) + if self.purpose is Purpose.APPLICATION: + return {"isError": True, "content": [{"type": "text", "text": "Application observation is unavailable; operator diagnostics retain the failure."}]} return { "isError": True, "content": [ @@ -304,7 +325,7 @@ def _request(self, method: str, params: dict) -> dict: return { "structuredContent": value, "content": [{"type": "text", "text": json.dumps(value)}], - "isError": value.get("kind") == "rejected-result" + "isError": value.get("kind") in {"rejected-result", "application-rejected-result"} or value.get("status") == "rejected", } @@ -331,14 +352,15 @@ def main() -> int: description="Serve Standards Engine tools over MCP stdio." ) parser.add_argument("--repo-root", type=Path, default=Path.cwd()) + parser.add_argument("--purpose", choices=[value.value for value in Purpose], required=True) parser.add_argument( "--advanced", action="store_true", - help="Expose the complete native and focused catalog.", + help="Expose additional operations within the configured purpose.", ) arguments = parser.parse_args() serve( - MCPServer(arguments.repo_root, advanced=arguments.advanced), + MCPServer(arguments.repo_root, purpose=arguments.purpose, advanced=arguments.advanced), sys.stdin, sys.stdout, ) diff --git a/tools/standards_engine/standards_engine/rendering.py b/tools/standards_engine/standards_engine/rendering.py index d08c2e7a..485234f4 100644 --- a/tools/standards_engine/standards_engine/rendering.py +++ b/tools/standards_engine/standards_engine/rendering.py @@ -11,6 +11,12 @@ def render_text(value: ContractValue | Mapping[str, object]) -> str: """Render a deterministic human projection of one typed engine result.""" contract = value.as_contract() if hasattr(value, "as_contract") else dict(value) kind = str(contract.get("kind", "unknown")) + if contract.get("purpose") == "application": + import json + return json.dumps(contract, ensure_ascii=False, indent=2) + "\n" + if kind in {"provenance-read-result", "operational-read-result"}: + import json + return json.dumps(contract, ensure_ascii=False, indent=2) + "\n" if kind == "fact-observation": return _observation(contract) if kind.endswith("-inspection-result"): diff --git a/tools/standards_engine/standards_engine/supporting.py b/tools/standards_engine/standards_engine/supporting.py new file mode 100644 index 00000000..c30e020e --- /dev/null +++ b/tools/standards_engine/standards_engine/supporting.py @@ -0,0 +1,169 @@ +"""Compose captured standard and operational-aid material for review and use.""" +from __future__ import annotations + +from dataclasses import dataclass +from types import MappingProxyType +from typing import Mapping, TYPE_CHECKING + +from tools.standards_metadata.standards_metadata import ( + CanonicalStandardsCorpus, ContentSource, MetadataError, MetadataFailure, + PolicyUnit, PolicyUnitTombstone, SupportingContent, content_digest, +) +from tools.standards_policy_impact.standards_policy_impact import CompiledPolicyImpactSet, thaw + +if TYPE_CHECKING: + from .engine import CompiledSnapshot + + +@dataclass(frozen=True, slots=True) +class ContentMaterial: + id: str + role: str + level: str + path: str + content: str + binding: str + requires: tuple[str, ...] = () + specializes: tuple[str, ...] = () + + +def material_error(message: str) -> MetadataError: + return MetadataError(MetadataFailure("SUPPORT.INVALID_BINDING", "invalid", message)) + + +def build_materials(source: ContentSource, corpus: CanonicalStandardsCorpus, + impact: CompiledPolicyImpactSet, router: object, + supporting: SupportingContent) -> Mapping[str, ContentMaterial]: + """Capture complete eligible source units; policy reads inherit their module.""" + from .agent_navigation import fact_definitions + materials = {} + for module in corpus.modules: + text = source.read_bytes(module.path).decode("utf-8") + record = { + "id": module.module_id, "role": module.role, "level": module.level, + "content": text, + "policy_units": [unit.as_declaration() for unit in corpus.policy_unit_corpus.for_module(module.module_id)], + } + if module.module_id == "router": + record["routing"] = { + "facts": fact_definitions(router), + "base_modules": list(router.base_modules), + "rules": [{"id": rule.id, "target": rule.target, + "when": rule.program.as_expression()} for rule in router.rules], + } + materials[module.module_id] = ContentMaterial( + module.module_id, module.role, module.level, module.path, + text, content_digest(record), module.requires, module.specializes, + ) + for artifact in impact.artifacts.values(): + if artifact.artifact_kind not in {"prompt", "template"}: + continue + if artifact.id in materials: + raise material_error("Operational aids and standards have distinct identities.") + text = source.read_bytes(artifact.repository_path).decode("utf-8") + # Operational aids consume selected policy owners. Binding their owners' + # exact content prevents a stale prompt from outliving a material rule edit. + owners = [] + for semantics in impact.semantics.values(): + if semantics.consumer != artifact.id: + continue + owner = corpus.resolve_policy_unit(semantics.source) + if not isinstance(owner, PolicyUnit): + raise material_error("Operational-aid relationships require active policy owners.") + owners.append({"policy": owner.id, "binding": owner.representation_digest, + "declaration": owner.as_declaration(), + "source_scope": thaw(semantics.source_scope), + "consumer_scope": thaw(semantics.consumer_scope), + "relation": semantics.relation, + "applicability": semantics.applicability_program.as_expression()}) + binding = content_digest({"id": artifact.id, "kind": artifact.artifact_kind, + "authority": artifact.authority, "content": text, + "owners": sorted(owners, key=lambda item: (item["policy"], item["relation"]))}) + materials[artifact.id] = ContentMaterial( + artifact.id, artifact.artifact_kind, "REFERENCE", artifact.repository_path, + text, binding, + ) + for target in supporting.exposure: + if target not in materials: + raise material_error("Application exposure requires a complete registered content unit.") + for record in supporting.provenance.values(): + if record.id in materials or corpus.resolve_policy_unit(record.id) is not None: + raise material_error("Decision provenance has a distinct identity namespace.") + subject = corpus.resolve_module(record.subject) or corpus.resolve_policy_unit(record.subject) + if (subject is None or isinstance(subject, PolicyUnitTombstone)) and not record.retired: + raise material_error("Active provenance requires a canonical subject.") + identity = getattr(subject, "module_id", getattr(subject, "id", None)) + if subject is not None and identity != record.subject: + raise material_error("Provenance subjects use canonical identities rather than aliases.") + return MappingProxyType(materials) + + +def subject_binding(compiled: CompiledSnapshot, subject: str) -> str: + module = compiled.corpus.resolve_module(subject) + if module is not None and module.module_id == subject: + return compiled.materials[subject].binding + unit = compiled.corpus.resolve_policy_unit(subject) + if isinstance(unit, PolicyUnit) and unit.id == subject: + return content_digest({"id": unit.id, "content": unit.content, + "declaration": unit.as_declaration()}) + raise material_error("Provenance requires an active canonical standard or policy unit.") + + +def record_state(compiled: CompiledSnapshot, record: object) -> str: + if record.retired: + return "retired" + return "current" if record.subject_binding == subject_binding(compiled, record.subject) else "needs-review" + + +def resolve_material(compiled: CompiledSnapshot, target: str) -> tuple[ContentMaterial, PolicyUnit | None] | None: + module = compiled.corpus.resolve_module(target) + if module is not None: + return compiled.materials[module.module_id], None + unit = compiled.corpus.resolve_policy_unit(target) + if isinstance(unit, PolicyUnit): + return compiled.materials[unit.module], unit + artifact = compiled.policy_impact.artifacts.get(target) + if artifact is None: + artifact = next((item for item in compiled.policy_impact.artifacts.values() + if target in item.aliases), None) + if artifact is not None and artifact.id in compiled.materials: + return compiled.materials[artifact.id], None + return None + + +def review_authorities(compiled: CompiledSnapshot): + """Bind local support review to material without relabelling it as policy.""" + from tools.standards_analysis.standards_analysis import SupportingContentAuthority + result = [] + for record in compiled.supporting.provenance.values(): + representation = content_digest(record.as_contract()) + subject = {"state": "retired"} if record.retired else {"binding": subject_binding(compiled, record.subject)} + result.append(SupportingContentAuthority( + record.id, representation, content_digest({"record": record.as_contract(), "subject": subject}))) + for entry in compiled.supporting.exposure.values(): + material = compiled.materials[entry.target] + result.append(SupportingContentAuthority( + f"application-exposure:{entry.target}", content_digest(entry.as_contract()), + content_digest({"declaration": entry.as_contract(), "material": material.binding}))) + for material in compiled.materials.values(): + if material.role in {"prompt", "template"}: + result.append(SupportingContentAuthority( + f"operational-aid:{material.id}", content_digest(material.content), material.binding)) + return tuple(sorted(result, key=lambda item: item.id)) + + +def read_supporting(compiled: CompiledSnapshot, projection, target: str): + """Authoring-only read forms for records and registered operational aids.""" + record = compiled.supporting.provenance.get(target) + if record is not None: + return {"kind": "provenance-read-result", "authority": projection.authority.as_contract(), + "record": record.as_contract(), "state": record_state(compiled, record), "next_operations": []} + selected = resolve_material(compiled, target) + if selected is None or selected[0].role not in {"prompt", "template"}: + return None + material = selected[0] + return {"kind": "operational-read-result", "authority": projection.authority.as_contract(), + "target": projection.authoring_target(material.id), "canonical_id": material.id, + "role": material.role, "content": material.content, + "application_exposure": compiled.supporting.exposure_state(material.id, material.binding), + "next_operations": []} diff --git a/tools/standards_engine/standards_engine/supporting_authoring.py b/tools/standards_engine/standards_engine/supporting_authoring.py new file mode 100644 index 00000000..2552fa0d --- /dev/null +++ b/tools/standards_engine/standards_engine/supporting_authoring.py @@ -0,0 +1,130 @@ +"""Supporting-content edits staged inside the existing atomic logical change.""" +from __future__ import annotations + +from dataclasses import replace +from typing import Mapping + +from tools.standards_metadata.standards_metadata import ( + APPLICATION_CONTENT, DECISION_PROVENANCE, ApplicationExposure, DecisionProvenance, + FrozenContentSource, load_supporting_content, +) +from .supporting import subject_binding + +SUPPORT_EDIT_KINDS = frozenset({"put-provenance", "retire-provenance", + "approve-application-content", "withdraw-application-content", + "revise-operational-artifact"}) + + +def parse_edit(raw: Mapping[str, object]): + from .logical_authoring import (_exact, _mapping, _text, _semantic_id, + _relationship_consumer, _structured, _evidence_list, _invalid) + kind = raw["kind"] + if kind == "put-provenance": + _exact(raw, {"kind", "record"}, kind) + record = _mapping(raw["record"], "provenance") + optional = {"assumptions", "limits", "alternatives", "reconsideration", "supersedes"} + required = {"id", "subject", "origin", "rationale", "evidence"} + if not required <= record.keys() or set(record) - required - optional: + raise _invalid("AUTHORING.INVALID_PROVENANCE", "Provenance fields are incomplete or unsupported.") + identity = _semantic_id(record["id"], "provenance ID") + _semantic_id(record["subject"], "provenance subject") + if record["origin"] not in {"documented-original", "reconstructed-history", "current-justification", "unrecorded"}: + raise _invalid("AUTHORING.INVALID_PROVENANCE", "Select a declared provenance origin.") + if record["origin"] == "unrecorded" and record["rationale"] == "": + pass + else: + _text(record["rationale"], "rationale") + if not isinstance(record["evidence"], list): + raise _invalid("AUTHORING.INVALID_PROVENANCE", "Evidence must be a reference array.") + if record["evidence"]: + record["evidence"] = [item.as_contract() for item in _evidence_list(record["evidence"], "provenance evidence")] + for field in optional & record.keys(): + if not isinstance(record[field], list): + raise _invalid("AUTHORING.INVALID_PROVENANCE", "Optional sections must be arrays.") + for value in record[field]: + _text(value, field) + return _structured({"kind": kind, "record": record}, target=identity, facet="provenance") + if kind == "retire-provenance": + _exact(raw, {"kind", "id"}, kind) + return _structured(raw, target=_semantic_id(raw["id"], "provenance ID"), facet="provenance") + if kind in {"approve-application-content", "withdraw-application-content"}: + _exact(raw, {"kind", "target"}, kind) + target = _relationship_consumer(raw["target"]) + return _structured(raw, target=target if isinstance(target, str) else target["id"], facet="application-exposure") + _exact(raw, {"kind", "target", "title", "body"}, kind) + target = _relationship_consumer(raw["target"]) + if isinstance(target, str): + raise _invalid("AUTHORING.TARGET_HANDLE_REQUIRED", "Operational aids use a returned authoring target.") + title = _text(raw["title"], "title") + if "\n" in title or "\r" in title: + raise _invalid("AUTHORING.INVALID_TITLE", "Operational titles occupy one line.") + _text(raw["body"], "body") + return _structured(raw, target=target["id"], facet="operational-aid") + + +def _write(files, records, entries): + from .logical_authoring import _toml_inline + files[DECISION_PROVENANCE] = ("schema_version = 1\nrecords = " + + _toml_inline([records[key].as_contract() for key in sorted(records)]) + "\n").encode("utf-8") + files[APPLICATION_CONTENT] = ("schema_version = 1\nentries = " + + _toml_inline([entries[key].as_contract() for key in sorted(entries)]) + "\n").encode("utf-8") + + +def begin_edits(files, edits, base, snapshot): + """Prepare private staging for retirements/repointing before owner edits.""" + from .logical_authoring import _resolve_consumer, _invalid + if not edits: + return + support = load_supporting_content(FrozenContentSource(files)) + records, entries = dict(support.provenance), dict(support.exposure) + changed = False + for edit in edits: + kind = edit["kind"] + if kind in {"retire-provenance", "put-provenance"}: + identity = edit["id"] if kind == "retire-provenance" else edit["record"]["id"] + if identity in records: + records[identity] = replace(records[identity], retired=True) + changed = True + elif kind == "retire-provenance": + raise _invalid("AUTHORING.PROVENANCE_UNAVAILABLE", "Retirement requires an existing provenance record.") + elif kind == "withdraw-application-content": + target = _resolve_consumer(edit["target"], base, snapshot) + if target not in entries: + raise _invalid("AUTHORING.EXPOSURE_UNAVAILABLE", "Withdrawal requires an existing exposure declaration.") + del entries[target] + changed = True + if changed: + _write(files, records, entries) + + +def finish_edits(files, edits, base, snapshot, compile_current): + from .logical_authoring import _resolve_consumer, _invalid, _unsupported + if not edits: + return + for edit in edits: + if edit["kind"] != "revise-operational-artifact": + continue + target = _resolve_consumer(edit["target"], base, snapshot) + artifact = base.policy_impact.artifacts.get(target) + if artifact is None or artifact.artifact_kind not in {"prompt", "template"}: + raise _unsupported("AUTHORING.OPERATIONAL_TARGET_REQUIRED", "Select a registered prompt or template.") + # Registration owns the path. Requests supply neither paths nor raw files. + files[artifact.repository_path] = f"# {edit['title']}\n\n{edit['body'].rstrip()}\n".encode("utf-8") + current = compile_current(files) + records, entries = dict(current.supporting.provenance), dict(current.supporting.exposure) + for edit in edits: + if edit["kind"] == "put-provenance": + raw = dict(edit["record"]) + raw["subject_binding"] = subject_binding(current, raw["subject"]) + record = DecisionProvenance.from_mapping(raw) + records[record.id] = record + elif edit["kind"] == "approve-application-content": + target = _resolve_consumer(edit["target"], base, snapshot) + material = current.materials.get(target) + if material is None: + raise _invalid("AUTHORING.EXPOSURE_TARGET_REQUIRED", "Qualify a complete module or registered operational aid.") + entries[target] = ApplicationExposure(target, material.binding) + if edits: + _write(files, records, entries) + # The caller compiles the entire final set, including same-set references, + # before publishing an immutable proposal revision. diff --git a/tools/standards_engine/standards_engine/tools.py b/tools/standards_engine/standards_engine/tools.py index 2bb8223b..b3fe4647 100644 --- a/tools/standards_engine/standards_engine/tools.py +++ b/tools/standards_engine/standards_engine/tools.py @@ -32,6 +32,7 @@ from . import _generated_contract as generated_contract from ._generated_contract import decode_contract from .engine import StandardsEngine +from .context_projection import Purpose, application_rejection from ._generated_contract import ( MaintainEvidenceCall, VerifyRepositoryCall, @@ -131,7 +132,10 @@ def __init__(self, engine: StandardsEngine, contracts: CompiledContracts) -> Non self._engine = engine self._contracts = contracts self._operations = { - operation.id: operation for operation in contracts.interface.operations + operation.id: (operation.select_variant("application") + if engine.purpose is Purpose.APPLICATION else operation) + for operation in contracts.interface.operations + if engine.purpose is Purpose.AUTHORING or "application" in operation.variants } schema = contracts.schema self._handle_versions = self._derive_handle_versions(schema) @@ -139,17 +143,18 @@ def __init__(self, engine: StandardsEngine, contracts: CompiledContracts) -> Non operation.id: self._concrete_model_types( schema, operation.result_definitions ) - for operation in contracts.interface.operations + for operation in self._operations.values() } @classmethod - def open_repository(cls, root: Path) -> AgentToolFacade: + def open_repository(cls, root: Path, *, purpose: Purpose | str) -> AgentToolFacade: repo_root = root.resolve() engine = StandardsEngine.open_repository( repo_root, execution_context=AnalysisExecutionContext( LocalAlwaysAllowAuthorizer(repo_root) ), + purpose=purpose, ) try: return cls(engine, _contracts(repo_root)) @@ -377,13 +382,19 @@ def inspect(self, arguments: object) -> dict[str, object]: def _call_or_rejection( self, operation: str, arguments: object, expected_type: type ) -> object: + if self._engine.purpose is Purpose.APPLICATION and operation not in self._operations: + return application_rejection("APPLICATION.OPERATION_UNAVAILABLE", "unsupported").as_contract() try: return self._decode_call(operation, arguments, expected_type) except InterfaceVersionError as error: + if self._engine.purpose is Purpose.APPLICATION: + return application_rejection("APPLICATION.UNSUPPORTED_CAPTURE", "unsupported").as_contract() return self._rejected( "INTERFACE.UNSUPPORTED_VERSION", "unsupported", str(error) ) except (ContractError, KeyError, TypeError, ValueError) as error: + if self._engine.purpose is Purpose.APPLICATION: + return application_rejection("APPLICATION.INPUT_INVALID", "invalid").as_contract() return self._rejected("INTERFACE.INVALID_ARGUMENTS", "invalid", str(error)) def _decode_call(self, operation: str, arguments: object, expected_type): @@ -391,6 +402,7 @@ def _decode_call(self, operation: str, arguments: object, expected_type): value = self._mapping(arguments) self._require_supported_handle_versions(value) call = decode_contract(contract.input_definition, value) + expected_type = generated_contract.MODEL_TYPES[contract.input_definition] if not isinstance(call, expected_type): raise RuntimeError( f"generated {contract.input_definition} decoder returned the wrong type" diff --git a/tools/standards_engine/tests/codex_navigation_client.py b/tools/standards_engine/tests/codex_navigation_client.py index c000768d..641f2cad 100644 --- a/tools/standards_engine/tests/codex_navigation_client.py +++ b/tools/standards_engine/tests/codex_navigation_client.py @@ -1,10 +1,11 @@ """Check configured MCP schemas/navigation through Codex without a model turn. Run with the locked Engine Python from the repository root. Requires the Codex -CLI and a standards-engine MCP configuration pointing at this checkout. Creates +CLI and an authoring-purpose MCP configuration pointing at this checkout. Creates an ephemeral client thread, captures a standards snapshot, and reads policy. """ +import argparse import asyncio import json import sys @@ -15,7 +16,7 @@ ROOT = Path(__file__).resolve().parents[3] -async def main(): +async def main(server_name): with tempfile.TemporaryFile(mode="w+") as log: process = await asyncio.create_subprocess_exec( "codex", @@ -65,7 +66,7 @@ async def request(method, params): tid = thread["thread"]["id"] inventory = await request("mcpServerStatus/list", {"threadId": tid}) server = next( - s for s in inventory["data"] if s["name"] == "standards-engine" + s for s in inventory["data"] if s["name"] == server_name ) toolmap = server["tools"] print("Codex tools:", sorted(toolmap), flush=True) @@ -76,16 +77,14 @@ async def request(method, params): "purpose", "edits", } - assert ( - len( - shape["properties"]["change_set"]["properties"]["edits"]["items"][ - "oneOf" - ] - ) - == 15 - ) + canonical = json.loads((ROOT / "tools/standards_engine/contracts/a1-contract.schema.json").read_text()) + variants = canonical["$defs"]["StandardEdit"]["oneOf"] + assert len(shape["properties"]["change_set"]["properties"]["edits"]["items"]["oneOf"]) == len(variants) + assert {"PutDecisionProvenanceEdit", "RetireDecisionProvenanceEdit", + "ApproveApplicationContentEdit", "WithdrawApplicationContentEdit", + "ReviseOperationalArtifactEdit"} <= {item["$ref"].rsplit("/", 1)[-1] for item in variants} print( - "Codex authoring schema: purpose, edits, 15 inline edit variants", + f"Codex authoring schema: purpose, edits, {len(variants)} inline edit variants", flush=True, ) for name in ("propose", "revise", "resolve_workflow"): @@ -102,7 +101,7 @@ async def request(method, params): "provider_contract_version", } if name != "resolve_workflow": - assert len(documented["$defs"]["StandardEdit"]["oneOf"]) == 15 + assert documented["$defs"]["StandardEdit"]["oneOf"] == variants print( "Codex descriptions: exact nested edit/evidence contracts preserved", flush=True, @@ -113,7 +112,7 @@ async def call(name, arguments): "mcpServer/tool/call", { "threadId": tid, - "server": "standards-engine", + "server": server_name, "tool": name, "arguments": arguments, }, @@ -152,4 +151,7 @@ async def call(name, arguments): if __name__ == "__main__": - asyncio.run(main()) + parser = argparse.ArgumentParser(description=__doc__) + parser.add_argument("--server", default="standards-authoring", help="Configured authoring-purpose MCP registration") + arguments = parser.parse_args() + asyncio.run(main(arguments.server)) diff --git a/tools/standards_engine/tests/mcp_workflow_client.py b/tools/standards_engine/tests/mcp_workflow_client.py index 6725cd81..db3e4215 100644 --- a/tools/standards_engine/tests/mcp_workflow_client.py +++ b/tools/standards_engine/tests/mcp_workflow_client.py @@ -43,7 +43,7 @@ async def walkthrough(engine_python, pending_only=False): raise SystemExit(main()) """) - def parameters(interrupted=False): + def parameters(interrupted=False, *, purpose="authoring"): launch = ( [str(interrupted_server)] if interrupted @@ -51,7 +51,7 @@ def parameters(interrupted=False): ) return StdioServerParameters( command=engine_python, - args=["-P", *launch, "--repo-root", str(repo)], + args=["-P", *launch, "--purpose", purpose, "--repo-root", str(repo)], env={**os.environ, "PYTHONPATH": str(ROOT)}, ) @@ -226,6 +226,55 @@ async def call(client, name, arguments, *, error=False): ) assert "Revised fixture text." in readback["content"] + change = reference_change(repo, "purpose-client") + selected = change["edits"][0]["standard"]["id"] + change["edits"][0]["requires"] = [] + change["edits"].extend([ + {"kind": "approve-application-content", "target": selected}, + {"kind": "put-provenance", "record": { + "id": "provenance.purpose-client", "subject": selected, + "origin": "current-justification", "rationale": "AUTHORING_SDK_MARKER_843015", + "evidence": [evidence(repo)], + }}, + ]) + pending = await call(client, "propose", {"change_set": change}) + seen = set() + while pending["status"] == "needs-action": + key = json.dumps(pending["context"], sort_keys=True) + assert key not in seen, pending + seen.add(key) + assert not pending["outcome"].get("fact_requirements"), pending + obligation = next(item for item in pending["outcome"]["obligations"] if item["state"] == "required") + assert "impact-disposition" in obligation["permitted_submissions"], pending + pending = await call(client, "resolve_workflow", { + "context": pending["context"], "submission": { + "kind": "impact-disposition", "obligation": obligation["handle"], + "fingerprint": obligation["fingerprint"], "result": "confirmed", + "rationale": "The isolated SDK fixture approves this exact supporting change.", + "evidence": [evidence(repo)], + }, + }) + assert pending["status"] == "complete", pending + ready = await call(client, "review", {"context": pending["context"], "decisions": decisions(repo)}) + published = await call(client, "apply", {"context": ready["context"]}) + assert published["status"] == "applied", published + author_reason = await call(client, "read", {"target": "provenance.purpose-client"}) + assert author_reason["record"]["rationale"] == "AUTHORING_SDK_MARKER_843015" + + async with stdio_client(parameters(purpose="application")) as streams: + async with ClientSession(*streams, read_timeout_seconds=timedelta(seconds=600)) as client: + await client.initialize() + application_catalog = await client.list_tools() + application_names = {tool.name for tool in application_catalog.tools} + assert {"route", "read", "related", "routing_facts", "inspect"} <= application_names + assert application_names <= {"route", "read", "related", "routing_facts", "inspect", "query"} + visible = await call(client, "read", {"target": selected, "detail": "full"}) + assert visible["kind"] == "application-read-result", visible + assert "This is an isolated workflow test reference." in visible["content"] + assert "AUTHORING_SDK_MARKER_843015" not in json.dumps(visible) + hidden = await call(client, "read", {"target": "provenance.purpose-client"}, error=True) + assert hidden["code"] == "APPLICATION.CONTENT_UNAVAILABLE", hidden + return { "client": "official MCP Python SDK", "focused_tools": len(names), @@ -242,6 +291,9 @@ async def call(client, name, arguments, *, error=False): "accepted_text_readback": True, "stale_context_rejected": True, "resume_explicit": True, + "purpose_separated_catalog": True, + "application_readback": True, + "decision_provenance_isolated": True, } diff --git a/tools/standards_engine/tests/platform_harness.py b/tools/standards_engine/tests/platform_harness.py index 706a8ec7..0ea1ac6a 100644 --- a/tools/standards_engine/tests/platform_harness.py +++ b/tools/standards_engine/tests/platform_harness.py @@ -218,6 +218,7 @@ def produce(repository: Path, store: Path, manifest_path: Path) -> dict[str, obj repository, store_path=store, execution_context=AnalysisExecutionContext(HarnessAuthorizer()), + purpose="authoring", ) facade = _FacadeSession(engine) try: @@ -405,7 +406,7 @@ def _concurrent_probe( def probe(repository: Path, store: Path, manifest_path: Path) -> dict[str, object]: manifest = _load_manifest(manifest_path) - engine = StandardsEngine.open_repository(repository, store_path=store) + engine = StandardsEngine.open_repository(repository, store_path=store, purpose="authoring") facade = _FacadeSession(engine) try: snapshot = manifest["snapshot"] @@ -440,7 +441,7 @@ def consume(store: Path, manifest_path: Path) -> dict[str, object]: _verify_store(store, manifest) with tempfile.TemporaryDirectory() as temporary: repository = _temporary_repository(Path(temporary)) - engine = StandardsEngine.open_repository(repository, store_path=store) + engine = StandardsEngine.open_repository(repository, store_path=store, purpose="authoring") facade = _FacadeSession(engine) try: snapshot = manifest["snapshot"] diff --git a/tools/standards_engine/tests/test_agent_navigation.py b/tools/standards_engine/tests/test_agent_navigation.py index bc241439..57766f1a 100644 --- a/tools/standards_engine/tests/test_agent_navigation.py +++ b/tools/standards_engine/tests/test_agent_navigation.py @@ -16,7 +16,7 @@ class AgentNavigationTest(unittest.TestCase): @classmethod def setUpClass(cls): - cls.engine = StandardsEngine.open_repository(ROOT, durable=False) + cls.engine = StandardsEngine.open_repository(ROOT, durable=False, purpose="authoring") cls.facade = AgentToolFacade(cls.engine, _contracts(ROOT)) cls.created = cls.facade.create_snapshot({"kind": "create-snapshot"}) assert cls.created["kind"] == "create-snapshot-result", cls.created @@ -175,7 +175,7 @@ def test_related_matches_native_permissions_and_projection(self): def test_focused_read_continuations_are_callable_against_exact_snapshot(self): from tools.standards_engine.standards_engine.mcp import tool_catalog - catalog = {item["name"] for item in tool_catalog(ROOT)} + catalog = {item["name"] for item in tool_catalog(ROOT, purpose="authoring")} native = self.facade.query( { "snapshot": self.snapshot, diff --git a/tools/standards_engine/tests/test_agent_workflow.py b/tools/standards_engine/tests/test_agent_workflow.py index 769a6234..338ac2e9 100644 --- a/tools/standards_engine/tests/test_agent_workflow.py +++ b/tools/standards_engine/tests/test_agent_workflow.py @@ -24,6 +24,11 @@ def prepare_repository(destination): ["git", "clone", "--quiet", "--no-hardlinks", str(ROOT), str(destination)], check=True, ) + branch = subprocess.check_output( + ["git", "branch", "--show-current"], cwd=destination, text=True + ).strip() + if branch != "main": + subprocess.run(["git", "branch", "-m", "main"], cwd=destination, check=True) for path in ( "a1-interface.toml", "a1-contract.schema.json", @@ -96,6 +101,7 @@ def setUpClass(cls): execution_context=AnalysisExecutionContext( LocalAlwaysAllowAuthorizer(cls.root) ), + purpose="authoring", ) cls.facade = AgentToolFacade(cls.engine, _contracts(cls.root)) result = cls.facade.create_snapshot({"kind": "create-snapshot"}) @@ -183,7 +189,7 @@ def test_context_is_immutable_existing_identity_and_foreign_records_reject(self) self.facade.workflow_status({"context": context})["kind"], "rejected-result", ) - with StandardsEngine.open_repository(self.root, durable=False) as foreign: + with StandardsEngine.open_repository(self.root, durable=False, purpose="authoring") as foreign: facade = AgentToolFacade(foreign, _contracts(self.root)) self.assertEqual( facade.workflow_status({"context": created["context"]})["kind"], @@ -192,7 +198,7 @@ def test_context_is_immutable_existing_identity_and_foreign_records_reject(self) def test_review_is_explicit_and_current_authorization_is_required(self): created = self.propose("review") - with StandardsEngine.open_repository(self.root) as denied_engine: + with StandardsEngine.open_repository(self.root, purpose="authoring") as denied_engine: denied = AgentToolFacade(denied_engine, _contracts(self.root)).review( {"context": created["context"], "decisions": decisions(self.root)} ) diff --git a/tools/standards_engine/tests/test_analysis.py b/tools/standards_engine/tests/test_analysis.py index fa252684..945ce03b 100644 --- a/tools/standards_engine/tests/test_analysis.py +++ b/tools/standards_engine/tests/test_analysis.py @@ -283,6 +283,7 @@ def setUpClass(cls) -> None: REPO_ROOT, store_path=cls.store, execution_context=AnalysisExecutionContext(ExactAuthorizer()), + purpose="authoring", ) created = cls.engine.create_snapshot( CreateSnapshotCall.from_value({"kind": "create-snapshot"}) @@ -307,6 +308,7 @@ def test_apply_proposal_composes_real_verification_and_cold_readback( repository, store_path=store, execution_context=context, + purpose="authoring", ) facade = AgentToolFacade(engine, _contracts(repository)) try: @@ -459,6 +461,7 @@ def test_apply_proposal_composes_real_verification_and_cold_readback( repository, store_path=store, execution_context=context, + purpose="authoring", ) try: cold_facade = AgentToolFacade(reopened, _contracts(repository)) @@ -510,6 +513,7 @@ def test_apply_create_and_retire_owns_topology_and_commit(self) -> None: repository, store_path=store, execution_context=context, + purpose="authoring", ) facade = AgentToolFacade(engine, _contracts(repository)) standard_path = "topics/logical-application-test.md" @@ -691,6 +695,7 @@ def assert_commit( repository, store_path=store, execution_context=context, + purpose="authoring", ) facade = AgentToolFacade(engine, _contracts(repository)) self.assertEqual( @@ -825,6 +830,7 @@ def assert_commit( repository, store_path=store, execution_context=context, + purpose="authoring", ) facade = AgentToolFacade(engine, _contracts(repository)) self.assertEqual( @@ -936,6 +942,7 @@ def test_proposal_analysis_derives_inputs_and_replays_exact_revision(self) -> No REPO_ROOT, store_path=self.store, execution_context=AnalysisExecutionContext(ExactAuthorizer()), + purpose="authoring", ) try: replayed = reopened._evaluate(reopened._load_analysis(initial.handle)) @@ -1126,6 +1133,7 @@ def test_relationship_only_proposals_enter_a1c_and_replay_cold(self) -> None: REPO_ROOT, store_path=self.store, execution_context=AnalysisExecutionContext(ExactAuthorizer()), + purpose="authoring", ) try: replayed = reopened._evaluate(reopened._load_analysis(results[0].handle)) @@ -1851,7 +1859,7 @@ def test_state_and_children_are_inspectable_in_a_fresh_process(self) -> None: request = json.loads(sys.stdin.read()) engine = StandardsEngine.open_repository( - Path(request["root"]), store_path=Path(request["store"]) + Path(request["root"]), store_path=Path(request["store"]), purpose="authoring" ) try: result = [ @@ -1910,6 +1918,7 @@ def compile_with_extra_replay_read(source): engine = StandardsEngine.open_repository( REPO_ROOT, store_path=Path(temporary) / "standards.sqlite3", + purpose="authoring", ) try: with mock.patch.object( @@ -1949,7 +1958,7 @@ def test_cold_load_rejects_obsolete_domain_contracts(self) -> None: { "kind": "analysis-handle", "id": state.analysis_id, - "schema_version": 6, + "schema_version": 7, } ) @@ -1973,7 +1982,7 @@ def prepare(self, *, prior: dict[str, object] | None = None): } ], "semantic_proposals": [], - "contract_version": 5, + "contract_version": 6, } if prior is not None: request["prior_analysis"] = prior diff --git a/tools/standards_engine/tests/test_authoring.py b/tools/standards_engine/tests/test_authoring.py index 403ada7e..e9ddd7e4 100644 --- a/tools/standards_engine/tests/test_authoring.py +++ b/tools/standards_engine/tests/test_authoring.py @@ -107,7 +107,7 @@ def _authoring( def _engine_with_stub_authoring(snapshots: SnapshotModule) -> StandardsEngine: - engine = StandardsEngine(object(), snapshots) # type: ignore[arg-type] + engine = StandardsEngine(object(), snapshots, purpose="authoring") # type: ignore[arg-type] engine._authoring = _authoring(snapshots) return engine @@ -608,7 +608,7 @@ def test_create_and_find_are_durable_through_the_public_facade(self) -> None: from tools.standards_engine.standards_engine import AgentToolFacade request = json.loads(sys.stdin.read()) -with AgentToolFacade.open_repository(Path(request["root"])) as facade: +with AgentToolFacade.open_repository(Path(request["root"]), purpose="authoring") as facade: print(json.dumps(facade.find_proposals({"kind": "find-proposals"}), sort_keys=True)) """ environment = dict(os.environ) @@ -921,7 +921,7 @@ def test_discovery_rejects_the_old_revision_contract_as_unsupported(self) -> Non AggregateRecord(revision_id, "proposal-revision", payload, (base,)), ) with AgentToolFacade( - StandardsEngine(object(), snapshots), # type: ignore[arg-type] + StandardsEngine(object(), snapshots, purpose="authoring"), # type: ignore[arg-type] _contracts(REPOSITORY_ROOT), ) as facade: rejected = facade.find_proposals({"kind": "find-proposals"}) diff --git a/tools/standards_engine/tests/test_coverage_publication.py b/tools/standards_engine/tests/test_coverage_publication.py index d9358540..84c2b10f 100644 --- a/tools/standards_engine/tests/test_coverage_publication.py +++ b/tools/standards_engine/tests/test_coverage_publication.py @@ -28,6 +28,7 @@ def test_review_verify_apply_recover_and_read_without_original_database(self): repository, store_path=root / "engine.sqlite3", execution_context=context, + purpose="authoring", ) as engine: facade = AgentToolFacade(engine, _contracts(repository)) initial = facade.verify_repository( @@ -207,6 +208,7 @@ def test_review_verify_apply_recover_and_read_without_original_database(self): repository, store_path=root / "independent.sqlite3", execution_context=context, + purpose="authoring", ) as cold: facade = AgentToolFacade(cold, _contracts(repository)) captured = facade.create_snapshot({"kind": "create-snapshot"}) diff --git a/tools/standards_engine/tests/test_evidence_maintenance.py b/tools/standards_engine/tests/test_evidence_maintenance.py index 57e9327f..852e7f67 100644 --- a/tools/standards_engine/tests/test_evidence_maintenance.py +++ b/tools/standards_engine/tests/test_evidence_maintenance.py @@ -257,6 +257,7 @@ def test_preview_and_overlap_preserve_working_tree_then_apply_retires(self): execution_context=AnalysisExecutionContext( LocalAlwaysAllowAuthorizer(repository) ), + purpose="authoring", ) as engine: facade = AgentToolFacade(engine, _contracts(repository)) refreshed = facade.verify_repository( diff --git a/tools/standards_engine/tests/test_generated_contract.py b/tools/standards_engine/tests/test_generated_contract.py index f1b6e071..a0b979a3 100644 --- a/tools/standards_engine/tests/test_generated_contract.py +++ b/tools/standards_engine/tests/test_generated_contract.py @@ -23,6 +23,7 @@ ) from tools.standards_engine.standards_engine import AgentToolFacade, StandardsEngine from tools.standards_engine.standards_engine import _generated_contract as generated +from tools.standards_engine.standards_engine.context_projection import Purpose REPO_ROOT = Path(__file__).resolve().parents[3] @@ -45,7 +46,7 @@ def test_coverage_read_is_scoped_optional_and_uses_repository_authority(self): ) from tools.standards_engine.standards_engine.tools import _contracts - with StandardsEngine.open_repository(REPO_ROOT, durable=False) as engine: + with StandardsEngine.open_repository(REPO_ROOT, durable=False, purpose="authoring") as engine: facade = AgentToolFacade(engine, _contracts(REPO_ROOT)) created = facade.create_snapshot({"kind": "create-snapshot"}) self.assertEqual(created["kind"], "create-snapshot-result", created) @@ -114,7 +115,7 @@ def test_verification_is_exposed_without_publication_and_refresh_is_explicit(sel ) from tools.standards_engine.standards_engine.tools import _contracts - with StandardsEngine.open_repository(REPO_ROOT, durable=False) as engine: + with StandardsEngine.open_repository(REPO_ROOT, durable=False, purpose="authoring") as engine: facade = AgentToolFacade(engine, _contracts(REPO_ROOT)) with ( mock.patch.object( @@ -149,6 +150,7 @@ def test_missing_verification_input_returns_a_typed_rejection(self): with StandardsEngine.open_repository( REPO_ROOT, durable=False, execution_context=AnalysisExecutionContext(LocalAlwaysAllowAuthorizer(REPO_ROOT)), + purpose="authoring", ) as engine: facade = AgentToolFacade(engine, _contracts(REPO_ROOT)) with mock.patch( @@ -169,7 +171,7 @@ def test_missing_verification_input_returns_a_typed_rejection(self): def test_router_read_exposes_editable_definitions_only_when_requested(self): from tools.standards_engine.standards_engine.tools import _contracts - with StandardsEngine.open_repository(REPO_ROOT, durable=False) as engine: + with StandardsEngine.open_repository(REPO_ROOT, durable=False, purpose="authoring") as engine: facade = AgentToolFacade(engine, _contracts(REPO_ROOT)) created = facade.create_snapshot({"kind": "create-snapshot"}) self.assertEqual(created["kind"], "create-snapshot-result", created) @@ -259,11 +261,11 @@ def test_router_read_exposes_editable_definitions_only_when_requested(self): self.assertEqual(observed["condition"], rule["condition"]) def test_local_facade_binds_always_allow_authorization(self) -> None: - engine = SimpleNamespace(close=lambda: None) + engine = SimpleNamespace(close=lambda: None, purpose=Purpose.AUTHORING) with mock.patch.object( StandardsEngine, "open_repository", return_value=engine ) as open_repository: - facade = AgentToolFacade.open_repository(REPO_ROOT) + facade = AgentToolFacade.open_repository(REPO_ROOT, purpose="authoring") self.assertIs(facade._engine, engine) context = open_repository.call_args.kwargs["execution_context"] @@ -338,7 +340,7 @@ def test_local_evidence_rejects_missing_files_and_wrong_digests(self): def test_interface_operations_bind_generated_calls_results_and_facade(self) -> None: schema, interface = _canonical_contracts() contracts = compile_contracts(schema, interface) - facade = AgentToolFacade(object(), contracts) + facade = AgentToolFacade(SimpleNamespace(purpose=Purpose.AUTHORING), contracts) for operation in contracts.interface.operations: with self.subTest(operation=operation.id): self.assertEqual( @@ -373,6 +375,7 @@ def test_prepare_facade_passes_the_complete_generated_call(self) -> None: (), ) engine = SimpleNamespace( + purpose=Purpose.AUTHORING, prepare=lambda call: observed.append(call) or rejected, ) facade = AgentToolFacade(engine, contracts) diff --git a/tools/standards_engine/tests/test_logical_authoring.py b/tools/standards_engine/tests/test_logical_authoring.py index 28d6a5db..00efc346 100644 --- a/tools/standards_engine/tests/test_logical_authoring.py +++ b/tools/standards_engine/tests/test_logical_authoring.py @@ -275,6 +275,67 @@ def test_compiler_projects_module_relationships_through_current_owners( self.assertEqual(projection.analysis_module_ids, ("topic.architecture",)) self.assertNotIn("path", change_set.as_contract()["edits"][0]) + def test_whole_module_rescope_preserves_identity_and_explicit_meaning(self): + module = self.compiled.corpus.resolve_module("topic.architecture") + units = self.compiled.corpus.policy_unit_corpus.for_module(module.module_id) + original = dict(self.base.files)[module.path].decode() + body = original.split(f"- Canonical owner: `{module.path}`\n\n", 1)[1] + selected = "topic.architecture.composed-design-admission" + body = body.replace("## Composed Design Admission", "## Composed Artifact Review", 1) + edit = {"kind": "revise-standard", "standard": { + "id": module.module_id, "title": original.splitlines()[0].removeprefix("# "), + "role": module.role, "level": module.level, "applies_when": module.applies_when, + "does_not_apply_when": module.excludes, "verification": module.verification, "body": body, + }, "scope_updates": [{ + "policy": unit.id, + "heading_path": ["Composed Artifact Review"] if unit.id == selected else list(unit.heading_path), + "semantics": {"kind": "preserve", "semantic_revision": unit.semantic_revision, + "intent": "Retain the exact obligation while revising its heading."}, + } for unit in units]} + projected = LogicalAuthoringCompiler(StandardsEngine._compile).compile( + self.base, LogicalProgram((self.change_set([edit]),)), + base_repository_paths=self.repository_paths, + ) + changed = projected.compiled.corpus.policy_unit_corpus.active_by_id(selected) + self.assertEqual(changed.heading_path, ("Composed Artifact Review",)) + self.assertEqual(changed.semantic_revision, 1) + self.assertEqual({unit.id for unit in projected.compiled.corpus.policy_unit_corpus.for_module(module.module_id)}, {unit.id for unit in units}) + for intent in projected.semantic_proposals: + self.assertEqual(intent["accepted_semantic_revision"], intent["proposed_semantic_revision"]) + invalid = {**edit, "scope_updates": edit["scope_updates"][:-1]} + with self.assertRaises(AuthoringError) as rejected: + LogicalAuthoringCompiler(StandardsEngine._compile).compile( + self.base, LogicalProgram((self.change_set([invalid]),)), + base_repository_paths=self.repository_paths, + ) + self.assertEqual(rejected.exception.failure.code, "AUTHORING.SCOPE_DISPOSITIONS_REQUIRED") + + def test_supporting_records_and_withdrawal_use_the_final_candidate(self): + from tools.standards_engine.standards_engine.supporting import record_state + standard = self.new_standard_edit() + identity = standard["standard"]["id"] + initial = self.change_set([ + {"kind": "approve-application-content", "target": identity}, + {"kind": "put-provenance", "record": { + "id": "provenance.logical-fixture", "subject": identity, + "origin": "unrecorded", "rationale": "", "evidence": [], + }}, standard, + ]) + compiler = LogicalAuthoringCompiler(StandardsEngine._compile) + first = compiler.compile(self.base, LogicalProgram((initial,)), base_repository_paths=self.repository_paths) + record = first.compiled.supporting.provenance["provenance.logical-fixture"] + self.assertEqual(record_state(first.compiled, record), "current") + self.assertEqual(first.compiled.supporting.exposure_state(identity, first.compiled.materials[identity].binding), "current") + withdrawal = self.change_set([ + {"kind": "withdraw-application-content", "target": identity}, + {"kind": "retire-provenance", "id": record.id}, + ]) + second = compiler.compile(self.base, LogicalProgram((initial, withdrawal)), base_repository_paths=self.repository_paths) + self.assertEqual(second.compiled.supporting.exposure_state(identity, second.compiled.materials[identity].binding), "unreviewed") + self.assertTrue(second.compiled.supporting.provenance[record.id].retired) + self.assertFalse(first.compiled.supporting.provenance[record.id].retired) + self.assertEqual(first.compiled.materials[identity].binding, second.compiled.materials[identity].binding) + def test_compiler_revises_one_registered_policy_and_derives_analysis_input( self, ) -> None: @@ -318,7 +379,7 @@ def test_compiler_revises_one_registered_policy_and_derives_analysis_input( ) self.assertIsNotNone(unit) assert unit is not None - self.assertEqual(unit.semantic_revision, 1) + self.assertEqual(unit.semantic_revision, 2) self.assertEqual( unit.content, "## Composed Design Admission\n\n" + content, @@ -420,7 +481,8 @@ def test_move_preserves_identity_and_relocates_relationship_authority(self) -> N assert unit is not None self.assertEqual(unit.module, "topic.contracts") self.assertEqual(unit.semantic_revision, 1) - self.assertEqual(projection.semantic_proposals, ()) + self.assertEqual(projection.semantic_proposals[0]["accepted_semantic_revision"], 1) + self.assertEqual(projection.semantic_proposals[0]["proposed_semantic_revision"], 1) self.assertEqual( { item.declaration_source @@ -505,7 +567,7 @@ def test_whole_standard_revision_requires_companion_policy_semantics(self) -> No ) proposed = projection.compiled.corpus.policy_unit_corpus.active_by_id(unit.id) assert proposed is not None - self.assertEqual(proposed.semantic_revision, 1) + self.assertEqual(proposed.semantic_revision, 2) self.assertIn("whenever a material design", proposed.content) self.assertEqual( projection.semantic_proposals, diff --git a/tools/standards_engine/tests/test_mcp.py b/tools/standards_engine/tests/test_mcp.py index 4b8bab61..3d5e26da 100644 --- a/tools/standards_engine/tests/test_mcp.py +++ b/tools/standards_engine/tests/test_mcp.py @@ -52,7 +52,7 @@ def initialize(server): class MCPTest(unittest.TestCase): def test_catalog_schemas_validate_authored_examples_and_resolve_refs(self): - catalog = {tool["name"]: tool for tool in tool_catalog(ROOT, advanced=True)} + catalog = {tool["name"]: tool for tool in tool_catalog(ROOT, advanced=True, purpose="authoring")} contract = json.loads( ( ROOT / "tools/standards_engine/contracts/generated/agent-tools.json" @@ -88,7 +88,7 @@ def check_refs(value): Draft202012Validator(tool["inputSchema"]).validate(example["value"]) def test_default_catalog_focuses_navigation_and_workflows(self): - catalog = {t["name"] for t in tool_catalog(ROOT)} + catalog = {t["name"] for t in tool_catalog(ROOT, purpose="authoring")} self.assertTrue( { "route", @@ -101,7 +101,7 @@ def test_default_catalog_focuses_navigation_and_workflows(self): ) self.assertNotIn("query", catalog) self.assertNotIn("apply_proposal", catalog) - server = MCPServer(ROOT) + server = MCPServer(ROOT, purpose="authoring") initialize(server) self.assertEqual( server.dispatch(request("tools/call", {"name": "query"}))["error"]["code"], @@ -109,7 +109,7 @@ def test_default_catalog_focuses_navigation_and_workflows(self): ) def test_authoring_inputs_expose_structure_and_preserve_recursive_validation(self): - catalog = {tool["name"]: tool for tool in tool_catalog(ROOT)} + catalog = {tool["name"]: tool for tool in tool_catalog(ROOT, purpose="authoring")} generated = json.loads( ( ROOT / "tools/standards_engine/contracts/generated/agent-tools.json" @@ -177,7 +177,7 @@ def test_authoring_description_carries_exact_contract_without_type_rendering(sel ROOT / "tools/standards_engine/contracts/generated/agent-tools.json" ).read_text() ) - catalog = {t["name"]: t for t in tool_catalog(ROOT)} + catalog = {t["name"]: t for t in tool_catalog(ROOT, purpose="authoring")} for name in ("propose", "revise", "resolve_workflow"): operation = next(op for op in generated["operations"] if op["id"] == name) documented = json.loads( @@ -197,7 +197,7 @@ def test_authoring_description_carries_exact_contract_without_type_rendering(sel {"id", "digest", "provider_contract", "provider_contract_version"}, ) if name != "resolve_workflow": - self.assertEqual(len(documented["$defs"]["StandardEdit"]["oneOf"]), 15) + self.assertEqual(documented["$defs"]["StandardEdit"], generated["$defs"]["StandardEdit"]) Draft202012Validator.check_schema(documented) def test_input_projection_preserves_reference_siblings(self): @@ -211,7 +211,7 @@ def test_input_projection_preserves_reference_siblings(self): self.assertFalse(validator.is_valid(invalid)) def test_default_guidance_uses_available_recovery_tools(self): - server = MCPServer(ROOT) + server = MCPServer(ROOT, purpose="authoring") instructions = initialize(server)["result"]["instructions"] self.assertNotIn("recover_application", instructions) self.assertIn("recover", instructions) @@ -234,7 +234,7 @@ def test_default_guidance_uses_available_recovery_tools(self): facade.recover.assert_not_called() def test_lifecycle_and_protocol_errors_never_open_engine(self): - server = MCPServer(ROOT, advanced=True) + server = MCPServer(ROOT, advanced=True, purpose="authoring") with patch.object(AgentToolFacade, "open_repository") as opened: self.assertEqual( server.dispatch(request("tools/list"))["error"]["code"], -32000 @@ -258,7 +258,7 @@ def test_lifecycle_and_protocol_errors_never_open_engine(self): opened.assert_not_called() def test_preserves_typed_outcomes_and_never_retries(self): - server = MCPServer(ROOT, advanced=True) + server = MCPServer(ROOT, advanced=True, purpose="authoring") initialize(server) for kind in ( "pending-result", @@ -289,7 +289,7 @@ def test_preserves_typed_outcomes_and_never_retries(self): opened.return_value.__exit__.assert_called_once() def test_internal_failure_is_tool_error_without_retry(self): - server = MCPServer(ROOT, advanced=True) + server = MCPServer(ROOT, advanced=True, purpose="authoring") initialize(server) with ( patch.object(AgentToolFacade, "open_repository") as opened, @@ -306,9 +306,9 @@ def test_internal_failure_is_tool_error_without_retry(self): facade.recover_application.assert_not_called() def test_real_snapshot_read_and_validation_through_server(self): - server = MCPServer(ROOT, advanced=True) + server = MCPServer(ROOT, advanced=True, purpose="authoring") initialize(server) - with StandardsEngine.open_repository(ROOT, durable=False) as engine: + with StandardsEngine.open_repository(ROOT, durable=False, purpose="authoring") as engine: facade = AgentToolFacade(engine, _contracts(ROOT)) # The context manager normally owns a durable store per request. # Keep this test's in-memory store open across both calls. @@ -365,7 +365,7 @@ def test_real_snapshot_read_and_validation_through_server(self): def test_parse_errors_and_notifications_keep_stream_synchronized(self): output = io.StringIO() serve( - MCPServer(ROOT, advanced=True), + MCPServer(ROOT, advanced=True, purpose="authoring"), io.StringIO( "bad json\n" + json.dumps({"jsonrpc": "2.0", "method": "notifications/cancelled"}) @@ -399,6 +399,8 @@ def test_module_stdio_launch_from_unrelated_working_directory(self): "-P", "-m", "tools.standards_engine.standards_engine.mcp", + "--purpose", + "authoring", "--repo-root", str(ROOT), ], diff --git a/tools/standards_engine/tests/test_navigation.py b/tools/standards_engine/tests/test_navigation.py index 90b03566..d83bd540 100644 --- a/tools/standards_engine/tests/test_navigation.py +++ b/tools/standards_engine/tests/test_navigation.py @@ -98,6 +98,7 @@ def setUpClass(cls) -> None: cls.engine = StandardsEngine.open_repository( REPO_ROOT, store_path=Path(cls.temporary.name) / "standards.sqlite3", + purpose="authoring", ) created = cls.engine.create_snapshot( CreateSnapshotCall.from_value({"kind": "create-snapshot"}) @@ -288,7 +289,7 @@ def test_live_worktree_mutation_cannot_change_snapshot_reads(self) -> None: ) engine = StandardsEngine.open_repository( root, store_path=Path(temporary) / "standards.sqlite3" - ) + , purpose="authoring") try: created = engine.create_snapshot( CreateSnapshotCall.from_value({"kind": "create-snapshot"}) diff --git a/tools/standards_engine/tests/test_navigation_indexes.py b/tools/standards_engine/tests/test_navigation_indexes.py index aef5b553..ad252b6f 100644 --- a/tools/standards_engine/tests/test_navigation_indexes.py +++ b/tools/standards_engine/tests/test_navigation_indexes.py @@ -143,7 +143,7 @@ def setUpClass(cls): shutil.copyfile(ROOT / relative, cls.root / relative) cls.seed_legacy_fixture() subprocess.run(["git", "add", "--all"], cwd=cls.root, check=True) - with AgentToolFacade.open_repository(cls.root) as fixture_facade: + with AgentToolFacade.open_repository(cls.root, purpose="authoring") as fixture_facade: refreshed = fixture_facade.verify_repository( {"kind": "verify-repository", "refresh_verification_inputs": True} ) @@ -164,7 +164,7 @@ def setUpClass(cls): cwd=cls.root, check=True, ) - cls.facade = AgentToolFacade.open_repository(cls.root) + cls.facade = AgentToolFacade.open_repository(cls.root, purpose="authoring") directory = cls.facade.read({"target": "navigation-indexes"}) assert directory["kind"] == "navigation-indexes-result", directory cls.frontend = next( @@ -383,6 +383,8 @@ def test_fresh_mcp_process_exposes_snapshot_bound_navigation(self): "-P", "-m", "tools.standards_engine.standards_engine.mcp", + "--purpose", + "authoring", "--repo-root", str(self.root), ], diff --git a/tools/standards_engine/tests/test_purpose_projection.py b/tools/standards_engine/tests/test_purpose_projection.py new file mode 100644 index 00000000..81b30f5f --- /dev/null +++ b/tools/standards_engine/tests/test_purpose_projection.py @@ -0,0 +1,250 @@ +"""Focused exposure evidence over captured content and the actual SQLite store.""" +from __future__ import annotations + +from dataclasses import replace +import json +from pathlib import Path +import tempfile +import unittest +from unittest.mock import patch + +from tools.standards_engine.standards_engine import AgentToolFacade, StandardsEngine +from tools.standards_engine.standards_engine import _generated_contract as c +from tools.standards_engine.standards_engine.context_projection import ApplicationView, Purpose +from tools.standards_engine.standards_engine.logical_authoring import _toml_inline +from tools.standards_engine.standards_engine.tools import _contracts +from tools.standards_engine.standards_engine.supporting import subject_binding +from tools.standards_engine.tests.test_logical_authoring import _CurrentFilesWithFreshSuiteDigests +from tools.standards_metadata.standards_metadata import ( + APPLICATION_CONTENT, DECISION_PROVENANCE, FrozenContentSource, RecordingContentSource, file_digest, +) +from tools.standards_snapshots.standards_snapshots import CapturedContent, SnapshotFile, SnapshotPath + +ROOT = Path(__file__).resolve().parents[3] +PRIVATE = "AUTHORING_ONLY_ORIGIN_673591" +PUBLIC = "APPROVED_OPERATIONAL_RULE_184237" + + +def refresh(files): + key = "evaluation/standards-effectiveness/generated/suite-inputs.json" + raw = json.loads(files[key]) + for row in raw["files"]: + if row["state"] == "present" and row["path"] in files: + row["digest"] = file_digest(files[row["path"]]) + for row in raw["suites"]: + if row["path"] in files: + row["digest"] = file_digest(files[row["path"]]) + raw["registry"]["digest"] = file_digest(files[raw["registry"]["path"]]) + files[key] = (json.dumps(raw, ensure_ascii=False, indent=2, sort_keys=True) + "\n").encode() + return FrozenContentSource(files) + + +def compile_files(files): + return StandardsEngine._compile(refresh(dict(files))) + + +class PurposeProjectionTest(unittest.TestCase): + @classmethod + def setUpClass(cls): + capture = RecordingContentSource(_CurrentFilesWithFreshSuiteDigests(ROOT)) + StandardsEngine._compile(capture) + cls.original = dict(capture.freeze().files) + files = dict(cls.original) + files["CORE-STANDARDS.md"] += ("\n" + PUBLIC + "\n").encode() + compiled = compile_files(files) + reference = next(module for module in compiled.corpus.modules if module.role == "reference") + cls.reference = reference.module_id + eligible = {"core", "router", reference.module_id} + pending = list(eligible) + while pending: + material = compiled.materials[pending.pop()] + for dependency in (*material.requires, *material.specializes): + if dependency not in eligible: + eligible.add(dependency); pending.append(dependency) + entries = [{"target": key, "binding": compiled.materials[key].binding} for key in sorted(eligible)] + records = [{"id": "provenance.fixture", "subject": "core", "subject_binding": subject_binding(compiled, "core"), + "origin": "current-justification", "rationale": PRIVATE, "evidence": []}] + files[APPLICATION_CONTENT] = ("schema_version = 1\nentries = " + _toml_inline(entries) + "\n").encode() + files[DECISION_PROVENANCE] = ("schema_version = 1\nrecords = " + _toml_inline(records) + "\n").encode() + cls.files = dict(refresh(files).files) + cls.compiled = compile_files(cls.files) + cls.temporary = tempfile.TemporaryDirectory(prefix="purpose-projection-") + cls.store_path = Path(cls.temporary.name) / "engine.sqlite3" + cls.engine = StandardsEngine.open_repository(ROOT, purpose="application", store_path=cls.store_path) + captured = cls.engine._snapshots.create_snapshot(CapturedContent("test-fixture", ( + SnapshotFile(SnapshotPath.parse(path), value) for path, value in cls.files.items()))) + cls.snapshot = cls.engine._snapshot_handle(captured.snapshot) + cls.facade = AgentToolFacade(cls.engine, _contracts(ROOT)) + + @classmethod + def tearDownClass(cls): + cls.engine.close(); cls.temporary.cleanup() + + def read(self, **fields): + return self.facade.read({"snapshot": self.snapshot, "target": "core", **fields}) + + def test_read_has_exact_reviewed_content_and_explicit_permitted_fields(self): + for detail in ("compact", "full"): + value = self.read(detail=detail) + self.assertEqual(value["kind"], "application-read-result", value) + self.assertEqual(value["content"], self.files["CORE-STANDARDS.md"].decode()) + self.assertIn(PUBLIC, value["content"]) + self.assertNotIn(PRIVATE, json.dumps(value)) + self.assertEqual(set(value), {"kind", "purpose", "snapshot", "policy", "content", "scope", "requires", "specializes", "next_operations"} | ({"related"} if detail == "full" else set())) + self.assertNotIn("provenance", value) + + def test_direct_hidden_read_and_privileged_request_are_bounded(self): + for fields in ({"target": "provenance.fixture"}, {"purpose": "authoring"}, {"include_coverage": True}): + value = self.read(**fields) + self.assertEqual(value["kind"], "application-rejected-result") + self.assertNotIn(PRIVATE, json.dumps(value)) + with self.assertRaises(AttributeError): + self.engine.purpose = Purpose.AUTHORING + with self.assertRaises(TypeError): + StandardsEngine.open_repository(ROOT) + + def test_domain_and_facade_admit_only_application_operations_before_work(self): + from unittest.mock import Mock + for operation in _contracts(ROOT).interface.operations: + if "application" in operation.variants: + continue + with self.subTest(operation=operation.id): + result = getattr(self.engine, operation.id)(Mock()) + self.assertEqual(result.as_contract()["code"], "APPLICATION.OPERATION_UNAVAILABLE") + value = getattr(self.facade, operation.id)({}) + self.assertEqual(value["code"], "APPLICATION.OPERATION_UNAVAILABLE") + + def test_native_query_and_handle_inspection_use_the_same_boundary(self): + value = self.facade.query({"snapshot": self.snapshot, "request": {"kind": "read", "target": "core", "detail": "full"}}) + self.assertEqual(value["kind"], "application-read-result", value) + inspected = self.facade.inspect({"handle": value["policy"]["handle"]}) + self.assertEqual(inspected["content"], value["content"]) + handle = {**value["policy"]["handle"], "child_id": "provenance.fixture"} + self.assertEqual(self.facade.inspect({"handle": handle})["kind"], "application-rejected-result") + + def test_authoring_read_retrieves_reasoning_and_exposure_state(self): + with StandardsEngine.open_repository(ROOT, purpose="authoring", store_path=self.store_path) as engine: + facade = AgentToolFacade(engine, _contracts(ROOT)) + value = facade.read({"snapshot": self.snapshot, "target": "provenance.fixture"}) + self.assertEqual(value["record"]["rationale"], PRIVATE, value) + normal = facade.read({"snapshot": self.snapshot, "target": "core"}) + self.assertEqual(normal["application_exposure"], "current") + self.assertIn("provenance.fixture", normal["provenance"]) + + def test_material_change_requires_new_exposure_but_rationale_change_does_not(self): + files = dict(self.files) + files["CORE-STANDARDS.md"] += b"\nMaterially changed content.\n" + changed = compile_files(files) + self.assertEqual(changed.supporting.exposure_state("core", changed.materials["core"].binding), "needs-review") + files = dict(self.files) + files[DECISION_PROVENANCE] = files[DECISION_PROVENANCE].replace(PRIVATE.encode(), b"Revised authoring reason") + reason = compile_files(files) + self.assertEqual(reason.materials["core"].binding, self.compiled.materials["core"].binding) + self.assertEqual(reason.supporting.exposure_state("core", reason.materials["core"].binding), "current") + + def test_routing_retains_unknown_facts_and_blocks_missing_required_content(self): + unknown = self.facade.route({"snapshot": self.snapshot, "facts": {}}) + self.assertEqual(unknown["status"], "needs-facts", unknown) + self.assertTrue(unknown["unresolved_questions"]) + facts = {"routing."+key: {"type": "enum-set", "state": "known", "value": []} + for key in ("activities", "workflow-profiles", "applications", "boundaries", "languages", "frameworks", "topics", "details")} + complete = self.facade.route({"snapshot": self.snapshot, "facts": facts}) + self.assertEqual(complete["status"], "complete", complete) + facts["routing.activities"]["value"] = ["implementation"] + blocked = self.facade.route({"snapshot": self.snapshot, "facts": facts}) + self.assertEqual(blocked["code"], "APPLICATION.CONTENT_UNAVAILABLE", blocked) + + def test_hidden_intermediate_cannot_bridge_a_permitted_traversal(self): + from tools.graph_engine.graph_engine import ( + Direction, Edge, EdgeGroup, EdgeRegistry, GraphContribution, + Node, Provenance, TraversalPolicy, + ) + from tools.standards_graph.standards_graph import Provider + provenance = Provenance("fixture", "provider", "isolated graph fixture") + group = EdgeGroup("semantic", "Selected relationships", TraversalPolicy( + frozenset({Direction.INCOMING, Direction.OUTGOING}), transitive=True), provenance) + edges = ( + Edge("fixture.first", "core", "fixture.hidden", "related", ("semantic",), provenance), + Edge("fixture.second", "fixture.hidden", self.reference, "related", ("semantic",), provenance), + ) + graph = EdgeRegistry(Path("/"), (Provider("fixture", GraphContribution( + tuple(Node(key, provenance=provenance) for key in ("core", "fixture.hidden", self.reference)), + (group,), edges)),)) + self.assertEqual(len(graph.traverse_group("core", "semantic", Direction.OUTGOING, transitive=True).steps), 2) + view = ApplicationView(replace(self.compiled, graph=graph), c.SnapshotHandle.from_value(self.snapshot)) + result = view.related("core", ("semantic",), "outgoing", True).as_contract() + self.assertEqual(result["relationships"], []) + self.assertEqual(result["next_operations"], []) + + def test_router_presentation_change_requires_explicit_renewal(self): + files = dict(self.files) + path = "evaluation/standards-effectiveness/router-projection.toml" + old = self.compiled.router.facts[0].prompt + self.assertIn(old.encode(), files[path]) + files[path] = files[path].replace(old.encode(), b"Describe the selected task activities.", 1) + changed = compile_files(files) + self.assertNotEqual(changed.materials["router"].binding, self.compiled.materials["router"].binding) + self.assertEqual(changed.supporting.exposure_state("router", changed.materials["router"].binding), "needs-review") + + def test_unexpected_observation_failure_returns_no_private_context(self): + with patch.object(ApplicationView, "read", side_effect=RuntimeError(PRIVATE)): + with self.assertLogs("tools.standards_engine.standards_engine.context_projection", level="ERROR"): + value = self.read() + self.assertEqual(value["code"], "APPLICATION.INTERNAL_UNAVAILABLE") + self.assertNotIn(PRIVATE, json.dumps(value)) + + def test_unsupported_capture_is_preserved_and_classified(self): + files = {path: value for path, value in self.files.items() if path not in {APPLICATION_CONTENT, DECISION_PROVENANCE}} + captured = self.engine._snapshots.create_snapshot(CapturedContent("old-fixture", ( + SnapshotFile(SnapshotPath.parse(path), value) for path, value in files.items()))) + handle = self.engine._snapshot_handle(captured.snapshot) + before = self.engine._snapshots.load_content(captured.snapshot) + value = self.facade.read({"snapshot": handle, "target": "core"}) + self.assertEqual(value["code"], "APPLICATION.UNSUPPORTED_CAPTURE", value) + self.assertEqual(self.engine._snapshots.load_content(captured.snapshot), before) + + def test_catalog_has_no_authoring_schema_closure(self): + from tools.standards_engine.standards_engine.mcp import tool_catalog + for advanced in (False, True): + catalog = tool_catalog(ROOT, purpose="application", advanced=advanced) + names = {tool["name"] for tool in catalog} + self.assertLessEqual(names, {"route", "read", "related", "routing_facts", "query", "inspect"}) + serialized = json.dumps(catalog) + for hidden in ("rationale", "ChangePurpose", "DecisionProvenanceRecord", "ProposalRevisionHandle"): + self.assertNotIn(hidden, serialized) + + + def test_whole_module_discovers_references_owned_by_its_policy_units(self): + from tools.graph_engine.graph_engine import ( + Direction, Edge, EdgeGroup, EdgeRegistry, GraphContribution, + Node, Provenance, TraversalPolicy, + ) + from tools.standards_graph.standards_graph import Provider + from tools.standards_metadata.standards_metadata import ApplicationExposure + owner = "topic.code-design" + unit = self.compiled.corpus.policy_unit_corpus.for_module(owner)[0] + supporting = replace(self.compiled.supporting, exposure={ + **self.compiled.supporting.exposure, + owner: ApplicationExposure(owner, self.compiled.materials[owner].binding), + }) + provenance = Provenance("scope-fixture", "provider", "scope fixture") + group = EdgeGroup("semantic", "Supplementary relationships", TraversalPolicy( + frozenset({Direction.INCOMING, Direction.OUTGOING})), provenance) + edge = Edge("scope.reference", unit.id, self.reference, + "reference-projection", ("semantic",), provenance) + graph = EdgeRegistry(Path("/"), (Provider("scope-fixture", GraphContribution( + tuple(Node(key, provenance=provenance) for key in ("core", owner, unit.id, self.reference)), + (group,), (edge,))),)) + view = ApplicationView(replace(self.compiled, graph=graph, supporting=supporting), c.SnapshotHandle.from_value(self.snapshot)) + related = view.related(owner, ("semantic",), "outgoing", False).as_contract() + self.assertEqual([entry["target"] for entry in related["relationships"]], [self.reference]) + self.assertEqual([entry["target"] for entry in related["next_operations"]], [self.reference]) + full = view.read(owner, "full").as_contract() + self.assertEqual(full["related"], related["relationships"]) + + def test_invalid_host_purpose_creates_no_store(self): + with tempfile.TemporaryDirectory(prefix="invalid-purpose-") as temporary: + store = Path(temporary) / "state" / "engine.sqlite3" + with self.assertRaises(ValueError): + StandardsEngine.open_repository(ROOT, purpose="request-controlled", store_path=store) + self.assertFalse(store.parent.exists()) diff --git a/tools/standards_engine/tests/test_purpose_transport.py b/tools/standards_engine/tests/test_purpose_transport.py new file mode 100644 index 00000000..ac66e6f4 --- /dev/null +++ b/tools/standards_engine/tests/test_purpose_transport.py @@ -0,0 +1,148 @@ +"""Cold process and local stdio observations of the qualified application API. + +These tests use the real transport and SQLite reader. The separate publication +suite owns the proof that approval enters a snapshot through reviewed Git state. +""" +from __future__ import annotations + +import json +import os +from pathlib import Path +import shutil +import subprocess +import sys +import tempfile +import unittest + +from tools.standards_engine.tests import test_purpose_projection as fixture + +PRIVATE, PUBLIC, ROOT = fixture.PRIVATE, fixture.PUBLIC, fixture.ROOT +from tools.standards_snapshots.standards_snapshots import SnapshotModule, CapturedContent, SnapshotFile, SnapshotPath + + +class PurposeTransportTest(unittest.TestCase): + @classmethod + def setUpClass(cls): + fixture.PurposeProjectionTest.setUpClass() + cls.temp = tempfile.TemporaryDirectory(prefix="purpose-transport-") + cls.root = Path(cls.temp.name) + for relative in ("tools/standards_engine/contracts/a1-contract.schema.json", + "tools/standards_engine/contracts/a1-interface.toml", + "tools/standards_engine/contracts/generated/agent-tools.json", + "tools/standards_engine/contracts/examples/a1-examples.json"): + target = cls.root / relative + target.parent.mkdir(parents=True, exist_ok=True) + shutil.copyfile(ROOT / relative, target) + store_path = cls.root / ".standards-engine/snapshots-v1.sqlite3" + store_path.parent.mkdir(parents=True) + with SnapshotModule.open(store_path) as store: + captured = store.create_snapshot(CapturedContent("isolated-transport-fixture", ( + SnapshotFile(SnapshotPath.parse(path), value) + for path, value in fixture.PurposeProjectionTest.files.items()))) + cls.snapshot = fixture.PurposeProjectionTest.engine._snapshot_handle(captured.snapshot) + cls.expected = fixture.PurposeProjectionTest.files["CORE-STANDARDS.md"].decode() + + @classmethod + def tearDownClass(cls): + cls.temp.cleanup() + fixture.PurposeProjectionTest.tearDownClass() + + def cli(self, purpose, *arguments, value=None): + return subprocess.run( + [sys.executable, "-P", str(ROOT / ".agents/skills/standards-engine/scripts/invoke.py"), + "--repo-root", str(self.root), "--purpose", purpose, *arguments], + input=json.dumps(value) if value is not None else "", text=True, + capture_output=True, env={**os.environ, "PYTHONPATH": str(ROOT)}, + timeout=90, + ) + + def test_two_cold_processes_preserve_exact_application_read(self): + request = {"snapshot": self.snapshot, "target": "core", "detail": "full"} + first = self.cli("application", "read", value=request) + second = self.cli("application", "read", value=request) + for result in (first, second): + self.assertEqual(result.returncode, 0, result.stderr) + self.assertEqual(result.stderr, "") + value = json.loads(result.stdout) + self.assertEqual(value["content"], self.expected) + self.assertIn(PUBLIC, value["content"]) + self.assertNotIn(PRIVATE, result.stdout) + self.assertEqual(json.loads(first.stdout), json.loads(second.stdout)) + authored = self.cli("authoring", "read", value={"snapshot": self.snapshot, "target": "provenance.fixture"}) + self.assertEqual(authored.returncode, 0, authored.stderr) + self.assertEqual(json.loads(authored.stdout)["record"]["rationale"], PRIVATE) + + def test_cli_catalog_schema_example_and_denial_share_the_purpose(self): + listing = self.cli("application", "--list") + self.assertEqual(listing.returncode, 0, listing.stderr) + self.assertEqual(set(listing.stdout.splitlines()), {"route", "read", "related", "routing_facts", "query", "inspect"}) + for option in ("--schema", "--example"): + result = self.cli("application", option, "read") + self.assertEqual(result.returncode, 0, result.stderr) + for private in ("rationale", "ChangePurpose", "DecisionProvenanceRecord", PRIVATE): + self.assertNotIn(private, result.stdout) + denied = self.cli("application", "apply", value={}) + self.assertEqual(denied.returncode, 2) + self.assertNotIn(PRIVATE, denied.stderr + denied.stdout) + + def test_actual_stdio_has_qualified_catalog_and_identical_result_encodings(self): + def request(identifier, method, params): + return {"jsonrpc": "2.0", "id": identifier, "method": method, "params": params} + messages = [ + request(1, "initialize", {"protocolVersion": "2025-11-25", "capabilities": {}, "clientInfo": {"name": "purpose-fixture", "version": "1"}}), + {"jsonrpc": "2.0", "method": "notifications/initialized"}, + request(2, "tools/list", {}), + request(3, "tools/call", {"name": "read", "arguments": {"snapshot": self.snapshot, "target": "core", "detail": "full"}}), + request(4, "tools/call", {"name": "read", "arguments": {"snapshot": self.snapshot, "target": "provenance.fixture"}}), + request(5, "tools/call", {"name": "apply", "arguments": {}}), + ] + process = subprocess.run( + [sys.executable, "-P", "-m", "tools.standards_engine.standards_engine.mcp", + "--repo-root", str(self.root), "--purpose", "application", "--advanced"], + input="".join(json.dumps(value) + "\n" for value in messages), text=True, + capture_output=True, env={**os.environ, "PYTHONPATH": str(ROOT)}, timeout=120, + ) + self.assertEqual(process.returncode, 0, process.stderr) + self.assertEqual(process.stderr, "") + self.assertNotIn(PRIVATE, process.stdout) + values = {value["id"]: value for value in map(json.loads, process.stdout.splitlines())} + self.assertEqual({tool["name"] for tool in values[2]["result"]["tools"]}, {"route", "read", "related", "routing_facts", "query", "inspect"}) + allowed = values[3]["result"] + self.assertFalse(allowed["isError"]) + self.assertEqual(allowed["structuredContent"]["content"], self.expected) + self.assertEqual(json.loads(allowed["content"][0]["text"]), allowed["structuredContent"]) + self.assertTrue(values[4]["result"]["isError"]) + self.assertEqual(values[4]["result"]["structuredContent"]["code"], "APPLICATION.CONTENT_UNAVAILABLE") + self.assertIn("error", values[5]) + + + def test_default_capture_reads_accepted_main_instead_of_unpublished_head(self): + from tools.standards_engine.standards_engine import AgentToolFacade + with tempfile.TemporaryDirectory(prefix="accepted-purpose-") as temporary: + root = Path(temporary) + for relative, content in fixture.PurposeProjectionTest.files.items(): + path = root / relative + path.parent.mkdir(parents=True, exist_ok=True) + path.write_bytes(content) + for relative in ("tools/standards_engine/contracts/a1-contract.schema.json", + "tools/standards_engine/contracts/a1-interface.toml"): + target = root / relative + target.parent.mkdir(parents=True, exist_ok=True) + shutil.copyfile(ROOT / relative, target) + def git(*arguments): + return subprocess.run(["git", "-c", "user.name=Fixture", "-c", + "user.email=fixture@example.invalid", *arguments], + cwd=root, check=True, capture_output=True) + git("init", "-b", "main") + git("add", "--all") + git("commit", "-m", "test: accepted application content") + git("checkout", "-b", "unpublished") + core = root / "CORE-STANDARDS.md" + core.write_text(core.read_text() + "\nUNPUBLISHED_CONTENT_MARKER_15839\n") + git("add", "--", "CORE-STANDARDS.md") + git("commit", "-m", "test: leave unreviewed content on a draft branch") + with AgentToolFacade.open_repository(root, purpose="application") as facade: + result = facade.read({"target": "core"}) + self.assertEqual(result["kind"], "application-read-result", result) + self.assertEqual(result["content"], self.expected) + self.assertNotIn("UNPUBLISHED_CONTENT_MARKER_15839", json.dumps(result)) diff --git a/tools/standards_engine/tests/test_rendering.py b/tools/standards_engine/tests/test_rendering.py index 4442a788..f1128779 100644 --- a/tools/standards_engine/tests/test_rendering.py +++ b/tools/standards_engine/tests/test_rendering.py @@ -164,6 +164,17 @@ def test_proposal_review_renders_only_opaque_authority(self) -> None: f"PROPOSAL REVIEW {revision} {readiness} [ready]\n", ) + def test_application_purpose_is_distinct_from_authoring_publication(self): + import json + from tools.standards_engine.standards_engine.context_projection import application_rejection + rejected = application_rejection() + self.assertEqual(json.loads(render_text(rejected)), rejected.as_contract()) + publication = {"kind": "application-recovery-required-result", + "application": {"id": "application:fixture"}, + "status": "recovery-required", "code": "APPLICATION.RECOVERY_REQUIRED"} + self.assertEqual(render_text(publication), + "PROPOSAL APPLICATION application:fixture [recovery-required] APPLICATION.RECOVERY_REQUIRED\n") + def test_unknown_result_variant_is_a_programming_error(self) -> None: with self.assertRaisesRegex(ValueError, "unsupported Standards Engine"): render_text({"kind": "future-result"}) diff --git a/tools/standards_engine/tests/test_supporting_workflow.py b/tools/standards_engine/tests/test_supporting_workflow.py new file mode 100644 index 00000000..94a816a5 --- /dev/null +++ b/tools/standards_engine/tests/test_supporting_workflow.py @@ -0,0 +1,134 @@ +"""Real proposal, review, publication and readback in an isolated Git repository.""" +from __future__ import annotations + +import json +from pathlib import Path +import subprocess +import tempfile +import unittest + +from tools.standards_engine.standards_engine import AgentToolFacade +from tools.standards_engine.tests.test_agent_workflow import prepare_repository, evidence, decisions +from tools.standards_metadata.standards_metadata import load_canonical_standards_corpus + +RULE = "topic.purpose-fixture" +REFERENCE = "reference.testing.purpose-fixture" +REASON = "provenance.purpose-fixture" +PRIVATE = "PRIVATE_DECISION_RECORD_506187" +PUBLIC = "Observe the operation's owned completion before releasing its resource." + + +def standard(identity, *, reference=False): + return {"kind": "create-standard", "standard": { + "id": identity, "title": "Purpose Boundary Fixture", "role": "reference" if reference else "topic", + "level": "REFERENCE" if reference else "MUST", "applies_when": "The isolated fixture is selected.", + "does_not_apply_when": "The fixture is outside the selected task.", + "verification": "The isolated Engine workflow verifies the selected result.", + "body": "## Owned completion\n\n" + PUBLIC + "\n", + }, "requires": [], "specializes": [], "policy_units": []} + + +class SupportingWorkflowTest(unittest.TestCase): + @classmethod + def setUpClass(cls): + cls.temporary = tempfile.TemporaryDirectory(prefix="supporting-workflow-") + cls.root = Path(cls.temporary.name) / "repository" + prepare_repository(cls.root) + # Fixture publication has one explicit local accepted branch regardless + # of which implementation branch supplied the test code. + if subprocess.check_output(["git", "branch", "--show-current"], cwd=cls.root).decode().strip() != "main": + subprocess.run(["git", "branch", "-m", "main"], cwd=cls.root, check=True) + cls.author = AgentToolFacade.open_repository(cls.root, purpose="authoring") + cls.app = AgentToolFacade.open_repository(cls.root, purpose="application") + + @classmethod + def tearDownClass(cls): + cls.author.close(); cls.app.close(); cls.temporary.cleanup() + + def change(self, edits): + return {"purpose": {"summary": "Exercise purpose-separated content publication", + "rationale": "This isolated fixture proves the Engine mechanism, not editorial quality.", + "evidence": [evidence(self.root)]}, "edits": edits} + + def resolve(self, proposed): + seen = set() + while proposed.get("status") == "needs-action": + self.assertNotIn(json.dumps(proposed["context"], sort_keys=True), seen, proposed) + seen.add(json.dumps(proposed["context"], sort_keys=True)) + outcome = proposed["outcome"] + self.assertFalse(outcome.get("fact_requirements"), outcome) + obligation = next(item for item in outcome["obligations"] if item["state"] == "required") + self.assertIn("impact-disposition", obligation["permitted_submissions"], obligation) + proposed = self.author.resolve_workflow({"context": proposed["context"], "submission": { + "kind": "impact-disposition", "obligation": obligation["handle"], "result": "confirmed", + "rationale": "The fixture owner confirms this exact isolated support/content change.", + "evidence": [evidence(self.root)], "fingerprint": obligation["fingerprint"], + }}) + self.assertEqual(proposed.get("status"), "complete", proposed) + return proposed + + def publish(self, proposed): + complete = self.resolve(proposed) + ready = self.author.review({"context": complete["context"], "decisions": decisions(self.root)}) + self.assertEqual(ready.get("status"), "ready", ready) + applied = self.author.apply({"context": ready["context"]}) + self.assertEqual(applied.get("status"), "applied", applied) + return applied + + def test_coordinated_publication_and_provenance_only_revision(self): + snapshot = self.author.create_snapshot({"kind": "create-snapshot"})["snapshot"]["snapshot"] + empty = self.app.read({"snapshot": snapshot, "target": "core"}) + self.assertEqual(empty["code"], "APPLICATION.CONTENT_UNAVAILABLE", empty) + aids = [] + for target in ("prompts/planning.md", "templates/PLAN-TEMPLATE.md"): + aid = self.author.read({"snapshot": snapshot, "target": target}) + self.assertEqual(aid["kind"], "operational-read-result", aid) + aids.append(aid) + record = {"id": REASON, "subject": RULE, "origin": "current-justification", "rationale": PRIVATE, "evidence": [evidence(self.root)]} + edits = [{"kind": "approve-application-content", "target": RULE}, + {"kind": "put-provenance", "record": record}, + standard(REFERENCE, reference=True), standard(RULE), + {"kind": "approve-application-content", "target": REFERENCE}] + for aid in aids: + lines = aid["content"].splitlines() + edits.extend([ + {"kind": "revise-operational-artifact", "target": aid["target"], + "title": lines[0].lstrip("# "), "body": "\n".join(lines[1:]).lstrip() + "\n\n" + PUBLIC + "\n"}, + {"kind": "approve-application-content", "target": aid["target"]}, + ]) + proposed = self.author.propose({"snapshot": snapshot, "change_set": self.change(edits)}) + self.assertEqual(proposed.get("status"), "needs-action", proposed) + draft = self.author.query_proposal({"revision": proposed["revision"], "request": {"kind": "read", "target": REASON}}) + self.assertEqual(draft["record"]["rationale"], PRIVATE, draft) + self.assertEqual(self.app.read({"target": RULE})["kind"], "application-rejected-result") + self.assertEqual(self.app.query_proposal({"revision": proposed["revision"], "request": {"kind": "read", "target": REASON}})["code"], "APPLICATION.OPERATION_UNAVAILABLE") + self.publish(proposed) + first = self.app.read({"target": RULE, "detail": "full"}) + self.assertEqual(first["kind"], "application-read-result", first) + self.assertIn(PUBLIC, first["content"]) + self.assertNotIn(PRIVATE, json.dumps(first)) + self.assertEqual(self.app.read({"target": REFERENCE})["kind"], "application-read-result") + for aid in aids: + exposed = self.app.read({"target": aid["canonical_id"]}) + self.assertEqual(exposed["kind"], "application-read-result", exposed) + self.assertIn(PUBLIC, exposed["content"]) + before = subprocess.check_output(["git", "show", "main:topics/purpose-fixture.md"], cwd=self.root) + revisions_before = {unit.id: unit.semantic_revision for unit in + load_canonical_standards_corpus(self.root).policy_units} + old_snapshot = first["snapshot"] + next_change = self.author.propose({"change_set": self.change([ + {"kind": "put-provenance", "record": {**record, "rationale": PRIVATE + "_REVISED"}}, + ])}) + self.assertEqual(len(next_change["outcome"]["obligations"]), 1, next_change) + self.publish(next_change) + after = subprocess.check_output(["git", "show", "main:topics/purpose-fixture.md"], cwd=self.root) + self.assertEqual(before, after) + revisions_after = {unit.id: unit.semantic_revision for unit in + load_canonical_standards_corpus(self.root).policy_units} + self.assertEqual(revisions_before, revisions_after) + historical = self.author.read({"snapshot": old_snapshot, "target": REASON}) + current = self.author.read({"target": REASON}) + self.assertEqual(historical["record"]["rationale"], PRIVATE) + self.assertEqual(current["record"]["rationale"], PRIVATE + "_REVISED") + self.assertEqual(self.app.read({"target": RULE})["content"], first["content"]) + self.assertEqual(self.app.read({"target": REASON})["kind"], "application-rejected-result") diff --git a/tools/standards_graph/standards_graph/repository.py b/tools/standards_graph/standards_graph/repository.py index 5a2c7de3..355cc179 100644 --- a/tools/standards_graph/standards_graph/repository.py +++ b/tools/standards_graph/standards_graph/repository.py @@ -12,6 +12,7 @@ from tools.standards_metadata.standards_metadata import ( CanonicalStandardsCorpus, ContentSourceInput, + SupportingContent, ) from .metadata import metadata_dependency_source @@ -27,6 +28,7 @@ def standards_navigation_registry( policy_impact_registry: str = POLICY_IMPACT_REGISTRY, *, compiled_policy_impact: CompiledPolicyImpactSet | None = None, + supporting: SupportingContent | None = None, ) -> EdgeRegistry: """Build the explicit graph view used for canonical standards navigation.""" @@ -43,6 +45,9 @@ def standards_navigation_registry( PolicyUnitGraphSource(corpus.policy_unit_corpus), PolicyImpactSource(compiled), ) + if supporting is not None: + from tools.standards_policy_impact.standards_policy_impact import DecisionProvenanceSource + sources = (*sources, DecisionProvenanceSource(supporting)) return EdgeRegistry( Path("/"), sources, diff --git a/tools/standards_metadata/README.md b/tools/standards_metadata/README.md index 8de6b840..e24e221f 100644 --- a/tools/standards_metadata/README.md +++ b/tools/standards_metadata/README.md @@ -34,3 +34,13 @@ python3 -m unittest discover -s tools/standards_metadata/tests The [module metadata schema](metadata-schema.md) documents authored fields, grammar, invariants, and the validation boundary. + +## Supporting-content input + +`supporting_content.py` loads the explicit application-exposure and +decision-provenance manifests through the same `ContentSource` as other +canonical material. It validates shape, identities, exact bindings, origin +representation and supersession. Runtime source capture is independent from +editorial review: an empty application manifest qualifies nothing. Missing +required manifests identify an unsupported older capture. See the +[Engine content contract](../standards_engine/PURPOSE-SEPARATION.md). diff --git a/tools/standards_metadata/standards_metadata/__init__.py b/tools/standards_metadata/standards_metadata/__init__.py index 2fdd8c75..f3af9dae 100644 --- a/tools/standards_metadata/standards_metadata/__init__.py +++ b/tools/standards_metadata/standards_metadata/__init__.py @@ -45,7 +45,14 @@ load_suite_input_manifest, suite_input_manifest_bytes, ) +from .supporting_content import ( + APPLICATION_CONTENT, DECISION_PROVENANCE, ApplicationExposure, DecisionProvenance, + SupportingContent, content_digest, load_supporting_content, +) + __all__ = ( + "APPLICATION_CONTENT", "DECISION_PROVENANCE", "ApplicationExposure", + "DecisionProvenance", "SupportingContent", "content_digest", "load_supporting_content", "CANONICAL_MODULE_CORPUS", "POLICY_UNIT_REGISTRY", "CanonicalModuleCorpus", diff --git a/tools/standards_metadata/standards_metadata/supporting_content.py b/tools/standards_metadata/standards_metadata/supporting_content.py new file mode 100644 index 00000000..98589e33 --- /dev/null +++ b/tools/standards_metadata/standards_metadata/supporting_content.py @@ -0,0 +1,204 @@ +"""Captured decision records and exact application-exposure declarations. + +This owner validates structure and bindings. Editorial review decides which +content belongs in an application context. +""" +from __future__ import annotations + +import hashlib +import json +import re +import tomllib +from dataclasses import dataclass +from types import MappingProxyType +from typing import Mapping + +from .errors import MetadataError, MetadataFailure +from .source import ContentSource + +APPLICATION_CONTENT = "evaluation/standards-effectiveness/application-content.toml" +DECISION_PROVENANCE = "evaluation/standards-effectiveness/decision-provenance.toml" +_ID = re.compile(r"^[A-Za-z0-9][A-Za-z0-9._:/-]*$") +_DIGEST = re.compile(r"^sha256:[0-9a-f]{64}$") +ORIGINS = frozenset({"documented-original", "reconstructed-history", "current-justification", "unrecorded"}) + + +def _invalid(message: str) -> MetadataError: + return MetadataError(MetadataFailure("SUPPORT.INVALID_CONTENT", "invalid", message)) + + +def content_digest(value: object) -> str: + encoded = json.dumps(value, sort_keys=True, ensure_ascii=False, separators=(",", ":")).encode("utf-8") + return "sha256:" + hashlib.sha256(b"standards-support-v1\x00" + encoded).hexdigest() + + +def _text(value: object, label: str, *, empty: bool = False) -> str: + if (type(value) is not str or (not empty and not value.strip()) + or any(0xD800 <= ord(char) <= 0xDFFF for char in value)): + raise _invalid(f"{label} requires Unicode text.") + return value + + +def _identity(value: object, label: str) -> str: + selected = _text(value, label) + if _ID.fullmatch(selected) is None: + raise _invalid(f"{label} requires a canonical identity.") + return selected + + +def _digest(value: object) -> str: + selected = _text(value, "Content binding") + if _DIGEST.fullmatch(selected) is None: + raise _invalid("Content binding requires a SHA-256 identity.") + return selected + + +def _strings(value: object, label: str) -> tuple[str, ...]: + if not isinstance(value, list): + raise _invalid(f"{label} requires an array.") + return tuple(_text(item, label) for item in value) + + +def _evidence(value: object) -> tuple[Mapping[str, str], ...]: + if not isinstance(value, list): + raise _invalid("Evidence requires an array.") + result, seen = [], set() + for item in value: + if not isinstance(item, dict) or set(item) != {"id", "digest", "provider_contract", "provider_contract_version"}: + raise _invalid("Evidence requires the canonical four-field reference.") + row = {"id": _identity(item["id"], "Evidence identity"), + "digest": _digest(item["digest"]), + "provider_contract": _identity(item["provider_contract"], "Evidence provider"), + "provider_contract_version": _text(item["provider_contract_version"], "Provider version")} + key = tuple(sorted(row.items())) + if key in seen: + raise _invalid("Evidence references must be unique.") + seen.add(key) + result.append(MappingProxyType(row)) + return tuple(result) + + +@dataclass(frozen=True, slots=True) +class DecisionProvenance: + id: str + subject: str + subject_binding: str + origin: str + rationale: str + evidence: tuple[Mapping[str, str], ...] + assumptions: tuple[str, ...] = () + limits: tuple[str, ...] = () + alternatives: tuple[str, ...] = () + reconsideration: tuple[str, ...] = () + supersedes: tuple[str, ...] = () + retired: bool = False + + @classmethod + def from_mapping(cls, value: object) -> DecisionProvenance: + required = {"id", "subject", "subject_binding", "origin", "rationale", "evidence"} + lists = {"assumptions", "limits", "alternatives", "reconsideration", "supersedes"} + if not isinstance(value, dict) or not required <= value.keys() or set(value) - required - lists - {"retired"}: + raise _invalid("Decision provenance has missing or unknown fields.") + identity = _identity(value["id"], "Provenance identity") + if not identity.startswith("provenance."): + raise _invalid("Decision provenance uses the provenance namespace.") + origin = _text(value["origin"], "Origin") + if origin not in ORIGINS: + raise _invalid("Decision provenance origin is unsupported.") + evidence = _evidence(value["evidence"]) + rationale = _text(value["rationale"], "Rationale", empty=origin == "unrecorded") + if origin in {"documented-original", "reconstructed-history"} and not evidence: + raise _invalid("Historical origin claims require evidence references.") + values = {key: _strings(value.get(key, []), key) for key in lists} + if len(set(values["supersedes"])) != len(values["supersedes"]) or identity in values["supersedes"]: + raise _invalid("Provenance supersession identifies distinct predecessors.") + for predecessor in values["supersedes"]: + _identity(predecessor, "Predecessor") + retired = value.get("retired", False) + if type(retired) is not bool: + raise _invalid("Provenance retirement must be boolean.") + return cls(identity, _identity(value["subject"], "Subject"), + _digest(value["subject_binding"]), origin, rationale, evidence, + retired=retired, **values) + + def as_contract(self) -> dict[str, object]: + return {"id": self.id, "subject": self.subject, + "subject_binding": self.subject_binding, "origin": self.origin, + "rationale": self.rationale, "evidence": [dict(item) for item in self.evidence], + "retired": self.retired, + **{field: list(getattr(self, field)) for field in + ("assumptions", "limits", "alternatives", "reconsideration", "supersedes")}} + + +@dataclass(frozen=True, slots=True) +class ApplicationExposure: + target: str + binding: str + + @classmethod + def from_mapping(cls, value: object) -> ApplicationExposure: + if not isinstance(value, dict) or set(value) != {"target", "binding"}: + raise _invalid("Application exposure requires a target and reviewed binding.") + return cls(_identity(value["target"], "Exposure target"), _digest(value["binding"])) + + def as_contract(self) -> dict[str, str]: + return {"target": self.target, "binding": self.binding} + + +@dataclass(frozen=True, slots=True) +class SupportingContent: + provenance: Mapping[str, DecisionProvenance] + exposure: Mapping[str, ApplicationExposure] + + def __post_init__(self) -> None: + object.__setattr__(self, "provenance", MappingProxyType(dict(sorted(self.provenance.items())))) + object.__setattr__(self, "exposure", MappingProxyType(dict(sorted(self.exposure.items())))) + + def exposure_state(self, target: str, binding: str) -> str: + reviewed = self.exposure.get(target) + return "unreviewed" if reviewed is None else "current" if reviewed.binding == binding else "needs-review" + + +def _manifest(source: ContentSource, path: str, member: str) -> list[object]: + try: + raw = tomllib.loads(source.read_bytes(path).decode("utf-8")) + except MetadataError as error: + if error.failure.code != "INPUT.UNAVAILABLE": + raise + raise MetadataError(MetadataFailure( + "SUPPORT.UNSUPPORTED_CAPTURE", "unsupported", + "The captured content predates the supported content contract.")) from error + except (ValueError, UnicodeError) as error: + raise _invalid("Supporting content must be valid UTF-8 TOML.") from error + if not isinstance(raw, dict) or set(raw) != {"schema_version", member}: + raise _invalid("Supporting manifest has missing or unknown fields.") + if type(raw["schema_version"]) is not int or raw["schema_version"] != 1: + raise MetadataError(MetadataFailure("SUPPORT.UNSUPPORTED_VERSION", "unsupported", "Unsupported supporting-content schema.")) + if not isinstance(raw[member], list): + raise _invalid("Supporting manifest entries require an array.") + return raw[member] + + +def load_supporting_content(source: ContentSource) -> SupportingContent: + records = [DecisionProvenance.from_mapping(item) for item in _manifest(source, DECISION_PROVENANCE, "records")] + entries = [ApplicationExposure.from_mapping(item) for item in _manifest(source, APPLICATION_CONTENT, "entries")] + if len({item.id for item in records}) != len(records) or len({item.target for item in entries}) != len(entries): + raise _invalid("Supporting content identities must be unique.") + index = {item.id: item for item in records} + for record in records: + if any(target not in index for target in record.supersedes): + raise _invalid("Provenance supersession requires retained predecessors.") + visiting, visited = set(), set() + def visit(identity: str) -> None: + if identity in visiting: + raise _invalid("Provenance supersession requires an acyclic history.") + if identity in visited: + return + visiting.add(identity) + for predecessor in index[identity].supersedes: + visit(predecessor) + visiting.remove(identity) + visited.add(identity) + for identity in index: + visit(identity) + return SupportingContent(index, {item.target: item for item in entries}) diff --git a/tools/standards_metadata/tests/test_supporting_content.py b/tools/standards_metadata/tests/test_supporting_content.py new file mode 100644 index 00000000..a59ebd1d --- /dev/null +++ b/tools/standards_metadata/tests/test_supporting_content.py @@ -0,0 +1,86 @@ +from __future__ import annotations + +import json +import unittest + +from tools.standards_metadata.standards_metadata import ( + APPLICATION_CONTENT, DECISION_PROVENANCE, FrozenContentSource, + DecisionProvenance, MetadataError, load_supporting_content, +) + + +def inline(value): + if isinstance(value, bool): + return "true" if value else "false" + if isinstance(value, str): + return json.dumps(value) + if isinstance(value, list): + return "[" + ", ".join(inline(item) for item in value) + "]" + if isinstance(value, dict): + return "{ " + ", ".join(f"{key} = {inline(item)}" for key, item in value.items()) + " }" + return str(value) + + +def source(records=(), entries=()): + return FrozenContentSource({ + DECISION_PROVENANCE: ("schema_version = 1\nrecords = " + inline(list(records)) + "\n").encode(), + APPLICATION_CONTENT: ("schema_version = 1\nentries = " + inline(list(entries)) + "\n").encode(), + }) + + +def record(**changes): + return {"id": "provenance.fixture", "subject": "core", + "subject_binding": "sha256:" + "1" * 64, "origin": "current-justification", + "rationale": "The selected operation preserves the required property.", "evidence": [], **changes} + + +class SupportingContentTest(unittest.TestCase): + def test_empty_registration_is_an_honest_unreviewed_state(self): + support = load_supporting_content(source()) + self.assertEqual(dict(support.provenance), {}) + self.assertEqual(support.exposure_state("core", "sha256:" + "1" * 64), "unreviewed") + + def test_binding_controls_current_and_stale_states(self): + support = load_supporting_content(source(entries=[{"target": "core", "binding": "sha256:" + "1" * 64}])) + self.assertEqual(support.exposure_state("core", "sha256:" + "1" * 64), "current") + self.assertEqual(support.exposure_state("core", "sha256:" + "2" * 64), "needs-review") + with self.assertRaises(TypeError): + support.exposure["other"] = support.exposure["core"] + + def test_unknown_history_does_not_require_a_fabricated_reason(self): + support = load_supporting_content(source(records=[record(origin="unrecorded", rationale="")])) + self.assertEqual(support.provenance["provenance.fixture"].rationale, "") + self.assertEqual(support.provenance["provenance.fixture"].evidence, ()) + + def test_historical_claim_has_reference_shape_and_preserves_unicode(self): + evidence = {"id": "evidence:case", "digest": "sha256:" + "a" * 64, + "provider_contract": "repository-content", "provider_contract_version": "1"} + original = record(origin="documented-original", evidence=[evidence], rationale="Propriété 日本語 e\u0301") + observed = load_supporting_content(source(records=[original])).provenance["provenance.fixture"] + self.assertEqual(observed.rationale, original["rationale"]) + self.assertEqual(dict(observed.evidence[0]), evidence) + for malformed in [record(origin="documented-original"), record(evidence=[evidence, evidence]), + record(subject_binding="guessed"), record(rationale="\ud800"), + record(extra="unknown"), record(retired=1)]: + with self.subTest(malformed=malformed), self.assertRaises(MetadataError): + DecisionProvenance.from_mapping(malformed) + + def test_supersession_uses_retained_distinct_records(self): + older = record(retired=True) + newer = record(id="provenance.newer", supersedes=[older["id"]]) + self.assertEqual(len(load_supporting_content(source(records=[newer, older])).provenance), 2) + for rows in [[record(supersedes=["provenance.missing"])], + [record(supersedes=["provenance.newer"]), newer], [older, older]]: + with self.assertRaises(MetadataError): + load_supporting_content(source(records=rows)) + + def test_unsupported_capture_does_not_become_an_empty_manifest(self): + with self.assertRaises(MetadataError) as caught: + load_supporting_content(FrozenContentSource({})) + self.assertEqual(caught.exception.failure.code, "SUPPORT.UNSUPPORTED_CAPTURE") + for data in [b"schema_version = true\nentries = []", b"schema_version = 99\nentries = []", + b"schema_version = 1\nentries = {}", b"not toml", b"\xff"]: + files = dict(source().files) + files[APPLICATION_CONTENT] = data + with self.subTest(data=data), self.assertRaises(MetadataError): + load_supporting_content(FrozenContentSource(files)) diff --git a/tools/standards_policy_impact/README.md b/tools/standards_policy_impact/README.md index 342bd13e..c5a00415 100644 --- a/tools/standards_policy_impact/README.md +++ b/tools/standards_policy_impact/README.md @@ -38,3 +38,11 @@ Run focused tests with: ```bash python3 -m unittest discover -s tools/standards_policy_impact/tests ``` + +## Descriptive decision provenance + +`DecisionProvenanceSource` derives neutral graph nodes and descriptive subject +and supersession edges from captured provenance records. Each record owns its +subject association once. The `decision-provenance` group has no normative +prerequisite or automatic impact-propagation meaning. Purpose-specific Engine +views select eligible topology before traversal; the generic graph stays neutral. diff --git a/tools/standards_policy_impact/standards_policy_impact/__init__.py b/tools/standards_policy_impact/standards_policy_impact/__init__.py index 559ba44a..11ebe181 100644 --- a/tools/standards_policy_impact/standards_policy_impact/__init__.py +++ b/tools/standards_policy_impact/standards_policy_impact/__init__.py @@ -20,7 +20,10 @@ RelationshipKind, thaw, ) +from .provenance import DecisionProvenanceSource + __all__ = ( + "DecisionProvenanceSource", "DEFAULT_AUTHORING_CONTRACT", "CATALOG_SOURCE_ID", "DEFAULT_REGISTRY", diff --git a/tools/standards_policy_impact/standards_policy_impact/provenance.py b/tools/standards_policy_impact/standards_policy_impact/provenance.py new file mode 100644 index 00000000..a043c9fc --- /dev/null +++ b/tools/standards_policy_impact/standards_policy_impact/provenance.py @@ -0,0 +1,33 @@ +"""Descriptive provenance associations derived from their sole source record.""" +from __future__ import annotations + +from dataclasses import dataclass +from urllib.parse import quote + +from tools.graph_engine.graph_engine import ( + Direction, Edge, EdgeGroup, GraphContribution, Node, Provenance, TraversalPolicy, +) +from tools.standards_metadata.standards_metadata import DECISION_PROVENANCE, SupportingContent + +PROVENANCE_GROUP = "decision-provenance" + + +@dataclass(frozen=True, slots=True) +class DecisionProvenanceSource: + supporting: SupportingContent + id: str = "standards.decision-provenance" + + def load(self) -> GraphContribution: + source = Provenance(self.id, "provider", DECISION_PROVENANCE) + nodes = tuple(Node(record.id, (), source, {"artifact_kind": "decision-provenance"}) + for record in self.supporting.provenance.values()) + group = EdgeGroup(PROVENANCE_GROUP, "Reasoning available to standards authors.", + TraversalPolicy(frozenset({Direction.INCOMING, Direction.OUTGOING}), False), source) + edges = tuple(Edge(f"provenance:{quote(record.subject, safe='')}:{quote(record.id, safe='')}", + record.subject, record.id, "justified-by", (PROVENANCE_GROUP,), source) + for record in self.supporting.provenance.values() if not record.retired) + supersession = tuple( + Edge(f"provenance-supersedes:{quote(record.id, safe='')}:{quote(predecessor, safe='')}", + record.id, predecessor, "supersedes", (PROVENANCE_GROUP,), source) + for record in self.supporting.provenance.values() for predecessor in record.supersedes) + return GraphContribution(nodes, (group,), (*edges, *supersession)) From 8750761133b66297a2bfac4e495fd1c8a893b96a Mon Sep 17 00:00:00 2001 From: ChatGPT Date: Wed, 23 Sep 2026 11:06:13 +0000 Subject: [PATCH 03/26] docs(engine): record final source and delivery verification --- .../execution-ledger.md | 14 +++++++++++ .../issues.md | 2 +- .../reports/implementation-evidence.md | 23 ++++++++++++++++--- 3 files changed, 35 insertions(+), 4 deletions(-) diff --git a/docs/plans/purpose-separated-standards-engine/execution-ledger.md b/docs/plans/purpose-separated-standards-engine/execution-ledger.md index a3b5baf6..c2ed4cc3 100644 --- a/docs/plans/purpose-separated-standards-engine/execution-ledger.md +++ b/docs/plans/purpose-separated-standards-engine/execution-ledger.md @@ -38,3 +38,17 @@ variants remain owned by the existing contract compiler. The next accepted action is installed qualification and independent review. Local implementation and artifact packaging do not authorize the standards content migration while those requirements remain pending. + +## September 23, 2026 — Final source verification and ZIP validation + +Local Git CLI commit `ea4f643fbed938281e2a03e31963c995f0bcdcbb` contains the +implementation. The final navigation-index suite passed 14 tests, the existing +coverage-publication suite passed one test, and the focused authoring workflow +passed six tests. Final selected test processes completed normally. + +The delivery patch recreated the intended index in a clean base checkout; the +incremental bundle fast-forwarded a separate disposable branch to the exact +clean implementation commit. ZIP CRC and all replacement hashes passed. The +artifact includes the exact base, patch, full files, bundle and apply procedure. +GitHub push remains DNS-blocked, so no PR was created. This evidence update does +not change source behavior, normative content or the pending acceptance boundary. diff --git a/docs/plans/purpose-separated-standards-engine/issues.md b/docs/plans/purpose-separated-standards-engine/issues.md index e5fd8732..440a8387 100644 --- a/docs/plans/purpose-separated-standards-engine/issues.md +++ b/docs/plans/purpose-separated-standards-engine/issues.md @@ -10,7 +10,7 @@ These are bounded implementation or rollout facts, not claims of newly reproduce | PSE-04 | known boundary | Content owner | Existing standards contain unreviewed mixed prose. Code alone cannot establish positive application content. | Start the real application-exposure manifest empty; migrate content through the separate guide after code acceptance. | | PSE-05 | pending | Host owner | An application agent may have independent checkout/store/log access. | Confirm the deployment boundary; Engine-mediated guarantees do not imply OS isolation or context erasure. | | PSE-06 | implemented | Authoring owner | Prompts/templates and whole-module rewrites must be editable through the final Engine contract. | Runtime and tested operation map include scope_updates and registered prompt/template editing; independent C10 review remains pending. | -| PSE-07 | pending | Verification owner | Existing failures could mask a changed claim. | Record where each affected baseline check stops; repair the obstruction, add a discriminator, or keep the claim unverified. | +| PSE-07 | resolved for selected source checks | Verification owner | Existing failures could mask a changed claim. | Final selected runs pass after recorded fixture and implementation repairs. Full supported-environment qualification remains PSE-02. | No item authorizes unrelated repository cleanup or a normative-content change during code implementation. Block only the dependent action when its required fact is unavailable. diff --git a/docs/plans/purpose-separated-standards-engine/reports/implementation-evidence.md b/docs/plans/purpose-separated-standards-engine/reports/implementation-evidence.md index 905341e7..3f653e4d 100644 --- a/docs/plans/purpose-separated-standards-engine/reports/implementation-evidence.md +++ b/docs/plans/purpose-separated-standards-engine/reports/implementation-evidence.md @@ -74,9 +74,10 @@ remote permission system or compatibility adapter was added. ## Supporting tests -Executed test records are summarized below. Final packaging reconciles their -results and any focused repairs. Structural checks do not execute the package -tests or certify prose quality. +Executed test records are summarized below. Final selected runs passed after the focused repairs described below. +Structural checks do not execute the package tests or certify prose quality. +These selected runs are not a claim that the complete Engine suite was executed +in the supported pinned environment. | Observation | Result | | --- | --- | @@ -87,12 +88,15 @@ tests or certify prose quality. | Logical authoring suite | 23 passed | | Existing low-level authoring suite | 13 passed | | Engine analysis/publication workflow suite | 14 passed | +| Existing coverage-publication suite | 1 passed | | Generated-contract/facade suite after explicit-purpose fixture repair | 15 passed | | MCP transport unit suite | 12 passed | | Purpose projection suite | 14 passed | | Real CLI/stdin-stdout transport and cold SQLite reads | 4 passed | | Existing focused agent navigation | 11 passed | +| Existing focused agent authoring workflow | 6 passed | | Existing native navigation | 7 passed | +| Navigation-index suite, including verified index publication | 14 passed | | Renderer suite after purpose/publication distinction | 10 passed | | Coordinated publication followed by provenance-only publication | 1 passed using real Git, SQLite and the complete publication checkpoint | | Full structural checkpoint | 73 suites passed; zero failed or blocked | @@ -136,6 +140,19 @@ remain outstanding. Required evidence is not replaced with the local interpreter a passing structural checkpoint, or the synthetic provenance review decisions. The content guide remains gated on code acceptance. +## Delivery validation + +The implementation commit is `ea4f643fbed938281e2a03e31963c995f0bcdcbb`, created +on the existing dedicated branch with Git CLI. The changed-files ZIP provides +complete replacement files, a full-index patch, an incremental Git bundle, +base/result hashes and application instructions. In separate disposable clones, +patch application reproduced the intended index and bundle import fast-forwarded +to the exact clean commit. Archive CRC and replacement-file hashes also passed. + +The explicit Git CLI push to the existing GitHub branch failed with +`Could not resolve host: github.com`. The fallback archive is the delivery; +no remote push or pull request is reported. + ## Handoff The runtime operation and version map, empty-corpus bootstrap, replay limits and From 42d67355cbbba2d9378cde54b6d4c2d61d493741 Mon Sep 17 00:00:00 2001 From: MrScripty Date: Wed, 23 Sep 2026 11:59:18 -0700 Subject: [PATCH 04/26] fix(engine): bound application diagnostics and record store cutover audit --- .../execution-ledger.md | 46 ++++++++++ .../issues.md | 4 +- .../reports/implementation-evidence.md | 85 +++++++++++++++---- .../generated/suite-inputs.json | 4 +- .../standards_engine/context_projection.py | 6 +- .../standards_engine/standards_engine/mcp.py | 8 +- .../tests/platform_harness.py | 2 +- tools/standards_engine/tests/test_mcp.py | 14 +++ .../tests/test_purpose_projection.py | 3 +- 9 files changed, 146 insertions(+), 26 deletions(-) diff --git a/docs/plans/purpose-separated-standards-engine/execution-ledger.md b/docs/plans/purpose-separated-standards-engine/execution-ledger.md index c2ed4cc3..66b44a8c 100644 --- a/docs/plans/purpose-separated-standards-engine/execution-ledger.md +++ b/docs/plans/purpose-separated-standards-engine/execution-ledger.md @@ -52,3 +52,49 @@ clean implementation commit. ZIP CRC and all replacement hashes passed. The artifact includes the exact base, patch, full files, bundle and apply procedure. GitHub push remains DNS-blocked, so no PR was created. This evidence update does not change source behavior, normative content or the pending acceptance boundary. + +## September 23, 2026 — Post-delivery client qualification + +Installed the Engine's hash-locked dependencies in Python 3.12 and the official +MCP Python SDK 1.30.0 in a separate disposable client environment. The SDK's +pending-workflow and full publication/recovery walkthroughs passed, including +application-purpose readback and provenance isolation. Codex CLI 0.156.1 passed +its configured app-server navigation harness against a temporary authoring +registration. The complete package run covered 477 Python tests and 73 +structural checks after correcting one stale platform-harness contract version. + +The installed Codex registration now declares authoring purpose. Its live client +loads the tool catalog, but automatic route rejects the old accepted `main` as +an unsupported capture. The real accepted ref and store were preserved; an +isolated store copy yielded ten proposal heads, five with applied outcomes and +five without recorded application. +Candidate-client qualification and this installed boundary are recorded in the +[implementation evidence](reports/implementation-evidence.md). Code integration, +old-store disposition, and independent review remain pending. + +## September 23, 2026 — Old-store audit and disposition + +Used the SQLite online backup API to make a consistent copy of the installed +store, then verified its integrity and SHA-256 after placing it in a private +offline archive at +`/home/jeremy/.local/share/standards-engine/archive/old-store-2026-09-23/`. +The adjacent `inventory.json` records the owning accepted Engine revision and +dependency-lock identity, proposal root and revision identities, relevant Git +revisions, readiness, application selection, application, and outcome links. + +The inventory contains ten roots and ten revisions. Five have completed applied +outcomes. Five have no readiness, application selection, or application record; +they are deferred drafts, not interrupted publications. No admitted application +has an unresolved outcome. The deferred revisions are retained for historical +review and excluded from active cutover. Relevant intent must enter the new +Engine as new proposals against then-current accepted standards. The old store +and its proposal records were not edited. +All five applied candidate commits still exist as Git objects, but none is an +ancestor of current accepted `main`. The archive inventory records this exact +reachability; the fresh Engine will capture current accepted `main`. + +Independent Standards and Spec reviews found no blocking source or spec issue. +The Standards review identified an application diagnostic path that could emit +private exception text to host logs or stderr. That path now reports only the +exception class, with focused tests for both Engine and MCP boundaries. The +suite-input projection was regenerated to match the changed source. diff --git a/docs/plans/purpose-separated-standards-engine/issues.md b/docs/plans/purpose-separated-standards-engine/issues.md index 440a8387..c83b90dc 100644 --- a/docs/plans/purpose-separated-standards-engine/issues.md +++ b/docs/plans/purpose-separated-standards-engine/issues.md @@ -5,8 +5,8 @@ These are bounded implementation or rollout facts, not claims of newly reproduce | ID | Status | Owner | Fact or risk | Disposition and deciding evidence | | --- | --- | --- | --- | --- | | PSE-01 | resolved | Integration owner | The actual implementation checkout may differ from inspected `366c1d9`. | Reused branch 41598c4c; only its existing CI workflow differed from inspected main. | -| PSE-02 | blocked | Verification owner | Locked-environment and real-client execution have not been performed for this plan. | Source and real local stdio/CLI observations passed on Python 3.13; supported locked Python and official SDK/client qualification remain required. | -| PSE-03 | pending | Installation owner | Active proposals, recovery-required work, and retained old-store obligations are unknown. | Establish explicit dispositions before installed cutover; preserve bytes and history; no runtime compatibility fallback. | +| PSE-02 | partially resolved | Verification owner | Installed local-client qualification remains incomplete. | Hash-locked Python 3.12, official MCP SDK 1.30.0, and a temporary Codex authoring registration passed the candidate workflows. The installed registration now declares authoring purpose and loads tools, but accepted `main` returns `SUPPORT.UNSUPPORTED_CAPTURE`; integration and store disposition remain pending. | +| PSE-03 | resolved | Installation owner | The old store contains ten proposal roots and ten revisions. Five revisions have applied outcomes; five have no readiness, application selection, or application admission. No admitted publication is unresolved. | A verified SQLite backup and per-revision inventory are retained offline at `/home/jeremy/.local/share/standards-engine/archive/old-store-2026-09-23/`. The five deferred drafts are excluded from active cutover; useful intent requires new proposals against accepted standards. No stored records were edited. | | PSE-04 | known boundary | Content owner | Existing standards contain unreviewed mixed prose. Code alone cannot establish positive application content. | Start the real application-exposure manifest empty; migrate content through the separate guide after code acceptance. | | PSE-05 | pending | Host owner | An application agent may have independent checkout/store/log access. | Confirm the deployment boundary; Engine-mediated guarantees do not imply OS isolation or context erasure. | | PSE-06 | implemented | Authoring owner | Prompts/templates and whole-module rewrites must be editable through the final Engine contract. | Runtime and tested operation map include scope_updates and registered prompt/template editing; independent C10 review remains pending. | diff --git a/docs/plans/purpose-separated-standards-engine/reports/implementation-evidence.md b/docs/plans/purpose-separated-standards-engine/reports/implementation-evidence.md index 3f653e4d..d75311ca 100644 --- a/docs/plans/purpose-separated-standards-engine/reports/implementation-evidence.md +++ b/docs/plans/purpose-separated-standards-engine/reports/implementation-evidence.md @@ -18,8 +18,9 @@ All implementation commits use Git CLI. Direct remote Git transport is unavailable in the execution environment; the user authorized a changed-files ZIP instead. No remote implementation push or PR is claimed. -The available interpreter is Python 3.13.5, outside the declared supported -3.11/3.12 range. Installed jsonschema 4.26.0, referencing 0.37.0, attrs 26.1.0 +At implementation delivery, the available interpreter was Python 3.13.5, +outside the declared supported 3.11/3.12 range. Installed jsonschema 4.26.0, +referencing 0.37.0, attrs 26.1.0 and jsonschema-specifications 2025.9.1 match their locked versions; local rpds-py 2026.5.1 differs from pinned 2026.6.3. The dependency lock and supported range remain unchanged. Results below are supporting source observations, not @@ -76,8 +77,9 @@ remote permission system or compatibility adapter was added. Executed test records are summarized below. Final selected runs passed after the focused repairs described below. Structural checks do not execute the package tests or certify prose quality. -These selected runs are not a claim that the complete Engine suite was executed -in the supported pinned environment. +These selected runs did not include the complete Engine suite in the supported +pinned environment at delivery time. Post-delivery qualification is recorded +below. | Observation | Result | | --- | --- | @@ -123,22 +125,73 @@ package and transport observations. Later focused repairs preserve these subjects where unaffected and are checked at their changed boundary. These are private test-candidate commits, not user-repository main updates. -## Remaining acceptance - -The official MCP SDK and configured Codex client are unavailable here. Their -existing harnesses have been updated for explicit purpose and the supporting -workflow, but execution in the supported locked environment remains required. -No independently delegated material review or inspection of the user's installed -store/pending recovery obligations was performed. - Candidate `a0a425ce93579ff6b0cabb05cc8a6f9b0ffe5f36` passed the corrected generated-contract suite and the complete structural checkpoint. A final formatting-only adjustment to seven test callers preserved their parsed ASTs. -The plan's C8 installed qualification and C10 independent final review therefore -remain outstanding. Required evidence is not replaced with the local interpreter, -a passing structural checkpoint, or the synthetic provenance review decisions. -The content guide remains gated on code acceptance. +## Post-delivery client qualification — September 23, 2026 + +Python 3.12.3 installed the six Engine dependencies from +`tools/standards_contracts/requirements.lock` with `--require-hashes` and +`--only-binary=:all:` into a disposable environment. A separate disposable +client environment installed the official MCP Python SDK 1.30.0. Both +environments passed `pip check`. + +The official SDK pending-workflow harness passed: it refused review before a +required disposition and accepted explicit resolution. The full SDK walkthrough +also passed against a disposable repository whose local `main` was the candidate: +authoring and application catalogs were purpose-separated; interrupted +publication required cold-process recovery; retry did not republish; stale +revision review was refused; explicit resume and normal publication succeeded; +application readback exposed approved content without authoring-only provenance. + +Codex CLI 0.156.1 ran `tests/codex_navigation_client.py` through its actual +app-server client using a temporary `standards-authoring` registration pointing +at the candidate and the hash-locked Engine Python. It discovered 15 focused +tools, checked all 20 inline edit variants and the nested evidence schemas, +then completed route-to-read with the exact snapshot. This did not start a +model turn or modify the installed Codex configuration. + +The CI-defined package run covered 477 Python tests and 73 structural checks. +One platform-harness fixture initially used request contract version 5 despite +the branch's version 6 contract; correcting that fixture and rerunning its three +tests passed. The package run used locally cached pinned dependency versions; +the separate client qualification used a fresh hash-verified Engine install. + +## Remaining acceptance + +The user's installed `standards-engine` registration now includes +`--purpose authoring`. The live Codex client discovers its 15 focused tools and +validates their schemas, but route returns `SUPPORT.UNSUPPORTED_CAPTURE` because +the accepted local `main` predates the new content contract. The candidate +passed route/read in a temporary registration whose local `main` was the exact +candidate. The real accepted ref was not retargeted to make the test pass. +The installed store was copied using SQLite's online backup API and retained +offline with a verified per-revision inventory at +`/home/jeremy/.local/share/standards-engine/archive/old-store-2026-09-23/`. +It contains ten proposal roots and ten revisions. Five revisions have an +application selection, application record, and `applied` outcome; five have no +readiness, selection, or application record. No admitted application has an +unresolved outcome. The five deferred drafts are retained for historical review +and excluded from active cutover. Any useful intent requires a new proposal +against then-current accepted standards; no stored proposal status was changed. +The inventory preserves root/revision IDs, relevant Git revisions, and the +owning accepted Engine revision and dependency lock identity. +All five applied candidate commits exist as Git objects but are not ancestors +of current accepted `main`. The inventory records that reachability, and fresh +snapshots will use current accepted `main` as their source. + +Independent Standards and Spec reviews of `git diff main...HEAD` plus the +working changes found no substantive source-scope mismatch or blocking code +standard violation. The Standards review identified full exception logging at +the application boundary as a diagnostic privacy risk. Application paths now +emit bounded exception class names without exception text or traceback; focused +tests assert that a private exception message is absent from both the public +response and diagnostics. The generated suite-input manifest was refreshed. + +The plan's C8 installed cutover and C10 independent final review remain +outstanding. Synthetic provenance review decisions do not certify the real +standards content. The content guide remains gated on code acceptance. ## Delivery validation diff --git a/evaluation/standards-effectiveness/generated/suite-inputs.json b/evaluation/standards-effectiveness/generated/suite-inputs.json index 8a49d925..b73c496e 100644 --- a/evaluation/standards-effectiveness/generated/suite-inputs.json +++ b/evaluation/standards-effectiveness/generated/suite-inputs.json @@ -7053,7 +7053,7 @@ ] }, { - "digest": "sha256:cda2c10e0de915eb09440847e45c22dada2d5092091c55b3a8700a6bfd79d8de", + "digest": "sha256:e25b0bbce6c5cb76359221cb7e8430e68e3de1dbb7e6f2883fe3b463eff87dfb", "path": "tools/standards_engine/standards_engine/context_projection.py", "state": "present", "uses": [ @@ -7111,7 +7111,7 @@ ] }, { - "digest": "sha256:abe942b581905efd080fc8dff845dc92e1f6c27a0e6b5dfc747b02d6544a4881", + "digest": "sha256:7ceec1b5fa21922a8d7b3b8d87f7e351488b3393978bcb7d7518c01516c07872", "path": "tools/standards_engine/standards_engine/mcp.py", "state": "present", "uses": [ diff --git a/tools/standards_engine/standards_engine/context_projection.py b/tools/standards_engine/standards_engine/context_projection.py index 0b122f6d..d2c5d234 100644 --- a/tools/standards_engine/standards_engine/context_projection.py +++ b/tools/standards_engine/standards_engine/context_projection.py @@ -54,8 +54,10 @@ def invoke(engine, call): if engine.purpose is Purpose.APPLICATION: try: return application_dispatch(engine, function.__name__, call) - except Exception: - logging.getLogger(__name__).exception("Application observation failed") + except Exception as error: + logging.getLogger(__name__).error( + "Application observation failed: %s", type(error).__name__ + ) return application_rejection("APPLICATION.INTERNAL_UNAVAILABLE") return function(engine, call) return invoke diff --git a/tools/standards_engine/standards_engine/mcp.py b/tools/standards_engine/standards_engine/mcp.py index 06a95c75..c5ed45d8 100644 --- a/tools/standards_engine/standards_engine/mcp.py +++ b/tools/standards_engine/standards_engine/mcp.py @@ -302,10 +302,14 @@ def _request(self, method: str, params: dict) -> dict: with redirect_stdout(sys.stderr): with AgentToolFacade.open_repository(self.root, purpose=self.purpose) as facade: value = getattr(facade, name)(arguments) - except Exception: - traceback.print_exc(file=sys.stderr) + except Exception as error: if self.purpose is Purpose.APPLICATION: + print( + f"Application invocation failed: {type(error).__name__}", + file=sys.stderr, + ) return {"isError": True, "content": [{"type": "text", "text": "Application observation is unavailable; operator diagnostics retain the failure."}]} + traceback.print_exc(file=sys.stderr) return { "isError": True, "content": [ diff --git a/tools/standards_engine/tests/platform_harness.py b/tools/standards_engine/tests/platform_harness.py index 0ea1ac6a..d511efcf 100644 --- a/tools/standards_engine/tests/platform_harness.py +++ b/tools/standards_engine/tests/platform_harness.py @@ -172,7 +172,7 @@ def _analysis_request(snapshot: dict[str, object]) -> dict[str, object]: } ], "semantic_proposals": [], - "contract_version": 5, + "contract_version": 6, } diff --git a/tools/standards_engine/tests/test_mcp.py b/tools/standards_engine/tests/test_mcp.py index 3d5e26da..9eee09b1 100644 --- a/tools/standards_engine/tests/test_mcp.py +++ b/tools/standards_engine/tests/test_mcp.py @@ -305,6 +305,20 @@ def test_internal_failure_is_tool_error_without_retry(self): facade.apply_proposal.assert_called_once() facade.recover_application.assert_not_called() + def test_application_failure_diagnostic_omits_private_exception(self): + server = MCPServer(ROOT, purpose="application") + initialize(server) + stderr = io.StringIO() + with ( + patch.object(AgentToolFacade, "open_repository") as opened, + redirect_stderr(stderr), + ): + opened.return_value.__enter__.return_value.read.side_effect = RuntimeError("private diagnostic") + response = server.dispatch(request("tools/call", {"name": "read"}))["result"] + self.assertTrue(response["isError"]) + self.assertNotIn("private diagnostic", json.dumps(response) + stderr.getvalue()) + self.assertIn("RuntimeError", stderr.getvalue()) + def test_real_snapshot_read_and_validation_through_server(self): server = MCPServer(ROOT, advanced=True, purpose="authoring") initialize(server) diff --git a/tools/standards_engine/tests/test_purpose_projection.py b/tools/standards_engine/tests/test_purpose_projection.py index 81b30f5f..2ef2eb62 100644 --- a/tools/standards_engine/tests/test_purpose_projection.py +++ b/tools/standards_engine/tests/test_purpose_projection.py @@ -188,10 +188,11 @@ def test_router_presentation_change_requires_explicit_renewal(self): def test_unexpected_observation_failure_returns_no_private_context(self): with patch.object(ApplicationView, "read", side_effect=RuntimeError(PRIVATE)): - with self.assertLogs("tools.standards_engine.standards_engine.context_projection", level="ERROR"): + with self.assertLogs("tools.standards_engine.standards_engine.context_projection", level="ERROR") as captured: value = self.read() self.assertEqual(value["code"], "APPLICATION.INTERNAL_UNAVAILABLE") self.assertNotIn(PRIVATE, json.dumps(value)) + self.assertNotIn(PRIVATE, "\n".join(captured.output)) def test_unsupported_capture_is_preserved_and_classified(self): files = {path: value for path, value in self.files.items() if path not in {APPLICATION_CONTENT, DECISION_PROVENANCE}} From 1d183e9e4b3195243f253625972b8a096e5c2875 Mon Sep 17 00:00:00 2001 From: MrScripty Date: Wed, 23 Sep 2026 12:04:41 -0700 Subject: [PATCH 05/26] docs(engine): record accepted cutover and client qualification --- .../execution-ledger.md | 23 +++++++++ .../issues.md | 12 ++--- .../plan.md | 44 ++++++++--------- .../reports/implementation-evidence.md | 47 ++++++++++++++----- 4 files changed, 85 insertions(+), 41 deletions(-) diff --git a/docs/plans/purpose-separated-standards-engine/execution-ledger.md b/docs/plans/purpose-separated-standards-engine/execution-ledger.md index 66b44a8c..4533e212 100644 --- a/docs/plans/purpose-separated-standards-engine/execution-ledger.md +++ b/docs/plans/purpose-separated-standards-engine/execution-ledger.md @@ -98,3 +98,26 @@ The Standards review identified an application diagnostic path that could emit private exception text to host logs or stderr. That path now reports only the exception class, with focused tests for both Engine and MCP boundaries. The suite-input projection was regenerated to match the changed source. + +## September 23, 2026 — Accepted-main integration and fresh-store activation + +Committed the reviewed repair and audit as `42d67355`, then fast-forwarded +local accepted `main` to that commit and returned the checkout to the +implementation branch. The original old SQLite file was moved into the private +archive alongside the independently verified SQLite backup and inventory. +Both database files pass integrity checks; the inventory records both hashes. + +The new default store contains zero proposal roots and records and a snapshot +sourced from exact accepted `main` at `42d67355`. The installed Codex +`standards-engine` registration passed catalog, schema, route, and read checks +against that fresh store. Application CLI route returned the intended +`APPLICATION.CONTENT_UNAVAILABLE` result while the production exposure manifest +remains empty. The code release is accepted; real content qualification remains +the separate guide's work. + +The earlier complete package run passed 477 tests. The post-fix rerun passed +the first five package groups and advanced through most Engine tests without a +failure, but was interrupted in a slow case; five focused post-fix regression +tests passed. The final generated-input and 73-check structural checkpoints +passed. This qualification limit is recorded rather than treating the +interrupted run as a complete post-fix pass. diff --git a/docs/plans/purpose-separated-standards-engine/issues.md b/docs/plans/purpose-separated-standards-engine/issues.md index c83b90dc..1ac9eeac 100644 --- a/docs/plans/purpose-separated-standards-engine/issues.md +++ b/docs/plans/purpose-separated-standards-engine/issues.md @@ -5,12 +5,12 @@ These are bounded implementation or rollout facts, not claims of newly reproduce | ID | Status | Owner | Fact or risk | Disposition and deciding evidence | | --- | --- | --- | --- | --- | | PSE-01 | resolved | Integration owner | The actual implementation checkout may differ from inspected `366c1d9`. | Reused branch 41598c4c; only its existing CI workflow differed from inspected main. | -| PSE-02 | partially resolved | Verification owner | Installed local-client qualification remains incomplete. | Hash-locked Python 3.12, official MCP SDK 1.30.0, and a temporary Codex authoring registration passed the candidate workflows. The installed registration now declares authoring purpose and loads tools, but accepted `main` returns `SUPPORT.UNSUPPORTED_CAPTURE`; integration and store disposition remain pending. | +| PSE-02 | resolved | Verification owner | Installed local-client qualification was required. | Hash-locked Python 3.12 and official MCP SDK 1.30.0 passed candidate publication/recovery; the installed Codex authoring registration passed catalog/schema/route/read after accepted-main integration and fresh-store activation. The application CLI returns the expected content-unavailable result. | | PSE-03 | resolved | Installation owner | The old store contains ten proposal roots and ten revisions. Five revisions have applied outcomes; five have no readiness, application selection, or application admission. No admitted publication is unresolved. | A verified SQLite backup and per-revision inventory are retained offline at `/home/jeremy/.local/share/standards-engine/archive/old-store-2026-09-23/`. The five deferred drafts are excluded from active cutover; useful intent requires new proposals against accepted standards. No stored records were edited. | | PSE-04 | known boundary | Content owner | Existing standards contain unreviewed mixed prose. Code alone cannot establish positive application content. | Start the real application-exposure manifest empty; migrate content through the separate guide after code acceptance. | -| PSE-05 | pending | Host owner | An application agent may have independent checkout/store/log access. | Confirm the deployment boundary; Engine-mediated guarantees do not imply OS isolation or context erasure. | -| PSE-06 | implemented | Authoring owner | Prompts/templates and whole-module rewrites must be editable through the final Engine contract. | Runtime and tested operation map include scope_updates and registered prompt/template editing; independent C10 review remains pending. | -| PSE-07 | resolved for selected source checks | Verification owner | Existing failures could mask a changed claim. | Final selected runs pass after recorded fixture and implementation repairs. Full supported-environment qualification remains PSE-02. | +| PSE-05 | known host boundary | Host owner | An application agent may have independent checkout/store/log access. | Engine-mediated guarantees apply to its interface; deployers must keep private files and diagnostics outside an application agent's independent reach. Application exception diagnostics now omit exception text and tracebacks. | +| PSE-06 | accepted | Authoring owner | Prompts/templates and whole-module rewrites must be editable through the final Engine contract. | Runtime and tested operation map include scope_updates and registered prompt/template editing; independent C10 review found no substantive spec mismatch. | +| PSE-07 | resolved | Verification owner | Existing failures could mask a changed claim. | Complete pre-repair run passed 477 tests; focused post-fix tests passed, and 73 structural checks passed after refreshing generated inputs. The interrupted post-fix full repeat is recorded in implementation evidence. | No item authorizes unrelated repository cleanup or a normative-content change during code implementation. Block only the dependent action when its required fact is unavailable. @@ -18,5 +18,5 @@ No item authorizes unrelated repository cleanup or a normative-content change du Remote Git transport is unavailable; the user explicitly selected a ZIP fallback. Local Git CLI commits and the exact base remain the delivery authority. -Independent material review and actual installation/store cutover are pending; -source tests and synthetic reviews do not claim them. +Independent Standards and Spec reviews and the local installation/store cutover +are complete. Remote publication remains separate from this local acceptance. diff --git a/docs/plans/purpose-separated-standards-engine/plan.md b/docs/plans/purpose-separated-standards-engine/plan.md index 7954eee9..120b95eb 100644 --- a/docs/plans/purpose-separated-standards-engine/plan.md +++ b/docs/plans/purpose-separated-standards-engine/plan.md @@ -1,9 +1,9 @@ # Implementation Plan: Purpose-Separated Standards Engine and Decision Provenance -**Plan status:** `Verifying` -**Current phase:** M3 — qualify the implemented candidate in the supported installed environment -**Next slice:** M3/S3 — complete pinned-client qualification and independent integrated review -**Acceptance status:** `blocked` +**Plan status:** `Accepted` +**Current phase:** M3 — code qualification and installed cutover complete +**Next slice:** Separate standards-content guide, when authorized by its content owner +**Acceptance status:** `accepted` **Prepared:** September 23, 2026 **Repository:** `MrScripty/Coding-Standards` **Inspected baseline:** `366c1d90a24bbfb50973f62b155a5f3396c0f107` @@ -11,7 +11,7 @@ **Issues:** [issues.md](issues.md) **Separate content guide:** [Positive guidance and decision provenance](../../guides/positive-guidance-and-provenance.md) -This document owns the implementation plan. Executed source observations and remaining qualification are recorded in [implementation evidence](reports/implementation-evidence.md); complete plan acceptance is still pending. The baseline is a research reference, not a requirement to revert a newer checkout. Reconcile material differences at M0. Runtime/code acceptance precedes standards-content migration. +This document owns the implementation plan. Executed source observations, qualification limits, and installed cutover are recorded in [implementation evidence](reports/implementation-evidence.md). The baseline is a research reference, not a requirement to revert a newer checkout. Runtime/code acceptance precedes standards-content migration. ## Objective @@ -246,7 +246,7 @@ The exposure tests address a real boundary that current full reads/inspection do ### M3 — Qualify installation, review, and hand off to content authoring -**Status:** `Verifying`; depends on M2. **Goal:** deliver the code capability required to carry out the separate guide. +**Status:** `Accepted`; depends on M2. **Goal:** deliver the code capability required to carry out the separate guide. **Allowed write set:** touched runtime/contract files for ordinary repairs; existing real-client harnesses; installation/cutover documentation; implementation evidence and generated registrations; plan bundle. Normative bodies remain preserved. @@ -261,20 +261,20 @@ The exposure tests address a real boundary that current full reads/inspection do ## Objective Acceptance -Source evidence is recorded in [implementation evidence](reports/implementation-evidence.md). Pending claims retain their stated qualification limits; the overall plan is blocked on the supported installed environment and independent final review. +Source and installed cutover evidence is recorded in [implementation evidence](reports/implementation-evidence.md). The separate content guide still owns the quality and eligibility of the real standards corpus. | ID | Observable criterion | Kind / environment / mode | Deciding evidence | Status | Evidence | | --- | --- | --- | --- | --- | --- | -| C1 | Host purpose is immutable and request input cannot elevate it or grant mutation. | contract + system / representative local host / automated | Independently authored operation matrix; actual facade/MCP/CLI calls; verify rejected mutations produce no canonical change. | `pending` | pending | -| C2 | Application reads, relationships, full detail, inspection, summaries, schemas, examples, and continuations contain only permitted material. | contract + system / representative / automated | Distinctive synthetic markers and expected permitted fields authored independently of projection code; inspect JSON, text, catalogs, and nested fields. | `pending` | pending | -| C3 | Required routing closure is complete or explicitly unavailable; hidden support nodes do not alter permitted traversal paths. | integration / not-applicable / automated | Small explicit graph fixtures, required/optional cases, unknown facts, and hidden intermediary cases. | `pending` | pending | -| C4 | The Engine can publish coordinated guidance/reference/prompt/template/provenance/exposure changes and later provenance-only changes. | system / representative Git + SQLite / automated | Public authoring operations, actual candidate materialization, accepted-ref readback, and independent content assertions. | `pending` | pending | -| C5 | Supported snapshots reopen after process replacement with matching content and current-purpose enforcement. | system / required-real local processes + store / automated | Two-process capture/read; later source mutation; real store reopening; exact requested subject/revision checks. | `pending` | pending | -| C6 | Draft exposure cannot become application-visible before reviewed publication; changed content cannot silently retain stale approval. | integration + system / representative / automated | Before/after publication reads; stale bindings; concurrent revisions; withdrawal; interruption/recovery. | `pending` | pending | -| C7 | One new contract is supported across in-repository consumers; old unsupported formats fail without corrupting retained data. | contract + system / representative / automated | Version/consumer matrix, old-format fixtures, unchanged-store checks, actual startup outcomes. | `pending` | pending | -| C8 | The installed local transports execute the complete supported workflow with correct catalogs and bounded diagnostics. | release-artifact + system / required-real locked environment and actual MCP client / automated | Existing real-client harness extended for both purposes; installed entrypoint and CLI execution. No paid model turn required. | `blocked` | [Environment limits](reports/implementation-evidence.md#remaining-acceptance) | -| C9 | Provenance-only changes leave unchanged normative semantics and unrelated impact requirements stable. | integration / not-applicable / automated | Independent before/after domain revisions and local impact expectations; allow changed opaque snapshot identity. | `pending` | pending | -| C10 | The code release preserves real normative bodies and leaves an executable content-migration path. | acceptance review / inspected repository / manual + automated comparison | One-time scoped diff review; API operation map; empty real-corpus eligibility; independent final review. | `pending` | pending | +| C1 | Host purpose is immutable and request input cannot elevate it or grant mutation. | contract + system / representative local host / automated | Independently authored operation matrix; actual facade/MCP/CLI calls; verify rejected mutations produce no canonical change. | `accepted` | Purpose projection and transport tests; official SDK catalogs. | +| C2 | Application reads, relationships, full detail, inspection, summaries, schemas, examples, and continuations contain only permitted material. | contract + system / representative / automated | Distinctive synthetic markers and expected permitted fields authored independently of projection code; inspect JSON, text, catalogs, and nested fields. | `accepted` | Projection tests and SDK application readback. | +| C3 | Required routing closure is complete or explicitly unavailable; hidden support nodes do not alter permitted traversal paths. | integration / not-applicable / automated | Small explicit graph fixtures, required/optional cases, unknown facts, and hidden intermediary cases. | `accepted` | Required-closure and hidden-intermediary fixtures. | +| C4 | The Engine can publish coordinated guidance/reference/prompt/template/provenance/exposure changes and later provenance-only changes. | system / representative Git + SQLite / automated | Public authoring operations, actual candidate materialization, accepted-ref readback, and independent content assertions. | `accepted` | Supporting workflow and official SDK publication walkthrough. | +| C5 | Supported snapshots reopen after process replacement with matching content and current-purpose enforcement. | system / required-real local processes + store / automated | Two-process capture/read; later source mutation; real store reopening; exact requested subject/revision checks. | `accepted` | Cold-process transport tests and SDK recovery walkthrough. | +| C6 | Draft exposure cannot become application-visible before reviewed publication; changed content cannot silently retain stale approval. | integration + system / representative / automated | Before/after publication reads; stale bindings; concurrent revisions; withdrawal; interruption/recovery. | `accepted` | Supporting workflow, stale-binding fixtures, and SDK interruption/recovery. | +| C7 | One new contract is supported across in-repository consumers; old unsupported formats fail without corrupting retained data. | contract + system / representative / automated | Version/consumer matrix, old-format fixtures, unchanged-store checks, actual startup outcomes. | `accepted` | Generated contract and old-capture tests; archived old store and fresh live store. | +| C8 | The installed local transports execute the complete supported workflow with correct catalogs and bounded diagnostics. | release-artifact + system / required-real locked environment and actual MCP client / automated | Existing real-client harness extended for both purposes; installed entrypoint and CLI execution. No paid model turn required. | `accepted` | Python 3.12 hash-locked SDK walkthrough; installed Codex route/read after cutover; application CLI unavailable result. | +| C9 | Provenance-only changes leave unchanged normative semantics and unrelated impact requirements stable. | integration / not-applicable / automated | Independent before/after domain revisions and local impact expectations; allow changed opaque snapshot identity. | `accepted` | Supporting workflow and analysis impact tests. | +| C10 | The code release preserves real normative bodies and leaves an executable content-migration path. | acceptance review / inspected repository / manual + automated comparison | One-time scoped diff review; API operation map; empty real-corpus eligibility; independent final review. | `accepted` | Normative diff, empty manifests, operation map, and independent Standards/Spec reviews. | A marker-absence test proves only sampled disclosure paths; pair it with positive field assertions, operation admission, and the complete bounded entrypoint inventory. Codepoint text equality is used where exact returned content is the contract. Generated freshness proves derived files are current, not that the prose is correct or the exposure boundary works. @@ -293,7 +293,7 @@ PYTHONPATH=. "$ENGINE_PYTHON" -m unittest discover -s tools/standards_policy_imp PYTHONPATH=.:tools/standards_verifier "$ENGINE_PYTHON" -m unittest discover -s tools/standards_verifier/tests ``` -Run additional touched-owner suites from their established READMEs. Execute the repository structural checkpoint separately through the Engine. Regenerate contracts with the existing compiler and generated-input mechanism, then check freshness. The new `--purpose` syntax and new edit schemas are proposed work, not commands claimed to exist today. Retain the supported transport protocol unless a separately evidenced interoperability issue requires changing it. +Run additional touched-owner suites from their established READMEs. Execute the repository structural checkpoint separately through the Engine. Regenerate contracts with the existing compiler and generated-input mechanism, then check freshness. The implemented `--purpose` syntax and edit schemas are documented in the accepted contract. Retain the supported transport protocol unless a separately evidenced interoperability issue requires changing it. ## Execution Discipline @@ -305,9 +305,9 @@ Ordinary implementation/test repair continues within the admitted contract. Repl A new implementation file, additional focused assertion, or unchanged review record is not by itself a reason to reopen design admission. Investigation ends when the fact that could change the decision has been resolved. Independent work continues while a real environment or rollout claim is pending. -## Blockers +## Delivery boundary -The available Python 3.13 environment is outside the supported locked range. Official MCP SDK/installed-client qualification and independent integrated review remain outstanding. User installation and pending-store recovery facts remain operator-owned. Remote Git push is unavailable; the user selected changed-files ZIP delivery. +Python 3.12 hash-locked dependencies, the official MCP SDK, the installed Codex client, independent review, and the old-store cutover have been qualified as recorded in implementation evidence. Local accepted `main` contains the code. Remote Git push was unavailable during delivery; the changed-files ZIP remains a fallback artifact, and local acceptance does not claim remote publication. ## Code-To-Content Handoff @@ -317,8 +317,8 @@ The first content work should migrate Core, the application-relevant Router/fact ## Final Acceptance -- Acceptance status: `blocked` -- Final status: `Verifying` +- Acceptance status: `accepted` +- Final status: `Accepted` - Deferred follow-ups: normative content migration and downstream effectiveness evaluation, owned by the separate guide and existing effectiveness effort. ## Source baseline diff --git a/docs/plans/purpose-separated-standards-engine/reports/implementation-evidence.md b/docs/plans/purpose-separated-standards-engine/reports/implementation-evidence.md index d75311ca..4cfc4030 100644 --- a/docs/plans/purpose-separated-standards-engine/reports/implementation-evidence.md +++ b/docs/plans/purpose-separated-standards-engine/reports/implementation-evidence.md @@ -158,14 +158,14 @@ the branch's version 6 contract; correcting that fixture and rerunning its three tests passed. The package run used locally cached pinned dependency versions; the separate client qualification used a fresh hash-verified Engine install. -## Remaining acceptance - -The user's installed `standards-engine` registration now includes -`--purpose authoring`. The live Codex client discovers its 15 focused tools and -validates their schemas, but route returns `SUPPORT.UNSUPPORTED_CAPTURE` because -the accepted local `main` predates the new content contract. The candidate -passed route/read in a temporary registration whose local `main` was the exact -candidate. The real accepted ref was not retargeted to make the test pass. +## Installed cutover and acceptance + +The user's installed `standards-engine` registration includes +`--purpose authoring`. Before integration it discovered its 15 focused tools +and validated their schemas but route returned `SUPPORT.UNSUPPORTED_CAPTURE` +against the old accepted `main`. Candidate route/read passed in a disposable +clone whose local `main` identified the candidate; the real accepted ref was +not retargeted for premerge testing. The installed store was copied using SQLite's online backup API and retained offline with a verified per-revision inventory at `/home/jeremy/.local/share/standards-engine/archive/old-store-2026-09-23/`. @@ -178,8 +178,9 @@ against then-current accepted standards; no stored proposal status was changed. The inventory preserves root/revision IDs, relevant Git revisions, and the owning accepted Engine revision and dependency lock identity. All five applied candidate commits exist as Git objects but are not ancestors -of current accepted `main`. The inventory records that reachability, and fresh -snapshots will use current accepted `main` as their source. +of the pre-cutover accepted `main`. The inventory records that reachability. +The archive holds both the original database bytes and a consistent SQLite +backup, with separate verified SHA-256 values and integrity checks. Independent Standards and Spec reviews of `git diff main...HEAD` plus the working changes found no substantive source-scope mismatch or blocking code @@ -189,9 +190,29 @@ emit bounded exception class names without exception text or traceback; focused tests assert that a private exception message is absent from both the public response and diagnostics. The generated suite-input manifest was refreshed. -The plan's C8 installed cutover and C10 independent final review remain -outstanding. Synthetic provenance review decisions do not certify the real -standards content. The content guide remains gated on code acceptance. +The corrected candidate passed the 73-check structural checkpoint. Its +post-fix package run passed the metadata (31), policy-impact (10), contracts +(23), analysis (100), and verifier (156) groups; the Engine group advanced +through most tests without a failure, then a slow case was interrupted. The +earlier complete run passed 477 Python tests. Five focused post-fix tests for +bounded diagnostics and the platform harness passed, and the generated input +projection was current. The incomplete repeat is not counted as a complete +post-fix suite. + +Local accepted `main` was fast-forwarded to `42d67355cbbba2d9378cde54b6d4c2d61d493741`; +the checkout returned to `implementation/purpose-separated-standards-engine`. +The original old database moved to the private archive after integration. The +new default store has zero proposal roots and records, passes SQLite integrity +check, and contains a snapshot sourced from that exact accepted `main` commit. +The actual installed Codex registration then discovered all 15 tools, validated +the 20 edit variants and nested evidence contracts, and completed route/read +on one snapshot. The installed application CLI returned +`APPLICATION.CONTENT_UNAVAILABLE` against the intentionally empty exposure +manifest, rather than `SUPPORT.UNSUPPORTED_CAPTURE`. + +C8 installed qualification and C10 independent review are complete for the +code release. Synthetic provenance decisions do not certify real standards +content; the separate content guide owns that later qualification. ## Delivery validation From 90a3c8f13f517ad1dc32342fa10a4f1af181ed81 Mon Sep 17 00:00:00 2001 From: MrScripty Date: Wed, 23 Sep 2026 13:22:47 -0700 Subject: [PATCH 06/26] docs(engine): import performance design and measurement evidence --- .../execution-ledger.md | 12 ++ .../plan.md | 2 +- .../README.md | 59 ++++++ .../SHA256SUMS | 130 ++++++++++++ .../baseline-summary.json | 143 +++++++++++++ .../design.md | 193 +++++++++++++++++ .../evidence.md | 198 ++++++++++++++++++ .../evidence/cgroup.json | 6 + .../evidence/ci-baseline.json | 54 +++++ .../evidence/completed-for-parallel.json | 1 + .../evidence/completed-original.json | 1 + .../evidence/environment.json | 16 ++ .../evidence/followup.stderr | 0 .../evidence/followup.stdout | 26 +++ .../evidence/followup/concurrent-readers.json | 10 + .../evidence/followup/identity-profile.txt | 44 ++++ .../evidence/followup/mcp-0.stderr | 0 .../evidence/followup/mcp-1.stderr | 0 .../evidence/followup/measurements.json | 137 ++++++++++++ .../evidence/followup/source-size.json | 1 + .../evidence/full-run.stderr | 4 + .../evidence/full-run.stdout | 27 +++ .../evidence/operation-run.stderr | 0 .../evidence/operation-run.stdout | 115 ++++++++++ .../evidence/operations/capture-size-0.json | 1 + .../evidence/operations/capture-size-1.json | 1 + .../evidence/operations/capture-size-2.json | 1 + .../evidence/operations/compile-profile.txt | 78 +++++++ .../evidence/operations/compiled-memory.json | 6 + .../evidence/operations/operations.jsonl | 57 +++++ .../evidence/operations/snapshot-0.json | 1 + .../evidence/operations/snapshot-1.json | 1 + .../evidence/operations/snapshot-2.json | 1 + .../evidence/parallel-summary.json | 18 ++ .../evidence/per-test-full.jsonl | 27 +++ .../evidence/qualified-controller.stderr | 1 + .../evidence/qualified-controller.stdout | 0 .../evidence/qualified_apply_cold.exit.json | 1 + .../evidence/qualified_apply_cold.jsonl | 5 + .../evidence/qualified_apply_cold.stderr | 5 + .../evidence/qualified_apply_cold.stdout | 2 + .../qualified_apply_topology.exit.json | 1 + .../evidence/qualified_apply_topology.jsonl | 7 + .../evidence/qualified_apply_topology.stderr | 5 + .../evidence/qualified_apply_topology.stdout | 2 + .../evidence/qualified_audit.exit.json | 1 + .../evidence/qualified_audit.jsonl | 8 + .../evidence/qualified_audit.stderr | 5 + .../evidence/qualified_audit.stdout | 2 + .../evidence/qualified_navigation.jsonl | 3 + .../evidence/qualified_navigation.stderr | 5 + .../evidence/qualified_navigation.stdout | 2 + .../evidence/scheduler.stderr | 0 .../evidence/scheduler.stdout | 0 .../evidence/slow-case-isolated.exit.json | 1 + .../evidence/slow-case-isolated.jsonl | 6 + .../evidence/slow-case-isolated.stderr | 5 + .../evidence/slow-case-isolated.stdout | 2 + .../evidence/source-integrity.json | 56 +++++ .../evidence/test_agent_workflow.exit.json | 1 + .../evidence/test_agent_workflow.jsonl | 12 ++ .../evidence/test_agent_workflow.stderr | 5 + .../evidence/test_agent_workflow.stdout | 6 + .../evidence/test_analysis.exit.json | 1 + .../evidence/test_analysis.jsonl | 40 ++++ .../evidence/test_analysis.stderr | 59 ++++++ .../evidence/test_analysis.stdout | 28 +++ .../test_applicability_contract.exit.json | 1 + .../test_applicability_contract.jsonl | 5 + .../test_applicability_contract.stderr | 5 + .../test_applicability_contract.stdout | 4 + .../evidence/test_authoring.exit.json | 1 + .../evidence/test_authoring.jsonl | 27 +++ .../evidence/test_authoring.stderr | 5 + .../evidence/test_authoring.stdout | 26 +++ .../test_coverage_publication.exit.json | 1 + .../evidence/test_coverage_publication.jsonl | 3 + .../evidence/test_coverage_publication.stderr | 17 ++ .../evidence/test_coverage_publication.stdout | 2 + .../test_evidence_maintenance.exit.json | 1 + .../evidence/test_evidence_maintenance.jsonl | 18 ++ .../evidence/test_evidence_maintenance.stderr | 5 + .../evidence/test_evidence_maintenance.stdout | 14 ++ .../test_generated_contract.exit.json | 1 + .../evidence/test_generated_contract.jsonl | 32 +++ .../evidence/test_generated_contract.stderr | 5 + .../evidence/test_generated_contract.stdout | 30 +++ .../evidence/test_logical_authoring.exit.json | 1 + .../evidence/test_logical_authoring.jsonl | 48 +++++ .../evidence/test_logical_authoring.stderr | 5 + .../evidence/test_logical_authoring.stdout | 46 ++++ .../evidence/test_mcp.exit.json | 1 + .../evidence/test_mcp.jsonl | 25 +++ .../evidence/test_mcp.stderr | 5 + .../evidence/test_mcp.stdout | 24 +++ .../evidence/test_navigation.exit.json | 1 + .../evidence/test_navigation.jsonl | 17 ++ .../evidence/test_navigation.stderr | 20 ++ .../evidence/test_navigation.stdout | 14 ++ .../test_navigation_indexes.exit.json | 1 + .../evidence/test_navigation_indexes.jsonl | 42 ++++ .../evidence/test_navigation_indexes.stderr | 5 + .../evidence/test_navigation_indexes.stdout | 28 +++ .../evidence/test_platform_harness.exit.json | 1 + .../evidence/test_platform_harness.jsonl | 7 + .../evidence/test_platform_harness.stderr | 29 +++ .../evidence/test_platform_harness.stdout | 6 + .../test_purpose_projection.exit.json | 1 + .../evidence/test_purpose_projection.jsonl | 30 +++ .../evidence/test_purpose_projection.stderr | 5 + .../evidence/test_purpose_projection.stdout | 28 +++ .../evidence/test_purpose_transport.exit.json | 1 + .../evidence/test_purpose_transport.jsonl | 10 + .../evidence/test_purpose_transport.stderr | 5 + .../evidence/test_purpose_transport.stdout | 8 + .../evidence/test_rendering.exit.json | 1 + .../evidence/test_rendering.jsonl | 21 ++ .../evidence/test_rendering.stderr | 5 + .../evidence/test_rendering.stdout | 20 ++ .../test_supporting_workflow.exit.json | 1 + .../evidence/test_supporting_workflow.jsonl | 21 ++ .../evidence/test_supporting_workflow.stderr | 5 + .../evidence/test_supporting_workflow.stdout | 2 + .../measurement-tools/after-tests.sh | 5 + .../measurement-tools/measure_followup.py | 79 +++++++ .../measurement-tools/measure_operations.py | 101 +++++++++ .../recheck_fixture_qualification.py | 15 ++ .../measurement-tools/run_tests.py | 31 +++ .../measurement-tools/run_timed_suite.py | 64 ++++++ .../measurement-tools/schedule_tests.py | 25 +++ .../measurement-tools/summarize_evidence.py | 197 +++++++++++++++++ .../operation-baseline.csv | 20 ++ .../per-test-baseline.csv | 162 ++++++++++++++ 133 files changed, 3039 insertions(+), 1 deletion(-) create mode 100644 docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/README.md create mode 100644 docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/SHA256SUMS create mode 100644 docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/baseline-summary.json create mode 100644 docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/design.md create mode 100644 docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence.md create mode 100644 docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/cgroup.json create mode 100644 docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/ci-baseline.json create mode 100644 docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/completed-for-parallel.json create mode 100644 docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/completed-original.json create mode 100644 docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/environment.json create mode 100644 docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/followup.stderr create mode 100644 docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/followup.stdout create mode 100644 docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/followup/concurrent-readers.json create mode 100644 docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/followup/identity-profile.txt create mode 100644 docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/followup/mcp-0.stderr create mode 100644 docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/followup/mcp-1.stderr create mode 100644 docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/followup/measurements.json create mode 100644 docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/followup/source-size.json create mode 100644 docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/full-run.stderr create mode 100644 docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/full-run.stdout create mode 100644 docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/operation-run.stderr create mode 100644 docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/operation-run.stdout create mode 100644 docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/operations/capture-size-0.json create mode 100644 docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/operations/capture-size-1.json create mode 100644 docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/operations/capture-size-2.json create mode 100644 docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/operations/compile-profile.txt create mode 100644 docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/operations/compiled-memory.json create mode 100644 docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/operations/operations.jsonl create mode 100644 docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/operations/snapshot-0.json create mode 100644 docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/operations/snapshot-1.json create mode 100644 docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/operations/snapshot-2.json create mode 100644 docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/parallel-summary.json create mode 100644 docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/per-test-full.jsonl create mode 100644 docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/qualified-controller.stderr create mode 100644 docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/qualified-controller.stdout create mode 100644 docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/qualified_apply_cold.exit.json create mode 100644 docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/qualified_apply_cold.jsonl create mode 100644 docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/qualified_apply_cold.stderr create mode 100644 docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/qualified_apply_cold.stdout create mode 100644 docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/qualified_apply_topology.exit.json create mode 100644 docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/qualified_apply_topology.jsonl create mode 100644 docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/qualified_apply_topology.stderr create mode 100644 docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/qualified_apply_topology.stdout create mode 100644 docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/qualified_audit.exit.json create mode 100644 docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/qualified_audit.jsonl create mode 100644 docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/qualified_audit.stderr create mode 100644 docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/qualified_audit.stdout create mode 100644 docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/qualified_navigation.jsonl create mode 100644 docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/qualified_navigation.stderr create mode 100644 docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/qualified_navigation.stdout create mode 100644 docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/scheduler.stderr create mode 100644 docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/scheduler.stdout create mode 100644 docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/slow-case-isolated.exit.json create mode 100644 docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/slow-case-isolated.jsonl create mode 100644 docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/slow-case-isolated.stderr create mode 100644 docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/slow-case-isolated.stdout create mode 100644 docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/source-integrity.json create mode 100644 docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/test_agent_workflow.exit.json create mode 100644 docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/test_agent_workflow.jsonl create mode 100644 docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/test_agent_workflow.stderr create mode 100644 docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/test_agent_workflow.stdout create mode 100644 docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/test_analysis.exit.json create mode 100644 docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/test_analysis.jsonl create mode 100644 docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/test_analysis.stderr create mode 100644 docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/test_analysis.stdout create mode 100644 docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/test_applicability_contract.exit.json create mode 100644 docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/test_applicability_contract.jsonl create mode 100644 docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/test_applicability_contract.stderr create mode 100644 docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/test_applicability_contract.stdout create mode 100644 docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/test_authoring.exit.json create mode 100644 docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/test_authoring.jsonl create mode 100644 docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/test_authoring.stderr create mode 100644 docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/test_authoring.stdout create mode 100644 docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/test_coverage_publication.exit.json create mode 100644 docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/test_coverage_publication.jsonl create mode 100644 docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/test_coverage_publication.stderr create mode 100644 docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/test_coverage_publication.stdout create mode 100644 docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/test_evidence_maintenance.exit.json create mode 100644 docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/test_evidence_maintenance.jsonl create mode 100644 docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/test_evidence_maintenance.stderr create mode 100644 docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/test_evidence_maintenance.stdout create mode 100644 docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/test_generated_contract.exit.json create mode 100644 docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/test_generated_contract.jsonl create mode 100644 docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/test_generated_contract.stderr create mode 100644 docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/test_generated_contract.stdout create mode 100644 docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/test_logical_authoring.exit.json create mode 100644 docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/test_logical_authoring.jsonl create mode 100644 docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/test_logical_authoring.stderr create mode 100644 docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/test_logical_authoring.stdout create mode 100644 docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/test_mcp.exit.json create mode 100644 docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/test_mcp.jsonl create mode 100644 docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/test_mcp.stderr create mode 100644 docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/test_mcp.stdout create mode 100644 docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/test_navigation.exit.json create mode 100644 docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/test_navigation.jsonl create mode 100644 docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/test_navigation.stderr create mode 100644 docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/test_navigation.stdout create mode 100644 docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/test_navigation_indexes.exit.json create mode 100644 docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/test_navigation_indexes.jsonl create mode 100644 docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/test_navigation_indexes.stderr create mode 100644 docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/test_navigation_indexes.stdout create mode 100644 docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/test_platform_harness.exit.json create mode 100644 docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/test_platform_harness.jsonl create mode 100644 docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/test_platform_harness.stderr create mode 100644 docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/test_platform_harness.stdout create mode 100644 docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/test_purpose_projection.exit.json create mode 100644 docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/test_purpose_projection.jsonl create mode 100644 docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/test_purpose_projection.stderr create mode 100644 docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/test_purpose_projection.stdout create mode 100644 docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/test_purpose_transport.exit.json create mode 100644 docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/test_purpose_transport.jsonl create mode 100644 docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/test_purpose_transport.stderr create mode 100644 docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/test_purpose_transport.stdout create mode 100644 docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/test_rendering.exit.json create mode 100644 docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/test_rendering.jsonl create mode 100644 docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/test_rendering.stderr create mode 100644 docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/test_rendering.stdout create mode 100644 docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/test_supporting_workflow.exit.json create mode 100644 docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/test_supporting_workflow.jsonl create mode 100644 docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/test_supporting_workflow.stderr create mode 100644 docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/test_supporting_workflow.stdout create mode 100644 docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/measurement-tools/after-tests.sh create mode 100644 docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/measurement-tools/measure_followup.py create mode 100644 docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/measurement-tools/measure_operations.py create mode 100644 docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/measurement-tools/recheck_fixture_qualification.py create mode 100644 docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/measurement-tools/run_tests.py create mode 100644 docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/measurement-tools/run_timed_suite.py create mode 100644 docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/measurement-tools/schedule_tests.py create mode 100644 docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/measurement-tools/summarize_evidence.py create mode 100644 docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/operation-baseline.csv create mode 100644 docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/per-test-baseline.csv diff --git a/docs/plans/purpose-separated-standards-engine/execution-ledger.md b/docs/plans/purpose-separated-standards-engine/execution-ledger.md index 4533e212..1a37a8fd 100644 --- a/docs/plans/purpose-separated-standards-engine/execution-ledger.md +++ b/docs/plans/purpose-separated-standards-engine/execution-ledger.md @@ -121,3 +121,15 @@ failure, but was interrupted in a slow case; five focused post-fix regression tests passed. The final generated-input and 73-check structural checkpoints passed. This qualification limit is recorded rather than treating the interrupted run as a complete post-fix pass. + +## September 23, 2026 — Performance design evidence imported + +Imported the [performance design and measurement package](reports/standards-engine-performance-report/README.md) +from `standards-engine-performance-design-and-evidence.zip`. ZIP integrity and +all packaged SHA-256 checks passed. The package proposes optimizations and +contains no production code patch. Its measurements target `87507611` in a +separate environment; the current branch includes later cutover commits and +the platform-harness contract-version repair described above. Its timings and +targets therefore remain supporting design evidence, not measured results for +the current installed Engine. This import makes no runtime, store, or standards +content change. diff --git a/docs/plans/purpose-separated-standards-engine/plan.md b/docs/plans/purpose-separated-standards-engine/plan.md index 120b95eb..52689366 100644 --- a/docs/plans/purpose-separated-standards-engine/plan.md +++ b/docs/plans/purpose-separated-standards-engine/plan.md @@ -319,7 +319,7 @@ The first content work should migrate Core, the application-relevant Router/fact - Acceptance status: `accepted` - Final status: `Accepted` -- Deferred follow-ups: normative content migration and downstream effectiveness evaluation, owned by the separate guide and existing effectiveness effort. +- Deferred follow-ups: normative content migration and downstream effectiveness evaluation, owned by the separate guide and existing effectiveness effort; the separately [proposed performance design](reports/standards-engine-performance-report/design.md) requires current-branch qualification before implementation. ## Source baseline diff --git a/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/README.md b/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/README.md new file mode 100644 index 00000000..a6f46f63 --- /dev/null +++ b/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/README.md @@ -0,0 +1,59 @@ +# Standards Engine performance design and evidence + +This package contains analysis, a proposed design, raw measurement evidence, and external measurement scripts. It contains **no production implementation patch**. The source branch and normative standards are unchanged. + +## Read the reports + +- [Recommended design and verification plan](design.md) +- [Measured evidence and limitations](evidence.md) +- [Per-test timing table](per-test-baseline.csv): every completed attempt, including failed initial attempts and qualified reruns. +- [Per-operation timing table](operation-baseline.csv) +- [Machine-readable summary](baseline-summary.json) + +The baseline is the published branch `implementation/purpose-separated-standards-engine` at `8750761133b66297a2bfac4e495fd1c8a893b96a`. The user's local checkout and installed database were not accessible. The reports distinguish local supporting measurements, the user's reported timings, existing CI results, and unmeasured design targets. + +## Reproduce on the supported environment + +Use a disposable clone and an evidence directory outside the source tree. The commands below deliberately change only the disposable clone's `main`, not the real accepted branch. They also check out that local main because some existing tests create nested clones that assume their checked-out branch is named main. + +```bash +SOURCE='/media/jeremy/OrangeCream/Linux Software/repos/owned/developer-tooling/Coding-Standards' +WORK="$(mktemp -d)" +OUT="$WORK/evidence" +mkdir -p "$OUT" +git clone --local --no-hardlinks \ + --branch implementation/purpose-separated-standards-engine \ + "$SOURCE" "$WORK/repo" +git -C "$WORK/repo" checkout -B main \ + 8750761133b66297a2bfac4e495fd1c8a893b96a + +# Select the existing supported 3.11/3.12 environment installed from the exact lock. +PY='/absolute/path/to/locked-engine-environment/bin/python' +REPORT='/absolute/path/to/standards-engine-performance-report' +export PYTHONDONTWRITEBYTECODE=1 + +"$PY" "$REPORT/measurement-tools/run_timed_suite.py" \ + --repo "$WORK/repo" --output "$OUT/engine-tests.jsonl" + +"$PY" "$REPORT/measurement-tools/measure_operations.py" \ + --repo "$WORK/repo" --output "$OUT/operations" --samples 3 --profile + +"$PY" "$REPORT/measurement-tools/measure_followup.py" \ + --repo "$WORK/repo" --evidence "$OUT" +``` + +Run these commands serially for isolated latency comparison. The submitted report's complete per-test population was assembled from split runs, with explicitly labeled concurrent module timing; it is not represented as a serial full-suite latency measurement. Increase independent paired repetitions when establishing candidate regression thresholds; the report's three operation sweeps do not establish a tail-latency SLA. + +The unchanged platform harness at this revision submits Analysis request version 5 to the version-6 interface and therefore fails. The standalone operation benchmark constructs valid version-6 requests; it does not repair or bypass that test. Keep this failure visible until a separately authorized harness-conformance repair is made. + +`run_timed_suite.py` times setup, body, teardown and selected original method calls, and uses a Python-thread sampler to capture long-case stacks without terminating the test. It preserves test assertions and call behavior. The optional `--test` or `--pattern` selects a narrower measurement. The scripts assume the measured branch's actual methods; revalidate instrumentation when applying them to later implementations. + +`measure_followup.py` reuses a fully closed disposable store created by the operation script. It measures existing identity framing/encoding, fresh-process CLI reads, hand-driven MCP stdio calls, and two concurrent readers. Its SHA-256-only probe is attribution evidence, never a replacement content-ID contract. Fresh processes do not imply that physical filesystem caches were flushed. Official MCP SDK and configured Codex acceptance remain separate from this protocol-level measurement. + +## Evidence contents + +`evidence/operations/operations.jsonl` holds nested inclusive and exclusive span accounting. `evidence/*test*.jsonl`, `evidence/test_*.jsonl`, and `evidence/qualified_*.jsonl` hold test start/end records, statuses and stack observations. Associated stderr files retain failures. `evidence/ci-baseline.json` transcribes the relevant existing CI log results and names their primary source. `evidence/environment.json` and `evidence/source-integrity.json` record the local execution boundary. + +Binary SQLite stores, repository copies, private installed state and Git bundles are intentionally absent from this report package. Reproduction creates its own disposable stores. Text profiler summaries are provided instead of requiring profiler tooling to open binary profiles. `SHA256SUMS` covers the packaged reports, observations and measurement tools. + +The original orchestration scripts are also included to explain campaign provenance, but contain the report-generation environment's `/mnt/data/engine-performance` paths. The three commands above are the portable measurement entrypoints; the orchestration scripts are not required for reproduction. diff --git a/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/SHA256SUMS b/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/SHA256SUMS new file mode 100644 index 00000000..02b96493 --- /dev/null +++ b/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/SHA256SUMS @@ -0,0 +1,130 @@ +7db17bfe5c22cc28157d14c4a138a518dfadfb43ee063c32045bf9c99ffc3b61 README.md +3e810c257bd52d900fe019cd0e28c61b80e65ad17b9105ca0f78743798bd0d1d baseline-summary.json +69eee7a42c19e874f69c579a58224ee27e53f36569a0303fcbd730fa2fc2b970 design.md +11de2e6f0411140dfd5b3e78569a6184f711dc5fcfd485ec868cf7db4d6f9b1b evidence/cgroup.json +ded6af9a29db76c1114975cebd0003dc0a38d8c24de04d3c366b33b4b156cbd6 evidence/ci-baseline.json +ee543efbc290220d977a60f86e4d5202e0bf50b8ff944532ecaf510398546b50 evidence/completed-for-parallel.json +ed94f485568cb0a23b9053be008e101a19e937e7bb2d3dd995f9e08bba4aa9fc evidence/completed-original.json +2d152b1fbe24daf142135c81621146366d19010dfd4d64dbf64b6fe0829e8df1 evidence/environment.json +d33c5ac67b94bfcce1357d7840fdb9b610f3cbe18b9e7749ecb042f7be7278ef evidence/followup/concurrent-readers.json +9e133d8115b392ab03a05d2b0443f42595bd3c601286a6555c1c33358bfcc617 evidence/followup/identity-profile.txt +e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 evidence/followup/mcp-0.stderr +e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 evidence/followup/mcp-1.stderr +e531d3923d793c6010b72e01002944f8bb13c2984e41475f832280a7f0c7c5c7 evidence/followup/measurements.json +cebca885057d5c76cbeb7a6fd82370e98a9a777d0a575abb3e45e4c71e616917 evidence/followup/source-size.json +e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 evidence/followup.stderr +24197356b3a4ac8db47dfa2d98b4fa47457474747f93e1ad56060c126161885d evidence/followup.stdout +ba9a5025bddf6756113f631b59bc1d55f9ed873700dd608831a21a3281dd5207 evidence/full-run.stderr +709040173f0a3db9c355f42b6e95f55a721399c03eccfe99890e3c4be46be1a8 evidence/full-run.stdout +e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 evidence/operation-run.stderr +7d451a7715994f52782bc6ea78aa41f3412cd2dfb5d963deafbaa6efe2580129 evidence/operation-run.stdout +59690e2d8fa87d354a6de2afaf8dead802a3cb162cdd7d0e1d7bb34915b1f4ec evidence/operations/capture-size-0.json +59690e2d8fa87d354a6de2afaf8dead802a3cb162cdd7d0e1d7bb34915b1f4ec evidence/operations/capture-size-1.json +59690e2d8fa87d354a6de2afaf8dead802a3cb162cdd7d0e1d7bb34915b1f4ec evidence/operations/capture-size-2.json +9b118f82f4fa423776b9e8dd19be72368640d8ddf193e64d727fe914dc212d8d evidence/operations/compile-profile.txt +396121c8f9596ec4cd6a2369b4f68ecee40aceff7b52b0e96b2dcd2b5d0b9e38 evidence/operations/compiled-memory.json +24c96704c8ffd5b142c030243bf72db623834095e48af87176541679eff9d3b9 evidence/operations/operations.jsonl +b3488e46f66dcc335e0168c8216aad305fa6bc45f7c938525ed2c596cea14e63 evidence/operations/snapshot-0.json +761a1132ab067f6fface5f5b0df607c1845b07e939fed8bf2797c53dac9b23c7 evidence/operations/snapshot-1.json +7b1ba8d62730bc4583f6ebab06e7bb58e4f7932f4ff2a7024e875c77e9261d89 evidence/operations/snapshot-2.json +fa181764a6efb215918a6a73595673d70962e0ae36f6b941a16fe2e27a910e7e evidence/parallel-summary.json +5c9a765d65b9fe1ee44e9745e96b0ce1e6c8f9c89ec9778a1b334e2d427bc48d evidence/per-test-full.jsonl +446ff0ffd78aeb745263492c17a55ce198f883d87fd7800720043a1b562c71f8 evidence/qualified-controller.stderr +e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 evidence/qualified-controller.stdout +3ada8bc6b2004d6b28b1c28144a7995d2f9985166899a2877d03e02d220cc238 evidence/qualified_apply_cold.exit.json +7ee9b59389df604096a07ee826a318306fe7bc8ebc6b8663cbc4efb63baf85aa evidence/qualified_apply_cold.jsonl +561ca6c2f5c1a124599b9e67648d7b285bcc2bc29457f6543b67e75e94533eb4 evidence/qualified_apply_cold.stderr +cc85baa5007b6d41715cb811dd2bafadbadd623d1b8a4a7da98cbf8a5a2bec5b evidence/qualified_apply_cold.stdout +c5f898abbaf4f1189af76ee9793c08fbfedec4cb18d499bb51679b2e4714d70b evidence/qualified_apply_topology.exit.json +281efffa6172d7f159d6c2e2ec792a6f259e524a86e68ab8dc6b91dfc82243d3 evidence/qualified_apply_topology.jsonl +a011e1552c807bf8cd90fc3b4f0760261ddd3c9fb4db45a3e19343856111c156 evidence/qualified_apply_topology.stderr +7891174ffebfbd3c4c80148f23426a6126a4189dc2db1835598a37845c1d90ae evidence/qualified_apply_topology.stdout +8323649780c2d456bf1c4e1667fd2d0fd1184b31cb3656b912f76de1fb7b42aa evidence/qualified_audit.exit.json +fd8a8b267116e2c57806904e1bfe0fb68a0eafbf105aa12a5fd47fdf8adbf56f evidence/qualified_audit.jsonl +ae5f920bbf35f0d21654b31c029fc80fb53f824dea99624448b893ddca89c818 evidence/qualified_audit.stderr +db8d056dd020d7d747d0f9392544d4a5b6e4c8eb91bc8b9bf9d6da2a0a8f18fe evidence/qualified_audit.stdout +84a9d9187d54bba1a5e401be5edd35aa976472042297962a018c1e11927a5f57 evidence/qualified_navigation.jsonl +38a1fae90613bd4e8d355a4bc681a0340ad14307201f82e42e01a228ba158025 evidence/qualified_navigation.stderr +479869225108e8793c2f664037722cbd0783388049aef74221049bdeec97bf7d evidence/qualified_navigation.stdout +e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 evidence/scheduler.stderr +e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 evidence/scheduler.stdout +c1d41be57795e2883a2cee6c93fb1d7a8e292e7aca1970c55872b699a375aea5 evidence/slow-case-isolated.exit.json +f5a6b717ad4c612c6e0aaf0e5961826a9bf3d1efbfe10ff61781e55e4d1921af evidence/slow-case-isolated.jsonl +55f9e21dbe77c432d1f570ee487e5eab8881936f75f408c3ec38bfce8f4d3cc3 evidence/slow-case-isolated.stderr +a5fb8486ab8ca5c89e8b504a038c77f8adc243b16fe51bcf5e2d44388befe403 evidence/slow-case-isolated.stdout +016d05ebfdf151ad4d38d7d2abb2d2b704d8b1c820db8d49a8caf64737540c7a evidence/source-integrity.json +59b0b4988d821ca194d29c768fdac1e9cc5d57625ebbf889e94d3d34f56170c6 evidence/test_agent_workflow.exit.json +6ea4c633642a244d9f94a80096b462e0458941808650e21fa9085571767488b5 evidence/test_agent_workflow.jsonl +eef10146a433e16dd898ac83db4eb1470b7da55ee0014014fe49d842a1ff0f54 evidence/test_agent_workflow.stderr +1bb08c64b296a7deb76395ec4fd805ce5ebd9ab0093a5d84b354b76a795195e5 evidence/test_agent_workflow.stdout +e7aa289baa398c325da6e5228f87a60a0cb5dd0cacc91f70da51e5398c70f7aa evidence/test_analysis.exit.json +dd76907fc23a6909d785cdb5deead0334b5f40723515e6d242f36e30491335d3 evidence/test_analysis.jsonl +57a4e6e3f77383efc08ff5c04cfaf255880f364ca9910e120e7fe0e2cc352ade evidence/test_analysis.stderr +837657b93c106f4f246be103d6ab544a7a9f2174c1628e3eb71c6391b15828e0 evidence/test_analysis.stdout +05481b8563082fb69972a099d5f404d4af3077f391c906efce11b226d7d75531 evidence/test_applicability_contract.exit.json +0458f68062cf7afa11773b8b53eea54b6fd96616ea46d55a9f923ba4c75a0d62 evidence/test_applicability_contract.jsonl +6f283ee6225d2cef4c0127d95456a6f954c45141c92b97dd89016cb1c630e8f4 evidence/test_applicability_contract.stderr +cfcebb8630c84a7693804864ddf9d05f22247c66cdcbfab6a20277651d828772 evidence/test_applicability_contract.stdout +5c9212f0dc0a1445fc6603378571ce3187a7a51e573bfe11e1c010080b037faa evidence/test_authoring.exit.json +669cabfc0a85326060419a77ab0ea4d650169fe48a6f31ce472d254a9959f33b evidence/test_authoring.jsonl +a48ad8149627f9a6113a7f54366e6601fd2e6fea867739ec9f3f3f51df1c1bc9 evidence/test_authoring.stderr +a490a4c4e35dc851369ff334c714eb78fe8566bc56d8fd75389f4d726bfb9084 evidence/test_authoring.stdout +81652e0988fe9332995b7f1c462079402550b24d81b65052b0d8516a7e2b7424 evidence/test_coverage_publication.exit.json +b58af2c49249836c95f7784950500841c82a07323c57ba324b24c856efb2cfc5 evidence/test_coverage_publication.jsonl +3c992dd188a21b74d6e2ee6226acc7f3386f25b9a8646a9d2fcf830de9cf76b0 evidence/test_coverage_publication.stderr +75142a15bf4279dbec53add38ff930709d42cb93e4c362dd80adf49ca81884d6 evidence/test_coverage_publication.stdout +88d17b3856b217aed5de8481aba668750d71ca82d6c0af6fafd340c3084e5ce8 evidence/test_evidence_maintenance.exit.json +c68190d04e434203abf341c87f6bd4d158a5efe2b433a268297bd30e238ebcf5 evidence/test_evidence_maintenance.jsonl +911dcf4331a4227a09b6dbba2b137ecf9e0fbb9addce0d2aff8860553c38a41a evidence/test_evidence_maintenance.stderr +054e1710794f34a5d93a6f796a94c005b619036277aba5777eedb047a3d7cb33 evidence/test_evidence_maintenance.stdout +dac535af160bbaf4b6f7a6e777399caad937ddf6715baff02ddb5067060326c2 evidence/test_generated_contract.exit.json +4dc907067c720461de4280c884377ec46edf904631ea4e5e71449acfd372e855 evidence/test_generated_contract.jsonl +35c120667b3aa8a0a22ac9331a69ca395a83aa87e41e40c0abc9446a9e78b15b evidence/test_generated_contract.stderr +6fac4442a464e21d999b197625f089f7cccfe7075c3187c44efc246d885d9308 evidence/test_generated_contract.stdout +6aaeb5924709d18515f4b1be603a04f2b968e1c207156b268b0ad7b4a0d6a0e5 evidence/test_logical_authoring.exit.json +281ba9610664741865799457385608ef13bf04eaf791d20c568f7e1baff0a5c6 evidence/test_logical_authoring.jsonl +50910d5878f18d56c8c294cce3908075a233739b0ff87792a53da116d73bc235 evidence/test_logical_authoring.stderr +d668986cdbbb6bffd06c8b8aa48919d8ad5fa76d0a96a24706857648c1e545df evidence/test_logical_authoring.stdout +3e22f4848542273f662b65bad723beac307c87a312592116a02c5183fec6e0b7 evidence/test_mcp.exit.json +ec7f1b862ff763f291a72b0c9af6002f3ef5b65e79a4fc52f112cd0d8f5ba0cc evidence/test_mcp.jsonl +eca8814c4ffc4d0f73a9dc843a0e8a7823c266367e7be123c8ed41cc6e5aba48 evidence/test_mcp.stderr +6e81877fa732a30054899ca174f48557cf09470866427dd40f5661254be4db1c evidence/test_mcp.stdout +4c84497dfc00bfab0314a085fe63589f87d75684bf15f7fcdfda66f2cd2569ae evidence/test_navigation.exit.json +1ec7efbf15019adcd8e66191523b1f35075057e46cec90678dec9bc076b17810 evidence/test_navigation.jsonl +bda345ab3283603ee80ef882c59df5bab27177ccdb168fa8a36f723e2ea69837 evidence/test_navigation.stderr +643b9a893f5de13c7d9017ca13f2d2b1da4f13057b6bfe4d39b3beb984f6a496 evidence/test_navigation.stdout +cf658026d4717bd0c1450d8a76355ba1375880e5815f0d1c070aebb1d090a6c9 evidence/test_navigation_indexes.exit.json +d1e9c6900463d248a0e500eccb42113b36bc9e6007b9ff5fa1eeae89fd35e0d8 evidence/test_navigation_indexes.jsonl +c06fe237b8ff70627e39d0f8dc8cd39ace7a0daf5688cb56e83b1867fb247c00 evidence/test_navigation_indexes.stderr +eb1c4c46e7459f33718bde83bfd5195c90059de30b644aeccb7f681fdeea2782 evidence/test_navigation_indexes.stdout +c62d2f00ba6b561e2b39fddb1b0d3d698894a4eae346e6575f968e721f418d52 evidence/test_platform_harness.exit.json +1aff29d467cd90ec19c8eaa88c263d4c31f88f91e8c1dd4ee9ef57be1d43fb00 evidence/test_platform_harness.jsonl +c238b312b921daace7e0fe56e2f46efd47c77e287ce775bb7a876551faff2dc2 evidence/test_platform_harness.stderr +7c45edf51e569fe0434c78b47646c873c1f84223b5023874c2e1deb299e8ddaa evidence/test_platform_harness.stdout +24baa0bc8d39647e450df1f18a791400533e727cd407ffc248ceecf66aa40c1e evidence/test_purpose_projection.exit.json +525025a39e819af0c69921680b54bb2e57698b7667694a4152efb5a1aac7b07d evidence/test_purpose_projection.jsonl +d428db85c808c5bbd942d35cb6a9b4062bfd1cf6ee340e34dc70dd6f60fc9ec5 evidence/test_purpose_projection.stderr +8f838e389e3d19cdf35c5fb794dc9caf05b0c90e99cec743025ef484f4e4733c evidence/test_purpose_projection.stdout +03b472abeeb19c6782af607688107d03f76bec6fa30817a5fb0d0a7c55182fed evidence/test_purpose_transport.exit.json +9140cf541452444163c6e9947810e240a52dc20f436fc614e338bd74d8def85d evidence/test_purpose_transport.jsonl +558b11af52a26d3829f1fe5193c10a98e6642b9b9b6937d5646c11299391d856 evidence/test_purpose_transport.stderr +fbf7a748908090ffa071a1fa2ec3704b15df3fd6393d4aff21c9eb26143de5c5 evidence/test_purpose_transport.stdout +0868368d1a34dc424853419a3203ed5556b624b8af80b2f36cc2de233ebc929c evidence/test_rendering.exit.json +da125db0a60b6a4df6ef8e9429fc40188804df12e07f59b3e1259bd9a0fe13dd evidence/test_rendering.jsonl +cf8d3a2572a7898fcf32a4c2dd1445509b3d59e66061853243c4627f80695068 evidence/test_rendering.stderr +62b2c6ef6eb83d7654d7a005f5f1082bc76501f79bd21781dfcdec6b074841d6 evidence/test_rendering.stdout +b207fc61d3325a4349e02d6e25985b6dead6dee4173fdc7f2ccef8e8636cd089 evidence/test_supporting_workflow.exit.json +328766a5c7610471f9d3281fe35596e502b8f2a427e7b260944e192b7fe676e9 evidence/test_supporting_workflow.jsonl +81694df81148b7331d8255e0f952c7a4f4644a3625484b8cded3dce0c431a173 evidence/test_supporting_workflow.stderr +4d9dca6a9494128c5822c5f02dfa9ba189a5e138a96613cd48ea29446c07e327 evidence/test_supporting_workflow.stdout +11ba8d5dc16cbfdf9c0a4f342ff0e0f0e503432f5dd5ab04c2ecfe6690587acc evidence.md +bc5e69fe38a0f0e303510365970a7a273cebc3c7f9c9c6e7709c3a7f2a9d5fdf measurement-tools/after-tests.sh +3fc4dbfe55f462751fc0972fbb5e611493361c20e1abd34d4612a5b657379785 measurement-tools/measure_followup.py +8a8b0be46f9200019272934218545fe393173a882d931ee27143d3f7e7e4f7d2 measurement-tools/measure_operations.py +935439e518e89391542dfd45ff7b2492812e3593e44fd9adecd6380bb506de6b measurement-tools/recheck_fixture_qualification.py +545126a894f09f06f9d43a63c64909bde0595ee35dd278a43b6a5f6d3482bfa0 measurement-tools/run_tests.py +f2551f120820950bc24f7dd256f82732029368f662e6148041cef1aedb45353d measurement-tools/run_timed_suite.py +8fb9ea508b38eebe323a6b27db59cfb3bb2a54623c1599d4b0b8a6c2dfa5a31a measurement-tools/schedule_tests.py +37b753fdbbd26c66ff3d2857dd4b4a51230cc4a88ae1bfe38c21d2a9d9cfd3cb measurement-tools/summarize_evidence.py +1ee6878b97b2c9e60caf947e2e02b3a970776d74ce3cb01a84143071c6671062 operation-baseline.csv +030a765946af3b5751209b6a9b69010b5bc21a6c475a2166b5b17faf66943c6b per-test-baseline.csv diff --git a/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/baseline-summary.json b/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/baseline-summary.json new file mode 100644 index 00000000..6f976d62 --- /dev/null +++ b/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/baseline-summary.json @@ -0,0 +1,143 @@ +{ + "observed_distinct_tests": 157, + "attempts": 161, + "consolidated_statuses": { + "pass": 156, + "skip": 0, + "error": 1, + "failure": 0 + }, + "per_test_is_not_one_serial_suite_run": true, + "scheduler_complete": true, + "followup_complete": true, + "longest_completed": [ + { + "test": "test_supporting_workflow.SupportingWorkflowTest.test_coordinated_publication_and_provenance_only_revision", + "wall_s": 839.06457716, + "cpu_s": 617.979156948, + "status": "pass", + "lane": "isolated stores/checkouts; concurrent module campaign", + "source_log": "test_supporting_workflow.jsonl" + }, + { + "test": "test_coverage_publication.EngineAuditPublicationTest.test_review_verify_apply_recover_and_read_without_original_database", + "wall_s": 264.38809278099984, + "cpu_s": 153.307691122, + "status": "pass", + "lane": "disposable-main fixture qualification rerun; concurrent campaign", + "source_log": "qualified_audit.jsonl" + }, + { + "test": "test_navigation_indexes.NavigationIndexWorkflowTest.test_z_exact_index_proposal_requires_review_and_applies_through_engine", + "wall_s": 250.161738701, + "cpu_s": 159.509019199, + "status": "pass", + "lane": "isolated stores/checkouts; concurrent module campaign", + "source_log": "test_navigation_indexes.jsonl" + }, + { + "test": "test_analysis.AnalysisWorkflowTest.test_apply_create_and_retire_owns_topology_and_commit", + "wall_s": 179.66984623599978, + "cpu_s": 72.619611824, + "status": "pass", + "lane": "disposable-main fixture qualification rerun; concurrent campaign", + "source_log": "qualified_apply_topology.jsonl" + }, + { + "test": "test_evidence_maintenance.EvidenceMaintenanceInterfaceTest.test_preview_and_overlap_preserve_working_tree_then_apply_retires", + "wall_s": 170.09449521300007, + "cpu_s": 27.811621846999998, + "status": "pass", + "lane": "isolated stores/checkouts; concurrent module campaign", + "source_log": "test_evidence_maintenance.jsonl" + }, + { + "test": "test_navigation_indexes.ProtectedNavigationIndexTest.test_z_declared_sections_survive_verified_index_application", + "wall_s": 162.93120885300004, + "cpu_s": 115.06860945200003, + "status": "pass", + "lane": "isolated stores/checkouts; concurrent module campaign", + "source_log": "test_navigation_indexes.jsonl" + }, + { + "test": "test_analysis.AnalysisWorkflowTest.test_review_composition_publishes_readiness_for_complete_analysis", + "wall_s": 124.78088032799997, + "cpu_s": 120.680856882, + "status": "pass", + "lane": "isolated stores/checkouts; concurrent module campaign", + "source_log": "test_analysis.jsonl" + }, + { + "test": "test_agent_workflow.AgentWorkflowTest.test_normative_proposal_stops_at_real_pending_work", + "wall_s": 119.85453770599997, + "cpu_s": 116.38708710799999, + "status": "pass", + "lane": "isolated serial slow-case reproduction", + "source_log": "slow-case-isolated.jsonl" + }, + { + "test": "test_analysis.AnalysisWorkflowTest.test_relationship_only_proposals_enter_a1c_and_replay_cold", + "wall_s": 119.039640512, + "cpu_s": 114.099035275, + "status": "pass", + "lane": "isolated stores/checkouts; concurrent module campaign", + "source_log": "test_analysis.jsonl" + }, + { + "test": "test_agent_workflow.AgentWorkflowTest.test_revision_advancement_does_not_retarget_old_context", + "wall_s": 106.61506452999993, + "cpu_s": 100.177395083, + "status": "pass", + "lane": "isolated stores/checkouts; concurrent module campaign", + "source_log": "test_agent_workflow.jsonl" + }, + { + "test": "test_analysis.AnalysisWorkflowTest.test_apply_proposal_composes_real_verification_and_cold_readback", + "wall_s": 105.71184679599992, + "cpu_s": 37.010024707, + "status": "pass", + "lane": "disposable-main fixture qualification rerun; concurrent campaign", + "source_log": "qualified_apply_cold.jsonl" + }, + { + "test": "test_analysis.AnalysisWorkflowTest.test_proposal_analysis_derives_inputs_and_replays_exact_revision", + "wall_s": 75.324488675, + "cpu_s": 72.27664687999999, + "status": "pass", + "lane": "isolated stores/checkouts; concurrent module campaign", + "source_log": "test_analysis.jsonl" + }, + { + "test": "test_agent_workflow.AgentWorkflowTest.test_review_is_explicit_and_current_authorization_is_required", + "wall_s": 73.57862857499981, + "cpu_s": 70.58365419900001, + "status": "pass", + "lane": "isolated stores/checkouts; concurrent module campaign", + "source_log": "test_agent_workflow.jsonl" + }, + { + "test": "test_analysis.AnalysisWorkflowTest.test_equal_transition_is_idempotent_and_different_evidence_branches", + "wall_s": 48.434708839999985, + "cpu_s": 48.375320581000004, + "status": "pass", + "lane": "isolated stores/checkouts; concurrent module campaign", + "source_log": "test_analysis.jsonl" + }, + { + "test": "test_agent_workflow.AgentWorkflowTest.test_reference_proposal_composes_analysis_without_review_or_application", + "wall_s": 45.97590149400003, + "cpu_s": 43.901939248000005, + "status": "pass", + "lane": "isolated stores/checkouts; concurrent module campaign", + "source_log": "test_agent_workflow.jsonl" + } + ], + "failures": [ + { + "test": "test_platform_harness.PlatformHarnessTest.test_closed_store_round_trip_uses_public_operations", + "status": "error", + "source_log": "test_platform_harness.jsonl", + "wall_s": 28.083518951000087 + } + ] +} \ No newline at end of file diff --git a/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/design.md b/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/design.md new file mode 100644 index 00000000..5c18e673 --- /dev/null +++ b/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/design.md @@ -0,0 +1,193 @@ +# Standards Engine performance design + +**Status:** proposed design; no optimization implemented. +**Analysis date:** 2026-09-23. +**Branch:** `implementation/purpose-separated-standards-engine`. +**Inspected revision:** `8750761133b66297a2bfac4e495fd1c8a893b96a`. + +## Recommendation + +Improve the cost of preserving integrity before adding a cache around the existing slow path. The first implementation increment should combine exact-format identity-encoding improvements, bounded reuse of verified Git objects during capture, and explicit reuse of immutable material within an operation. Preserve the existing full compiler and all capture/replay, authorization, publication, recovery, and disclosure boundaries. + +A bounded pure compiled-snapshot cache and supported-interface reuse at the existing MCP-process lifetime are a second, conditional increment. Keep the Engine/SQLite lifetime per call: reopening costs only milliseconds in the measured database and preserves the current open-time validation boundary. Its design is specified below, but its current marginal saving is approximately 0.3 seconds per ordinary read, not the whole 2.9-second read. Admit that extra retained state only if the first increment leaves meaningful repeated-call latency or schema-loading cost. Selective compilation and a persistent on-disk compiled cache are not selected. + +The measured contributors and complete measurement limitations are in [the evidence report](evidence.md). Proposed budgets are targets for a later implementation comparison, not demonstrated speedups or accepted production service levels. + +## Scope and governing contracts + +This is a design and evidence task. Application source, tests, normative standards, dependency locks, the real accepted branch, and the user's installed database remain unchanged. Measurements run against an isolated reconstruction of the published branch. A separate disposable benchmark clone points its **local** `main` at the candidate, as required for pre-merge qualification by `PURPOSE-SEPARATION.md`; the source reconstruction retains the original `main`. + +The applicable guidance is Core and the Router; Performance and Verification; Development Proportionality; Architecture and Immutable Results And Replay; Contracts; Persistence; Concurrency; and Security for the existing purpose/authorization boundary. Relevant obligations are measurement fidelity, proportionate machinery, independently sufficient module boundaries, exact replay, honest supported-environment claims, and owner-specific lifecycle. This task creates no new generic standards policy. + +Preserved product promises: + +1. New capture resolves accepted `main` once to an exact Git revision, reads that revision, independently compiles recorded Git material and frozen material, compares requested path closure and semantic signatures, and publishes only after success. +2. Explicit snapshot and proposal handles select their exact material. Cold replay uses captured bytes, rather than current files or an originating process. +3. Application/authoring purpose is host-owned and immutable for the interface. Each response is constructed through its existing purpose-qualified path. +4. Current access authorization, review decisions, proposal heads, application readiness, exact candidate verification, compare-and-swap publication, and recovery observations retain their current checks and timing boundaries. +5. Existing supported contract semantics remain single-valued. The design preserves identity-v2 preimages and content IDs; it introduces no old-format reader, fallback authority, dual write, or automatic migration. + +## Measured problem decomposition + +For the 434-file, 3,708,028-byte captured corpus, the temporary SQLite database was 4,558,848 bytes. Three isolated serial operation sweeps measured a median 15.234-second capture and approximately 2.9-second explicit reads. The operation breakdown locates approximately 2.54 seconds of a read in snapshot loading outside SQLite, principally content-identity reconstruction; SQLite content retrieval is about 0.011 seconds and compilation about 0.32 seconds. + +Capture makes 1,137 source reads of 434 unique paths, leading to 6,134 verified object requests for only 524 distinct repository/OID/type combinations. Each object request launches a new `git cat-file --batch` process. Git commands consumed approximately 11.34 seconds in the representative capture. The independent frozen compilation itself was approximately 0.315 seconds. The two-pass guarantee is necessary; repeatedly launching Git to read the same immutable commit and tree objects is not the guarantee. + +The isolated long workflow test took 119.855 seconds in its body and 137.863 seconds including its class setup and runner work. It recomputed content identity 32 times (86.127 seconds), compiled 52 times (18.528 seconds), and reconstructed a proposal projection 21 times. Parent and child span durations overlap; those projection durations must not be added again. This is CPU-intensive repeated derivation, not evidence that a 240 MB database caused a wait. + +## Options and trade-offs + +| Design | Benefit supported by baseline | Cost / correctness concern | Decision | +| --- | --- | --- | --- | +| Reuse already-verified material and projections inside an operation | Identical base/proposed snapshot is loaded twice in `prepare`; same-snapshot `resolve` loads it four times. `_validate_projected_inputs` reconstructs a projection already obtained by its caller. | Requires explicit proof lifetime and separation from live authorization, lifecycle, and publication barriers. | First increment. | +| Optimize identity encoding without changing bytes or IDs | Content-identity work is about 88% of a read's wall time and 72% of the isolated long test body. | Exact escaping, arbitrary integers, path ordering, framing lengths, and failure behavior must remain equivalent. | First increment; highest repeated-read leverage. | +| Capture-scoped verified Git object reuse | 6,134 requests versus 524 unique objects identifies about 91.5% redundant object fetches. | Bounded memory and correct repository/gitlink/hash-algorithm scoping; mutable sources must retain existing recording semantics. | First increment. | +| A genuine capture-scoped batch Git reader | Amortizes remaining process and pipe setup beyond object reuse. | Adds pipe framing, output-bound enforcement, cancellation, and child-process lifecycle. | Evaluate after object reuse; retain only if remaining capture cost warrants it. | +| Compiled immutable-snapshot cache | Avoids about 0.3 seconds of compilation per ordinary warm read; supports reuse across analysis operations. | A cache around `_compiled_snapshot` would otherwise skip lifecycle and content validation. Requires bounded, immutable ownership. | Conditional second increment, after cheap integrity work. | +| MCP-process-owned pure cache and compiled interface, with per-call Engine | Reuses derived material and avoids about 0.28 seconds of interface compilation; retains current database-open checks. | Explicit borrowed-cache ownership and namespace/bounds; no cached request state. | Preferred form of the conditional second increment. | +| One long-lived Engine/SQLite connection per MCP server | Also retains caches, but saves only about 0.004–0.005 seconds of store opening here. | Changes open-check frequency unless checks remain per call; adds connection replacement/shutdown concerns. | Not preferred for this baseline. | +| Selective / lazy compilation | Coverage/evidence compilation dominates the compiler-only profile; navigation often uses less than the full result. | Full compilation currently validates more than rendering needs. Skipping stages can accept malformed authority previously rejected. Adds dependency-specific proof and cache states. | Defer. | +| Persist compiled Python state on disk or add a shared cache service | Could reduce process-replacement recomputation. | New serialization/trust/versioning/recovery boundary, no demonstrated need after cheap validation and compilation. | Exclude from this design. | +| Reduce checks, bypass hashing, omit captured evidence, relax SQLite integrity/durability | Would remove work. | Changes the promised result or detection boundary, rather than improving its implementation. | Outside the accepted objective. | + +## Preferred core design and module boundaries + +### 1. Exact identity encoding remains Identity-owned + +`tools/standards_identity/standards_identity/encoding.py` remains the sole owner of identity-v2 encoding and framing. Snapshot code continues supplying its existing domain, prefix, paths, and bytes. Improve the implementation behind that boundary. + +The existing path-byte-set builder validates and constructs each framed entry once and then constructs it again. Retain the validated first construction and sort those entries, preserving empty/duplicate-path and Unicode checks. The byte content is represented as millions of integer values; every byte currently travels through the arbitrary-size integer formatter, including list creation and `divmod`. Use an exact small-integer fast path or bounded precomputed byte tokens, retaining the general arbitrary-integer path. Encode contiguous unescaped string segments together, preserving the existing exact quote, backslash, control-character, Unicode and surrogate behavior. + +Begin with these local transformations. Introduce a compact byte-sequence representation or streamed hashing only if retained allocation and encoding cost still dominate. Such a specialization belongs inside Identity and emits the **same existing canonical preimage**, including encoded-length framing; it is not a Snapshot-owned second encoder. `encode_identity_value` and `hash_identity` must share one definition of encoding semantics. + +Keep complete content hashing on durable loads. A faster hash of a different record, a file-count check, or trusting the database's stored content ID would change the claim. Standard `json.dumps` is not presumed identical to the current custom escaping and arbitrary-integer behavior. + +### 2. Verified Git reuse is capture-owned, not a global file cache + +Add a bounded exact-revision read session within `tools/repository_git`, constructed for one exact selected revision and its explicit gitlink mapping. Capture owns one such session; another bulk revision read, such as `maintain_evidence`, may own its own session using the same mechanism. Cache only fully verified object bytes, addressed by repository identity, object ID, expected type and hash algorithm. Retain the existing header, size, frame, mode, type and object-ID checks before admission. A repeat lookup reuses the same verified immutable object; first reads retain exact error classification. + +The Engine composes that reader beneath `_GitRevisionSource`. `RecordingContentSource` continues observing every requested logical path and comparing repeat results. It remains unchanged for mutable or independently implemented content sources. Fresh frozen replay continues to run through a separate recorder and a fresh full compiler; neither compiler result may be answered from a compiled cache. + +An initial **8 MiB verified-object payload / 1,024-entry cap** is proposed for the captured workload (3.71 MB file bytes and 524 unique observed objects). These are candidate-local tuning values, not new generic standards. Measure bookkeeping and tree-object retention before accepting them. Eviction or an oversized valid object causes ordinary verified reading, with no correctness change. Existing per-object safety limits remain authoritative. Destroy this cache at the owning capture or bulk-read operation's completion or failure. A verified object remains a valid immutable input for that operation; the session does not claim continuous health of its original on-disk storage after the successful read. Every fresh session verifies its own first reads. + +If repeated process startup remains material after this change, the same repository owner can run one batch reader per underlying Git repository for the capture. Git's documented batch protocol already supports multiple requests in one process. Preserve per-frame verification and independent stderr draining; consume and reap the child on every terminal path. A new whole-capture deadline must not replace the existing per-operation contract. This additional adapter is contingent on measured residual cost. + +### 3. Explicit material reuse inside one public operation + +In `standards_engine/engine.py`, carry verified captures, compiled snapshots and exact `LogicalProjection` values through the pure preparation/evaluation path. A small local operation-owned mapping or explicit parameters suffice; there is no global context registry or new durable record. + +For identical base and proposed snapshot IDs, validate the material once and use the same immutable value for both roles. Preserve each role's identity and the existing current lifecycle checks. For distinct inputs, retain distinct verified values. Pass the already obtained proposal projection to `_validate_projected_inputs` instead of rebuilding it to inspect the same facts. Where logical authoring also recompiles its unchanged base, pass the existing compiled base through a bounded internal input that is explicitly bound to the verified source; independently compile the changed candidate. The two fresh snapshot-capture passes remain separate from this reuse. + +`resolve` still evaluates the pre-submission and post-submission decision states separately. Reuse their immutable input material, not the evaluation, permissions or decision result. Apply the same rule to repeated immutable proposal material during `propose`, `analyze`, and `query_proposal`. + +Live source/evidence observations, provider execution, current authorization, current proposal-head checks, and the explicit pre-/post-verifier publication validations remain fresh where they are currently required. A code path crossing one of those barriers reacquires the required authority; it does not cite an earlier material lookup as proof of permission or readiness. No reuse survives the owning operation unless the separately admitted cache design applies. + +## Conditional compiled cache and transport lifetime + +### Entry and lookup rules + +The cache stores only the fully compiled representation of an exact frozen content set. Scope it to a trusted owner with fixed repository identity, installed compiler/contract implementation, and purpose. For MCP this is an explicit cache owned by the existing server process and borrowed by each per-call Engine; standalone callers can keep reuse operation-local. The key is the validated content-set identity within that namespace, including the observed store identity where required to isolate store lifecycles. Public handles, source revision, access state and result envelopes are reconstructed from the current request; they are not cached results. + +**Each public operation first performs the existing readable-root/lifecycle and durable content integrity checks.** Use the optimized exact hash. Only then consult the compiled cache. Cache availability never makes a missing, quarantined, expired, corrupted, or unsupported capture readable. Within the operation, the verified material can flow as described above. + +On a miss, compile through the existing full pipeline. Retain the successful frozen representation; failures are returned and not negatively cached. Where capture has just completed both independent passes, its second validated result may seed this cache only after successful publication. Retain a frozen content source, not the first pass's live Git reader or either recorder's mutable tracking state. The graph currently exposes read-only mapping views; all other reachable collections and sources need the same ownership review before sharing. + +A hit supplies pure canonical material to the existing purpose-qualified projection. Application approvals, dependencies and filtered relationships come from the exact selected snapshot. Build fresh response objects and continuations. Keep authoring data inside the trusted process; it is never an application output-cache entry. + +### Bounds + +The measured incremental retained compilation allocation is 3.65 MB, excluding already-held captured bytes and imported code. Raw capture plus that increment is about 7.36 MB. Propose an **LRU with at most two compiled entries and a 32 MiB accounted-retention budget**, sufficient for a representative base/proposed pair with headroom. Confirm actual retained object accounting during implementation; this is not a process-RSS guarantee. + +Account raw bytes and reachable compiled allocations without repeatedly charging shared immutable objects. An entry whose ownership or size cannot be established stays uncached. Oversized valid work uses the normal verified uncached path. Eviction changes cost only; active operations retain their borrowed immutable value until completion. Cache-owned memory and active-operation working memory are reported separately. The cache owner releases its entries deterministically at shutdown. Closing a borrowing per-call Engine closes its store but does not destroy the server-owned pure cache. + +An entry-count-only `functools.lru_cache` around a method is not this design: it retains `self`/results and cannot express the lifecycle/integrity lookup boundary or byte accounting. Python's documentation also distinguishes a thread-safe cache map from single execution of a concurrent miss. + +### MCP lifetime + +Prefer retaining the current per-call Engine/facade/store lifetime. The existing MCP process owns a bounded cache of pure compiled material and one compiled supported-interface contract. Its call path injects those trusted dependencies into a fresh Engine/facade, executes the operation, and closes the SQLite connection as it does now. Interface selection and full store-open validation remain explicit; the cached interface describes the installed Engine API, not accepted-main policy. + +This saves the expensive pure work without paying the semantic cost of reducing how often the database is reopened and integrity-checked. The measured 4–5 ms reopen cost does not justify changing that behavior. If a future deployment establishes meaningful open-time cost, evaluate a long-lived connection separately with an explicit integrity-check contract; it is not part of the preferred first design. + +Keep the existing serial request dispatch. Each independent MCP process owns its own pure cache and fixed purpose; no distributed cache or extra service is introduced. Each Engine receives a fresh/current execution context under the existing authorization contract. A plain CLI invocation still opens, executes, and closes once; it gets correct cold behavior without a background process. + +The installed implementation and generated interface are fixed for the MCP process lifetime. Engine code/schema replacement requires a controlled restart; ordinary standards publication is not code replacement. A new store is opened through the existing validation path and uses its own cache namespace. Missing/corrupt/replaced storage is not answered from retained material. Clear retained pure entries at server EOF or failure. + +Implement the reuse boundary in the Standards Engine package, not as standards semantics inside MCP. The transport owns its lifetime and injects it; snapshot loading owns integrity; the Engine owns pure compilation. Avoid a cached facade with a mutable Engine pointer or an ambient global cache. + +## Invalidation and failure matrix + +| Event | Required behavior | +| --- | --- | +| Accepted `main` advances | Next automatic capture resolves the new OID and performs both fresh compiles and closure equality. Old explicit snapshots keep their old material. | +| Main changes during a capture | Complete the capture against the OID selected at entry; the subsequent new capture sees the next revision. No mixed working-tree reads. | +| Only non-captured files change | The source revision still reflects the selected commit. Equal verified content may reuse pure compilation; result provenance remains attached to the correct snapshot. | +| Old snapshot reopened in another process | Recheck store/lifecycle/content and cold-compile captured inputs; missing cache is immaterial. | +| Snapshot quarantined, purged, missing, or bytes corrupted | Current store check returns the existing typed failure before cache use. No stale cached result substitutes. | +| Exposure withdrawn on newer main | New capture reflects withdrawal. Explicit historical snapshots retain their documented historical approval semantics; current disclosure authorization remains separate. | +| Purpose or current permission differs | Dispatch and projection enforce the current trusted interface/authorization. Cached canonical material grants neither capability nor disclosure. | +| Proposal head changes | Existing revision binding and compare-and-swap checks decide readiness/application. An older pure projection never selects the new head. | +| Publication interrupted or outcome unknown | Existing recovery handles and observation-only recovery remain authoritative. Cache lookup does not authorize retry or infer success. | +| Budget exceeded or entry evicted | Normal verified computation; same value or same domain failure, different latency only. | +| Compilation rejects | Return the existing failure; no cached failed state or fallback to another snapshot. | +| Engine implementation/contract changes | Restart and create an empty process cache under the one installed supported contract. No serialized compiled-state compatibility path. | + +## Concurrency and SQLite/Git costs + +The representative read's SQLite work is small. Store opening, including integrity checks, is measured in milliseconds for this database. There is no evidence to justify changing journal mode, synchronization durability, constraints, isolation, or busy handling for the reported delay. + +One concurrency concern remains visible in source: `SnapshotModule.maintain()` calls `purge_expired()`, which begins an immediate write transaction even when nothing expires. Multiple processes sharing a store can contend there. This is a **separate potential cause under write contention**, not the measured CPU-bound two-minute test. Measure that scenario before changing maintenance scheduling; expiry and lifecycle visibility are correctness boundaries. + +Keep SQLite transactions narrow and retain current conditional writes. Pure compilation does not hold a write transaction. For in-process concurrency, preserve current serialized ownership instead of making one SQLite connection accidentally shared across worker threads. If a future embedding explicitly supports concurrent calls, use one connection/Engine per execution owner or a reviewed serialization boundary. A concurrent cache map alone would not make the Engine thread-safe. + +Git object reuse is isolated to its capture and repository mapping. No lock is held while running unrelated analysis or publishing. A failed or cancelled capture releases reader/process/cache resources, and the next capture obtains a new accepted revision and fresh validation. + +## Verification plan + +Use the unchanged public behavior as the reference and test the affected mechanism at its real boundary. The original platform harness currently submits Analysis request version 5 to a version-6 interface. Correct that caller as a separately identified harness-conformance repair before claiming platform acceptance; never add a version-5 runtime fallback or relabel its present rejection as a passing timing sample. + +| Claim | Focused evidence | +| --- | --- | +| Identity bytes and IDs unchanged | Existing identity-v2 fixtures plus differential exact-preimage and digest comparison for all 256 bytes, empty content, controls, quotes/backslashes, Unicode scalar boundaries, duplicate/reordered paths, large arbitrary integers, and framed-length boundaries. Keep malformed-input outcomes. A temporary reference oracle belongs only in tests and has a stated retirement condition. | +| Capture still performs independent proof | Count two fresh compiles; retain mutating-source, additional replay-read, path-closure mismatch and signature mismatch cases. Seeded cache must not satisfy either pass. | +| Git reuse preserves exact objects | Real disposable Git repositories with repeated trees/blobs, modes, mapped gitlinks, missing/corrupt objects, object-size failures and distinct repositories. Verify cache on/off values and failures, process count and cleanup. | +| Operation reuse preserves decision semantics | Same/different snapshots; valid and invalid evidence; before/after submissions; exact proposal revision; identity/authorization failure at the appropriate point. Assert one pure derivation per identical material per admitted operation, while all required dynamic checks execute. | +| Warm cache has no added authority | Populate then quarantine/purge/corrupt; revoke current access where supported; change proposal head; supply foreign handles and switch configured purposes across independent interfaces. Results and failures match uncached execution. | +| Main advancement and cold replay | Capture A; advance main to B; capture B; read both explicitly; restart process; read A with current working tree missing its historical source files. Verify exact snapshot-bound output. | +| Publication and recovery preserved | Existing real Git/SQLite coordinated publication, stale-readiness, interrupted publication and cold recovery tests with cache warm and empty. Retain exact candidate verification and compare-and-swap checks. | +| Bounds and lifecycle | Zero/one/two entries, overflow, oversized material, cache-disabled execution, repeated close/open, server EOF/error, store replacement, and cross-process reads/writes. Measure cache-owned bytes separately from process RSS and working peaks. | +| Actual transport gain | Fresh Python CLI, fresh MCP initialization, repeated explicit-handle calls in one MCP process, implicit new capture, and process replacement. Use the official configured-client/SDK lane in supported Python 3.11/3.12 before claiming installed-client acceptance. | + +Performance measurement uses the same corpus, operation sequence, machine, supported interpreter and dependency lock for baseline/candidate pairs. Preserve test assertions and data scale. Report per-test body and class-fixture cost, operation wall/CPU time, Git child counts, hash/compile counts, database dimensions, cache hits/misses/evictions, and retained/peak memory. A structural checkpoint remains separate from functional suites. + +## Proposed performance targets and acceptance decisions + +Targets below are engineering proposals for this measured workload and require owner acceptance and same-environment remeasurement. Three operation sweeps establish a median/range, not a stable tail-latency SLA. None is a measured optimized result. + +| Target | Baseline and derivation | +| --- | --- | +| Preserve exactly two independent full compiles for capture | This is the integrity claim, not a count to reduce. | +| At most one verified object fetch per distinct cache-resident Git key in a capture | 6,134 requests / 524 distinct keys. The measured population should fit the proposed budget; larger populations may evict. | +| Capture median at most 6 seconds on the same benchmark host | 15.234 seconds now. A simple equal-cost model replacing repeated fetches predicts roughly 4.9 seconds without changing identity work; 6 seconds adds uncertainty allowance. Unique-object costs are not yet separately measured, so this is a target rather than forecast. | +| Same-snapshot prepare/resolve at most 1.25 times a single verified material read after the first increment | Current prepare 5.994 seconds and resolve 12.120 seconds versus a roughly 2.9-second read; one verified input per operation plus small separate decision work targets about 3.6 seconds even before hash acceleration. Different snapshots scale with distinct material count. | +| Content-identity median at most one quarter of its baseline | The approximately 2.54-second integrity component is the dominant repeated-read cost. This is an explicit optimization goal for exact-format encoding, not a demonstrated capability. | +| Explicit-read median approximately 1.1 seconds without retained compilation | With the preceding identity goal, 0.011 seconds SQLite + 0.64 identity + 0.32 compilation + projection/measurement margin is approximately 1.0–1.1 seconds. Recalculate from the supported-host baseline. | +| Conditional warm compiled read approximately 0.75 seconds | Same full integrity work, excluding approximately 0.32-second compilation. Admit the cache only if this incremental responsiveness is worth its retained state. | +| Long-test body approximately 60 seconds or less | Holding other costs constant, cutting its measured 86.127-second identity contribution by 75% gives 55.26 seconds, before operation-level reuse. This is a target; preserve every assertion and report class setup separately. | + +Fresh-process CLI/MCP targets retain measured import/startup overhead as a separate budget. The measured cold CLI median is 5.486 seconds, MCP initialization 1.783 seconds, and steady explicit-handle MCP reads 3.252 seconds; the 1.1-second target above is a native read with an already constructed facade. The optional 0.75-second warm target also assumes supported-interface reuse, with transport overhead reported separately. An implicit new-snapshot MCP read was 19.540 seconds in one observation; keep using the returned snapshot explicitly for a coherent reading sequence rather than silently weakening new-capture semantics. A warm-process result cannot satisfy a cold-process claim. Full-suite targets follow the per-test distribution after the selected causes are addressed; no claim of a fixed suite-wide speedup is made from one test. + +Acceptance order: verify the current-contract harness, implement and measure the core increment, reassess residual latency and memory, then decide whether to implement the conditional cache/transport increment. Keep selective compilation and broader store tuning deferred unless the new profile identifies them as necessary. This sequencing addresses measured work while limiting new permanent state. + +## Sources and evidence navigation + +All repository references refer to the inspected revision. See [evidence.md](evidence.md) and the included machine-readable observations for measurements and exact scopes. + +- `tools/standards_engine/PURPOSE-SEPARATION.md` — accepted-main capture, purpose, stored versions, qualification, cutover and recovery contract. +- `tools/standards_engine/standards_engine/engine.py` — capture, repeated `_compiled_snapshot`, proposal projection and evaluation. +- `tools/standards_snapshots/standards_snapshots/module.py` and `store.py` — durable validation, lifecycle, transactions and content identity. +- `tools/standards_identity/standards_identity/encoding.py` — exact identity-v2 framing and per-byte encoding. +- `tools/repository_git/repository_git/repository.py` — verified one-object-per-process Git reading. +- `tools/standards_engine/standards_engine/mcp.py`, `tools.py`, `context_projection.py` — facade lifetime, interface compilation and purpose-qualified outputs. +- [Git cat-file documentation](https://git-scm.com/docs/git-cat-file) — batch protocol. +- [Python 3.12 functools documentation](https://docs.python.org/3.12/library/functools.html) — memoization lifetime and concurrent misses. +- [SQLite PRAGMA documentation](https://www.sqlite.org/pragma.html) — integrity, busy and data-version semantics. `data_version` is not a content identity or an authorization proof. diff --git a/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence.md b/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence.md new file mode 100644 index 00000000..7db95400 --- /dev/null +++ b/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence.md @@ -0,0 +1,198 @@ +# Standards Engine performance evidence + +**Revision:** `8750761133b66297a2bfac4e495fd1c8a893b96a` +**Branch examined:** `implementation/purpose-separated-standards-engine` +**Date:** 2026-09-23 +**Status:** supporting measurements and design evidence, not installed acceptance or an optimized-candidate result. + +## What was and was not accessed + +The requested `/media/jeremy/.../Coding-Standards` path is not mounted in this environment. The remote branch was read through the GitHub connector; the exact published revision was reconstructed with Git CLI from the supplied full source bundle and incremental implementation bundle. The source reconstruction retains original local `main` at `366c1d9`. A disposable benchmark clone places the candidate on its own local `main`, following the documented pre-merge qualification procedure. None of these operations changes the user's repository, Codex configuration, or installed/archived store. + +All instrumentation resides outside the source tree. Wrappers record elapsed time, CPU time and call counts and then invoke the original functions. No candidate optimization, rewritten source function, weakened assertion, skipped integrity gate, altered lockfile, or normative-content change was used. Tests that intentionally create/edit synthetic repositories continue doing so in their own temporary directories. + +## Evidence classes and environment + +| Class | What it establishes | +| --- | --- | +| User-reported | 32.5-second representative platform test, 11.5-second capture, roughly 10-second analysis sequence and 1.7-second calls; 4.6 MB store. Not independently reproduced on the user's machine. | +| Local operation measurement | Three isolated serial sweeps on the exact published source; operation timing and internal inclusive spans. | +| Local test measurement | Individual unmodified Engine tests with wall/CPU/phase timing and Python stack samples; split runs and concurrency are identified per row. | +| External CI record | Existing Python 3.12 locked-environment run for this SHA; not a newly executed run. | +| Profile / memory diagnostic | Mechanism attribution and retained-allocation estimate; profiling overhead is not the unprofiled latency baseline. | +| Cost model / target | Hypothetical savings and proposed budgets in the design, explicitly not measured candidate performance. | + +The local environment is CPython 3.13.5, Linux 6.18.44, AMD EPYC 9V74, five visible logical CPUs with a four-CPU cgroup quota, approximately 6.24 GB available container memory allocation, no swap, and overlay-backed `/mnt/data` and `/tmp`. Git is 2.47.3. This is outside the project's supported Python 3.11/3.12 range. Installed `jsonschema` 4.26.0, `referencing` 0.37.0, `attrs` 26.1.0 and `jsonschema-specifications` 2025.9.1 match the inspected lock; installed `rpds-py` 2026.5.1 differs from pinned 2026.6.3. No claim of exact locked-environment acceptance is made. + +Bytecode writes were disabled and fresh cloned source trees had no prebuilt Python bytecode cache; fresh-process costs can therefore differ from an already-installed environment. The machine's filesystem page cache was not forcibly cleared. “Fresh process” below means a new interpreter or MCP process, not cold physical storage. The three operation sweeps were isolated from the test campaign; later per-module tests used separate checkouts/stores concurrently. Concurrency can inflate those per-test wall times and they are not serial production latency percentiles. Parent `process_time` excludes child-process CPU. + +## Per-operation baseline + +Raw observations are in `evidence/operations/operations.jsonl`; [operation-baseline.csv](operation-baseline.csv) contains individual operation-group medians and ranges. The following table combines repeated reads where appropriate. + +| Operation | Samples | Median seconds | Minimum–maximum seconds | +| --- | ---: | ---: | ---: | +| Engine open, new store | 3 | 0.0027 | 0.0018–0.0036 | +| Facade/interface construction | 3 | 0.2848 | 0.2684–0.2880 | +| Create snapshot | 3 | 15.2339 | 14.9993–16.2646 | +| Explicit policy read | 9 | 2.9156 | 2.8514–3.0369 | +| Policy inspection | 3 | 2.9028 | 2.8679–2.9394 | +| Route with explicit snapshot | 3 | 3.1951 | 3.0572–3.2953 | +| Prepare, same snapshot in both roles | 3 | 5.9935 | 5.8477–6.3206 | +| Resolve submission | 3 | 12.1203 | 11.5620–12.7430 | +| Analysis inspection | 3 | 0.0060 | 0.0057–0.0060 | +| Snapshot inspection | 3 | 0.0006 | 0.0006–0.0006 | +| Reopen existing store | 6 | 0.0048 | 0.0040–0.0058 | +| Read after Engine reopen | 6 | 3.0313 | 2.8415–3.0786 | + +The operation workload uses an authoring Engine and explicit snapshot IDs. Preparation supplies the same snapshot as both accepted and proposed material, then exercises an existing test-authorizer evidence disposition. The external benchmark submits **current Analysis request version 6**. It is a valid current-contract benchmark, not a claim that the unchanged repository platform round-trip test passes. + +Each captured corpus contains **434 files and 3,708,028 raw bytes**. The temporary database is **4,558,848 bytes** (1,113 × 4,096-byte pages). No archived 240 MB database participates. The aggregate read median is descriptive for nine reads across three sweeps; this sample is too small to establish a reliable p95/p99. + +### Read and analysis attribution + +A representative read is approximately 2.9 seconds: approximately 0.011 seconds in SQLite content loading, 2.54 seconds in the loading layer's content-identity work, and 0.32 seconds in full compilation. The direct long-test instrumentation independently times `SnapshotModule._content_id`, confirming that attribution. Removing only compilation would therefore retain approximately 89% of current read cost. + +Same-snapshot `prepare` loads/verifies/compiles that snapshot **twice**; its median is 5.994 seconds. `resolve` evaluates pre- and post-submission states and loads/verifies/compiles the same material **four** times; its median is 12.120 seconds. The pure analysis evaluations themselves total approximately 0.047 seconds in the representative resolve. Keeping those two evaluations is necessary; reconstructing their unchanged inputs four times is the optimization opportunity. + +Analysis inspection is approximately 0.006 seconds and snapshot inspection approximately 0.0006 seconds. A generic statement that every inspection is slow would be inaccurate: policy-child inspection takes the compiled-snapshot path, while these simpler inspections do not. + +### Capture attribution + +The representative capture has **1,137 Git-backed source reads for 434 distinct paths**, expanding to **6,134 object requests for 524 distinct repository/OID/type combinations**. There are 6,135 Git commands including the accepted-branch resolution. `_object` starts one `git cat-file --batch` process per requested object; it does not retain a batch process between requests. + +The median Git-command span is approximately 11.34 seconds. First full compilation over Git-backed recording takes approximately 12.24 seconds. The required second fresh compilation over frozen content takes approximately 0.315 seconds. Remaining capture time includes exact content-ID generation and SQLite publication. These are nested spans: first-compilation time already includes the Git spans. + +Thus the intentional second compile is not the dominant 11.5–15-second capture cost. Repeated commit/tree/blob retrieval and process setup account for most observed capture latency. The count ratio suggests 91.5% duplicate object fetches, but unique-object timing has not been isolated; the projected capture speedup remains a cost model. + +## Long-case identification + +The isolated test `test_agent_workflow.AgentWorkflowTest.test_normative_proposal_stops_at_real_pending_work` completed successfully with: + +| Observation | Measured value | +| --- | ---: | +| Test body wall time | 119.854 seconds | +| Test parent-process CPU | 116.387 seconds | +| Entire one-test runner, including class setup/import work | 137.863 seconds | +| Content identity calls | 32 | +| Content identity inclusive time | 86.127 seconds | +| Full compiles | 52 | +| Compilation inclusive time | 18.528 seconds | +| Proposal projections | 21 | +| Projected-input validation calls | 10 | +| Resolve operations | 3 | + +Identity accounts for about 71.9% and compilation about 15.5% of the body. Proposal-projection spans include those costs and are not additive. All three in-body stack samples (approximately 27, 72 and 117 seconds) were inside identity integer/byte encoding. The last sample traces `resolve_workflow → resolve → _evaluate → _validate_projected_inputs → _proposal_projection → load_content → _content_id`. + +This identifies a reproducible roughly two-minute **case**, including a late duplicate projection, and shows that it is doing CPU work rather than waiting on a SQLite lock. The user's original unnamed two-minute case cannot be conclusively matched to this test. Other long cases are listed below; the original terminal output/test ID would be needed to identify which one the user saw. + +## Per-test campaign and qualifications + +The consolidated campaign currently records **157 distinct completed tests**, with 156 passing, 0 skipped, 1 errors and 0 failures across split runs. There are 161 recorded attempts, including qualification reruns. These are per-test observations, not a claim of one clean serial full-suite run. The full table is [per-test-baseline.csv](per-test-baseline.csv). + +The initial serial diagnostic run completed 13 tests and then ended while emitting a native `faulthandler` diagnostic during the next test. Its exit cause was not captured; cgroup OOM/pid-exhaustion counters did not identify a cause. This is not classified as a production crash or as the user's original incident. The continuation used a non-terminating Python-thread stack sampler instead, and the suspected slow test was rerun in isolation. + +The remaining cases ran in isolated module checkouts/stores with up to three module processes. A separate one-process fixture-qualification rerun overlapped part of that campaign, making the maximum four test runners. The source revision and file bytes remained the same. Class-fixture costs and imports are included in each runner summary, outside individual test-body timing; sums of test rows are not a serial suite elapsed time. + +Four initial cases using nested repository clones failed because nested `git clone` copied the checked-out feature branch but did not create its own local `main`. The parent benchmark clone did have candidate-local `main`. This is a fixture/checkout precondition, distinct from the Engine's correct accepted-main lookup. Those cases are rerun with an otherwise identical disposable source clone **checked out on local `main`**, so nested clones meet their assumed precondition. All failed attempts remain in the raw evidence and CSV. + +### Longest completed case observations + +| Test | Seconds | CPU seconds | Result | Scope | +| --- | ---: | ---: | --- | --- | +| `test_supporting_workflow.SupportingWorkflowTest.test_coordinated_publication_and_provenance_only_revision` | 839.065 | 617.979 | pass | isolated stores/checkouts; concurrent module campaign | +| `test_coverage_publication.EngineAuditPublicationTest.test_review_verify_apply_recover_and_read_without_original_database` | 264.388 | 153.308 | pass | disposable-main fixture qualification rerun; concurrent campaign | +| `test_navigation_indexes.NavigationIndexWorkflowTest.test_z_exact_index_proposal_requires_review_and_applies_through_engine` | 250.162 | 159.509 | pass | isolated stores/checkouts; concurrent module campaign | +| `test_analysis.AnalysisWorkflowTest.test_apply_create_and_retire_owns_topology_and_commit` | 179.670 | 72.620 | pass | disposable-main fixture qualification rerun; concurrent campaign | +| `test_evidence_maintenance.EvidenceMaintenanceInterfaceTest.test_preview_and_overlap_preserve_working_tree_then_apply_retires` | 170.094 | 27.812 | pass | isolated stores/checkouts; concurrent module campaign | +| `test_navigation_indexes.ProtectedNavigationIndexTest.test_z_declared_sections_survive_verified_index_application` | 162.931 | 115.069 | pass | isolated stores/checkouts; concurrent module campaign | +| `test_analysis.AnalysisWorkflowTest.test_review_composition_publishes_readiness_for_complete_analysis` | 124.781 | 120.681 | pass | isolated stores/checkouts; concurrent module campaign | +| `test_agent_workflow.AgentWorkflowTest.test_normative_proposal_stops_at_real_pending_work` | 119.855 | 116.387 | pass | isolated serial slow-case reproduction | +| `test_analysis.AnalysisWorkflowTest.test_relationship_only_proposals_enter_a1c_and_replay_cold` | 119.040 | 114.099 | pass | isolated stores/checkouts; concurrent module campaign | +| `test_agent_workflow.AgentWorkflowTest.test_revision_advancement_does_not_retarget_old_context` | 106.615 | 100.177 | pass | isolated stores/checkouts; concurrent module campaign | + +### Existing CI record, separate environment + +The existing GitHub Actions job **107298850681**, run **35895666852**, used this exact SHA with Python 3.12 and the complete hash-pinned dependency installation, including `rpds-py` 2026.6.3. Its log reports: + +| Suite | Tests | Seconds | Result | +| --- | ---: | ---: | --- | +| Metadata | 31 | 0.350 | OK | +| Policy impact | 10 | 0.431 | OK | +| Contracts | 23 | 26.270 | OK | +| Analysis domain | 100 | 1.413 | OK | +| Verifier | 156 | 5.491 | OK | +| Engine | 157 | 2,946.090 | One error | + +The Engine run took **49.10 minutes**. Its dots are buffered and supply no per-test times, so they cannot identify a two-minute case. The one error is `test_closed_store_round_trip_uses_public_operations`: `platform_harness.py` constructs Analysis request version 5 while the supported interface requires version 6. Preparation returns `INTERFACE.INVALID_ARGUMENTS`; the subsequent final structural command was not reached because the workflow uses fail-fast shell execution. This is a caller-conformance issue, not evidence that accepting version 5 would be an optimization. + +The CI execution is independently useful because it demonstrates a long complete Engine run in the supported locked environment. It is not numerically interchangeable with this container's interpreter, hardware, resource limits, concurrency or per-test instrumentation. + +Primary run: https://github.com/MrScripty/Coding-Standards/actions/runs/35895666852 +Job: https://github.com/MrScripty/Coding-Standards/actions/runs/35895666852/job/107298850681 + +## Additional slow paths + +The coordinated supporting-content publication test completed in **839.065 seconds** during the concurrent campaign (617.979 seconds parent CPU), with **130 content-ID computations**, **278 compiles**, and **71 proposal projections**. Its identity span total was 380.130 seconds and its compilation span total 272.510 seconds. The compilation figure also includes Git-backed captures, so it cannot be read as 272 seconds of pure compiler CPU. This test deliberately crosses multiple captures, reviews, publication and historical-read boundaries. Its total counts are amplification evidence, not authority to eliminate all those checks or to promise a proportional whole-suite speedup. + +The evidence-maintenance preview/overlap/apply test took **170.094 seconds** but only 27.812 seconds of parent CPU. Samples at approximately 43 and 133 seconds were inside per-file Git object subprocess work; a sample at approximately 88 seconds was waiting for a required Python package-verification child process. This is a distinct slow path, not evidence of a database deadlock. Capture-only caching would not accelerate its bulk revision read unless the bounded verified Git reader is reused there as well. The required verifier execution remains intact. + +## Profiler and memory observations + +A compiler-only `cProfile` observation records about 6.25 million calls and 1.467 seconds of profiled execution, versus about 0.32 seconds in the unprofiled operation baseline. Its cumulative hot path is coverage/suite-input identity generation, including approximately 68,954 `_encode_string` calls and 2.46 million `ord` calls. The profiler's timings include instrumentation overhead and are used for attribution, not latency targets. + +A one-compilation `tracemalloc` observation records 3,649,110 additional retained bytes and 3,985,733 peak additional bytes. It excludes imports and the existing captured byte objects. Adding 3,708,028 raw capture bytes gives about 7.36 MB of representative retained material, supporting a two-entry cache design investigation, not proving a universal bound. Baseline process peak RSS includes other imports and identity-encoding temporaries; it must not be represented as cache size. + +### Additional isolated identity and transport observations + +These runs begin after both test controllers finish, with no concurrent test runners. Fresh CLI and MCP calls use a consistent closed-store copy and current explicit snapshot. The hand-driven MCP test exercises actual stdio initialization, tool listing and calls, not the official SDK or configured Codex client. + +| Observation | Seconds | Interpretation | +| --- | ---: | --- | +| `identity_frame_0` | 0.3691 | Existing implementation | +| `identity_encode_0` | 2.2315 | Existing implementation | +| `identity_complete_hash_0` | 2.5858 | Existing implementation | +| `sha256_encoded_bytes_only_0` | 0.0080 | Mechanism-only; not a replacement hash contract | +| `identity_frame_1` | 0.3540 | Existing implementation | +| `identity_encode_1` | 2.2430 | Existing implementation | +| `identity_complete_hash_1` | 2.6966 | Existing implementation | +| `sha256_encoded_bytes_only_1` | 0.0073 | Mechanism-only; not a replacement hash contract | +| `identity_frame_2` | 0.3568 | Existing implementation | +| `identity_encode_2` | 2.1984 | Existing implementation | +| `identity_complete_hash_2` | 2.6267 | Existing implementation | +| `sha256_encoded_bytes_only_2` | 0.0077 | Mechanism-only; not a replacement hash contract | +| `fresh_python_cli_read_0` | 5.4285 | Existing implementation | +| `fresh_python_cli_read_1` | 5.5769 | Existing implementation | +| `fresh_python_cli_read_2` | 5.4861 | Existing implementation | +| `two_concurrent_process_reads_same_store` | 6.0460 | Existing implementation | +| `fresh_mcp_initialize_0` | 1.7975 | Existing implementation | +| `mcp_tools_list_0` | 0.0067 | Existing implementation | +| `mcp_0_read_0` | 3.2786 | Existing implementation | +| `mcp_0_read_1` | 3.1684 | Existing implementation | +| `mcp_0_read_2` | 3.2195 | Existing implementation | +| `mcp_read_with_implicit_new_capture` | 19.5402 | Existing implementation | +| `fresh_mcp_initialize_1` | 1.7690 | Existing implementation | +| `mcp_tools_list_1` | 0.0065 | Existing implementation | +| `mcp_1_read_0` | 3.3284 | Existing implementation | +| `mcp_1_read_1` | 3.2246 | Existing implementation | +| `mcp_1_read_2` | 3.3501 | Existing implementation | + +### Additional interpretation + +The isolated content-ID micro-observation is **0.357 seconds framing**, **2.231 seconds encoding**, and **2.627 seconds for the complete existing identity computation**, by three-sample medians. SHA-256 of the already encoded bytes alone takes **0.0077 seconds**; this probe omits the identity frame and is used only to locate cryptographic cost, never as an alternative ID. The identity profile records **3,708,028 `_encode_integer` calls**, exactly matching the raw file-byte count, and approximately **40.97 million function calls** overall. Its profiled 11.115 seconds is not the unprofiled 2.627-second result. + +Fresh CLI reads have a **5.486-second median**. Fresh MCP initialization takes **1.783 seconds** across two sessions, while six explicit-handle reads in those sessions have a **3.252-second median**. One MCP read that implicitly creates a new snapshot takes **19.540 seconds**. Reusing the returned snapshot during a coherent task is therefore important even before a cache is added; silently substituting a prior snapshot for a requested new capture is not proposed. + +Two concurrent fresh-process reads of the same disposable store both succeeded in one sample, completing in approximately **6.0 and 6.05 seconds**, with **6.046 seconds** total elapsed time. This is limited positive evidence for this no-writer case; it does not establish scalability, writer-contention behavior, or larger-store performance. + +## Conclusions supported by measurement + +The dominant repeated-read cost is exact content-ID serialization/rehashing, rather than SQLite I/O. The dominant capture cost is repeated verified Git-object subprocess work. Repeated immutable material/projection derivation amplifies both mechanisms in authoring workflows. The fixed frozen replay pass is small relative to current Git-backed capture and remains necessary. A compiled cache alone has much less benefit than the phrase “recompile each call” suggests. + +The archived 240 MB store, a deadlock, a 30/60/120-second timeout, network delay, or a specific Python-version regression has not been established as the cause of the user's original pause. The observed slow case is CPU-bound. SQLite write contention, large-store integrity-check growth, filesystem-cold behavior, a larger-than-budget cache population, optimized-candidate performance and configured-client behavior remain separate unmeasured claims. + +## Reproduction and source integrity + +See [README.md](README.md) for the isolated-checkout procedure and measurement commands. External harnesses are supplied under `measurement-tools/`. They measure the existing implementation; they are not proposed production code. All operation and test raw records retain status and scope. Supported-environment acceptance requires rerunning with the declared Python interpreter, exact lock and the actual required client. + +Source integrity and branch/head observations are recorded in `evidence/source-integrity.json`. The design report is [design.md](design.md). No runtime optimization, standards edit, commit, remote push or PR is part of this task. diff --git a/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/cgroup.json b/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/cgroup.json new file mode 100644 index 00000000..bca9395d --- /dev/null +++ b/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/cgroup.json @@ -0,0 +1,6 @@ +{ + "/sys/fs/cgroup/cpu.max": "400000 100000", + "/sys/fs/cgroup/memory.max": "4294967296", + "/sys/fs/cgroup/memory.events": "low 0\nhigh 0\nmax 0\noom 0\noom_kill 0\noom_group_kill 0", + "/sys/fs/cgroup/pids.events": "max 0" +} \ No newline at end of file diff --git a/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/ci-baseline.json b/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/ci-baseline.json new file mode 100644 index 00000000..14bfec92 --- /dev/null +++ b/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/ci-baseline.json @@ -0,0 +1,54 @@ +{ + "classification": "existing external CI log, not a newly executed run", + "run_id": 35895666852, + "job_id": 107298850681, + "head_sha": "8750761133b66297a2bfac4e495fd1c8a893b96a", + "run_url": "https://github.com/MrScripty/Coding-Standards/actions/runs/35895666852", + "job_url": "https://github.com/MrScripty/Coding-Standards/actions/runs/35895666852/job/107298850681", + "retrieval": "GitHub.fetch_workflow_job_logs", + "python": "3.12, asserted by workflow", + "dependency_installation": "--require-hashes --only-binary=:all: from tools/standards_contracts/requirements.lock; rpds-py 2026.6.3 installed", + "suites": [ + { + "suite": "metadata", + "tests": 31, + "seconds": 0.35, + "outcome": "OK" + }, + { + "suite": "policy-impact", + "tests": 10, + "seconds": 0.431, + "outcome": "OK" + }, + { + "suite": "contracts", + "tests": 23, + "seconds": 26.27, + "outcome": "OK" + }, + { + "suite": "analysis-domain", + "tests": 100, + "seconds": 1.413, + "outcome": "OK" + }, + { + "suite": "verifier", + "tests": 156, + "seconds": 5.491, + "outcome": "OK" + }, + { + "suite": "engine", + "tests": 157, + "seconds": 2946.09, + "outcome": "FAILED errors=1" + } + ], + "error_test": "test_platform_harness.PlatformHarnessTest.test_closed_store_round_trip_uses_public_operations", + "error": "prepare rejected with INTERFACE.INVALID_ARGUMENTS (invalid): CONTRACT.INVALID_INSTANCE: value does not satisfy the selected public contract", + "log_last_engine_summary_at": "2026-09-23T18:16:59.6505035Z", + "per_test_timings_available": false, + "final_structural_command_reached": false +} \ No newline at end of file diff --git a/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/completed-for-parallel.json b/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/completed-for-parallel.json new file mode 100644 index 00000000..07f1c1c8 --- /dev/null +++ b/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/completed-for-parallel.json @@ -0,0 +1 @@ +["test_agent_navigation.AgentNavigationTest.test_boolean_nullable_set_facts_aliases_and_multiple_causes", "test_agent_navigation.AgentNavigationTest.test_capture_rejection_never_advances_to_query", "test_agent_navigation.AgentNavigationTest.test_compact_read_preserves_text_authority_and_full_detail", "test_agent_navigation.AgentNavigationTest.test_complete_explicit_facts_select_reviewed_modules", "test_agent_navigation.AgentNavigationTest.test_focused_read_continuations_are_callable_against_exact_snapshot", "test_agent_navigation.AgentNavigationTest.test_invalid_inputs_cannot_create_snapshot", "test_agent_navigation.AgentNavigationTest.test_invalid_routing_values_do_not_become_negative_facts", "test_agent_navigation.AgentNavigationTest.test_optional_capture_matches_explicit_route_and_preserves_unresolved", "test_agent_navigation.AgentNavigationTest.test_related_matches_native_permissions_and_projection", "test_agent_navigation.AgentNavigationTest.test_supplied_snapshot_never_captures_ambient_authority", "test_agent_navigation.AgentNavigationTest.test_vocabulary_matches_router_and_questions_are_typed", "test_agent_workflow.AgentWorkflowTest.test_analysis_rejection_retains_the_created_revision", "test_agent_workflow.AgentWorkflowTest.test_context_is_immutable_existing_identity_and_foreign_records_reject", "test_agent_workflow.AgentWorkflowTest.test_normative_proposal_stops_at_real_pending_work"] \ No newline at end of file diff --git a/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/completed-original.json b/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/completed-original.json new file mode 100644 index 00000000..c8f3a014 --- /dev/null +++ b/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/completed-original.json @@ -0,0 +1 @@ +["test_agent_navigation.AgentNavigationTest.test_boolean_nullable_set_facts_aliases_and_multiple_causes", "test_agent_navigation.AgentNavigationTest.test_capture_rejection_never_advances_to_query", "test_agent_navigation.AgentNavigationTest.test_compact_read_preserves_text_authority_and_full_detail", "test_agent_navigation.AgentNavigationTest.test_complete_explicit_facts_select_reviewed_modules", "test_agent_navigation.AgentNavigationTest.test_focused_read_continuations_are_callable_against_exact_snapshot", "test_agent_navigation.AgentNavigationTest.test_invalid_inputs_cannot_create_snapshot", "test_agent_navigation.AgentNavigationTest.test_invalid_routing_values_do_not_become_negative_facts", "test_agent_navigation.AgentNavigationTest.test_optional_capture_matches_explicit_route_and_preserves_unresolved", "test_agent_navigation.AgentNavigationTest.test_related_matches_native_permissions_and_projection", "test_agent_navigation.AgentNavigationTest.test_supplied_snapshot_never_captures_ambient_authority", "test_agent_navigation.AgentNavigationTest.test_vocabulary_matches_router_and_questions_are_typed", "test_agent_workflow.AgentWorkflowTest.test_analysis_rejection_retains_the_created_revision", "test_agent_workflow.AgentWorkflowTest.test_context_is_immutable_existing_identity_and_foreign_records_reject"] \ No newline at end of file diff --git a/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/environment.json b/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/environment.json new file mode 100644 index 00000000..6f1b8543 --- /dev/null +++ b/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/environment.json @@ -0,0 +1,16 @@ +{ + "python": "3.13.5", + "executable": "/opt/pyvenv/bin/python", + "platform": "Linux-6.18.44-x86_64-with-glibc2.41", + "cpu_count": 5, + "packages": { + "jsonschema": "4.26.0", + "referencing": "0.37.0", + "rpds-py": "2026.5.1", + "attrs": "26.1.0", + "jsonschema-specifications": "2025.9.1" + }, + "cpu": "Architecture: x86_64\nCPU op-mode(s): 32-bit, 64-bit\nAddress sizes: 46 bits physical, 48 bits virtual\nByte Order: Little Endian\nCPU(s): 5\nOn-line CPU(s) list: 0-4\nVendor ID: AuthenticAMD\nModel name: AMD EPYC 9V74 80-Core Processor\nCPU family: 25\nModel: 17\nThread(s) per core: 1\nCore(s) per socket: 5\nSocket(s): 1\nStepping: 1\nBogoMIPS: 5192.26\nFlags: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt pdpe1gb rdtscp lm constant_tsc rep_good nopl xtopology nonstop_tsc cpuid extd_apicid tsc_known_freq pni pclmulqdq ssse3 fma cx16 pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand hypervisor lahf_lm cmp_legacy cr8_legacy abm sse4a misalignsse 3dnowprefetch osvw topoext vmmcall fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid avx512f avx512dq rdseed adx smap avx512ifma clflushopt clwb avx512cd sha_ni avx512bw avx512vl xsaveopt xsavec xgetbv1 xsaves avx512_bf16 clzero xsaveerptr arat npt nrip_save tsc_scale vmcb_clean flushbyasid pausefilter pfthreshold v_vmsave_vmload avx512vbmi umip avx512_vbmi2 gfni vaes vpclmulqdq avx512_vnni avx512_bitalg avx512_vpopcntdq rdpid fsrm arch_capabilities\nHypervisor vendor: KVM\nVirtualization type: full\nL1d cache: 96 KiB (3 instances)\nL1i cache: 96 KiB (3 instances)\nL2 cache: 3 MiB (3 instances)\nL3 cache: 32 MiB (1 instance)\nNUMA node(s): 1\nNUMA node0 CPU(s): 0-4\nVulnerability Gather data sampling: Not affected\nVulnerability Ghostwrite: Not affected\nVulnerability Indirect target selection: Not affected\nVulnerability Itlb multihit: Not affected\nVulnerability L1tf: Not affected\nVulnerability Mds: Not affected\nVulnerability Meltdown: Not affected\nVulnerability Mmio stale data: Not affected\nVulnerability Old microcode: Not affected\nVulnerability Reg file data sampling: Not affected\nVulnerability Retbleed: Not affected\nVulnerability Spec rstack overflow: Vulnerable\nVulnerability Spec store bypass: Vulnerable\nVulnerability Spectre v1: Vulnerable: __user pointer sanitization and usercopy barriers only; no swapgs barriers\nVulnerability Spectre v2: Vulnerable; STIBP: disabled; PBRSB-eIBRS: Not affected; BHI: Not affected\nVulnerability Srbds: Not affected\nVulnerability Tsa: Vulnerable\nVulnerability Tsx async abort: Not affected\nVulnerability Vmscape: Not affected\n", + "filesystem": "Filesystem Type 1K-blocks Used Available Use% Mounted on\noverlay overlay 32978704 86224 31198376 1% /\noverlay overlay 32978704 86224 31198376 1% /\n", + "memory": " total used free shared buff/cache available\nMem: 6236913664 1080930304 5219303424 20480 166699008 5155983360\nSwap: 0 0 0\n" +} \ No newline at end of file diff --git a/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/followup.stderr b/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/followup.stderr new file mode 100644 index 00000000..e69de29b diff --git a/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/followup.stdout b/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/followup.stdout new file mode 100644 index 00000000..e2f0cccd --- /dev/null +++ b/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/followup.stdout @@ -0,0 +1,26 @@ +identity_frame_0 0.36905392599987863 +identity_encode_0 2.231484591000026 +identity_complete_hash_0 2.5857570539999415 +sha256_encoded_bytes_only_0 0.007950331000074584 +identity_frame_1 0.35401243299997986 +identity_encode_1 2.2429746459999933 +identity_complete_hash_1 2.696598586999926 +sha256_encoded_bytes_only_1 0.007304564000151004 +identity_frame_2 0.35681533899992246 +identity_encode_2 2.1984263070000907 +identity_complete_hash_2 2.6266955009998583 +sha256_encoded_bytes_only_2 0.0077280129999053315 +fresh_python_cli_read_0 5.428453769000043 +fresh_python_cli_read_1 5.576949112999955 +fresh_python_cli_read_2 5.486088176000067 +two_concurrent_process_reads_same_store 6.046019085000125 +mcp_tools_list_0 0.0067488999998204235 +mcp_0_read_0 3.2786033370000496 +mcp_0_read_1 3.168428525000081 +mcp_0_read_2 3.219450044000041 +mcp_read_with_implicit_new_capture 19.54023097199979 +mcp_tools_list_1 0.0064831249997041596 +mcp_1_read_0 3.328401692999705 +mcp_1_read_1 3.2245606900000894 +mcp_1_read_2 3.3500822969999717 +FOLLOWUP COMPLETE diff --git a/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/followup/concurrent-readers.json b/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/followup/concurrent-readers.json new file mode 100644 index 00000000..92af4756 --- /dev/null +++ b/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/followup/concurrent-readers.json @@ -0,0 +1,10 @@ +[ + { + "reader": 0, + "wall_s": 6.000648476999913 + }, + { + "reader": 1, + "wall_s": 6.045294712999976 + } +] \ No newline at end of file diff --git a/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/followup/identity-profile.txt b/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/followup/identity-profile.txt new file mode 100644 index 00000000..ce40c4c3 --- /dev/null +++ b/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/followup/identity-profile.txt @@ -0,0 +1,44 @@ + 40969277 function calls (29835125 primitive calls) in 11.115 seconds + + Ordered by: cumulative time + + ncalls tottime percall cumtime percall filename:lineno(function) + 1 0.000 0.000 11.115 11.115 module.py:205(_content_id) + 1 0.000 0.000 9.433 9.433 encoding.py:78(hash_identity) + 1 0.000 0.000 9.424 9.424 encoding.py:72(encode_identity_value) +3710951/1 1.002 0.000 9.424 9.424 encoding.py:180(_encode) +3711820/2 1.602 0.000 9.423 4.712 {method 'join' of 'bytes' objects} +3710951/435 0.717 0.000 9.421 0.022 encoding.py:191() + 1302 0.002 0.000 9.418 0.007 encoding.py:193() + 3708028 4.278 0.000 7.241 0.000 encoding.py:201(_encode_integer) + 1 0.003 0.003 1.682 1.682 encoding.py:136(frame_path_byte_set) + 868 0.002 0.000 1.677 0.002 encoding.py:113(frame_path_bytes) + 1737/869 0.871 0.001 1.672 0.002 encoding.py:22(__init__) + 435 0.000 0.000 0.801 0.002 encoding.py:152() + 7421467 0.781 0.000 0.788 0.000 encoding.py:155(_validate_value) + 3734861 0.491 0.000 0.491 0.000 {method 'encode' of 'str' objects} + 3708028 0.375 0.000 0.375 0.000 {method 'pop' of 'list' objects} + 3739517 0.351 0.000 0.351 0.000 {method 'append' of 'list' objects} + 3708028 0.324 0.000 0.324 0.000 {built-in method builtins.divmod} + 3708028 0.268 0.000 0.268 0.000 encoding.py:211() + 2488 0.012 0.000 0.021 0.000 encoding.py:218(_encode_string) + 868 0.011 0.000 0.015 0.000 encoding.py:33(__init__) + 4976 0.006 0.000 0.009 0.000 encoding.py:170(_validate_scalar_string) + 1 0.007 0.007 0.007 0.007 {built-in method _hashlib.openssl_sha256} + 80493 0.005 0.000 0.005 0.000 {built-in method builtins.ord} + 869 0.001 0.000 0.003 0.000 {method 'sort' of 'list' objects} + 434 0.000 0.000 0.001 0.000 encoding.py:145() + 868 0.001 0.000 0.001 0.000 {built-in method builtins.any} + 2054 0.001 0.000 0.001 0.000 encoding.py:145() + 1736 0.001 0.000 0.001 0.000 encoding.py:58() + 4108 0.001 0.000 0.001 0.000 encoding.py:121() + 435 0.000 0.000 0.000 0.000 module.py:207() + 1736 0.000 0.000 0.000 0.000 {method 'add' of 'set' objects} + 1744 0.000 0.000 0.000 0.000 {built-in method builtins.len} + 1 0.000 0.000 0.000 0.000 {method 'disable' of '_lsprof.Profiler' objects} + 435 0.000 0.000 0.000 0.000 encoding.py:146() + 1 0.000 0.000 0.000 0.000 {method 'hexdigest' of '_hashlib.HASH' objects} + 2 0.000 0.000 0.000 0.000 {method 'fullmatch' of 're.Pattern' objects} + 3 0.000 0.000 0.000 0.000 {built-in method _struct.pack} + + diff --git a/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/followup/mcp-0.stderr b/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/followup/mcp-0.stderr new file mode 100644 index 00000000..e69de29b diff --git a/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/followup/mcp-1.stderr b/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/followup/mcp-1.stderr new file mode 100644 index 00000000..e69de29b diff --git a/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/followup/measurements.json b/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/followup/measurements.json new file mode 100644 index 00000000..d73ac3b2 --- /dev/null +++ b/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/followup/measurements.json @@ -0,0 +1,137 @@ +[ + { + "operation": "identity_frame_0", + "wall_s": 0.36905392599987863, + "cpu_s": 0.3690519889999999 + }, + { + "operation": "identity_encode_0", + "wall_s": 2.231484591000026, + "cpu_s": 2.231395826 + }, + { + "operation": "identity_complete_hash_0", + "wall_s": 2.5857570539999415, + "cpu_s": 2.585655675 + }, + { + "operation": "sha256_encoded_bytes_only_0", + "wall_s": 0.007950331000074584, + "cpu_s": 0.007954014000000065 + }, + { + "operation": "identity_frame_1", + "wall_s": 0.35401243299997986, + "cpu_s": 0.3532979909999998 + }, + { + "operation": "identity_encode_1", + "wall_s": 2.2429746459999933, + "cpu_s": 2.2418495850000006 + }, + { + "operation": "identity_complete_hash_1", + "wall_s": 2.696598586999926, + "cpu_s": 2.696077091000001 + }, + { + "operation": "sha256_encoded_bytes_only_1", + "wall_s": 0.007304564000151004, + "cpu_s": 0.007304899000001086 + }, + { + "operation": "identity_frame_2", + "wall_s": 0.35681533899992246, + "cpu_s": 0.35678472399999883 + }, + { + "operation": "identity_encode_2", + "wall_s": 2.1984263070000907, + "cpu_s": 2.198018509999999 + }, + { + "operation": "identity_complete_hash_2", + "wall_s": 2.6266955009998583, + "cpu_s": 2.6261456249999995 + }, + { + "operation": "sha256_encoded_bytes_only_2", + "wall_s": 0.0077280129999053315, + "cpu_s": 0.007730110999997208 + }, + { + "operation": "fresh_python_cli_read_0", + "wall_s": 5.428453769000043, + "cpu_s": 0.0007288330000001508 + }, + { + "operation": "fresh_python_cli_read_1", + "wall_s": 5.576949112999955, + "cpu_s": 0.0008279009999974107 + }, + { + "operation": "fresh_python_cli_read_2", + "wall_s": 5.486088176000067, + "cpu_s": 0.0007783860000003529 + }, + { + "operation": "two_concurrent_process_reads_same_store", + "wall_s": 6.046019085000125, + "cpu_s": 0.003321474999999907 + }, + { + "operation": "fresh_mcp_initialize_0", + "wall_s": 1.797465437000028, + "cpu_s": null + }, + { + "operation": "mcp_tools_list_0", + "wall_s": 0.0067488999998204235, + "cpu_s": 0.003942069000000714 + }, + { + "operation": "mcp_0_read_0", + "wall_s": 3.2786033370000496, + "cpu_s": 0.0002616889999984551 + }, + { + "operation": "mcp_0_read_1", + "wall_s": 3.168428525000081, + "cpu_s": 0.00033233299999935184 + }, + { + "operation": "mcp_0_read_2", + "wall_s": 3.219450044000041, + "cpu_s": 0.0003060240000003489 + }, + { + "operation": "mcp_read_with_implicit_new_capture", + "wall_s": 19.54023097199979, + "cpu_s": 0.00022157900000152608 + }, + { + "operation": "fresh_mcp_initialize_1", + "wall_s": 1.769000546999905, + "cpu_s": null + }, + { + "operation": "mcp_tools_list_1", + "wall_s": 0.0064831249997041596, + "cpu_s": 0.0035314590000012913 + }, + { + "operation": "mcp_1_read_0", + "wall_s": 3.328401692999705, + "cpu_s": 0.00025373599999767293 + }, + { + "operation": "mcp_1_read_1", + "wall_s": 3.2245606900000894, + "cpu_s": 0.0002474280000015483 + }, + { + "operation": "mcp_1_read_2", + "wall_s": 3.3500822969999717, + "cpu_s": 0.00023477899999946317 + } +] \ No newline at end of file diff --git a/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/followup/source-size.json b/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/followup/source-size.json new file mode 100644 index 00000000..58d01668 --- /dev/null +++ b/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/followup/source-size.json @@ -0,0 +1 @@ +{"files": 434, "raw_bytes": 3708028, "identity": "snapshot-content:sha256:c018bd4c78b20e34f3179f63c96e1876f0874ce4b5b2e88c49c5d78e9331b24f"} \ No newline at end of file diff --git a/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/full-run.stderr b/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/full-run.stderr new file mode 100644 index 00000000..2546c7a0 --- /dev/null +++ b/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/full-run.stderr @@ -0,0 +1,4 @@ +.............Timeout (0:01:00)! +Thread 0x00007fe81e429780 (most recent call first): + File "/mnt/data/engine-performance/benchmark-checkout/tools/standards_identity/standards_identity/encoding.py", line 231 in _encode_string + File \ No newline at end of file diff --git a/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/full-run.stdout b/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/full-run.stdout new file mode 100644 index 00000000..c95b3751 --- /dev/null +++ b/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/full-run.stdout @@ -0,0 +1,27 @@ +START test_agent_navigation.AgentNavigationTest.test_boolean_nullable_set_facts_aliases_and_multiple_causes +END test_agent_navigation.AgentNavigationTest.test_boolean_nullable_set_facts_aliases_and_multiple_causes 2.950s pass +START test_agent_navigation.AgentNavigationTest.test_capture_rejection_never_advances_to_query +END test_agent_navigation.AgentNavigationTest.test_capture_rejection_never_advances_to_query 0.001s pass +START test_agent_navigation.AgentNavigationTest.test_compact_read_preserves_text_authority_and_full_detail +END test_agent_navigation.AgentNavigationTest.test_compact_read_preserves_text_authority_and_full_detail 6.200s pass +START test_agent_navigation.AgentNavigationTest.test_complete_explicit_facts_select_reviewed_modules +END test_agent_navigation.AgentNavigationTest.test_complete_explicit_facts_select_reviewed_modules 5.938s pass +START test_agent_navigation.AgentNavigationTest.test_focused_read_continuations_are_callable_against_exact_snapshot +END test_agent_navigation.AgentNavigationTest.test_focused_read_continuations_are_callable_against_exact_snapshot 8.897s pass +START test_agent_navigation.AgentNavigationTest.test_invalid_inputs_cannot_create_snapshot +END test_agent_navigation.AgentNavigationTest.test_invalid_inputs_cannot_create_snapshot 0.001s pass +START test_agent_navigation.AgentNavigationTest.test_invalid_routing_values_do_not_become_negative_facts +END test_agent_navigation.AgentNavigationTest.test_invalid_routing_values_do_not_become_negative_facts 5.772s pass +START test_agent_navigation.AgentNavigationTest.test_optional_capture_matches_explicit_route_and_preserves_unresolved +END test_agent_navigation.AgentNavigationTest.test_optional_capture_matches_explicit_route_and_preserves_unresolved 23.508s pass +START test_agent_navigation.AgentNavigationTest.test_related_matches_native_permissions_and_projection +END test_agent_navigation.AgentNavigationTest.test_related_matches_native_permissions_and_projection 11.623s pass +START test_agent_navigation.AgentNavigationTest.test_supplied_snapshot_never_captures_ambient_authority +END test_agent_navigation.AgentNavigationTest.test_supplied_snapshot_never_captures_ambient_authority 5.658s pass +START test_agent_navigation.AgentNavigationTest.test_vocabulary_matches_router_and_questions_are_typed +END test_agent_navigation.AgentNavigationTest.test_vocabulary_matches_router_and_questions_are_typed 9.504s pass +START test_agent_workflow.AgentWorkflowTest.test_analysis_rejection_retains_the_created_revision +END test_agent_workflow.AgentWorkflowTest.test_analysis_rejection_retains_the_created_revision 6.594s pass +START test_agent_workflow.AgentWorkflowTest.test_context_is_immutable_existing_identity_and_foreign_records_reject +END test_agent_workflow.AgentWorkflowTest.test_context_is_immutable_existing_identity_and_foreign_records_reject 17.460s pass +START test_agent_workflow.AgentWorkflowTest.test_normative_proposal_stops_at_real_pending_work diff --git a/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/operation-run.stderr b/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/operation-run.stderr new file mode 100644 index 00000000..e69de29b diff --git a/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/operation-run.stdout b/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/operation-run.stdout new file mode 100644 index 00000000..80aae7bb --- /dev/null +++ b/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/operation-run.stdout @@ -0,0 +1,115 @@ +START s0.engine_open_new +END s0.engine_open_new 0.0036471070000061445 ok +START s0.facade_construct +END s0.facade_construct 0.28479900199999975 ok +START s0.create_snapshot +END s0.create_snapshot 15.233948413999997 ok +START s0.query_read_0 +END s0.query_read_0 2.8882569200000034 ok +START s0.query_read_1 +END s0.query_read_1 2.853243651000014 ok +START s0.query_read_2 +END s0.query_read_2 2.9450300379999703 ok +START s0.inspect_policy +END s0.inspect_policy 2.867906268000013 ok +START s0.route_explicit +END s0.route_explicit 3.19512152599998 ok +START s0.prepare_same_snapshot +END s0.prepare_same_snapshot 5.993509637000045 ok +START s0.resolve +END s0.resolve 12.743021826000017 ok +START s0.inspect_analysis +END s0.inspect_analysis 0.00572523200003161 ok +START s0.inspect_snapshot +END s0.inspect_snapshot 0.0005627439999784656 ok +START s0.engine_close +END s0.engine_close 0.0004285219999928813 ok +START s0.reopen_0 +END s0.reopen_0 0.004172403000040958 ok +START s0.reopen_facade_0 +END s0.reopen_facade_0 0.2647701589999656 ok +START s0.reopened_query_0 +END s0.reopened_query_0 2.841536691999977 ok +START s0.reopen_1 +END s0.reopen_1 0.004645824000022003 ok +START s0.reopen_facade_1 +END s0.reopen_facade_1 0.26397920400000885 ok +START s0.reopened_query_1 +END s0.reopened_query_1 2.861938054999996 ok +START s1.engine_open_new +END s1.engine_open_new 0.0018422809999947276 ok +START s1.facade_construct +END s1.facade_construct 0.26844384000003174 ok +START s1.create_snapshot +END s1.create_snapshot 14.999295378999989 ok +START s1.query_read_0 +END s1.query_read_0 2.851386198 ok +START s1.query_read_1 +END s1.query_read_1 2.9156205319999913 ok +START s1.query_read_2 +END s1.query_read_2 2.8843864529999905 ok +START s1.inspect_policy +END s1.inspect_policy 2.939388970999971 ok +START s1.route_explicit +END s1.route_explicit 3.29525634700002 ok +START s1.prepare_same_snapshot +END s1.prepare_same_snapshot 6.320639734999986 ok +START s1.resolve +END s1.resolve 12.120287040999983 ok +START s1.inspect_analysis +END s1.inspect_analysis 0.0060321509999994305 ok +START s1.inspect_snapshot +END s1.inspect_snapshot 0.0005613210000205981 ok +START s1.engine_close +END s1.engine_close 0.0004450470000278983 ok +START s1.reopen_0 +END s1.reopen_0 0.0040474560000234305 ok +START s1.reopen_facade_0 +END s1.reopen_facade_0 0.27311807900002805 ok +START s1.reopened_query_0 +END s1.reopened_query_0 3.0625665750000053 ok +START s1.reopen_1 +END s1.reopen_1 0.004871230999981435 ok +START s1.reopen_facade_1 +END s1.reopen_facade_1 0.27991140300002826 ok +START s1.reopened_query_1 +END s1.reopened_query_1 3.010045933000015 ok +START s2.engine_open_new +END s2.engine_open_new 0.0027411379999762175 ok +START s2.facade_construct +END s2.facade_construct 0.2879713190000075 ok +START s2.create_snapshot +END s2.create_snapshot 16.264606757999957 ok +START s2.query_read_0 +END s2.query_read_0 3.0195219510000015 ok +START s2.query_read_1 +END s2.query_read_1 3.0369377220000047 ok +START s2.query_read_2 +END s2.query_read_2 2.9356448479999813 ok +START s2.inspect_policy +END s2.inspect_policy 2.902790402999983 ok +START s2.route_explicit +END s2.route_explicit 3.057167095000011 ok +START s2.prepare_same_snapshot +END s2.prepare_same_snapshot 5.847683467000024 ok +START s2.resolve +END s2.resolve 11.562000888 ok +START s2.inspect_analysis +END s2.inspect_analysis 0.005975886999976865 ok +START s2.inspect_snapshot +END s2.inspect_snapshot 0.000584817000003568 ok +START s2.engine_close +END s2.engine_close 0.0003741510000168091 ok +START s2.reopen_0 +END s2.reopen_0 0.005199347999962356 ok +START s2.reopen_facade_0 +END s2.reopen_facade_0 0.3026405969999928 ok +START s2.reopened_query_0 +END s2.reopened_query_0 3.078581342999996 ok +START s2.reopen_1 +END s2.reopen_1 0.005793843999981618 ok +START s2.reopen_facade_1 +END s2.reopen_facade_1 0.3117306949999943 ok +START s2.reopened_query_1 +END s2.reopened_query_1 3.0525170559999992 ok +DONE diff --git a/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/operations/capture-size-0.json b/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/operations/capture-size-0.json new file mode 100644 index 00000000..4522c7fc --- /dev/null +++ b/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/operations/capture-size-0.json @@ -0,0 +1 @@ +{"store_bytes": 4558848, "files": 434, "content_bytes": 3708028} \ No newline at end of file diff --git a/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/operations/capture-size-1.json b/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/operations/capture-size-1.json new file mode 100644 index 00000000..4522c7fc --- /dev/null +++ b/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/operations/capture-size-1.json @@ -0,0 +1 @@ +{"store_bytes": 4558848, "files": 434, "content_bytes": 3708028} \ No newline at end of file diff --git a/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/operations/capture-size-2.json b/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/operations/capture-size-2.json new file mode 100644 index 00000000..4522c7fc --- /dev/null +++ b/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/operations/capture-size-2.json @@ -0,0 +1 @@ +{"store_bytes": 4558848, "files": 434, "content_bytes": 3708028} \ No newline at end of file diff --git a/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/operations/compile-profile.txt b/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/operations/compile-profile.txt new file mode 100644 index 00000000..51aff6a0 --- /dev/null +++ b/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/operations/compile-profile.txt @@ -0,0 +1,78 @@ + 6246652 function calls (6025535 primitive calls) in 1.467 seconds + + Ordered by: cumulative time + List reduced from 391 to 70 due to restriction <70> + + ncalls tottime percall cumtime percall filename:lineno(function) + 1 0.000 0.000 1.473 1.473 engine.py:1702(_compile) + 156 0.038 0.000 0.983 0.006 suite_inputs.py:193(dependency) + 1 0.000 0.000 0.945 0.945 coverage.py:542(load_coverage_horizon) + 1 0.003 0.003 0.945 0.945 coverage.py:341(_load_coverage_horizon) + 400 0.000 0.000 0.849 0.002 encoding.py:72(encode_identity_value) +48746/400 0.023 0.000 0.848 0.002 encoding.py:180(_encode) +85429/400 0.041 0.000 0.848 0.002 {method 'join' of 'bytes' objects} +47575/2334 0.027 0.000 0.847 0.000 encoding.py:193() +16921/6030 0.004 0.000 0.794 0.000 encoding.py:191() + 68954 0.448 0.000 0.779 0.000 encoding.py:218(_encode_string) + 156 0.000 0.000 0.671 0.004 suite_inputs.py:99(_identity_digest) + 1 0.003 0.003 0.490 0.490 suite_inputs.py:537(load_suite_input_manifest) +10739/9628 0.047 0.000 0.285 0.000 encoding.py:33(__init__) + 220 0.001 0.000 0.220 0.001 keys.py:35(analysis_key_bytes) + 1 0.000 0.000 0.211 0.211 coverage.py:649(compile_coverage_definitions) + 24 0.001 0.000 0.211 0.009 coverage.py:551(derive_coverage_view) + 68954 0.121 0.000 0.189 0.000 encoding.py:170(_validate_scalar_string) + 48746 0.012 0.000 0.166 0.000 encoding.py:155(_validate_value) +5411/4583 0.006 0.000 0.157 0.000 encoding.py:22(__init__) + 2458784 0.140 0.000 0.140 0.000 {built-in method builtins.ord} + 1359032 0.120 0.000 0.120 0.000 {method 'append' of 'list' objects} + 1237305 0.120 0.000 0.120 0.000 {method 'encode' of 'str' objects} + 1 0.000 0.000 0.117 0.117 coverage.py:689(load_repository_coverage_decisions) + 24 0.000 0.000 0.116 0.005 coverage.py:680(coverage_requirement_id) + 24 0.000 0.000 0.108 0.004 coverage.py:669(coverage_requirement_projection) + 24 0.000 0.000 0.107 0.004 keys.py:43(analysis_value_digest) + 172 0.000 0.000 0.106 0.001 coverage.py:158(_digest) + 9053 0.003 0.000 0.098 0.000 suite_inputs.py:232() + 188 0.006 0.000 0.077 0.000 _parser.py:69(loads) + 1 0.000 0.000 0.076 0.076 corpus.py:9(load_canonical_standards_corpus) + 1 0.002 0.002 0.064 0.064 compiler.py:731(compile_policy_impact) + 4563 0.009 0.000 0.062 0.000 _parser.py:323(key_value_rule) + 6386/220 0.004 0.000 0.061 0.000 keys.py:16(analysis_key) +5403/1170 0.001 0.000 0.050 0.000 keys.py:23() +5969/4563 0.004 0.000 0.048 0.000 _parser.py:357(parse_key_value_pair) +3067/1411 0.001 0.000 0.046 0.000 keys.py:31() + 1 0.000 0.000 0.043 0.043 policy_units.py:443(load_policy_unit_corpus) + 24 0.000 0.000 0.041 0.002 policy_units.py:286(_unit) + 24 0.000 0.000 0.040 0.002 policy_units.py:258(_resolve_scope) +8406/4563 0.004 0.000 0.038 0.000 _parser.py:584(parse_value) + 70019 0.037 0.000 0.037 0.000 suite_inputs.py:220() + 1 0.001 0.001 0.033 0.033 compiler.py:620(_load_declarations) + 1 0.000 0.000 0.033 0.033 loader.py:521(load_canonical_module_corpus) + 19 0.000 0.000 0.032 0.002 compiler.py:89(_load_toml) + 1 0.000 0.000 0.031 0.031 loader.py:434(validate_module_metadata) + 70 0.001 0.000 0.031 0.000 loader.py:144(_parse_module) + 24 0.001 0.000 0.028 0.001 policy_units.py:220(markdown_structural_digest) + 1 0.001 0.001 0.027 0.027 navigation_indexes.py:107(load_indexes) + 70 0.018 0.000 0.027 0.000 loader.py:60(_field_values) + 10741 0.008 0.000 0.022 0.000 {method 'sort' of 'list' objects} + 1 0.001 0.001 0.020 0.020 suite_inputs.py:429(_registry_definitions) + 1 0.000 0.000 0.019 0.019 navigation_indexes.py:73(_navigation_checks) + 6870 0.002 0.000 0.019 0.000 _parser.py:407(parse_one_line_basic_str) + 1137 0.001 0.000 0.018 0.000 source.py:52(read_bytes) + 1207 0.002 0.000 0.018 0.000 paths.py:8(normalized_repository_path) + 662/557 0.002 0.000 0.017 0.000 _parser.py:412(parse_array) + 6870 0.017 0.000 0.017 0.000 _parser.py:552(parse_basic_str) + 1 0.002 0.002 0.015 0.015 suite_inputs.py:320(_parse_manifest) +71435/62555 0.007 0.000 0.015 0.000 {built-in method builtins.isinstance} + 36836 0.014 0.000 0.014 0.000 encoding.py:58() + 834 0.001 0.000 0.014 0.000 __init__.py:183(dumps) + 313 0.001 0.000 0.013 0.000 core.py:168(compile) + 834 0.001 0.000 0.012 0.000 encoder.py:183(encode) + 1 0.000 0.000 0.012 0.012 routing.py:78(load_router_projection) + 834 0.011 0.000 0.011 0.000 encoder.py:205(iterencode) + 1 0.000 0.000 0.011 0.011 repository.py:25(standards_navigation_registry) + 627/528 0.002 0.000 0.011 0.000 _parser.py:436(parse_inline_table) + 1691 0.001 0.000 0.011 0.000 _local.py:320(parts) + 2483 0.001 0.000 0.011 0.000 suite_inputs.py:401() + 24 0.006 0.000 0.011 0.000 policy_units.py:182(_headings) + + diff --git a/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/operations/compiled-memory.json b/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/operations/compiled-memory.json new file mode 100644 index 00000000..175601f4 --- /dev/null +++ b/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/operations/compiled-memory.json @@ -0,0 +1,6 @@ +{ + "retained_tracemalloc_bytes": 3649110, + "peak_tracemalloc_bytes": 3985733, + "capture_bytes": 3708028, + "note": "single compilation allocation increment; excludes prior imports and existing captured byte objects; not process RSS cap" +} \ No newline at end of file diff --git a/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/operations/operations.jsonl b/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/operations/operations.jsonl new file mode 100644 index 00000000..399f2420 --- /dev/null +++ b/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/operations/operations.jsonl @@ -0,0 +1,57 @@ +{"operation": "s0.engine_open_new", "wall_s": 0.0036471070000061445, "cpu_s": 0.0036396899999999732, "status": "ok", "peak_rss_kib": 137812, "spans": {"sqlite._verify_integrity": {"calls": 1, "wall_s": 0.00022370500005308713, "self_s": 0.00022370500005308713}, "sqlite.__init__": {"calls": 1, "wall_s": 0.0034763809999844852, "self_s": 0.003252675999931398}, "snapshot.maintain": {"calls": 1, "wall_s": 4.3274000006476854e-05, "self_s": 4.3274000006476854e-05}}, "git_reads": {"count": 0, "unique": 0, "top": []}, "git_objects": {"count": 0, "unique": 0}, "git_commands": {}} +{"operation": "s0.facade_construct", "wall_s": 0.28479900199999975, "cpu_s": 0.28477422699999977, "status": "ok", "peak_rss_kib": 138708, "spans": {"facade.contracts": {"calls": 1, "wall_s": 0.27917672500001345, "self_s": 0.27917672500001345}}, "git_reads": {"count": 0, "unique": 0, "top": []}, "git_objects": {"count": 0, "unique": 0}, "git_commands": {}} +{"operation": "s0.create_snapshot", "wall_s": 15.233948413999997, "cpu_s": 7.102598803, "status": "ok", "peak_rss_kib": 247308, "spans": {"git.command": {"calls": 6135, "wall_s": 11.33591744000097, "self_s": 11.33591744000097}, "git.object": {"calls": 6134, "wall_s": 11.46584322400281, "self_s": 0.13377479400185166}, "git.read_file": {"calls": 1137, "wall_s": 11.81849088800044, "self_s": 0.3526476639976295}, "git.read_bytes": {"calls": 1137, "wall_s": 11.837916688000064, "self_s": 0.019425799999623905}, "compile.load_canonical_standards_corpus": {"calls": 2, "wall_s": 1.0543305090000104, "self_s": 0.053257441000369}, "compile.compile_policy_impact": {"calls": 2, "wall_s": 0.30327400600003784, "self_s": 0.056241903000056936}, "compile.load_supporting_content": {"calls": 2, "wall_s": 0.029609549000042534, "self_s": 0.0003123090000372031}, "compile.standards_navigation_registry": {"calls": 2, "wall_s": 0.007974564000051032, "self_s": 0.007974564000051032}, "compile.load_router_projection": {"calls": 2, "wall_s": 0.028748550999978306, "self_s": 0.009294079999961014}, "compile.build_materials": {"calls": 2, "wall_s": 0.6915591459999746, "self_s": 0.017112125999744876}, "compile.load_coverage_horizon": {"calls": 2, "wall_s": 7.8990654760000325, "self_s": 0.41966256000017665}, "compile.compile_coverage_definitions": {"calls": 2, "wall_s": 0.07205871100001104, "self_s": 0.07205871100001104}, "compile.load_repository_coverage_decisions": {"calls": 2, "wall_s": 0.17771689699998205, "self_s": 0.041936041999974805}, "compile.load_indexes": {"calls": 2, "wall_s": 2.2926193280000007, "self_s": 0.04119031299967446}, "_compile/_GitRevisionSource": {"calls": 1, "wall_s": 12.241761449000023, "self_s": 7.561400002487062e-05}, "_compile/FrozenContentSource": {"calls": 1, "wall_s": 0.31535346499998695, "self_s": 8.256299986442173e-05}, "sqlite.snapshot": {"calls": 1, "wall_s": 6.589899999198678e-05, "self_s": 6.589899999198678e-05}}, "git_reads": {"count": 1137, "unique": 434, "top": [["topics/contracts.md", 17], ["STANDARDS-ROUTER.md", 15], ["topics/security.md", 14], ["workflows/verification.md", 14], ["topics/dependencies.md", 10], ["profiles/applications/frontend.md", 9], ["topics/architecture.md", 9], ["topics/concurrency.md", 9], ["topics/cross-platform.md", 9], ["workflows/commit.md", 9]]}, "git_objects": {"count": 6134, "unique": 524}, "git_commands": {"rev-parse --verify": 1, "cat-file --batch": 6134}} +{"operation": "s0.query_read_0", "wall_s": 2.8882569200000034, "cpu_s": 2.8849322369999992, "status": "ok", "peak_rss_kib": 265616, "spans": {"snapshot.maintain": {"calls": 1, "wall_s": 3.9748999995481427e-05, "self_s": 3.9748999995481427e-05}, "sqlite.snapshot": {"calls": 1, "wall_s": 1.9299000030059688e-05, "self_s": 1.9299000030059688e-05}, "sqlite.load_content": {"calls": 1, "wall_s": 0.011253368000041064, "self_s": 0.011234069000011004}, "snapshot.load_content": {"calls": 1, "wall_s": 2.5716840660000457, "self_s": 2.560390949000009}, "compile.load_canonical_standards_corpus": {"calls": 1, "wall_s": 0.02009395999999697, "self_s": 0.02009395999999697}, "compile.compile_policy_impact": {"calls": 1, "wall_s": 0.0253397519999794, "self_s": 0.0253397519999794}, "compile.load_supporting_content": {"calls": 1, "wall_s": 7.913799998959803e-05, "self_s": 7.913799998959803e-05}, "compile.standards_navigation_registry": {"calls": 1, "wall_s": 0.0033940980000011223, "self_s": 0.0033940980000011223}, "compile.load_router_projection": {"calls": 1, "wall_s": 0.004028218999962974, "self_s": 0.004028218999962974}, "compile.build_materials": {"calls": 1, "wall_s": 0.005027735999988181, "self_s": 0.005027735999988181}, "compile.load_coverage_horizon": {"calls": 1, "wall_s": 0.17707287199999655, "self_s": 0.17707287199999655}, "compile.compile_coverage_definitions": {"calls": 1, "wall_s": 0.03884095999995907, "self_s": 0.03884095999995907}, "compile.load_repository_coverage_decisions": {"calls": 1, "wall_s": 0.020527318999995714, "self_s": 0.020527318999995714}, "compile.load_indexes": {"calls": 1, "wall_s": 0.011916893000034179, "self_s": 0.011916893000034179}, "_compile/FrozenContentSource": {"calls": 1, "wall_s": 0.30640650500004085, "self_s": 8.555800013709813e-05}, "engine._compiled_snapshot": {"calls": 1, "wall_s": 2.8806338739999546, "self_s": 0.0025433029998680468}}, "git_reads": {"count": 0, "unique": 0, "top": []}, "git_objects": {"count": 0, "unique": 0}, "git_commands": {}} +{"operation": "s0.query_read_1", "wall_s": 2.853243651000014, "cpu_s": 2.8496010170000012, "status": "ok", "peak_rss_kib": 267180, "spans": {"snapshot.maintain": {"calls": 1, "wall_s": 0.00011806700001670833, "self_s": 0.00011806700001670833}, "sqlite.snapshot": {"calls": 1, "wall_s": 2.774199998611948e-05, "self_s": 2.774199998611948e-05}, "sqlite.load_content": {"calls": 1, "wall_s": 0.011274370000023737, "self_s": 0.011246628000037617}, "snapshot.load_content": {"calls": 1, "wall_s": 2.5215972220000253, "self_s": 2.510204784999985}, "compile.load_canonical_standards_corpus": {"calls": 1, "wall_s": 0.021448258999953396, "self_s": 0.021448258999953396}, "compile.compile_policy_impact": {"calls": 1, "wall_s": 0.026186923000011575, "self_s": 0.026186923000011575}, "compile.load_supporting_content": {"calls": 1, "wall_s": 7.568300003413242e-05, "self_s": 7.568300003413242e-05}, "compile.standards_navigation_registry": {"calls": 1, "wall_s": 0.0034446330000150738, "self_s": 0.0034446330000150738}, "compile.load_router_projection": {"calls": 1, "wall_s": 0.005085061999977825, "self_s": 0.005085061999977825}, "compile.build_materials": {"calls": 1, "wall_s": 0.005447897000010471, "self_s": 0.005447897000010471}, "compile.load_coverage_horizon": {"calls": 1, "wall_s": 0.18858938500000022, "self_s": 0.18858938500000022}, "compile.compile_coverage_definitions": {"calls": 1, "wall_s": 0.03840493600000627, "self_s": 0.03840493600000627}, "compile.load_repository_coverage_decisions": {"calls": 1, "wall_s": 0.02106470499995794, "self_s": 0.02106470499995794}, "compile.load_indexes": {"calls": 1, "wall_s": 0.011802310999996735, "self_s": 0.011802310999996735}, "_compile/FrozenContentSource": {"calls": 1, "wall_s": 0.32163664399996605, "self_s": 8.685000000241416e-05}, "engine._compiled_snapshot": {"calls": 1, "wall_s": 2.845623278000005, "self_s": 0.0023894120000136354}}, "git_reads": {"count": 0, "unique": 0, "top": []}, "git_objects": {"count": 0, "unique": 0}, "git_commands": {}} +{"operation": "s0.query_read_2", "wall_s": 2.9450300379999703, "cpu_s": 2.9350780249999993, "status": "ok", "peak_rss_kib": 267536, "spans": {"snapshot.maintain": {"calls": 1, "wall_s": 9.633400003394854e-05, "self_s": 9.633400003394854e-05}, "sqlite.snapshot": {"calls": 1, "wall_s": 2.6229000013699988e-05, "self_s": 2.6229000013699988e-05}, "sqlite.load_content": {"calls": 1, "wall_s": 0.011338294999973186, "self_s": 0.011312065999959486}, "snapshot.load_content": {"calls": 1, "wall_s": 2.608985445999963, "self_s": 2.5975508169999557}, "compile.load_canonical_standards_corpus": {"calls": 1, "wall_s": 0.02104239100003724, "self_s": 0.02104239100003724}, "compile.compile_policy_impact": {"calls": 1, "wall_s": 0.026747983000007025, "self_s": 0.026747983000007025}, "compile.load_supporting_content": {"calls": 1, "wall_s": 9.803699998656157e-05, "self_s": 9.803699998656157e-05}, "compile.standards_navigation_registry": {"calls": 1, "wall_s": 0.003847446999998283, "self_s": 0.003847446999998283}, "compile.load_router_projection": {"calls": 1, "wall_s": 0.004185763999998926, "self_s": 0.004185763999998926}, "compile.build_materials": {"calls": 1, "wall_s": 0.005565060999970228, "self_s": 0.005565060999970228}, "compile.load_coverage_horizon": {"calls": 1, "wall_s": 0.19493953299996747, "self_s": 0.19493953299996747}, "compile.compile_coverage_definitions": {"calls": 1, "wall_s": 0.037036254999975426, "self_s": 0.037036254999975426}, "compile.load_repository_coverage_decisions": {"calls": 1, "wall_s": 0.020690313999978116, "self_s": 0.020690313999978116}, "compile.load_indexes": {"calls": 1, "wall_s": 0.012045064999995247, "self_s": 0.012045064999995247}, "_compile/FrozenContentSource": {"calls": 1, "wall_s": 0.32630971899999395, "self_s": 0.00011186900007942313}, "engine._compiled_snapshot": {"calls": 1, "wall_s": 2.937880320999966, "self_s": 0.002585156000009192}}, "git_reads": {"count": 0, "unique": 0, "top": []}, "git_objects": {"count": 0, "unique": 0}, "git_commands": {}} +{"operation": "s0.inspect_policy", "wall_s": 2.867906268000013, "cpu_s": 2.860199088999998, "status": "ok", "peak_rss_kib": 267664, "spans": {"snapshot.maintain": {"calls": 1, "wall_s": 0.0009936089999769138, "self_s": 0.0009936089999769138}, "sqlite.snapshot": {"calls": 1, "wall_s": 2.995500000224638e-05, "self_s": 2.995500000224638e-05}, "sqlite.load_content": {"calls": 1, "wall_s": 0.012304593999999724, "self_s": 0.012274638999997478}, "snapshot.load_content": {"calls": 1, "wall_s": 2.54284434799996, "self_s": 2.5295461449999834}, "compile.load_canonical_standards_corpus": {"calls": 1, "wall_s": 0.020397704999993493, "self_s": 0.020397704999993493}, "compile.compile_policy_impact": {"calls": 1, "wall_s": 0.02529453500000045, "self_s": 0.02529453500000045}, "compile.load_supporting_content": {"calls": 1, "wall_s": 7.463200000756842e-05, "self_s": 7.463200000756842e-05}, "compile.standards_navigation_registry": {"calls": 1, "wall_s": 0.003461659000038253, "self_s": 0.003461659000038253}, "compile.load_router_projection": {"calls": 1, "wall_s": 0.004073024999968311, "self_s": 0.004073024999968311}, "compile.build_materials": {"calls": 1, "wall_s": 0.0050248219999957655, "self_s": 0.0050248219999957655}, "compile.load_coverage_horizon": {"calls": 1, "wall_s": 0.18293222200003356, "self_s": 0.18293222200003356}, "compile.compile_coverage_definitions": {"calls": 1, "wall_s": 0.0385966979999921, "self_s": 0.0385966979999921}, "compile.load_repository_coverage_decisions": {"calls": 1, "wall_s": 0.02635233099999823, "self_s": 0.02635233099999823}, "compile.load_indexes": {"calls": 1, "wall_s": 0.011550724000016999, "self_s": 0.011550724000016999}, "_compile/FrozenContentSource": {"calls": 1, "wall_s": 0.31787310400000024, "self_s": 0.00011475099995550408}, "engine._compiled_snapshot": {"calls": 1, "wall_s": 2.863075858000002, "self_s": 0.0023584060000416684}}, "git_reads": {"count": 0, "unique": 0, "top": []}, "git_objects": {"count": 0, "unique": 0}, "git_commands": {}} +{"operation": "s0.route_explicit", "wall_s": 3.19512152599998, "cpu_s": 3.193528937, "status": "ok", "peak_rss_kib": 267664, "spans": {"snapshot.maintain": {"calls": 1, "wall_s": 9.741600001689221e-05, "self_s": 9.741600001689221e-05}, "sqlite.snapshot": {"calls": 1, "wall_s": 2.509699999109216e-05, "self_s": 2.509699999109216e-05}, "sqlite.load_content": {"calls": 1, "wall_s": 0.011673669000003883, "self_s": 0.011648572000012791}, "snapshot.load_content": {"calls": 1, "wall_s": 2.663584840999988, "self_s": 2.6518137559999673}, "compile.load_canonical_standards_corpus": {"calls": 1, "wall_s": 0.01992217200000823, "self_s": 0.01992217200000823}, "compile.compile_policy_impact": {"calls": 1, "wall_s": 0.02511537599997382, "self_s": 0.02511537599997382}, "compile.load_supporting_content": {"calls": 1, "wall_s": 7.11769999952594e-05, "self_s": 7.11769999952594e-05}, "compile.standards_navigation_registry": {"calls": 1, "wall_s": 0.0033209480000095937, "self_s": 0.0033209480000095937}, "compile.load_router_projection": {"calls": 1, "wall_s": 0.004224843000031342, "self_s": 0.004224843000031342}, "compile.build_materials": {"calls": 1, "wall_s": 0.005325141999946936, "self_s": 0.005325141999946936}, "compile.load_coverage_horizon": {"calls": 1, "wall_s": 0.18392971700001226, "self_s": 0.18392971700001226}, "compile.compile_coverage_definitions": {"calls": 1, "wall_s": 0.03800449599998501, "self_s": 0.03800449599998501}, "compile.load_repository_coverage_decisions": {"calls": 1, "wall_s": 0.02184321100003217, "self_s": 0.02184321100003217}, "compile.load_indexes": {"calls": 1, "wall_s": 0.011554369999998926, "self_s": 0.011554369999998926}, "_compile/FrozenContentSource": {"calls": 1, "wall_s": 0.31340845800002626, "self_s": 9.700600003270665e-05}, "engine._compiled_snapshot": {"calls": 1, "wall_s": 2.9793326550000074, "self_s": 0.0023393559999931313}}, "git_reads": {"count": 0, "unique": 0, "top": []}, "git_objects": {"count": 0, "unique": 0}, "git_commands": {}} +{"operation": "s0.prepare_same_snapshot", "wall_s": 5.993509637000045, "cpu_s": 5.984644828, "status": "ok", "peak_rss_kib": 273148, "spans": {"snapshot.maintain": {"calls": 3, "wall_s": 0.0013282310000022335, "self_s": 0.0013282310000022335}, "sqlite.snapshot": {"calls": 3, "wall_s": 8.50769999374279e-05, "self_s": 8.50769999374279e-05}, "sqlite.load_content": {"calls": 2, "wall_s": 0.022900297000035152, "self_s": 0.022837143000060678}, "snapshot.load_content": {"calls": 2, "wall_s": 5.307598344000041, "self_s": 5.283480592000046}, "compile.load_canonical_standards_corpus": {"calls": 2, "wall_s": 0.04396875499998032, "self_s": 0.04396875499998032}, "compile.compile_policy_impact": {"calls": 2, "wall_s": 0.053709087000072486, "self_s": 0.053709087000072486}, "compile.load_supporting_content": {"calls": 2, "wall_s": 0.00015961899998728768, "self_s": 0.00015961899998728768}, "compile.standards_navigation_registry": {"calls": 2, "wall_s": 0.007627713000090353, "self_s": 0.007627713000090353}, "compile.load_router_projection": {"calls": 2, "wall_s": 0.00833021600004713, "self_s": 0.00833021600004713}, "compile.build_materials": {"calls": 2, "wall_s": 0.010471456999994189, "self_s": 0.010471456999994189}, "compile.load_coverage_horizon": {"calls": 2, "wall_s": 0.37719800300004636, "self_s": 0.37719800300004636}, "compile.compile_coverage_definitions": {"calls": 2, "wall_s": 0.0721317399999748, "self_s": 0.0721317399999748}, "compile.load_repository_coverage_decisions": {"calls": 2, "wall_s": 0.04025250500006905, "self_s": 0.04025250500006905}, "compile.load_indexes": {"calls": 2, "wall_s": 0.02329331400000001, "self_s": 0.02329331400000001}, "_compile/FrozenContentSource": {"calls": 2, "wall_s": 0.6373159409999971, "self_s": 0.00017353199973513256}, "engine._compiled_snapshot": {"calls": 2, "wall_s": 5.94977559199998, "self_s": 0.004861306999941917}, "compile.evaluate_analysis": {"calls": 1, "wall_s": 0.021166357000026892, "self_s": 0.021166357000026892}, "engine._evaluate_compiled": {"calls": 1, "wall_s": 0.02143746399997326, "self_s": 0.0002711069999463689}, "snapshot.publish_aggregate": {"calls": 1, "wall_s": 0.0009828029999994214, "self_s": 0.0008501039999941895}}, "git_reads": {"count": 0, "unique": 0, "top": []}, "git_objects": {"count": 0, "unique": 0}, "git_commands": {}} +{"operation": "s0.resolve", "wall_s": 12.743021826000017, "cpu_s": 12.727592847, "status": "ok", "peak_rss_kib": 276348, "spans": {"snapshot.maintain": {"calls": 6, "wall_s": 0.004269398000019464, "self_s": 0.004269398000019464}, "sqlite.snapshot": {"calls": 6, "wall_s": 0.00014765200006650048, "self_s": 0.00014765200006650048}, "engine._load_analysis": {"calls": 1, "wall_s": 0.0011102839999921343, "self_s": 0.00099352799998087}, "sqlite.load_content": {"calls": 4, "wall_s": 0.04617222900003526, "self_s": 0.04606881400002294}, "snapshot.load_content": {"calls": 4, "wall_s": 10.985343738999973, "self_s": 10.936913557999901}, "compile.load_canonical_standards_corpus": {"calls": 4, "wall_s": 0.13409727699996665, "self_s": 0.13409727699996665}, "compile.compile_policy_impact": {"calls": 4, "wall_s": 0.15042733599989333, "self_s": 0.15042733599989333}, "compile.load_supporting_content": {"calls": 4, "wall_s": 0.0004091030000381579, "self_s": 0.0004091030000381579}, "compile.standards_navigation_registry": {"calls": 4, "wall_s": 0.015717288000018925, "self_s": 0.015717288000018925}, "compile.load_router_projection": {"calls": 4, "wall_s": 0.023162077999984376, "self_s": 0.023162077999984376}, "compile.build_materials": {"calls": 4, "wall_s": 0.023915718000068864, "self_s": 0.023915718000068864}, "compile.load_coverage_horizon": {"calls": 4, "wall_s": 1.0146192130000031, "self_s": 1.0146192130000031}, "compile.compile_coverage_definitions": {"calls": 4, "wall_s": 0.1570890410000061, "self_s": 0.1570890410000061}, "compile.load_repository_coverage_decisions": {"calls": 4, "wall_s": 0.08121672600003649, "self_s": 0.08121672600003649}, "compile.load_indexes": {"calls": 4, "wall_s": 0.05045708999995213, "self_s": 0.05045708999995213}, "_compile/FrozenContentSource": {"calls": 4, "wall_s": 1.6515162190000297, "self_s": 0.00040534900006150565}, "engine._compiled_snapshot": {"calls": 4, "wall_s": 12.65664070799994, "self_s": 0.019780749999938507}, "compile.evaluate_analysis": {"calls": 2, "wall_s": 0.04613408000000163, "self_s": 0.04613408000000163}, "engine._evaluate_compiled": {"calls": 2, "wall_s": 0.04684964199998376, "self_s": 0.0007155619999821283}, "engine._evaluate": {"calls": 2, "wall_s": 12.709197435000021, "self_s": 0.005707085000096868}, "snapshot.publish_aggregate": {"calls": 1, "wall_s": 0.00462422099997184, "self_s": 0.0026852939999457703}}, "git_reads": {"count": 0, "unique": 0, "top": []}, "git_objects": {"count": 0, "unique": 0}, "git_commands": {}} +{"operation": "s0.inspect_analysis", "wall_s": 0.00572523200003161, "cpu_s": 0.00572562199999993, "status": "ok", "peak_rss_kib": 276348, "spans": {"snapshot.maintain": {"calls": 1, "wall_s": 8.855300001187061e-05, "self_s": 8.855300001187061e-05}, "sqlite.snapshot": {"calls": 1, "wall_s": 1.682499998878484e-05, "self_s": 1.682499998878484e-05}, "engine._load_analysis": {"calls": 1, "wall_s": 0.002525345999970341, "self_s": 0.0024199679999696855}}, "git_reads": {"count": 0, "unique": 0, "top": []}, "git_objects": {"count": 0, "unique": 0}, "git_commands": {}} +{"operation": "s0.inspect_snapshot", "wall_s": 0.0005627439999784656, "cpu_s": 0.0005629659999968339, "status": "ok", "peak_rss_kib": 276348, "spans": {"snapshot.maintain": {"calls": 1, "wall_s": 5.1147000021956046e-05, "self_s": 5.1147000021956046e-05}, "sqlite.snapshot": {"calls": 1, "wall_s": 2.129199998535114e-05, "self_s": 2.129199998535114e-05}}, "git_reads": {"count": 0, "unique": 0, "top": []}, "git_objects": {"count": 0, "unique": 0}, "git_commands": {}} +{"operation": "s0.engine_close", "wall_s": 0.0004285219999928813, "cpu_s": 0.00042585300000297366, "status": "ok", "peak_rss_kib": 276468, "spans": {}, "git_reads": {"count": 0, "unique": 0, "top": []}, "git_objects": {"count": 0, "unique": 0}, "git_commands": {}} +{"operation": "s0.reopen_0", "wall_s": 0.004172403000040958, "cpu_s": 0.0041745460000015555, "status": "ok", "peak_rss_kib": 276468, "spans": {"sqlite._verify_integrity": {"calls": 2, "wall_s": 0.003416861000005156, "self_s": 0.003416861000005156}, "sqlite.__init__": {"calls": 1, "wall_s": 0.004016539999952329, "self_s": 0.000599678999947173}, "snapshot.maintain": {"calls": 1, "wall_s": 3.968999999415246e-05, "self_s": 3.968999999415246e-05}}, "git_reads": {"count": 0, "unique": 0, "top": []}, "git_objects": {"count": 0, "unique": 0}, "git_commands": {}} +{"operation": "s0.reopen_facade_0", "wall_s": 0.2647701589999656, "cpu_s": 0.2647702710000033, "status": "ok", "peak_rss_kib": 276468, "spans": {"facade.contracts": {"calls": 1, "wall_s": 0.2622043220000023, "self_s": 0.2622043220000023}}, "git_reads": {"count": 0, "unique": 0, "top": []}, "git_objects": {"count": 0, "unique": 0}, "git_commands": {}} +{"operation": "s0.reopened_query_0", "wall_s": 2.841536691999977, "cpu_s": 2.8413287640000036, "status": "ok", "peak_rss_kib": 277240, "spans": {"snapshot.maintain": {"calls": 1, "wall_s": 9.320899999920584e-05, "self_s": 9.320899999920584e-05}, "sqlite.snapshot": {"calls": 1, "wall_s": 7.001500000569649e-05, "self_s": 7.001500000569649e-05}, "sqlite.load_content": {"calls": 1, "wall_s": 0.011004823999996916, "self_s": 0.010934808999991219}, "snapshot.load_content": {"calls": 1, "wall_s": 2.5094933650000257, "self_s": 2.4983953320000296}, "compile.load_canonical_standards_corpus": {"calls": 1, "wall_s": 0.020325465999974313, "self_s": 0.020325465999974313}, "compile.compile_policy_impact": {"calls": 1, "wall_s": 0.02634771299995009, "self_s": 0.02634771299995009}, "compile.load_supporting_content": {"calls": 1, "wall_s": 7.613399998263048e-05, "self_s": 7.613399998263048e-05}, "compile.standards_navigation_registry": {"calls": 1, "wall_s": 0.0033838120000382332, "self_s": 0.0033838120000382332}, "compile.load_router_projection": {"calls": 1, "wall_s": 0.004383740999969632, "self_s": 0.004383740999969632}, "compile.build_materials": {"calls": 1, "wall_s": 0.0055361590000302385, "self_s": 0.0055361590000302385}, "compile.load_coverage_horizon": {"calls": 1, "wall_s": 0.18779269599997406, "self_s": 0.18779269599997406}, "compile.compile_coverage_definitions": {"calls": 1, "wall_s": 0.039918224000018654, "self_s": 0.039918224000018654}, "compile.load_repository_coverage_decisions": {"calls": 1, "wall_s": 0.022299605999990035, "self_s": 0.022299605999990035}, "compile.load_indexes": {"calls": 1, "wall_s": 0.011979356000040298, "self_s": 0.011979356000040298}, "_compile/FrozenContentSource": {"calls": 1, "wall_s": 0.32212687200001255, "self_s": 8.396500004437257e-05}, "engine._compiled_snapshot": {"calls": 1, "wall_s": 2.8342386919999853, "self_s": 0.002618454999947062}}, "git_reads": {"count": 0, "unique": 0, "top": []}, "git_objects": {"count": 0, "unique": 0}, "git_commands": {}} +{"operation": "s0.reopen_1", "wall_s": 0.004645824000022003, "cpu_s": 0.004646117000000061, "status": "ok", "peak_rss_kib": 277240, "spans": {"sqlite._verify_integrity": {"calls": 2, "wall_s": 0.003874597999981688, "self_s": 0.003874597999981688}, "sqlite.__init__": {"calls": 1, "wall_s": 0.00448255800000652, "self_s": 0.000607960000024832}, "snapshot.maintain": {"calls": 1, "wall_s": 6.331500003398105e-05, "self_s": 6.331500003398105e-05}}, "git_reads": {"count": 0, "unique": 0, "top": []}, "git_objects": {"count": 0, "unique": 0}, "git_commands": {}} +{"operation": "s0.reopen_facade_1", "wall_s": 0.26397920400000885, "cpu_s": 0.263979796000001, "status": "ok", "peak_rss_kib": 277240, "spans": {"facade.contracts": {"calls": 1, "wall_s": 0.26146655700000565, "self_s": 0.26146655700000565}}, "git_reads": {"count": 0, "unique": 0, "top": []}, "git_objects": {"count": 0, "unique": 0}, "git_commands": {}} +{"operation": "s0.reopened_query_1", "wall_s": 2.861938054999996, "cpu_s": 2.861646936999996, "status": "ok", "peak_rss_kib": 277624, "spans": {"snapshot.maintain": {"calls": 1, "wall_s": 9.417199999006698e-05, "self_s": 9.417199999006698e-05}, "sqlite.snapshot": {"calls": 1, "wall_s": 6.799200002660655e-05, "self_s": 6.799200002660655e-05}, "sqlite.load_content": {"calls": 1, "wall_s": 0.011430372999996052, "self_s": 0.011362380999969446}, "snapshot.load_content": {"calls": 1, "wall_s": 2.5312164339999867, "self_s": 2.5196918890000006}, "compile.load_canonical_standards_corpus": {"calls": 1, "wall_s": 0.021248650000018188, "self_s": 0.021248650000018188}, "compile.compile_policy_impact": {"calls": 1, "wall_s": 0.025423607999982778, "self_s": 0.025423607999982778}, "compile.load_supporting_content": {"calls": 1, "wall_s": 6.957400000828784e-05, "self_s": 6.957400000828784e-05}, "compile.standards_navigation_registry": {"calls": 1, "wall_s": 0.003776371000014933, "self_s": 0.003776371000014933}, "compile.load_router_projection": {"calls": 1, "wall_s": 0.0041030699999851095, "self_s": 0.0041030699999851095}, "compile.build_materials": {"calls": 1, "wall_s": 0.005004060999965532, "self_s": 0.005004060999965532}, "compile.load_coverage_horizon": {"calls": 1, "wall_s": 0.1934154570000146, "self_s": 0.1934154570000146}, "compile.compile_coverage_definitions": {"calls": 1, "wall_s": 0.0360161920000337, "self_s": 0.0360161920000337}, "compile.load_repository_coverage_decisions": {"calls": 1, "wall_s": 0.0206281680000302, "self_s": 0.0206281680000302}, "compile.load_indexes": {"calls": 1, "wall_s": 0.011307427999952324, "self_s": 0.011307427999952324}, "_compile/FrozenContentSource": {"calls": 1, "wall_s": 0.32107450099999824, "self_s": 8.192199999257355e-05}, "engine._compiled_snapshot": {"calls": 1, "wall_s": 2.8545711830000187, "self_s": 0.00228024800003368}}, "git_reads": {"count": 0, "unique": 0, "top": []}, "git_objects": {"count": 0, "unique": 0}, "git_commands": {}} +{"operation": "s1.engine_open_new", "wall_s": 0.0018422809999947276, "cpu_s": 0.0018422590000000127, "status": "ok", "peak_rss_kib": 277624, "spans": {"sqlite._verify_integrity": {"calls": 1, "wall_s": 0.00011190700001861842, "self_s": 0.00011190700001861842}, "sqlite.__init__": {"calls": 1, "wall_s": 0.001680118000024322, "self_s": 0.0015682110000057037}, "snapshot.maintain": {"calls": 1, "wall_s": 3.563399997119632e-05, "self_s": 3.563399997119632e-05}}, "git_reads": {"count": 0, "unique": 0, "top": []}, "git_objects": {"count": 0, "unique": 0}, "git_commands": {}} +{"operation": "s1.facade_construct", "wall_s": 0.26844384000003174, "cpu_s": 0.26844542899999624, "status": "ok", "peak_rss_kib": 277624, "spans": {"facade.contracts": {"calls": 1, "wall_s": 0.2656934880000108, "self_s": 0.2656934880000108}}, "git_reads": {"count": 0, "unique": 0, "top": []}, "git_objects": {"count": 0, "unique": 0}, "git_commands": {}} +{"operation": "s1.create_snapshot", "wall_s": 14.999295378999989, "cpu_s": 6.936493705000004, "status": "ok", "peak_rss_kib": 280396, "spans": {"git.command": {"calls": 6135, "wall_s": 11.251528760000099, "self_s": 11.251528760000099}, "git.object": {"calls": 6134, "wall_s": 11.377418873995737, "self_s": 0.1298073259956709}, "git.read_file": {"calls": 1137, "wall_s": 11.739069855000537, "self_s": 0.3616509810048001}, "git.read_bytes": {"calls": 1137, "wall_s": 11.757330002999765, "self_s": 0.018260147999228593}, "compile.load_canonical_standards_corpus": {"calls": 2, "wall_s": 1.0167479579999394, "self_s": 0.05258526500017524}, "compile.compile_policy_impact": {"calls": 2, "wall_s": 0.28025448300002154, "self_s": 0.05844553999992286}, "compile.load_supporting_content": {"calls": 2, "wall_s": 0.01975310700004229, "self_s": 0.00026633000004494534}, "compile.standards_navigation_registry": {"calls": 2, "wall_s": 0.009369963999972697, "self_s": 0.009369963999972697}, "compile.load_router_projection": {"calls": 2, "wall_s": 0.025533186000018304, "self_s": 0.008890656000005492}, "compile.build_materials": {"calls": 2, "wall_s": 0.6649164640000436, "self_s": 0.01520942500047795}, "compile.load_coverage_horizon": {"calls": 2, "wall_s": 7.940047670999945, "self_s": 0.4122878479997212}, "compile.compile_coverage_definitions": {"calls": 2, "wall_s": 0.07283220499999743, "self_s": 0.07283220499999743}, "compile.load_repository_coverage_decisions": {"calls": 2, "wall_s": 0.17011136299998952, "self_s": 0.041834574000063185}, "compile.load_indexes": {"calls": 2, "wall_s": 2.2692580529999873, "self_s": 0.03977264399981095}, "_compile/_GitRevisionSource": {"calls": 1, "wall_s": 12.157284970999967, "self_s": 7.46609999850989e-05}, "_compile/FrozenContentSource": {"calls": 1, "wall_s": 0.31169966200002364, "self_s": 8.551800004852339e-05}, "sqlite.snapshot": {"calls": 1, "wall_s": 6.33749999678912e-05, "self_s": 6.33749999678912e-05}}, "git_reads": {"count": 1137, "unique": 434, "top": [["topics/contracts.md", 17], ["STANDARDS-ROUTER.md", 15], ["topics/security.md", 14], ["workflows/verification.md", 14], ["topics/dependencies.md", 10], ["profiles/applications/frontend.md", 9], ["topics/architecture.md", 9], ["topics/concurrency.md", 9], ["topics/cross-platform.md", 9], ["workflows/commit.md", 9]]}, "git_objects": {"count": 6134, "unique": 524}, "git_commands": {"rev-parse --verify": 1, "cat-file --batch": 6134}} +{"operation": "s1.query_read_0", "wall_s": 2.851386198, "cpu_s": 2.8490421670000003, "status": "ok", "peak_rss_kib": 280396, "spans": {"snapshot.maintain": {"calls": 1, "wall_s": 3.605400002015813e-05, "self_s": 3.605400002015813e-05}, "sqlite.snapshot": {"calls": 1, "wall_s": 1.774600002590887e-05, "self_s": 1.774600002590887e-05}, "sqlite.load_content": {"calls": 1, "wall_s": 0.010585525999999845, "self_s": 0.010567779999973936}, "snapshot.load_content": {"calls": 1, "wall_s": 2.523175132999995, "self_s": 2.512553552999975}, "compile.load_canonical_standards_corpus": {"calls": 1, "wall_s": 0.021125455000003512, "self_s": 0.021125455000003512}, "compile.compile_policy_impact": {"calls": 1, "wall_s": 0.026257036000004064, "self_s": 0.026257036000004064}, "compile.load_supporting_content": {"calls": 1, "wall_s": 7.312899998623834e-05, "self_s": 7.312899998623834e-05}, "compile.standards_navigation_registry": {"calls": 1, "wall_s": 0.0036747980000200187, "self_s": 0.0036747980000200187}, "compile.load_router_projection": {"calls": 1, "wall_s": 0.004363139000020055, "self_s": 0.004363139000020055}, "compile.build_materials": {"calls": 1, "wall_s": 0.005192532999956256, "self_s": 0.005192532999956256}, "compile.load_coverage_horizon": {"calls": 1, "wall_s": 0.18734448500003964, "self_s": 0.18734448500003964}, "compile.compile_coverage_definitions": {"calls": 1, "wall_s": 0.037175670999999966, "self_s": 0.037175670999999966}, "compile.load_repository_coverage_decisions": {"calls": 1, "wall_s": 0.01995022300002347, "self_s": 0.01995022300002347}, "compile.load_indexes": {"calls": 1, "wall_s": 0.012438904000021012, "self_s": 0.012438904000021012}, "_compile/FrozenContentSource": {"calls": 1, "wall_s": 0.31767159600002515, "self_s": 7.622299995091453e-05}, "engine._compiled_snapshot": {"calls": 1, "wall_s": 2.844022510000002, "self_s": 0.0031757809999817255}}, "git_reads": {"count": 0, "unique": 0, "top": []}, "git_objects": {"count": 0, "unique": 0}, "git_commands": {}} +{"operation": "s1.query_read_1", "wall_s": 2.9156205319999913, "cpu_s": 2.913406662, "status": "ok", "peak_rss_kib": 280396, "spans": {"snapshot.maintain": {"calls": 1, "wall_s": 9.582400002727809e-05, "self_s": 9.582400002727809e-05}, "sqlite.snapshot": {"calls": 1, "wall_s": 2.6359000003139954e-05, "self_s": 2.6359000003139954e-05}, "sqlite.load_content": {"calls": 1, "wall_s": 0.011279596000008496, "self_s": 0.011253237000005356}, "snapshot.load_content": {"calls": 1, "wall_s": 2.5654463889999874, "self_s": 2.5540709689999517}, "compile.load_canonical_standards_corpus": {"calls": 1, "wall_s": 0.026865318000034222, "self_s": 0.026865318000034222}, "compile.compile_policy_impact": {"calls": 1, "wall_s": 0.02989873400002807, "self_s": 0.02989873400002807}, "compile.load_supporting_content": {"calls": 1, "wall_s": 7.906899998033623e-05, "self_s": 7.906899998033623e-05}, "compile.standards_navigation_registry": {"calls": 1, "wall_s": 0.0036863049999737996, "self_s": 0.0036863049999737996}, "compile.load_router_projection": {"calls": 1, "wall_s": 0.004119665000018813, "self_s": 0.004119665000018813}, "compile.build_materials": {"calls": 1, "wall_s": 0.005175617000020338, "self_s": 0.005175617000020338}, "compile.load_coverage_horizon": {"calls": 1, "wall_s": 0.20167754799996374, "self_s": 0.20167754799996374}, "compile.compile_coverage_definitions": {"calls": 1, "wall_s": 0.03677343900000096, "self_s": 0.03677343900000096}, "compile.load_repository_coverage_decisions": {"calls": 1, "wall_s": 0.02027054299998099, "self_s": 0.02027054299998099}, "compile.load_indexes": {"calls": 1, "wall_s": 0.011716963000026226, "self_s": 0.011716963000026226}, "_compile/FrozenContentSource": {"calls": 1, "wall_s": 0.3403553059999922, "self_s": 9.210499996470389e-05}, "engine._compiled_snapshot": {"calls": 1, "wall_s": 2.9083868199999756, "self_s": 0.002585124999995969}}, "git_reads": {"count": 0, "unique": 0, "top": []}, "git_objects": {"count": 0, "unique": 0}, "git_commands": {}} +{"operation": "s1.query_read_2", "wall_s": 2.8843864529999905, "cpu_s": 2.8820570949999933, "status": "ok", "peak_rss_kib": 280396, "spans": {"snapshot.maintain": {"calls": 1, "wall_s": 0.00010096099998690988, "self_s": 0.00010096099998690988}, "sqlite.snapshot": {"calls": 1, "wall_s": 2.7632000012545177e-05, "self_s": 2.7632000012545177e-05}, "sqlite.load_content": {"calls": 1, "wall_s": 0.011281849999988935, "self_s": 0.01125421799997639}, "snapshot.load_content": {"calls": 1, "wall_s": 2.535314475000007, "self_s": 2.523931664000031}, "compile.load_canonical_standards_corpus": {"calls": 1, "wall_s": 0.021335829999998168, "self_s": 0.021335829999998168}, "compile.compile_policy_impact": {"calls": 1, "wall_s": 0.030869109000036588, "self_s": 0.030869109000036588}, "compile.load_supporting_content": {"calls": 1, "wall_s": 0.00011197700001730482, "self_s": 0.00011197700001730482}, "compile.standards_navigation_registry": {"calls": 1, "wall_s": 0.0036377729999799158, "self_s": 0.0036377729999799158}, "compile.load_router_projection": {"calls": 1, "wall_s": 0.005022478000000774, "self_s": 0.005022478000000774}, "compile.build_materials": {"calls": 1, "wall_s": 0.005857710000043426, "self_s": 0.005857710000043426}, "compile.load_coverage_horizon": {"calls": 1, "wall_s": 0.19606510900001695, "self_s": 0.19606510900001695}, "compile.compile_coverage_definitions": {"calls": 1, "wall_s": 0.042872440999985884, "self_s": 0.042872440999985884}, "compile.load_repository_coverage_decisions": {"calls": 1, "wall_s": 0.021203730999957315, "self_s": 0.021203730999957315}, "compile.load_indexes": {"calls": 1, "wall_s": 0.011762599999997292, "self_s": 0.011762599999997292}, "_compile/FrozenContentSource": {"calls": 1, "wall_s": 0.33882644100003745, "self_s": 8.768300000383533e-05}, "engine._compiled_snapshot": {"calls": 1, "wall_s": 2.876835325000002, "self_s": 0.0026944089999574317}}, "git_reads": {"count": 0, "unique": 0, "top": []}, "git_objects": {"count": 0, "unique": 0}, "git_commands": {}} +{"operation": "s1.inspect_policy", "wall_s": 2.939388970999971, "cpu_s": 2.9371630540000098, "status": "ok", "peak_rss_kib": 280396, "spans": {"snapshot.maintain": {"calls": 1, "wall_s": 9.792700001298726e-05, "self_s": 9.792700001298726e-05}, "sqlite.snapshot": {"calls": 1, "wall_s": 2.5899000036133657e-05, "self_s": 2.5899000036133657e-05}, "sqlite.load_content": {"calls": 1, "wall_s": 0.011118669999973463, "self_s": 0.01109277099993733}, "snapshot.load_content": {"calls": 1, "wall_s": 2.6163770040000145, "self_s": 2.605160407000028}, "compile.load_canonical_standards_corpus": {"calls": 1, "wall_s": 0.020314708000000792, "self_s": 0.020314708000000792}, "compile.compile_policy_impact": {"calls": 1, "wall_s": 0.02509994000001825, "self_s": 0.02509994000001825}, "compile.load_supporting_content": {"calls": 1, "wall_s": 7.636399999455534e-05, "self_s": 7.636399999455534e-05}, "compile.standards_navigation_registry": {"calls": 1, "wall_s": 0.0034442529999978433, "self_s": 0.0034442529999978433}, "compile.load_router_projection": {"calls": 1, "wall_s": 0.004215578000014375, "self_s": 0.004215578000014375}, "compile.build_materials": {"calls": 1, "wall_s": 0.005085661999999047, "self_s": 0.005085661999999047}, "compile.load_coverage_horizon": {"calls": 1, "wall_s": 0.1860945299999912, "self_s": 0.1860945299999912}, "compile.compile_coverage_definitions": {"calls": 1, "wall_s": 0.03759048500000972, "self_s": 0.03759048500000972}, "compile.load_repository_coverage_decisions": {"calls": 1, "wall_s": 0.02187944399997832, "self_s": 0.02187944399997832}, "compile.load_indexes": {"calls": 1, "wall_s": 0.011657723000041642, "self_s": 0.011657723000041642}, "_compile/FrozenContentSource": {"calls": 1, "wall_s": 0.31554065900002115, "self_s": 8.197199997539428e-05}, "engine._compiled_snapshot": {"calls": 1, "wall_s": 2.9342352059999826, "self_s": 0.002317542999946909}}, "git_reads": {"count": 0, "unique": 0, "top": []}, "git_objects": {"count": 0, "unique": 0}, "git_commands": {}} +{"operation": "s1.route_explicit", "wall_s": 3.29525634700002, "cpu_s": 3.292476690000001, "status": "ok", "peak_rss_kib": 280396, "spans": {"snapshot.maintain": {"calls": 1, "wall_s": 0.00011319899999762129, "self_s": 0.00011319899999762129}, "sqlite.snapshot": {"calls": 1, "wall_s": 2.888399995981672e-05, "self_s": 2.888399995981672e-05}, "sqlite.load_content": {"calls": 1, "wall_s": 0.010834930000044096, "self_s": 0.01080604600008428}, "snapshot.load_content": {"calls": 1, "wall_s": 2.7303831060000334, "self_s": 2.7194349769999917}, "compile.load_canonical_standards_corpus": {"calls": 1, "wall_s": 0.026748209999993833, "self_s": 0.026748209999993833}, "compile.compile_policy_impact": {"calls": 1, "wall_s": 0.02901885400001447, "self_s": 0.02901885400001447}, "compile.load_supporting_content": {"calls": 1, "wall_s": 0.00013786599998866222, "self_s": 0.00013786599998866222}, "compile.standards_navigation_registry": {"calls": 1, "wall_s": 0.0036313630000108787, "self_s": 0.0036313630000108787}, "compile.load_router_projection": {"calls": 1, "wall_s": 0.004494786999998723, "self_s": 0.004494786999998723}, "compile.build_materials": {"calls": 1, "wall_s": 0.005456378000019413, "self_s": 0.005456378000019413}, "compile.load_coverage_horizon": {"calls": 1, "wall_s": 0.20001720700003034, "self_s": 0.20001720700003034}, "compile.compile_coverage_definitions": {"calls": 1, "wall_s": 0.040764368999987255, "self_s": 0.040764368999987255}, "compile.load_repository_coverage_decisions": {"calls": 1, "wall_s": 0.02322060300002704, "self_s": 0.02322060300002704}, "compile.load_indexes": {"calls": 1, "wall_s": 0.013199503000009827, "self_s": 0.013199503000009827}, "_compile/FrozenContentSource": {"calls": 1, "wall_s": 0.3467881180000063, "self_s": 9.897799992586442e-05}, "engine._compiled_snapshot": {"calls": 1, "wall_s": 3.0807804840000017, "self_s": 0.003609259999961978}}, "git_reads": {"count": 0, "unique": 0, "top": []}, "git_objects": {"count": 0, "unique": 0}, "git_commands": {}} +{"operation": "s1.prepare_same_snapshot", "wall_s": 6.320639734999986, "cpu_s": 6.315167305000003, "status": "ok", "peak_rss_kib": 280396, "spans": {"snapshot.maintain": {"calls": 3, "wall_s": 0.00033336900003178016, "self_s": 0.00033336900003178016}, "sqlite.snapshot": {"calls": 3, "wall_s": 8.374600008664856e-05, "self_s": 8.374600008664856e-05}, "sqlite.load_content": {"calls": 2, "wall_s": 0.02468533699999398, "self_s": 0.024624785999947107}, "snapshot.load_content": {"calls": 2, "wall_s": 5.549599511999986, "self_s": 5.524690239999984}, "compile.load_canonical_standards_corpus": {"calls": 2, "wall_s": 0.04924523799996905, "self_s": 0.04924523799996905}, "compile.compile_policy_impact": {"calls": 2, "wall_s": 0.06376697199999626, "self_s": 0.06376697199999626}, "compile.load_supporting_content": {"calls": 2, "wall_s": 0.0001871910000090793, "self_s": 0.0001871910000090793}, "compile.standards_navigation_registry": {"calls": 2, "wall_s": 0.007682124000041313, "self_s": 0.007682124000041313}, "compile.load_router_projection": {"calls": 2, "wall_s": 0.009094059000005927, "self_s": 0.009094059000005927}, "compile.build_materials": {"calls": 2, "wall_s": 0.010906987000055324, "self_s": 0.010906987000055324}, "compile.load_coverage_horizon": {"calls": 2, "wall_s": 0.42392031000002817, "self_s": 0.42392031000002817}, "compile.compile_coverage_definitions": {"calls": 2, "wall_s": 0.08193829800006824, "self_s": 0.08193829800006824}, "compile.load_repository_coverage_decisions": {"calls": 2, "wall_s": 0.044302980000054504, "self_s": 0.044302980000054504}, "compile.load_indexes": {"calls": 2, "wall_s": 0.027247718000012355, "self_s": 0.027247718000012355}, "_compile/FrozenContentSource": {"calls": 2, "wall_s": 0.7184762519999595, "self_s": 0.00018437499971923899}, "engine._compiled_snapshot": {"calls": 2, "wall_s": 6.273209809000036, "self_s": 0.005134045000090737}, "compile.evaluate_analysis": {"calls": 1, "wall_s": 0.02400725200004672, "self_s": 0.02400725200004672}, "engine._evaluate_compiled": {"calls": 1, "wall_s": 0.02427284899999904, "self_s": 0.0002655969999523222}, "snapshot.publish_aggregate": {"calls": 1, "wall_s": 0.0005290029999969192, "self_s": 0.0003963739999335303}}, "git_reads": {"count": 0, "unique": 0, "top": []}, "git_objects": {"count": 0, "unique": 0}, "git_commands": {}} +{"operation": "s1.resolve", "wall_s": 12.120287040999983, "cpu_s": 12.10947603999999, "status": "ok", "peak_rss_kib": 282196, "spans": {"snapshot.maintain": {"calls": 6, "wall_s": 0.0006322589999854245, "self_s": 0.0006322589999854245}, "sqlite.snapshot": {"calls": 6, "wall_s": 0.0003607509999596914, "self_s": 0.0003607509999596914}, "engine._load_analysis": {"calls": 1, "wall_s": 0.001267019000010805, "self_s": 0.001050665000036588}, "sqlite.load_content": {"calls": 4, "wall_s": 0.04603456899997127, "self_s": 0.04574241099999199}, "snapshot.load_content": {"calls": 4, "wall_s": 10.668467857999985, "self_s": 10.622073338000064}, "compile.load_canonical_standards_corpus": {"calls": 4, "wall_s": 0.0872227820000262, "self_s": 0.0872227820000262}, "compile.compile_policy_impact": {"calls": 4, "wall_s": 0.11361535999998296, "self_s": 0.11361535999998296}, "compile.load_supporting_content": {"calls": 4, "wall_s": 0.00042497599997659563, "self_s": 0.00042497599997659563}, "compile.standards_navigation_registry": {"calls": 4, "wall_s": 0.015367182000034063, "self_s": 0.015367182000034063}, "compile.load_router_projection": {"calls": 4, "wall_s": 0.019031625000025088, "self_s": 0.019031625000025088}, "compile.build_materials": {"calls": 4, "wall_s": 0.022163027000033253, "self_s": 0.022163027000033253}, "compile.load_coverage_horizon": {"calls": 4, "wall_s": 0.8082226480000259, "self_s": 0.8082226480000259}, "compile.compile_coverage_definitions": {"calls": 4, "wall_s": 0.15168168399998194, "self_s": 0.15168168399998194}, "compile.load_repository_coverage_decisions": {"calls": 4, "wall_s": 0.083297974000061, "self_s": 0.083297974000061}, "compile.load_indexes": {"calls": 4, "wall_s": 0.05139207599995643, "self_s": 0.05139207599995643}, "_compile/FrozenContentSource": {"calls": 4, "wall_s": 1.3528175810000107, "self_s": 0.0003982469999073146}, "engine._compiled_snapshot": {"calls": 4, "wall_s": 12.03113805800001, "self_s": 0.009852619000014329}, "compile.evaluate_analysis": {"calls": 2, "wall_s": 0.04719556499998134, "self_s": 0.04719556499998134}, "engine._evaluate_compiled": {"calls": 2, "wall_s": 0.047747934000028636, "self_s": 0.0005523690000472925}, "engine._evaluate": {"calls": 2, "wall_s": 12.084827797999992, "self_s": 0.005941805999952976}, "snapshot.publish_aggregate": {"calls": 1, "wall_s": 0.0004897839999671305, "self_s": 0.00036523699992585534}}, "git_reads": {"count": 0, "unique": 0, "top": []}, "git_objects": {"count": 0, "unique": 0}, "git_commands": {}} +{"operation": "s1.inspect_analysis", "wall_s": 0.0060321509999994305, "cpu_s": 0.006033318000007171, "status": "ok", "peak_rss_kib": 282196, "spans": {"snapshot.maintain": {"calls": 1, "wall_s": 0.00011543300001903845, "self_s": 0.00011543300001903845}, "sqlite.snapshot": {"calls": 1, "wall_s": 1.816700000745186e-05, "self_s": 1.816700000745186e-05}, "engine._load_analysis": {"calls": 1, "wall_s": 0.002711412999985896, "self_s": 0.0025778129999594057}}, "git_reads": {"count": 0, "unique": 0, "top": []}, "git_objects": {"count": 0, "unique": 0}, "git_commands": {}} +{"operation": "s1.inspect_snapshot", "wall_s": 0.0005613210000205981, "cpu_s": 0.0005618950000041423, "status": "ok", "peak_rss_kib": 282196, "spans": {"snapshot.maintain": {"calls": 1, "wall_s": 5.1546999998208776e-05, "self_s": 5.1546999998208776e-05}, "sqlite.snapshot": {"calls": 1, "wall_s": 2.1351999976104707e-05, "self_s": 2.1351999976104707e-05}}, "git_reads": {"count": 0, "unique": 0, "top": []}, "git_objects": {"count": 0, "unique": 0}, "git_commands": {}} +{"operation": "s1.engine_close", "wall_s": 0.0004450470000278983, "cpu_s": 0.00044263800000976516, "status": "ok", "peak_rss_kib": 282404, "spans": {}, "git_reads": {"count": 0, "unique": 0, "top": []}, "git_objects": {"count": 0, "unique": 0}, "git_commands": {}} +{"operation": "s1.reopen_0", "wall_s": 0.0040474560000234305, "cpu_s": 0.004048077999996735, "status": "ok", "peak_rss_kib": 282404, "spans": {"sqlite._verify_integrity": {"calls": 2, "wall_s": 0.0032833120000077542, "self_s": 0.0032833120000077542}, "sqlite.__init__": {"calls": 1, "wall_s": 0.0038462840000192955, "self_s": 0.0005629720000115412}, "snapshot.maintain": {"calls": 1, "wall_s": 9.881799996946938e-05, "self_s": 9.881799996946938e-05}}, "git_reads": {"count": 0, "unique": 0, "top": []}, "git_objects": {"count": 0, "unique": 0}, "git_commands": {}} +{"operation": "s1.reopen_facade_0", "wall_s": 0.27311807900002805, "cpu_s": 0.27287609100000054, "status": "ok", "peak_rss_kib": 282404, "spans": {"facade.contracts": {"calls": 1, "wall_s": 0.27047410599999466, "self_s": 0.27047410599999466}}, "git_reads": {"count": 0, "unique": 0, "top": []}, "git_objects": {"count": 0, "unique": 0}, "git_commands": {}} +{"operation": "s1.reopened_query_0", "wall_s": 3.0625665750000053, "cpu_s": 3.059746089000001, "status": "ok", "peak_rss_kib": 282404, "spans": {"snapshot.maintain": {"calls": 1, "wall_s": 9.533299999020528e-05, "self_s": 9.533299999020528e-05}, "sqlite.snapshot": {"calls": 1, "wall_s": 6.668899999340283e-05, "self_s": 6.668899999340283e-05}, "sqlite.load_content": {"calls": 1, "wall_s": 0.011582759000020815, "self_s": 0.011516070000027412}, "snapshot.load_content": {"calls": 1, "wall_s": 2.716500798000027, "self_s": 2.704822706000016}, "compile.load_canonical_standards_corpus": {"calls": 1, "wall_s": 0.02241225300002725, "self_s": 0.02241225300002725}, "compile.compile_policy_impact": {"calls": 1, "wall_s": 0.027369853000038802, "self_s": 0.027369853000038802}, "compile.load_supporting_content": {"calls": 1, "wall_s": 9.564300000874937e-05, "self_s": 9.564300000874937e-05}, "compile.standards_navigation_registry": {"calls": 1, "wall_s": 0.0033802660000219475, "self_s": 0.0033802660000219475}, "compile.load_router_projection": {"calls": 1, "wall_s": 0.004083590999982789, "self_s": 0.004083590999982789}, "compile.build_materials": {"calls": 1, "wall_s": 0.005717329000049176, "self_s": 0.005717329000049176}, "compile.load_coverage_horizon": {"calls": 1, "wall_s": 0.2028631389999873, "self_s": 0.2028631389999873}, "compile.compile_coverage_definitions": {"calls": 1, "wall_s": 0.03704091800000242, "self_s": 0.03704091800000242}, "compile.load_repository_coverage_decisions": {"calls": 1, "wall_s": 0.02084459299999253, "self_s": 0.02084459299999253}, "compile.load_indexes": {"calls": 1, "wall_s": 0.0122445630000243, "self_s": 0.0122445630000243}, "_compile/FrozenContentSource": {"calls": 1, "wall_s": 0.33613585400001966, "self_s": 8.370599988438698e-05}, "engine._compiled_snapshot": {"calls": 1, "wall_s": 3.0551174199999878, "self_s": 0.0024807679999412358}}, "git_reads": {"count": 0, "unique": 0, "top": []}, "git_objects": {"count": 0, "unique": 0}, "git_commands": {}} +{"operation": "s1.reopen_1", "wall_s": 0.004871230999981435, "cpu_s": 0.004871661999999333, "status": "ok", "peak_rss_kib": 282404, "spans": {"sqlite._verify_integrity": {"calls": 2, "wall_s": 0.004115367999986574, "self_s": 0.004115367999986574}, "sqlite.__init__": {"calls": 1, "wall_s": 0.004721087000007174, "self_s": 0.0006057190000205992}, "snapshot.maintain": {"calls": 1, "wall_s": 4.603899998301131e-05, "self_s": 4.603899998301131e-05}}, "git_reads": {"count": 0, "unique": 0, "top": []}, "git_objects": {"count": 0, "unique": 0}, "git_commands": {}} +{"operation": "s1.reopen_facade_1", "wall_s": 0.27991140300002826, "cpu_s": 0.27973826100000565, "status": "ok", "peak_rss_kib": 282404, "spans": {"facade.contracts": {"calls": 1, "wall_s": 0.2770495930000152, "self_s": 0.2770495930000152}}, "git_reads": {"count": 0, "unique": 0, "top": []}, "git_objects": {"count": 0, "unique": 0}, "git_commands": {}} +{"operation": "s1.reopened_query_1", "wall_s": 3.010045933000015, "cpu_s": 3.0062666049999933, "status": "ok", "peak_rss_kib": 282404, "spans": {"snapshot.maintain": {"calls": 1, "wall_s": 9.727500003009482e-05, "self_s": 9.727500003009482e-05}, "sqlite.snapshot": {"calls": 1, "wall_s": 7.065600004807493e-05, "self_s": 7.065600004807493e-05}, "sqlite.load_content": {"calls": 1, "wall_s": 0.011501199000008455, "self_s": 0.01143054299996038}, "snapshot.load_content": {"calls": 1, "wall_s": 2.6651148359999866, "self_s": 2.653516361999948}, "compile.load_canonical_standards_corpus": {"calls": 1, "wall_s": 0.021200775000011163, "self_s": 0.021200775000011163}, "compile.compile_policy_impact": {"calls": 1, "wall_s": 0.025645144999998593, "self_s": 0.025645144999998593}, "compile.load_supporting_content": {"calls": 1, "wall_s": 6.863199996587355e-05, "self_s": 6.863199996587355e-05}, "compile.standards_navigation_registry": {"calls": 1, "wall_s": 0.00470607300002257, "self_s": 0.00470607300002257}, "compile.load_router_projection": {"calls": 1, "wall_s": 0.004336829999999736, "self_s": 0.004336829999999736}, "compile.build_materials": {"calls": 1, "wall_s": 0.005554304999975557, "self_s": 0.005554304999975557}, "compile.load_coverage_horizon": {"calls": 1, "wall_s": 0.1950356009999723, "self_s": 0.1950356009999723}, "compile.compile_coverage_definitions": {"calls": 1, "wall_s": 0.039430427000013424, "self_s": 0.039430427000013424}, "compile.load_repository_coverage_decisions": {"calls": 1, "wall_s": 0.02582713800001102, "self_s": 0.02582713800001102}, "compile.load_indexes": {"calls": 1, "wall_s": 0.012613004000002093, "self_s": 0.012613004000002093}, "_compile/FrozenContentSource": {"calls": 1, "wall_s": 0.3344961970000213, "self_s": 7.826700004898157e-05}, "engine._compiled_snapshot": {"calls": 1, "wall_s": 3.0024955669999827, "self_s": 0.002884533999974792}}, "git_reads": {"count": 0, "unique": 0, "top": []}, "git_objects": {"count": 0, "unique": 0}, "git_commands": {}} +{"operation": "s2.engine_open_new", "wall_s": 0.0027411379999762175, "cpu_s": 0.0027405539999989514, "status": "ok", "peak_rss_kib": 282404, "spans": {"sqlite._verify_integrity": {"calls": 1, "wall_s": 9.24589999726777e-05, "self_s": 9.24589999726777e-05}, "sqlite.__init__": {"calls": 1, "wall_s": 0.0024580840000112403, "self_s": 0.0023656250000385626}, "snapshot.maintain": {"calls": 1, "wall_s": 3.568300002143587e-05, "self_s": 3.568300002143587e-05}}, "git_reads": {"count": 0, "unique": 0, "top": []}, "git_objects": {"count": 0, "unique": 0}, "git_commands": {}} +{"operation": "s2.facade_construct", "wall_s": 0.2879713190000075, "cpu_s": 0.28764120900000023, "status": "ok", "peak_rss_kib": 282404, "spans": {"facade.contracts": {"calls": 1, "wall_s": 0.2852270760000124, "self_s": 0.2852270760000124}}, "git_reads": {"count": 0, "unique": 0, "top": []}, "git_objects": {"count": 0, "unique": 0}, "git_commands": {}} +{"operation": "s2.create_snapshot", "wall_s": 16.264606757999957, "cpu_s": 7.510993486000004, "status": "ok", "peak_rss_kib": 282404, "spans": {"git.command": {"calls": 6135, "wall_s": 12.28416798700107, "self_s": 12.28416798700107}, "git.object": {"calls": 6134, "wall_s": 12.426557050999918, "self_s": 0.14616057699885232}, "git.read_file": {"calls": 1137, "wall_s": 12.807863979999354, "self_s": 0.38130692899943597}, "git.read_bytes": {"calls": 1137, "wall_s": 12.828739769000606, "self_s": 0.020875789001252087}, "compile.load_canonical_standards_corpus": {"calls": 2, "wall_s": 0.9965998760000048, "self_s": 0.054152931999965404}, "compile.compile_policy_impact": {"calls": 2, "wall_s": 0.31187576100001024, "self_s": 0.0763865740001961}, "compile.load_supporting_content": {"calls": 2, "wall_s": 0.03184729099996275, "self_s": 0.0006825729999491159}, "compile.standards_navigation_registry": {"calls": 2, "wall_s": 0.007871568999973988, "self_s": 0.007871568999973988}, "compile.load_router_projection": {"calls": 2, "wall_s": 0.025553989000002275, "self_s": 0.00911275700002534}, "compile.build_materials": {"calls": 2, "wall_s": 0.7699991849999606, "self_s": 0.016273168999930476}, "compile.load_coverage_horizon": {"calls": 2, "wall_s": 8.823270817000036, "self_s": 0.43186114900004213}, "compile.compile_coverage_definitions": {"calls": 2, "wall_s": 0.07603976900003317, "self_s": 0.07603976900003317}, "compile.load_repository_coverage_decisions": {"calls": 2, "wall_s": 0.17868081399996072, "self_s": 0.04115229999990788}, "compile.load_indexes": {"calls": 2, "wall_s": 2.362558464000074, "self_s": 0.042024973999389204}, "_compile/_GitRevisionSource": {"calls": 1, "wall_s": 13.265049965000003, "self_s": 7.524199992303693e-05}, "_compile/FrozenContentSource": {"calls": 1, "wall_s": 0.31940803100002313, "self_s": 8.521900008418015e-05}, "sqlite.snapshot": {"calls": 1, "wall_s": 6.834199996319512e-05, "self_s": 6.834199996319512e-05}}, "git_reads": {"count": 1137, "unique": 434, "top": [["topics/contracts.md", 17], ["STANDARDS-ROUTER.md", 15], ["topics/security.md", 14], ["workflows/verification.md", 14], ["topics/dependencies.md", 10], ["profiles/applications/frontend.md", 9], ["topics/architecture.md", 9], ["topics/concurrency.md", 9], ["topics/cross-platform.md", 9], ["workflows/commit.md", 9]]}, "git_objects": {"count": 6134, "unique": 524}, "git_commands": {"rev-parse --verify": 1, "cat-file --batch": 6134}} +{"operation": "s2.query_read_0", "wall_s": 3.0195219510000015, "cpu_s": 3.0190821100000136, "status": "ok", "peak_rss_kib": 282404, "spans": {"snapshot.maintain": {"calls": 1, "wall_s": 5.808700001352918e-05, "self_s": 5.808700001352918e-05}, "sqlite.snapshot": {"calls": 1, "wall_s": 2.2714000010637392e-05, "self_s": 2.2714000010637392e-05}, "sqlite.load_content": {"calls": 1, "wall_s": 0.013238021000006484, "self_s": 0.013215306999995846}, "snapshot.load_content": {"calls": 1, "wall_s": 2.548434259999965, "self_s": 2.535138151999945}, "compile.load_canonical_standards_corpus": {"calls": 1, "wall_s": 0.0229578689999812, "self_s": 0.0229578689999812}, "compile.compile_policy_impact": {"calls": 1, "wall_s": 0.02789483700001938, "self_s": 0.02789483700001938}, "compile.load_supporting_content": {"calls": 1, "wall_s": 8.782200001178353e-05, "self_s": 8.782200001178353e-05}, "compile.standards_navigation_registry": {"calls": 1, "wall_s": 0.1340495999999689, "self_s": 0.1340495999999689}, "compile.load_router_projection": {"calls": 1, "wall_s": 0.00433790200003159, "self_s": 0.00433790200003159}, "compile.build_materials": {"calls": 1, "wall_s": 0.006703557000037108, "self_s": 0.006703557000037108}, "compile.load_coverage_horizon": {"calls": 1, "wall_s": 0.19453215900000487, "self_s": 0.19453215900000487}, "compile.compile_coverage_definitions": {"calls": 1, "wall_s": 0.037811050000016166, "self_s": 0.037811050000016166}, "compile.load_repository_coverage_decisions": {"calls": 1, "wall_s": 0.02011804200003553, "self_s": 0.02011804200003553}, "compile.load_indexes": {"calls": 1, "wall_s": 0.012059353999973155, "self_s": 0.012059353999973155}, "_compile/FrozenContentSource": {"calls": 1, "wall_s": 0.4606460210000023, "self_s": 9.382899992260718e-05}, "engine._compiled_snapshot": {"calls": 1, "wall_s": 3.011447860999965, "self_s": 0.0023675799999978153}}, "git_reads": {"count": 0, "unique": 0, "top": []}, "git_objects": {"count": 0, "unique": 0}, "git_commands": {}} +{"operation": "s2.query_read_1", "wall_s": 3.0369377220000047, "cpu_s": 3.036413937000006, "status": "ok", "peak_rss_kib": 282404, "spans": {"snapshot.maintain": {"calls": 1, "wall_s": 0.00010257399998181427, "self_s": 0.00010257399998181427}, "sqlite.snapshot": {"calls": 1, "wall_s": 3.021600002739433e-05, "self_s": 3.021600002739433e-05}, "sqlite.load_content": {"calls": 1, "wall_s": 0.012133785000003172, "self_s": 0.012103568999975778}, "snapshot.load_content": {"calls": 1, "wall_s": 2.6505126140000357, "self_s": 2.6382762550000507}, "compile.load_canonical_standards_corpus": {"calls": 1, "wall_s": 0.028515915000014047, "self_s": 0.028515915000014047}, "compile.compile_policy_impact": {"calls": 1, "wall_s": 0.025011693999999807, "self_s": 0.025011693999999807}, "compile.load_supporting_content": {"calls": 1, "wall_s": 7.217800003900265e-05, "self_s": 7.217800003900265e-05}, "compile.standards_navigation_registry": {"calls": 1, "wall_s": 0.003585852999947292, "self_s": 0.003585852999947292}, "compile.load_router_projection": {"calls": 1, "wall_s": 0.004188876000000619, "self_s": 0.004188876000000619}, "compile.build_materials": {"calls": 1, "wall_s": 0.005372108999949887, "self_s": 0.005372108999949887}, "compile.load_coverage_horizon": {"calls": 1, "wall_s": 0.21848379499999737, "self_s": 0.21848379499999737}, "compile.compile_coverage_definitions": {"calls": 1, "wall_s": 0.05342020900002353, "self_s": 0.05342020900002353}, "compile.load_repository_coverage_decisions": {"calls": 1, "wall_s": 0.022646360999999615, "self_s": 0.022646360999999615}, "compile.load_indexes": {"calls": 1, "wall_s": 0.013871563000009246, "self_s": 0.013871563000009246}, "_compile/FrozenContentSource": {"calls": 1, "wall_s": 0.37528129099996477, "self_s": 0.00011273799998434697}, "engine._compiled_snapshot": {"calls": 1, "wall_s": 3.0284615319999943, "self_s": 0.0026676269999938995}}, "git_reads": {"count": 0, "unique": 0, "top": []}, "git_objects": {"count": 0, "unique": 0}, "git_commands": {}} +{"operation": "s2.query_read_2", "wall_s": 2.9356448479999813, "cpu_s": 2.9353135270000053, "status": "ok", "peak_rss_kib": 282404, "spans": {"snapshot.maintain": {"calls": 1, "wall_s": 0.00010221299999102484, "self_s": 0.00010221299999102484}, "sqlite.snapshot": {"calls": 1, "wall_s": 2.6690000026974303e-05, "self_s": 2.6690000026974303e-05}, "sqlite.load_content": {"calls": 1, "wall_s": 0.013099827000019104, "self_s": 0.01307313699999213}, "snapshot.load_content": {"calls": 1, "wall_s": 2.6093082649999815, "self_s": 2.5961062249999713}, "compile.load_canonical_standards_corpus": {"calls": 1, "wall_s": 0.02066204700003027, "self_s": 0.02066204700003027}, "compile.compile_policy_impact": {"calls": 1, "wall_s": 0.025619065000000774, "self_s": 0.025619065000000774}, "compile.load_supporting_content": {"calls": 1, "wall_s": 9.950899999466856e-05, "self_s": 9.950899999466856e-05}, "compile.standards_navigation_registry": {"calls": 1, "wall_s": 0.0035996429999727297, "self_s": 0.0035996429999727297}, "compile.load_router_projection": {"calls": 1, "wall_s": 0.004152150999971127, "self_s": 0.004152150999971127}, "compile.build_materials": {"calls": 1, "wall_s": 0.005225629999983994, "self_s": 0.005225629999983994}, "compile.load_coverage_horizon": {"calls": 1, "wall_s": 0.18839281499998606, "self_s": 0.18839281499998606}, "compile.compile_coverage_definitions": {"calls": 1, "wall_s": 0.0368386750000127, "self_s": 0.0368386750000127}, "compile.load_repository_coverage_decisions": {"calls": 1, "wall_s": 0.020227605999991738, "self_s": 0.020227605999991738}, "compile.load_indexes": {"calls": 1, "wall_s": 0.011632329000008212, "self_s": 0.011632329000008212}, "_compile/FrozenContentSource": {"calls": 1, "wall_s": 0.31653400600004034, "self_s": 8.453600008806461e-05}, "engine._compiled_snapshot": {"calls": 1, "wall_s": 2.9282203340000024, "self_s": 0.002378062999980557}}, "git_reads": {"count": 0, "unique": 0, "top": []}, "git_objects": {"count": 0, "unique": 0}, "git_commands": {}} +{"operation": "s2.inspect_policy", "wall_s": 2.902790402999983, "cpu_s": 2.902447487999993, "status": "ok", "peak_rss_kib": 282404, "spans": {"snapshot.maintain": {"calls": 1, "wall_s": 9.917799997083421e-05, "self_s": 9.917799997083421e-05}, "sqlite.snapshot": {"calls": 1, "wall_s": 2.733100001250932e-05, "self_s": 2.733100001250932e-05}, "sqlite.load_content": {"calls": 1, "wall_s": 0.011811566999995193, "self_s": 0.011784235999982684}, "snapshot.load_content": {"calls": 1, "wall_s": 2.576325560999976, "self_s": 2.56441481600001}, "compile.load_canonical_standards_corpus": {"calls": 1, "wall_s": 0.020474327000044923, "self_s": 0.020474327000044923}, "compile.compile_policy_impact": {"calls": 1, "wall_s": 0.026530163000018092, "self_s": 0.026530163000018092}, "compile.load_supporting_content": {"calls": 1, "wall_s": 7.708499998670959e-05, "self_s": 7.708499998670959e-05}, "compile.standards_navigation_registry": {"calls": 1, "wall_s": 0.0037290089999828524, "self_s": 0.0037290089999828524}, "compile.load_router_projection": {"calls": 1, "wall_s": 0.004186795000009624, "self_s": 0.004186795000009624}, "compile.build_materials": {"calls": 1, "wall_s": 0.005054075000032299, "self_s": 0.005054075000032299}, "compile.load_coverage_horizon": {"calls": 1, "wall_s": 0.1864036100000135, "self_s": 0.1864036100000135}, "compile.compile_coverage_definitions": {"calls": 1, "wall_s": 0.0403328110000416, "self_s": 0.0403328110000416}, "compile.load_repository_coverage_decisions": {"calls": 1, "wall_s": 0.02060237800003506, "self_s": 0.02060237800003506}, "compile.load_indexes": {"calls": 1, "wall_s": 0.011654248000013467, "self_s": 0.011654248000013467}, "_compile/FrozenContentSource": {"calls": 1, "wall_s": 0.3191226179999944, "self_s": 7.811699981630227e-05}, "engine._compiled_snapshot": {"calls": 1, "wall_s": 2.897762548000003, "self_s": 0.002314369000032457}}, "git_reads": {"count": 0, "unique": 0, "top": []}, "git_objects": {"count": 0, "unique": 0}, "git_commands": {}} +{"operation": "s2.route_explicit", "wall_s": 3.057167095000011, "cpu_s": 3.0567280650000015, "status": "ok", "peak_rss_kib": 282404, "spans": {"snapshot.maintain": {"calls": 1, "wall_s": 9.629400000221722e-05, "self_s": 9.629400000221722e-05}, "sqlite.snapshot": {"calls": 1, "wall_s": 2.7601999988746684e-05, "self_s": 2.7601999988746684e-05}, "sqlite.load_content": {"calls": 1, "wall_s": 0.011395919999984017, "self_s": 0.01136831799999527}, "snapshot.load_content": {"calls": 1, "wall_s": 2.4622210229999837, "self_s": 2.4507288089999975}, "compile.load_canonical_standards_corpus": {"calls": 1, "wall_s": 0.021295272999964254, "self_s": 0.021295272999964254}, "compile.compile_policy_impact": {"calls": 1, "wall_s": 0.026062636999995448, "self_s": 0.026062636999995448}, "compile.load_supporting_content": {"calls": 1, "wall_s": 7.8216999952474e-05, "self_s": 7.8216999952474e-05}, "compile.standards_navigation_registry": {"calls": 1, "wall_s": 0.00363083099995265, "self_s": 0.00363083099995265}, "compile.load_router_projection": {"calls": 1, "wall_s": 0.0054424009999820555, "self_s": 0.0054424009999820555}, "compile.build_materials": {"calls": 1, "wall_s": 0.007739038000011078, "self_s": 0.007739038000011078}, "compile.load_coverage_horizon": {"calls": 1, "wall_s": 0.22786487899998065, "self_s": 0.22786487899998065}, "compile.compile_coverage_definitions": {"calls": 1, "wall_s": 0.04118212499997753, "self_s": 0.04118212499997753}, "compile.load_repository_coverage_decisions": {"calls": 1, "wall_s": 0.022684013999992203, "self_s": 0.022684013999992203}, "compile.load_indexes": {"calls": 1, "wall_s": 0.013720661999968797, "self_s": 0.013720661999968797}, "_compile/FrozenContentSource": {"calls": 1, "wall_s": 0.36979133400001274, "self_s": 9.125700023560057e-05}, "engine._compiled_snapshot": {"calls": 1, "wall_s": 2.8343737349999856, "self_s": 0.002361377999989145}}, "git_reads": {"count": 0, "unique": 0, "top": []}, "git_objects": {"count": 0, "unique": 0}, "git_commands": {}} +{"operation": "s2.prepare_same_snapshot", "wall_s": 5.847683467000024, "cpu_s": 5.846807922000011, "status": "ok", "peak_rss_kib": 282404, "spans": {"snapshot.maintain": {"calls": 3, "wall_s": 0.000447689999987233, "self_s": 0.000447689999987233}, "sqlite.snapshot": {"calls": 3, "wall_s": 8.203400000184047e-05, "self_s": 8.203400000184047e-05}, "sqlite.load_content": {"calls": 2, "wall_s": 0.026427374000036252, "self_s": 0.026370488000054593}, "snapshot.load_content": {"calls": 2, "wall_s": 5.172046958000067, "self_s": 5.145411302000014}, "compile.load_canonical_standards_corpus": {"calls": 2, "wall_s": 0.04054930699999204, "self_s": 0.04054930699999204}, "compile.compile_policy_impact": {"calls": 2, "wall_s": 0.052863741999942704, "self_s": 0.052863741999942704}, "compile.load_supporting_content": {"calls": 2, "wall_s": 0.0001673920000371254, "self_s": 0.0001673920000371254}, "compile.standards_navigation_registry": {"calls": 2, "wall_s": 0.007329964999939875, "self_s": 0.007329964999939875}, "compile.load_router_projection": {"calls": 2, "wall_s": 0.00856765999998288, "self_s": 0.00856765999998288}, "compile.build_materials": {"calls": 2, "wall_s": 0.010706724999977268, "self_s": 0.010706724999977268}, "compile.load_coverage_horizon": {"calls": 2, "wall_s": 0.37174537899994675, "self_s": 0.37174537899994675}, "compile.compile_coverage_definitions": {"calls": 2, "wall_s": 0.07137828700001592, "self_s": 0.07137828700001592}, "compile.load_repository_coverage_decisions": {"calls": 2, "wall_s": 0.0400737939999658, "self_s": 0.0400737939999658}, "compile.load_indexes": {"calls": 2, "wall_s": 0.022841830999993817, "self_s": 0.022841830999993817}, "_compile/FrozenContentSource": {"calls": 2, "wall_s": 0.6263996339999949, "self_s": 0.00017555200020069606}, "engine._compiled_snapshot": {"calls": 2, "wall_s": 5.803164852999998, "self_s": 0.004718260999936774}, "compile.evaluate_analysis": {"calls": 1, "wall_s": 0.0213828239999998, "self_s": 0.0213828239999998}, "engine._evaluate_compiled": {"calls": 1, "wall_s": 0.021655592999991313, "self_s": 0.00027276899999151283}, "snapshot.publish_aggregate": {"calls": 1, "wall_s": 0.0008070999999745254, "self_s": 0.0005425439999839909}}, "git_reads": {"count": 0, "unique": 0, "top": []}, "git_objects": {"count": 0, "unique": 0}, "git_commands": {}} +{"operation": "s2.resolve", "wall_s": 11.562000888, "cpu_s": 11.55892393900001, "status": "ok", "peak_rss_kib": 283536, "spans": {"snapshot.maintain": {"calls": 6, "wall_s": 0.0005877400000144917, "self_s": 0.0005877400000144917}, "sqlite.snapshot": {"calls": 6, "wall_s": 0.00016093200002842423, "self_s": 0.00016093200002842423}, "engine._load_analysis": {"calls": 1, "wall_s": 0.0011090419999959522, "self_s": 0.0009831030000100327}, "sqlite.load_content": {"calls": 4, "wall_s": 0.04592478599994365, "self_s": 0.04580514599990693}, "snapshot.load_content": {"calls": 4, "wall_s": 10.208939756999996, "self_s": 10.16264475700001}, "compile.load_canonical_standards_corpus": {"calls": 4, "wall_s": 0.08650113400000237, "self_s": 0.08650113400000237}, "compile.compile_policy_impact": {"calls": 4, "wall_s": 0.10647868500001323, "self_s": 0.10647868500001323}, "compile.load_supporting_content": {"calls": 4, "wall_s": 0.0003147919999264559, "self_s": 0.0003147919999264559}, "compile.standards_navigation_registry": {"calls": 4, "wall_s": 0.014206782999963252, "self_s": 0.014206782999963252}, "compile.load_router_projection": {"calls": 4, "wall_s": 0.01709174599994867, "self_s": 0.01709174599994867}, "compile.build_materials": {"calls": 4, "wall_s": 0.021640123000054245, "self_s": 0.021640123000054245}, "compile.load_coverage_horizon": {"calls": 4, "wall_s": 0.7466100340000139, "self_s": 0.7466100340000139}, "compile.compile_coverage_definitions": {"calls": 4, "wall_s": 0.1444897759999435, "self_s": 0.1444897759999435}, "compile.load_repository_coverage_decisions": {"calls": 4, "wall_s": 0.07957109199998058, "self_s": 0.07957109199998058}, "compile.load_indexes": {"calls": 4, "wall_s": 0.04663458499993567, "self_s": 0.04663458499993567}, "_compile/FrozenContentSource": {"calls": 4, "wall_s": 1.2638923570000316, "self_s": 0.0003536070002496672}, "engine._compiled_snapshot": {"calls": 4, "wall_s": 11.482957338000006, "self_s": 0.010125223999978061}, "compile.evaluate_analysis": {"calls": 2, "wall_s": 0.04347916600005419, "self_s": 0.04347916600005419}, "engine._evaluate_compiled": {"calls": 2, "wall_s": 0.044027588000005835, "self_s": 0.0005484219999516426}, "engine._evaluate": {"calls": 2, "wall_s": 11.532766261000006, "self_s": 0.0057813349999946695}, "snapshot.publish_aggregate": {"calls": 1, "wall_s": 0.0005486020000375902, "self_s": 0.00041572300006009755}}, "git_reads": {"count": 0, "unique": 0, "top": []}, "git_objects": {"count": 0, "unique": 0}, "git_commands": {}} +{"operation": "s2.inspect_analysis", "wall_s": 0.005975886999976865, "cpu_s": 0.005976785000001428, "status": "ok", "peak_rss_kib": 283536, "spans": {"snapshot.maintain": {"calls": 1, "wall_s": 8.460699996248877e-05, "self_s": 8.460699996248877e-05}, "sqlite.snapshot": {"calls": 1, "wall_s": 1.7356000000745553e-05, "self_s": 1.7356000000745553e-05}, "engine._load_analysis": {"calls": 1, "wall_s": 0.002775159000009353, "self_s": 0.0026731960000461186}}, "git_reads": {"count": 0, "unique": 0, "top": []}, "git_objects": {"count": 0, "unique": 0}, "git_commands": {}} +{"operation": "s2.inspect_snapshot", "wall_s": 0.000584817000003568, "cpu_s": 0.0005850400000042555, "status": "ok", "peak_rss_kib": 283536, "spans": {"snapshot.maintain": {"calls": 1, "wall_s": 5.3941000032864395e-05, "self_s": 5.3941000032864395e-05}, "sqlite.snapshot": {"calls": 1, "wall_s": 2.2103999981482048e-05, "self_s": 2.2103999981482048e-05}}, "git_reads": {"count": 0, "unique": 0, "top": []}, "git_objects": {"count": 0, "unique": 0}, "git_commands": {}} +{"operation": "s2.engine_close", "wall_s": 0.0003741510000168091, "cpu_s": 0.00037184300001058546, "status": "ok", "peak_rss_kib": 283536, "spans": {}, "git_reads": {"count": 0, "unique": 0, "top": []}, "git_objects": {"count": 0, "unique": 0}, "git_commands": {}} +{"operation": "s2.reopen_0", "wall_s": 0.005199347999962356, "cpu_s": 0.005202047000011589, "status": "ok", "peak_rss_kib": 283536, "spans": {"sqlite._verify_integrity": {"calls": 2, "wall_s": 0.004299287999970147, "self_s": 0.004299287999970147}, "sqlite.__init__": {"calls": 1, "wall_s": 0.004900980000002164, "self_s": 0.000601692000032017}, "snapshot.maintain": {"calls": 1, "wall_s": 8.122200000570956e-05, "self_s": 8.122200000570956e-05}}, "git_reads": {"count": 0, "unique": 0, "top": []}, "git_objects": {"count": 0, "unique": 0}, "git_commands": {}} +{"operation": "s2.reopen_facade_0", "wall_s": 0.3026405969999928, "cpu_s": 0.30255203500001926, "status": "ok", "peak_rss_kib": 283536, "spans": {"facade.contracts": {"calls": 1, "wall_s": 0.299446549000038, "self_s": 0.299446549000038}}, "git_reads": {"count": 0, "unique": 0, "top": []}, "git_objects": {"count": 0, "unique": 0}, "git_commands": {}} +{"operation": "s2.reopened_query_0", "wall_s": 3.078581342999996, "cpu_s": 3.0781807550000053, "status": "ok", "peak_rss_kib": 283536, "spans": {"snapshot.maintain": {"calls": 1, "wall_s": 9.573299996645801e-05, "self_s": 9.573299996645801e-05}, "sqlite.snapshot": {"calls": 1, "wall_s": 0.0001341610000054061, "self_s": 0.0001341610000054061}, "sqlite.load_content": {"calls": 1, "wall_s": 0.013101928000025964, "self_s": 0.012967767000020558}, "snapshot.load_content": {"calls": 1, "wall_s": 2.5908040630000073, "self_s": 2.577606402000015}, "compile.load_canonical_standards_corpus": {"calls": 1, "wall_s": 0.020482010000023365, "self_s": 0.020482010000023365}, "compile.compile_policy_impact": {"calls": 1, "wall_s": 0.025814723999985745, "self_s": 0.025814723999985745}, "compile.load_supporting_content": {"calls": 1, "wall_s": 7.664399998930094e-05, "self_s": 7.664399998930094e-05}, "compile.standards_navigation_registry": {"calls": 1, "wall_s": 0.003712243999984821, "self_s": 0.003712243999984821}, "compile.load_router_projection": {"calls": 1, "wall_s": 0.004129369000054339, "self_s": 0.004129369000054339}, "compile.build_materials": {"calls": 1, "wall_s": 0.005085111999960645, "self_s": 0.005085111999960645}, "compile.load_coverage_horizon": {"calls": 1, "wall_s": 0.35084497299999384, "self_s": 0.35084497299999384}, "compile.compile_coverage_definitions": {"calls": 1, "wall_s": 0.03574609899999359, "self_s": 0.03574609899999359}, "compile.load_repository_coverage_decisions": {"calls": 1, "wall_s": 0.019668631000001824, "self_s": 0.019668631000001824}, "compile.load_indexes": {"calls": 1, "wall_s": 0.012152355000011994, "self_s": 0.012152355000011994}, "_compile/FrozenContentSource": {"calls": 1, "wall_s": 0.4777929249999602, "self_s": 8.076399996070904e-05}, "engine._compiled_snapshot": {"calls": 1, "wall_s": 3.0709552019999933, "self_s": 0.0023582140000257823}}, "git_reads": {"count": 0, "unique": 0, "top": []}, "git_objects": {"count": 0, "unique": 0}, "git_commands": {}} +{"operation": "s2.reopen_1", "wall_s": 0.005793843999981618, "cpu_s": 0.005795223999996324, "status": "ok", "peak_rss_kib": 283536, "spans": {"sqlite._verify_integrity": {"calls": 2, "wall_s": 0.0049433989999556616, "self_s": 0.0049433989999556616}, "sqlite.__init__": {"calls": 1, "wall_s": 0.0056359569999813175, "self_s": 0.0006925580000256559}, "snapshot.maintain": {"calls": 1, "wall_s": 4.397599997219004e-05, "self_s": 4.397599997219004e-05}}, "git_reads": {"count": 0, "unique": 0, "top": []}, "git_objects": {"count": 0, "unique": 0}, "git_commands": {}} +{"operation": "s2.reopen_facade_1", "wall_s": 0.3117306949999943, "cpu_s": 0.3117303340000035, "status": "ok", "peak_rss_kib": 283536, "spans": {"facade.contracts": {"calls": 1, "wall_s": 0.3086139629999707, "self_s": 0.3086139629999707}}, "git_reads": {"count": 0, "unique": 0, "top": []}, "git_objects": {"count": 0, "unique": 0}, "git_commands": {}} +{"operation": "s2.reopened_query_1", "wall_s": 3.0525170559999992, "cpu_s": 3.0517312339999876, "status": "ok", "peak_rss_kib": 283536, "spans": {"snapshot.maintain": {"calls": 1, "wall_s": 9.834700000510566e-05, "self_s": 9.834700000510566e-05}, "sqlite.snapshot": {"calls": 1, "wall_s": 7.479200002080688e-05, "self_s": 7.479200002080688e-05}, "sqlite.load_content": {"calls": 1, "wall_s": 0.012253176999990956, "self_s": 0.012178384999970149}, "snapshot.load_content": {"calls": 1, "wall_s": 2.701356159999989, "self_s": 2.689004635999993}, "compile.load_canonical_standards_corpus": {"calls": 1, "wall_s": 0.02241049000002704, "self_s": 0.02241049000002704}, "compile.compile_policy_impact": {"calls": 1, "wall_s": 0.026895393000017975, "self_s": 0.026895393000017975}, "compile.load_supporting_content": {"calls": 1, "wall_s": 7.772599997224461e-05, "self_s": 7.772599997224461e-05}, "compile.standards_navigation_registry": {"calls": 1, "wall_s": 0.003575470000043879, "self_s": 0.003575470000043879}, "compile.load_router_projection": {"calls": 1, "wall_s": 0.004425764000018262, "self_s": 0.004425764000018262}, "compile.build_materials": {"calls": 1, "wall_s": 0.0053823869999973795, "self_s": 0.0053823869999973795}, "compile.load_coverage_horizon": {"calls": 1, "wall_s": 0.20411659299998064, "self_s": 0.20411659299998064}, "compile.compile_coverage_definitions": {"calls": 1, "wall_s": 0.04010691600001337, "self_s": 0.04010691600001337}, "compile.load_repository_coverage_decisions": {"calls": 1, "wall_s": 0.02116698700001507, "self_s": 0.02116698700001507}, "compile.load_indexes": {"calls": 1, "wall_s": 0.011919224999985545, "self_s": 0.011919224999985545}, "_compile/FrozenContentSource": {"calls": 1, "wall_s": 0.34016330200000766, "self_s": 8.635099993625772e-05}, "engine._compiled_snapshot": {"calls": 1, "wall_s": 3.0440994389999787, "self_s": 0.0025799769999821365}}, "git_reads": {"count": 0, "unique": 0, "top": []}, "git_objects": {"count": 0, "unique": 0}, "git_commands": {}} diff --git a/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/operations/snapshot-0.json b/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/operations/snapshot-0.json new file mode 100644 index 00000000..1820ffec --- /dev/null +++ b/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/operations/snapshot-0.json @@ -0,0 +1 @@ +{"kind": "snapshot-handle", "id": "snapshot:v1:f43adfdb-6843-4a10-9dc7-ab9702e15d4c", "schema_version": 5} \ No newline at end of file diff --git a/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/operations/snapshot-1.json b/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/operations/snapshot-1.json new file mode 100644 index 00000000..e7c65679 --- /dev/null +++ b/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/operations/snapshot-1.json @@ -0,0 +1 @@ +{"kind": "snapshot-handle", "id": "snapshot:v1:a53bef17-15d4-4128-899f-105f6044c71e", "schema_version": 5} \ No newline at end of file diff --git a/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/operations/snapshot-2.json b/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/operations/snapshot-2.json new file mode 100644 index 00000000..0d75bd7b --- /dev/null +++ b/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/operations/snapshot-2.json @@ -0,0 +1 @@ +{"kind": "snapshot-handle", "id": "snapshot:v1:3b3e6373-1909-4fae-8115-9834edac65d3", "schema_version": 5} \ No newline at end of file diff --git a/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/parallel-summary.json b/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/parallel-summary.json new file mode 100644 index 00000000..d189144c --- /dev/null +++ b/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/parallel-summary.json @@ -0,0 +1,18 @@ +{ + "test_analysis.py": 1, + "test_navigation_indexes.py": 0, + "test_logical_authoring.py": 0, + "test_supporting_workflow.py": 0, + "test_agent_workflow.py": 0, + "test_applicability_contract.py": 0, + "test_authoring.py": 0, + "test_coverage_publication.py": 1, + "test_evidence_maintenance.py": 0, + "test_generated_contract.py": 0, + "test_mcp.py": 0, + "test_navigation.py": 1, + "test_platform_harness.py": 1, + "test_purpose_projection.py": 0, + "test_purpose_transport.py": 0, + "test_rendering.py": 0 +} \ No newline at end of file diff --git a/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/per-test-full.jsonl b/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/per-test-full.jsonl new file mode 100644 index 00000000..7d71e0ae --- /dev/null +++ b/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/per-test-full.jsonl @@ -0,0 +1,27 @@ +{"event": "start", "test": "test_agent_navigation.AgentNavigationTest.test_boolean_nullable_set_facts_aliases_and_multiple_causes", "at": 1790191551.0356853} +{"event": "end", "test": "test_agent_navigation.AgentNavigationTest.test_boolean_nullable_set_facts_aliases_and_multiple_causes", "wall_s": 2.9496500130000243, "cpu_s": 2.9494568050000005, "status": "pass", "setup": 1.9930000121348712e-06, "body": 2.949278496000005, "teardown": 2.0429999949556077e-06} +{"event": "start", "test": "test_agent_navigation.AgentNavigationTest.test_capture_rejection_never_advances_to_query", "at": 1790191553.9854157} +{"event": "end", "test": "test_agent_navigation.AgentNavigationTest.test_capture_rejection_never_advances_to_query", "wall_s": 0.0006009409999876425, "cpu_s": 0.0006080040000000508, "status": "pass", "setup": 1.372000014043806e-06, "body": 0.0004559529999994538, "teardown": 6.710000093335111e-07} +{"event": "start", "test": "test_agent_navigation.AgentNavigationTest.test_compact_read_preserves_text_authority_and_full_detail", "at": 1790191553.9860551} +{"event": "end", "test": "test_agent_navigation.AgentNavigationTest.test_compact_read_preserves_text_authority_and_full_detail", "wall_s": 6.200310903999991, "cpu_s": 6.197799321999998, "status": "pass", "setup": 8.2099998621743e-07, "body": 6.199794358999981, "teardown": 1.8429999784075335e-06} +{"event": "start", "test": "test_agent_navigation.AgentNavigationTest.test_complete_explicit_facts_select_reviewed_modules", "at": 1790191560.1865726} +{"event": "end", "test": "test_agent_navigation.AgentNavigationTest.test_complete_explicit_facts_select_reviewed_modules", "wall_s": 5.937602570999985, "cpu_s": 5.928279748000001, "status": "pass", "setup": 1.5720000021701708e-06, "body": 5.936881940999996, "teardown": 1.2319999882492993e-06} +{"event": "start", "test": "test_agent_navigation.AgentNavigationTest.test_focused_read_continuations_are_callable_against_exact_snapshot", "at": 1790191566.1242716} +{"event": "end", "test": "test_agent_navigation.AgentNavigationTest.test_focused_read_continuations_are_callable_against_exact_snapshot", "wall_s": 8.897187876999993, "cpu_s": 8.876132591000001, "status": "pass", "setup": 1.2419999961821304e-06, "body": 8.896575559000013, "teardown": 1.1509999922054703e-06} +{"event": "start", "test": "test_agent_navigation.AgentNavigationTest.test_invalid_inputs_cannot_create_snapshot", "at": 1790191575.0217123} +{"event": "end", "test": "test_agent_navigation.AgentNavigationTest.test_invalid_inputs_cannot_create_snapshot", "wall_s": 0.0007238450000102148, "cpu_s": 0.0007459150000030945, "status": "pass", "setup": 1.1120000067421643e-06, "body": 0.00045497199999999793, "teardown": 8.110000067063083e-07} +{"event": "start", "test": "test_agent_navigation.AgentNavigationTest.test_invalid_routing_values_do_not_become_negative_facts", "at": 1790191575.0224807} +{"event": "end", "test": "test_agent_navigation.AgentNavigationTest.test_invalid_routing_values_do_not_become_negative_facts", "wall_s": 5.772085035999993, "cpu_s": 5.767504948000003, "status": "pass", "setup": 7.710000033966935e-07, "body": 5.771877125000003, "teardown": 1.3209999849550513e-06} +{"event": "start", "test": "test_agent_navigation.AgentNavigationTest.test_optional_capture_matches_explicit_route_and_preserves_unresolved", "at": 1790191580.7946424} +{"event": "end", "test": "test_agent_navigation.AgentNavigationTest.test_optional_capture_matches_explicit_route_and_preserves_unresolved", "wall_s": 23.507506769999992, "cpu_s": 13.729722799000001, "status": "pass", "setup": 8.319999835748604e-07, "body": 23.506626460999996, "teardown": 1.4519999922413263e-06} +{"event": "start", "test": "test_agent_navigation.AgentNavigationTest.test_related_matches_native_permissions_and_projection", "at": 1790191604.3022556} +{"event": "end", "test": "test_agent_navigation.AgentNavigationTest.test_related_matches_native_permissions_and_projection", "wall_s": 11.623151938000007, "cpu_s": 11.604851077, "status": "pass", "setup": 1.2620000120477926e-06, "body": 11.622634181999985, "teardown": 1.2010000034479162e-06} +{"event": "start", "test": "test_agent_navigation.AgentNavigationTest.test_supplied_snapshot_never_captures_ambient_authority", "at": 1790191615.9255776} +{"event": "end", "test": "test_agent_navigation.AgentNavigationTest.test_supplied_snapshot_never_captures_ambient_authority", "wall_s": 5.657629449999973, "cpu_s": 5.656173559999999, "status": "pass", "setup": 1.5130000008412026e-06, "body": 5.657239957000002, "teardown": 1.5930000074604322e-06} +{"event": "start", "test": "test_agent_navigation.AgentNavigationTest.test_vocabulary_matches_router_and_questions_are_typed", "at": 1790191621.5834181} +{"event": "end", "test": "test_agent_navigation.AgentNavigationTest.test_vocabulary_matches_router_and_questions_are_typed", "wall_s": 9.504238713000007, "cpu_s": 9.497467037999996, "status": "pass", "setup": 1.1019999988093332e-06, "body": 9.503845955000003, "teardown": 1.6630000061468309e-06} +{"event": "start", "test": "test_agent_workflow.AgentWorkflowTest.test_analysis_rejection_retains_the_created_revision", "at": 1790191646.7746449} +{"event": "end", "test": "test_agent_workflow.AgentWorkflowTest.test_analysis_rejection_retains_the_created_revision", "wall_s": 6.59389038499998, "cpu_s": 6.462765582000003, "status": "pass", "setup": 1.5519999863045086e-06, "body": 6.593568102000006, "teardown": 1.562999983661939e-06} +{"event": "start", "test": "test_agent_workflow.AgentWorkflowTest.test_context_is_immutable_existing_identity_and_foreign_records_reject", "at": 1790191653.3686116} +{"event": "end", "test": "test_agent_workflow.AgentWorkflowTest.test_context_is_immutable_existing_identity_and_foreign_records_reject", "wall_s": 17.459513432999984, "cpu_s": 16.912731050999994, "status": "pass", "setup": 1.3419999902453128e-06, "body": 17.459272510999995, "teardown": 1.8730000022060267e-06} +{"event": "start", "test": "test_agent_workflow.AgentWorkflowTest.test_normative_proposal_stops_at_real_pending_work", "at": 1790191670.828226} diff --git a/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/qualified-controller.stderr b/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/qualified-controller.stderr new file mode 100644 index 00000000..e8fb518d --- /dev/null +++ b/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/qualified-controller.stderr @@ -0,0 +1 @@ +Switched to a new branch 'main' diff --git a/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/qualified-controller.stdout b/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/qualified-controller.stdout new file mode 100644 index 00000000..e69de29b diff --git a/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/qualified_apply_cold.exit.json b/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/qualified_apply_cold.exit.json new file mode 100644 index 00000000..304d335a --- /dev/null +++ b/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/qualified_apply_cold.exit.json @@ -0,0 +1 @@ +{"returncode": 0, "elapsed_s": 129.70028138160706, "test": "test_analysis.AnalysisWorkflowTest.test_apply_proposal_composes_real_verification_and_cold_readback", "qualification": "same source SHA; disposable checkout on local main, so nested test clones create main"} \ No newline at end of file diff --git a/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/qualified_apply_cold.jsonl b/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/qualified_apply_cold.jsonl new file mode 100644 index 00000000..84b2a679 --- /dev/null +++ b/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/qualified_apply_cold.jsonl @@ -0,0 +1,5 @@ +{"event": "start", "test": "test_analysis.AnalysisWorkflowTest.test_apply_proposal_composes_real_verification_and_cold_readback", "at": 1790193019.9465413} +{"event": "observation", "test": "test_analysis.AnalysisWorkflowTest.test_apply_proposal_composes_real_verification_and_cold_readback", "elapsed_s": 22.125673086999996, "stack": [" File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 58, in \n result=unittest.TextTestRunner(verbosity=1,resultclass=Result).run(suite)\n", " File \"/usr/lib/python3.13/unittest/runner.py\", line 240, in run\n test(result)\n", " File \"/usr/lib/python3.13/unittest/suite.py\", line 84, in __call__\n return self.run(*args, **kwds)\n", " File \"/usr/lib/python3.13/unittest/suite.py\", line 122, in run\n test(result)\n", " File \"/usr/lib/python3.13/unittest/case.py\", line 707, in __call__\n return self.run(*args, **kwds)\n", " File \"/usr/lib/python3.13/unittest/case.py\", line 651, in run\n self._callTestMethod(testMethod)\n", " File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 36, in timed\n try:return _fn(self,*args,**kwargs)\n", " File \"/usr/lib/python3.13/unittest/case.py\", line 606, in _callTestMethod\n if method() is not None:\n", " File \"/mnt/data/engine-performance/qualified-main-checkout/tools/standards_engine/tests/test_analysis.py\", line 333, in test_apply_proposal_composes_real_verification_and_cold_readback\n facade.create_proposal(\n", " File \"/mnt/data/engine-performance/qualified-main-checkout/tools/standards_engine/standards_engine/tools.py\", line 190, in create_proposal\n return self._result(\"create_proposal\", self._engine.create_proposal(call))\n", " File \"/mnt/data/engine-performance/qualified-main-checkout/tools/standards_engine/standards_engine/context_projection.py\", line 60, in invoke\n return function(engine, call)\n", " File \"/mnt/data/engine-performance/qualified-main-checkout/tools/standards_engine/standards_engine/engine.py\", line 833, in create_proposal\n summary, revision = self._authoring.create_proposal(\n", " File \"/mnt/data/engine-performance/qualified-main-checkout/tools/standards_engine/standards_engine/authoring.py\", line 675, in create_proposal\n self._observe_repository_paths(base_snapshot),\n", " File \"/mnt/data/engine-performance/qualified-main-checkout/tools/standards_engine/standards_engine/engine.py\", line 1698, in _repository_paths_for_snapshot\n capture = self._snapshots.load_content(snapshot)\n", " File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 25, in observe\n try:return original(*args,**kwargs)\n", " File \"/mnt/data/engine-performance/qualified-main-checkout/tools/standards_snapshots/standards_snapshots/module.py\", line 112, in load_content\n if self._content_id(capture) != content_id:\n", " File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 25, in observe\n try:return original(*args,**kwargs)\n", " File \"/mnt/data/engine-performance/qualified-main-checkout/tools/standards_snapshots/standards_snapshots/module.py\", line 207, in _content_id\n material = frame_path_byte_set(\n", " File \"/mnt/data/engine-performance/qualified-main-checkout/tools/standards_identity/standards_identity/encoding.py\", line 152, in frame_path_byte_set\n return IdentityArray(frame_path_bytes(path, content) for path, content in selected)\n", " File \"/mnt/data/engine-performance/qualified-main-checkout/tools/standards_identity/standards_identity/encoding.py\", line 23, in __init__\n immutable = tuple(values)\n", " File \"/mnt/data/engine-performance/qualified-main-checkout/tools/standards_identity/standards_identity/encoding.py\", line 152, in \n return IdentityArray(frame_path_bytes(path, content) for path, content in selected)\n", " File \"/mnt/data/engine-performance/qualified-main-checkout/tools/standards_identity/standards_identity/encoding.py\", line 131, in frame_path_bytes\n (\"bytes\", IdentityArray(content)),\n", " File \"/mnt/data/engine-performance/qualified-main-checkout/tools/standards_identity/standards_identity/encoding.py\", line 25, in __init__\n _validate_value(value)\n"]} +{"event": "observation", "test": "test_analysis.AnalysisWorkflowTest.test_apply_proposal_composes_real_verification_and_cold_readback", "elapsed_s": 67.13632042299992, "stack": [" File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 58, in \n result=unittest.TextTestRunner(verbosity=1,resultclass=Result).run(suite)\n", " File \"/usr/lib/python3.13/unittest/runner.py\", line 240, in run\n test(result)\n", " File \"/usr/lib/python3.13/unittest/suite.py\", line 84, in __call__\n return self.run(*args, **kwds)\n", " File \"/usr/lib/python3.13/unittest/suite.py\", line 122, in run\n test(result)\n", " File \"/usr/lib/python3.13/unittest/case.py\", line 707, in __call__\n return self.run(*args, **kwds)\n", " File \"/usr/lib/python3.13/unittest/case.py\", line 651, in run\n self._callTestMethod(testMethod)\n", " File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 36, in timed\n try:return _fn(self,*args,**kwargs)\n", " File \"/usr/lib/python3.13/unittest/case.py\", line 606, in _callTestMethod\n if method() is not None:\n", " File \"/mnt/data/engine-performance/qualified-main-checkout/tools/standards_engine/tests/test_analysis.py\", line 409, in test_apply_proposal_composes_real_verification_and_cold_readback\n response = facade.apply_proposal(\n", " File \"/mnt/data/engine-performance/qualified-main-checkout/tools/standards_engine/standards_engine/tools.py\", line 250, in apply_proposal\n return self._result(\"apply_proposal\", self._engine.apply_proposal(call))\n", " File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 25, in observe\n try:return original(*args,**kwargs)\n", " File \"/mnt/data/engine-performance/qualified-main-checkout/tools/standards_engine/standards_engine/context_projection.py\", line 60, in invoke\n return function(engine, call)\n", " File \"/mnt/data/engine-performance/qualified-main-checkout/tools/standards_engine/standards_engine/engine.py\", line 1228, in apply_proposal\n projection = self._proposal_projection(revision)\n", " File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 25, in observe\n try:return original(*args,**kwargs)\n", " File \"/mnt/data/engine-performance/qualified-main-checkout/tools/standards_engine/standards_engine/engine.py\", line 1683, in _proposal_projection\n capture = self._snapshots.load_content(revision.base_snapshot)\n", " File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 25, in observe\n try:return original(*args,**kwargs)\n", " File \"/mnt/data/engine-performance/qualified-main-checkout/tools/standards_snapshots/standards_snapshots/module.py\", line 112, in load_content\n if self._content_id(capture) != content_id:\n", " File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 25, in observe\n try:return original(*args,**kwargs)\n", " File \"/mnt/data/engine-performance/qualified-main-checkout/tools/standards_snapshots/standards_snapshots/module.py\", line 210, in _content_id\n return hash_identity(\n", " File \"/mnt/data/engine-performance/qualified-main-checkout/tools/standards_identity/standards_identity/encoding.py\", line 93, in hash_identity\n encoded = encode_identity_value(value)\n", " File \"/mnt/data/engine-performance/qualified-main-checkout/tools/standards_identity/standards_identity/encoding.py\", line 75, in encode_identity_value\n return _encode(value)\n", " File \"/mnt/data/engine-performance/qualified-main-checkout/tools/standards_identity/standards_identity/encoding.py\", line 191, in _encode\n return b\"[\" + b\",\".join(_encode(item) for item in value.values) + b\"]\"\n", " File \"/mnt/data/engine-performance/qualified-main-checkout/tools/standards_identity/standards_identity/encoding.py\", line 191, in \n return b\"[\" + b\",\".join(_encode(item) for item in value.values) + b\"]\"\n", " File \"/mnt/data/engine-performance/qualified-main-checkout/tools/standards_identity/standards_identity/encoding.py\", line 197, in _encode\n return b\"{\" + b\",\".join(encoded_members) + b\"}\"\n", " File \"/mnt/data/engine-performance/qualified-main-checkout/tools/standards_identity/standards_identity/encoding.py\", line 194, in \n _encode_string(key) + b\":\" + _encode(member_value)\n", " File \"/mnt/data/engine-performance/qualified-main-checkout/tools/standards_identity/standards_identity/encoding.py\", line 191, in _encode\n return b\"[\" + b\",\".join(_encode(item) for item in value.values) + b\"]\"\n", " File \"/mnt/data/engine-performance/qualified-main-checkout/tools/standards_identity/standards_identity/encoding.py\", line 191, in \n return b\"[\" + b\",\".join(_encode(item) for item in value.values) + b\"]\"\n", " File \"/mnt/data/engine-performance/qualified-main-checkout/tools/standards_identity/standards_identity/encoding.py\", line 180, in _encode\n def _encode(value: IdentityValue) -> bytes:\n"]} +{"event": "end", "test": "test_analysis.AnalysisWorkflowTest.test_apply_proposal_composes_real_verification_and_cold_readback", "wall_s": 105.71184679599992, "cpu_s": 37.010024707, "status": "pass", "spans": {"tools.standards_engine.standards_engine.tools._contracts": {"calls": 2, "inclusive_s": 0.5754827390001083}, "StandardsEngine._compile": {"calls": 9, "inclusive_s": 17.45353602000023}, "SnapshotModule._content_id": {"calls": 8, "inclusive_s": 21.3227173759999}, "SnapshotModule.load_content": {"calls": 7, "inclusive_s": 18.64440546600008}, "StandardsEngine._compiled_snapshot": {"calls": 1, "inclusive_s": 3.1040255460000026}, "StandardsEngine._proposal_projection": {"calls": 3, "inclusive_s": 11.79753287099993}, "AuthoringModule.read_revision": {"calls": 18, "inclusive_s": 0.7586700190004194}, "StandardsEngine.verify_proposal": {"calls": 1, "inclusive_s": 37.557817372000045}, "StandardsEngine.apply_proposal": {"calls": 1, "inclusive_s": 38.54182896599991}}, "setup_s": 1.8619998627400491e-06, "body_s": 105.71163771200008, "teardown_s": 2.6640000214683823e-06} +{"event": "summary", "total_s": 128.596185053, "run": 1, "errors": 0, "failures": 0, "skips": 0} diff --git a/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/qualified_apply_cold.stderr b/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/qualified_apply_cold.stderr new file mode 100644 index 00000000..9387000c --- /dev/null +++ b/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/qualified_apply_cold.stderr @@ -0,0 +1,5 @@ +. +---------------------------------------------------------------------- +Ran 1 test in 127.042s + +OK diff --git a/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/qualified_apply_cold.stdout b/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/qualified_apply_cold.stdout new file mode 100644 index 00000000..e1520881 --- /dev/null +++ b/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/qualified_apply_cold.stdout @@ -0,0 +1,2 @@ +START test_analysis.AnalysisWorkflowTest.test_apply_proposal_composes_real_verification_and_cold_readback +END test_analysis.AnalysisWorkflowTest.test_apply_proposal_composes_real_verification_and_cold_readback 105.712 pass diff --git a/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/qualified_apply_topology.exit.json b/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/qualified_apply_topology.exit.json new file mode 100644 index 00000000..7eed0ceb --- /dev/null +++ b/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/qualified_apply_topology.exit.json @@ -0,0 +1 @@ +{"returncode": 0, "elapsed_s": 202.64125609397888, "test": "test_analysis.AnalysisWorkflowTest.test_apply_create_and_retire_owns_topology_and_commit", "qualification": "same source SHA; disposable checkout on local main, so nested test clones create main"} \ No newline at end of file diff --git a/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/qualified_apply_topology.jsonl b/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/qualified_apply_topology.jsonl new file mode 100644 index 00000000..fb1110d2 --- /dev/null +++ b/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/qualified_apply_topology.jsonl @@ -0,0 +1,7 @@ +{"event": "start", "test": "test_analysis.AnalysisWorkflowTest.test_apply_create_and_retire_owns_topology_and_commit", "at": 1790192816.3064382} +{"event": "observation", "test": "test_analysis.AnalysisWorkflowTest.test_apply_create_and_retire_owns_topology_and_commit", "elapsed_s": 23.33004519699989, "stack": [" File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 58, in \n result=unittest.TextTestRunner(verbosity=1,resultclass=Result).run(suite)\n", " File \"/usr/lib/python3.13/unittest/runner.py\", line 240, in run\n test(result)\n", " File \"/usr/lib/python3.13/unittest/suite.py\", line 84, in __call__\n return self.run(*args, **kwds)\n", " File \"/usr/lib/python3.13/unittest/suite.py\", line 122, in run\n test(result)\n", " File \"/usr/lib/python3.13/unittest/case.py\", line 707, in __call__\n return self.run(*args, **kwds)\n", " File \"/usr/lib/python3.13/unittest/case.py\", line 651, in run\n self._callTestMethod(testMethod)\n", " File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 36, in timed\n try:return _fn(self,*args,**kwargs)\n", " File \"/usr/lib/python3.13/unittest/case.py\", line 606, in _callTestMethod\n if method() is not None:\n", " File \"/mnt/data/engine-performance/qualified-main-checkout/tools/standards_engine/tests/test_analysis.py\", line 605, in test_apply_create_and_retire_owns_topology_and_commit\n facade.create_proposal(\n", " File \"/mnt/data/engine-performance/qualified-main-checkout/tools/standards_engine/standards_engine/tools.py\", line 190, in create_proposal\n return self._result(\"create_proposal\", self._engine.create_proposal(call))\n", " File \"/mnt/data/engine-performance/qualified-main-checkout/tools/standards_engine/standards_engine/context_projection.py\", line 60, in invoke\n return function(engine, call)\n", " File \"/mnt/data/engine-performance/qualified-main-checkout/tools/standards_engine/standards_engine/engine.py\", line 833, in create_proposal\n summary, revision = self._authoring.create_proposal(\n", " File \"/mnt/data/engine-performance/qualified-main-checkout/tools/standards_engine/standards_engine/authoring.py\", line 675, in create_proposal\n self._observe_repository_paths(base_snapshot),\n", " File \"/mnt/data/engine-performance/qualified-main-checkout/tools/standards_engine/standards_engine/engine.py\", line 1698, in _repository_paths_for_snapshot\n capture = self._snapshots.load_content(snapshot)\n", " File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 25, in observe\n try:return original(*args,**kwargs)\n", " File \"/mnt/data/engine-performance/qualified-main-checkout/tools/standards_snapshots/standards_snapshots/module.py\", line 112, in load_content\n if self._content_id(capture) != content_id:\n", " File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 25, in observe\n try:return original(*args,**kwargs)\n", " File \"/mnt/data/engine-performance/qualified-main-checkout/tools/standards_snapshots/standards_snapshots/module.py\", line 210, in _content_id\n return hash_identity(\n", " File \"/mnt/data/engine-performance/qualified-main-checkout/tools/standards_identity/standards_identity/encoding.py\", line 93, in hash_identity\n encoded = encode_identity_value(value)\n", " File \"/mnt/data/engine-performance/qualified-main-checkout/tools/standards_identity/standards_identity/encoding.py\", line 75, in encode_identity_value\n return _encode(value)\n", " File \"/mnt/data/engine-performance/qualified-main-checkout/tools/standards_identity/standards_identity/encoding.py\", line 191, in _encode\n return b\"[\" + b\",\".join(_encode(item) for item in value.values) + b\"]\"\n", " File \"/mnt/data/engine-performance/qualified-main-checkout/tools/standards_identity/standards_identity/encoding.py\", line 191, in \n return b\"[\" + b\",\".join(_encode(item) for item in value.values) + b\"]\"\n", " File \"/mnt/data/engine-performance/qualified-main-checkout/tools/standards_identity/standards_identity/encoding.py\", line 197, in _encode\n return b\"{\" + b\",\".join(encoded_members) + b\"}\"\n", " File \"/mnt/data/engine-performance/qualified-main-checkout/tools/standards_identity/standards_identity/encoding.py\", line 194, in \n _encode_string(key) + b\":\" + _encode(member_value)\n", " File \"/mnt/data/engine-performance/qualified-main-checkout/tools/standards_identity/standards_identity/encoding.py\", line 191, in _encode\n return b\"[\" + b\",\".join(_encode(item) for item in value.values) + b\"]\"\n", " File \"/mnt/data/engine-performance/qualified-main-checkout/tools/standards_identity/standards_identity/encoding.py\", line 191, in \n return b\"[\" + b\",\".join(_encode(item) for item in value.values) + b\"]\"\n", " File \"/mnt/data/engine-performance/qualified-main-checkout/tools/standards_identity/standards_identity/encoding.py\", line 187, in _encode\n return _encode_integer(value)\n", " File \"/mnt/data/engine-performance/qualified-main-checkout/tools/standards_identity/standards_identity/encoding.py\", line 210, in _encode_integer\n encoded = str(chunks.pop()).encode(\"ascii\")\n"]} +{"event": "observation", "test": "test_analysis.AnalysisWorkflowTest.test_apply_create_and_retire_owns_topology_and_commit", "elapsed_s": 68.52789987999995, "stack": [" File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 58, in \n result=unittest.TextTestRunner(verbosity=1,resultclass=Result).run(suite)\n", " File \"/usr/lib/python3.13/unittest/runner.py\", line 240, in run\n test(result)\n", " File \"/usr/lib/python3.13/unittest/suite.py\", line 84, in __call__\n return self.run(*args, **kwds)\n", " File \"/usr/lib/python3.13/unittest/suite.py\", line 122, in run\n test(result)\n", " File \"/usr/lib/python3.13/unittest/case.py\", line 707, in __call__\n return self.run(*args, **kwds)\n", " File \"/usr/lib/python3.13/unittest/case.py\", line 651, in run\n self._callTestMethod(testMethod)\n", " File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 36, in timed\n try:return _fn(self,*args,**kwargs)\n", " File \"/usr/lib/python3.13/unittest/case.py\", line 606, in _callTestMethod\n if method() is not None:\n", " File \"/mnt/data/engine-performance/qualified-main-checkout/tools/standards_engine/tests/test_analysis.py\", line 655, in test_apply_create_and_retire_owns_topology_and_commit\n create_application = apply_ready(create_ready.readiness_id)\n", " File \"/mnt/data/engine-performance/qualified-main-checkout/tools/standards_engine/tests/test_analysis.py\", line 569, in apply_ready\n facade.apply_proposal(\n", " File \"/mnt/data/engine-performance/qualified-main-checkout/tools/standards_engine/standards_engine/tools.py\", line 250, in apply_proposal\n return self._result(\"apply_proposal\", self._engine.apply_proposal(call))\n", " File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 25, in observe\n try:return original(*args,**kwargs)\n", " File \"/mnt/data/engine-performance/qualified-main-checkout/tools/standards_engine/standards_engine/context_projection.py\", line 60, in invoke\n return function(engine, call)\n", " File \"/mnt/data/engine-performance/qualified-main-checkout/tools/standards_engine/standards_engine/engine.py\", line 1275, in apply_proposal\n verification = self._application_verifier(candidate.root)\n", " File \"/mnt/data/engine-performance/qualified-main-checkout/tools/standards_verifier/standards_verifier/cli.py\", line 76, in run_complete_verification\n results = tuple(Verifier(repo_root, registry).run(None))\n", " File \"/mnt/data/engine-performance/qualified-main-checkout/tools/standards_verifier/standards_verifier/engine.py\", line 66, in run\n result = self._run_suite(catalog.suite(suite_id), catalog)\n", " File \"/mnt/data/engine-performance/qualified-main-checkout/tools/standards_verifier/standards_verifier/engine.py\", line 100, in _run_suite\n diagnostics.extend(check.run(context))\n", " File \"/mnt/data/engine-performance/qualified-main-checkout/tools/standards_verifier/standards_verifier/checks/python_package_contract.py\", line 70, in run\n for finding in execute_python_package_contract(context.repo_root)\n", " File \"/mnt/data/engine-performance/qualified-main-checkout/tools/standards_verifier/standards_verifier/python_packages.py\", line 1294, in execute_python_package_contract\n completed = subprocess.run(\n", " File \"/usr/lib/python3.13/subprocess.py\", line 556, in run\n stdout, stderr = process.communicate(input, timeout=timeout)\n", " File \"/usr/lib/python3.13/subprocess.py\", line 1222, in communicate\n stdout, stderr = self._communicate(input, endtime, timeout)\n", " File \"/usr/lib/python3.13/subprocess.py\", line 2128, in _communicate\n ready = selector.select(timeout)\n", " File \"/usr/lib/python3.13/selectors.py\", line 398, in select\n fd_event_list = self._selector.poll(timeout)\n"]} +{"event": "observation", "test": "test_analysis.AnalysisWorkflowTest.test_apply_create_and_retire_owns_topology_and_commit", "elapsed_s": 113.54044740099994, "stack": [" File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 58, in \n result=unittest.TextTestRunner(verbosity=1,resultclass=Result).run(suite)\n", " File \"/usr/lib/python3.13/unittest/runner.py\", line 240, in run\n test(result)\n", " File \"/usr/lib/python3.13/unittest/suite.py\", line 84, in __call__\n return self.run(*args, **kwds)\n", " File \"/usr/lib/python3.13/unittest/suite.py\", line 122, in run\n test(result)\n", " File \"/usr/lib/python3.13/unittest/case.py\", line 707, in __call__\n return self.run(*args, **kwds)\n", " File \"/usr/lib/python3.13/unittest/case.py\", line 651, in run\n self._callTestMethod(testMethod)\n", " File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 36, in timed\n try:return _fn(self,*args,**kwargs)\n", " File \"/usr/lib/python3.13/unittest/case.py\", line 606, in _callTestMethod\n if method() is not None:\n", " File \"/mnt/data/engine-performance/qualified-main-checkout/tools/standards_engine/tests/test_analysis.py\", line 806, in test_apply_create_and_retire_owns_topology_and_commit\n retire_application = apply_ready(retire_ready.readiness_id)\n", " File \"/mnt/data/engine-performance/qualified-main-checkout/tools/standards_engine/tests/test_analysis.py\", line 569, in apply_ready\n facade.apply_proposal(\n", " File \"/mnt/data/engine-performance/qualified-main-checkout/tools/standards_engine/standards_engine/tools.py\", line 250, in apply_proposal\n return self._result(\"apply_proposal\", self._engine.apply_proposal(call))\n", " File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 25, in observe\n try:return original(*args,**kwargs)\n", " File \"/mnt/data/engine-performance/qualified-main-checkout/tools/standards_engine/standards_engine/context_projection.py\", line 60, in invoke\n return function(engine, call)\n", " File \"/mnt/data/engine-performance/qualified-main-checkout/tools/standards_engine/standards_engine/engine.py\", line 1228, in apply_proposal\n projection = self._proposal_projection(revision)\n", " File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 25, in observe\n try:return original(*args,**kwargs)\n", " File \"/mnt/data/engine-performance/qualified-main-checkout/tools/standards_engine/standards_engine/engine.py\", line 1683, in _proposal_projection\n capture = self._snapshots.load_content(revision.base_snapshot)\n", " File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 25, in observe\n try:return original(*args,**kwargs)\n", " File \"/mnt/data/engine-performance/qualified-main-checkout/tools/standards_snapshots/standards_snapshots/module.py\", line 112, in load_content\n if self._content_id(capture) != content_id:\n", " File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 25, in observe\n try:return original(*args,**kwargs)\n", " File \"/mnt/data/engine-performance/qualified-main-checkout/tools/standards_snapshots/standards_snapshots/module.py\", line 210, in _content_id\n return hash_identity(\n", " File \"/mnt/data/engine-performance/qualified-main-checkout/tools/standards_identity/standards_identity/encoding.py\", line 93, in hash_identity\n encoded = encode_identity_value(value)\n", " File \"/mnt/data/engine-performance/qualified-main-checkout/tools/standards_identity/standards_identity/encoding.py\", line 75, in encode_identity_value\n return _encode(value)\n", " File \"/mnt/data/engine-performance/qualified-main-checkout/tools/standards_identity/standards_identity/encoding.py\", line 191, in _encode\n return b\"[\" + b\",\".join(_encode(item) for item in value.values) + b\"]\"\n", " File \"/mnt/data/engine-performance/qualified-main-checkout/tools/standards_identity/standards_identity/encoding.py\", line 191, in \n return b\"[\" + b\",\".join(_encode(item) for item in value.values) + b\"]\"\n", " File \"/mnt/data/engine-performance/qualified-main-checkout/tools/standards_identity/standards_identity/encoding.py\", line 197, in _encode\n return b\"{\" + b\",\".join(encoded_members) + b\"}\"\n", " File \"/mnt/data/engine-performance/qualified-main-checkout/tools/standards_identity/standards_identity/encoding.py\", line 194, in \n _encode_string(key) + b\":\" + _encode(member_value)\n", " File \"/mnt/data/engine-performance/qualified-main-checkout/tools/standards_identity/standards_identity/encoding.py\", line 191, in _encode\n return b\"[\" + b\",\".join(_encode(item) for item in value.values) + b\"]\"\n", " File \"/mnt/data/engine-performance/qualified-main-checkout/tools/standards_identity/standards_identity/encoding.py\", line 191, in \n return b\"[\" + b\",\".join(_encode(item) for item in value.values) + b\"]\"\n", " File \"/mnt/data/engine-performance/qualified-main-checkout/tools/standards_identity/standards_identity/encoding.py\", line 187, in _encode\n return _encode_integer(value)\n", " File \"/mnt/data/engine-performance/qualified-main-checkout/tools/standards_identity/standards_identity/encoding.py\", line 201, in _encode_integer\n def _encode_integer(value: int) -> bytes:\n"]} +{"event": "observation", "test": "test_analysis.AnalysisWorkflowTest.test_apply_create_and_retire_owns_topology_and_commit", "elapsed_s": 158.60136730199997, "stack": [" File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 58, in \n result=unittest.TextTestRunner(verbosity=1,resultclass=Result).run(suite)\n", " File \"/usr/lib/python3.13/unittest/runner.py\", line 240, in run\n test(result)\n", " File \"/usr/lib/python3.13/unittest/suite.py\", line 84, in __call__\n return self.run(*args, **kwds)\n", " File \"/usr/lib/python3.13/unittest/suite.py\", line 122, in run\n test(result)\n", " File \"/usr/lib/python3.13/unittest/case.py\", line 707, in __call__\n return self.run(*args, **kwds)\n", " File \"/usr/lib/python3.13/unittest/case.py\", line 651, in run\n self._callTestMethod(testMethod)\n", " File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 36, in timed\n try:return _fn(self,*args,**kwargs)\n", " File \"/usr/lib/python3.13/unittest/case.py\", line 606, in _callTestMethod\n if method() is not None:\n", " File \"/mnt/data/engine-performance/qualified-main-checkout/tools/standards_engine/tests/test_analysis.py\", line 840, in test_apply_create_and_retire_owns_topology_and_commit\n retired_snapshot = engine.create_snapshot(\n", " File \"/mnt/data/engine-performance/qualified-main-checkout/tools/standards_engine/standards_engine/context_projection.py\", line 60, in invoke\n return function(engine, call)\n", " File \"/mnt/data/engine-performance/qualified-main-checkout/tools/standards_engine/standards_engine/engine.py\", line 492, in create_snapshot\n return self._capture_snapshot(call)\n", " File \"/mnt/data/engine-performance/qualified-main-checkout/tools/standards_engine/standards_engine/engine.py\", line 503, in _capture_snapshot\n first = self._compile(recording)\n", " File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 25, in observe\n try:return original(*args,**kwargs)\n", " File \"/mnt/data/engine-performance/qualified-main-checkout/tools/standards_engine/standards_engine/engine.py\", line 1706, in _compile\n corpus = load_canonical_standards_corpus(source)\n", " File \"/mnt/data/engine-performance/qualified-main-checkout/tools/standards_metadata/standards_metadata/corpus.py\", line 16, in load_canonical_standards_corpus\n policy_units = load_policy_unit_corpus(\n", " File \"/mnt/data/engine-performance/qualified-main-checkout/tools/standards_metadata/standards_metadata/policy_units.py\", line 469, in load_policy_unit_corpus\n units.append(_unit(selected_source, modules, source, raw))\n", " File \"/mnt/data/engine-performance/qualified-main-checkout/tools/standards_metadata/standards_metadata/policy_units.py\", line 335, in _unit\n representation, structural, content = _resolve_scope(\n", " File \"/mnt/data/engine-performance/qualified-main-checkout/tools/standards_metadata/standards_metadata/policy_units.py\", line 263, in _resolve_scope\n raw = source.read_bytes(document)\n", " File \"/mnt/data/engine-performance/qualified-main-checkout/tools/standards_metadata/standards_metadata/source.py\", line 80, in read_bytes\n content = bytes(self._source.read_bytes(normalized))\n", " File \"/mnt/data/engine-performance/qualified-main-checkout/tools/standards_engine/standards_engine/engine.py\", line 264, in read_bytes\n return self._repository.read_file(\n", " File \"/mnt/data/engine-performance/qualified-main-checkout/tools/repository_git/repository_git/repository.py\", line 690, in read_file\n tree = self._object(repository, tree_oid, \"tree\", algorithm)\n", " File \"/mnt/data/engine-performance/qualified-main-checkout/tools/repository_git/repository_git/repository.py\", line 746, in _object\n output = git_output(\n", " File \"/mnt/data/engine-performance/qualified-main-checkout/tools/repository_git/repository_git/repository.py\", line 91, in git_output\n result = git_command(\n", " File \"/mnt/data/engine-performance/qualified-main-checkout/tools/repository_git/repository_git/repository.py\", line 75, in git_command\n return _run_bounded(\n", " File \"/mnt/data/engine-performance/qualified-main-checkout/tools/repository_git/repository_git/repository.py\", line 870, in _run_bounded\n process.stdout.close()\n", " File \"/usr/lib/python3.13/subprocess.py\", line 1280, in wait\n return self._wait(timeout=timeout)\n", " File \"/usr/lib/python3.13/subprocess.py\", line 2072, in _wait\n return self.returncode\n"]} +{"event": "end", "test": "test_analysis.AnalysisWorkflowTest.test_apply_create_and_retire_owns_topology_and_commit", "wall_s": 179.66984623599978, "cpu_s": 72.619611824, "status": "pass", "spans": {"tools.standards_engine.standards_engine.tools._contracts": {"calls": 3, "inclusive_s": 0.9711994790002336}, "StandardsEngine._compile": {"calls": 22, "inclusive_s": 60.19399182300049}, "SnapshotModule._content_id": {"calls": 13, "inclusive_s": 39.34830152800055}, "SnapshotModule.load_content": {"calls": 10, "inclusive_s": 30.74007271900041}, "StandardsEngine._proposal_projection": {"calls": 4, "inclusive_s": 24.56263760999991}, "AuthoringModule.read_revision": {"calls": 20, "inclusive_s": 0.744931124000459}, "StandardsEngine.apply_proposal": {"calls": 2, "inclusive_s": 90.35128944999974}, "StandardsEngine._compiled_snapshot": {"calls": 2, "inclusive_s": 6.297685085000239}}, "setup_s": 2.003000190597959e-06, "body_s": 179.6696084900002, "teardown_s": 1.8729999737843173e-06} +{"event": "summary", "total_s": 201.34684425399996, "run": 1, "errors": 0, "failures": 0, "skips": 0} diff --git a/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/qualified_apply_topology.stderr b/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/qualified_apply_topology.stderr new file mode 100644 index 00000000..7b4cb294 --- /dev/null +++ b/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/qualified_apply_topology.stderr @@ -0,0 +1,5 @@ +. +---------------------------------------------------------------------- +Ran 1 test in 199.748s + +OK diff --git a/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/qualified_apply_topology.stdout b/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/qualified_apply_topology.stdout new file mode 100644 index 00000000..472ae577 --- /dev/null +++ b/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/qualified_apply_topology.stdout @@ -0,0 +1,2 @@ +START test_analysis.AnalysisWorkflowTest.test_apply_create_and_retire_owns_topology_and_commit +END test_analysis.AnalysisWorkflowTest.test_apply_create_and_retire_owns_topology_and_commit 179.67 pass diff --git a/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/qualified_audit.exit.json b/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/qualified_audit.exit.json new file mode 100644 index 00000000..a3024109 --- /dev/null +++ b/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/qualified_audit.exit.json @@ -0,0 +1 @@ +{"returncode": 0, "elapsed_s": 266.8176658153534, "test": "test_coverage_publication.EngineAuditPublicationTest.test_review_verify_apply_recover_and_read_without_original_database", "qualification": "same source SHA; disposable checkout on local main, so nested test clones create main"} \ No newline at end of file diff --git a/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/qualified_audit.jsonl b/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/qualified_audit.jsonl new file mode 100644 index 00000000..df919291 --- /dev/null +++ b/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/qualified_audit.jsonl @@ -0,0 +1,8 @@ +{"event": "start", "test": "test_coverage_publication.EngineAuditPublicationTest.test_review_verify_apply_recover_and_read_without_original_database", "at": 1790193128.0789201} +{"event": "observation", "test": "test_coverage_publication.EngineAuditPublicationTest.test_review_verify_apply_recover_and_read_without_original_database", "elapsed_s": 43.65757945999985, "stack": [" File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 58, in \n result=unittest.TextTestRunner(verbosity=1,resultclass=Result).run(suite)\n", " File \"/usr/lib/python3.13/unittest/runner.py\", line 240, in run\n test(result)\n", " File \"/usr/lib/python3.13/unittest/suite.py\", line 84, in __call__\n return self.run(*args, **kwds)\n", " File \"/usr/lib/python3.13/unittest/suite.py\", line 122, in run\n test(result)\n", " File \"/usr/lib/python3.13/unittest/case.py\", line 707, in __call__\n return self.run(*args, **kwds)\n", " File \"/usr/lib/python3.13/unittest/case.py\", line 651, in run\n self._callTestMethod(testMethod)\n", " File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 36, in timed\n try:return _fn(self,*args,**kwargs)\n", " File \"/usr/lib/python3.13/unittest/case.py\", line 606, in _callTestMethod\n if method() is not None:\n", " File \"/mnt/data/engine-performance/qualified-main-checkout/tools/standards_engine/tests/test_coverage_publication.py\", line 70, in test_review_verify_apply_recover_and_read_without_original_database\n snapshot = facade.create_snapshot({\"kind\": \"create-snapshot\"})\n", " File \"/mnt/data/engine-performance/qualified-main-checkout/tools/standards_engine/standards_engine/tools.py\", line 178, in create_snapshot\n return self._result(\"create_snapshot\", self._engine.create_snapshot(call))\n", " File \"/mnt/data/engine-performance/qualified-main-checkout/tools/standards_engine/standards_engine/context_projection.py\", line 60, in invoke\n return function(engine, call)\n", " File \"/mnt/data/engine-performance/qualified-main-checkout/tools/standards_engine/standards_engine/engine.py\", line 492, in create_snapshot\n return self._capture_snapshot(call)\n", " File \"/mnt/data/engine-performance/qualified-main-checkout/tools/standards_engine/standards_engine/engine.py\", line 503, in _capture_snapshot\n first = self._compile(recording)\n", " File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 25, in observe\n try:return original(*args,**kwargs)\n", " File \"/mnt/data/engine-performance/qualified-main-checkout/tools/standards_engine/standards_engine/engine.py\", line 1729, in _compile\n load_indexes(source, corpus),\n", " File \"/mnt/data/engine-performance/qualified-main-checkout/tools/standards_engine/standards_engine/navigation_indexes.py\", line 198, in load_indexes\n enforcement = _navigation_checks(source)\n", " File \"/mnt/data/engine-performance/qualified-main-checkout/tools/standards_engine/standards_engine/navigation_indexes.py\", line 77, in _navigation_checks\n document = tomllib.loads(source.read_bytes(suite[\"path\"]).decode(\"utf-8\"))\n", " File \"/mnt/data/engine-performance/qualified-main-checkout/tools/standards_metadata/standards_metadata/source.py\", line 80, in read_bytes\n content = bytes(self._source.read_bytes(normalized))\n", " File \"/mnt/data/engine-performance/qualified-main-checkout/tools/standards_engine/standards_engine/engine.py\", line 264, in read_bytes\n return self._repository.read_file(\n", " File \"/mnt/data/engine-performance/qualified-main-checkout/tools/repository_git/repository_git/repository.py\", line 690, in read_file\n tree = self._object(repository, tree_oid, \"tree\", algorithm)\n", " File \"/mnt/data/engine-performance/qualified-main-checkout/tools/repository_git/repository_git/repository.py\", line 746, in _object\n output = git_output(\n", " File \"/mnt/data/engine-performance/qualified-main-checkout/tools/repository_git/repository_git/repository.py\", line 91, in git_output\n result = git_command(\n", " File \"/mnt/data/engine-performance/qualified-main-checkout/tools/repository_git/repository_git/repository.py\", line 75, in git_command\n return _run_bounded(\n", " File \"/mnt/data/engine-performance/qualified-main-checkout/tools/repository_git/repository_git/repository.py\", line 859, in _run_bounded\n returncode = process.wait(timeout=COMMAND_TIMEOUT_SECONDS)\n", " File \"/usr/lib/python3.13/subprocess.py\", line 1280, in wait\n return self._wait(timeout=timeout)\n", " File \"/usr/lib/python3.13/subprocess.py\", line 2060, in _wait\n time.sleep(delay)\n"]} +{"event": "observation", "test": "test_coverage_publication.EngineAuditPublicationTest.test_review_verify_apply_recover_and_read_without_original_database", "elapsed_s": 88.67183486299996, "stack": [" File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 58, in \n result=unittest.TextTestRunner(verbosity=1,resultclass=Result).run(suite)\n", " File \"/usr/lib/python3.13/unittest/runner.py\", line 240, in run\n test(result)\n", " File \"/usr/lib/python3.13/unittest/suite.py\", line 84, in __call__\n return self.run(*args, **kwds)\n", " File \"/usr/lib/python3.13/unittest/suite.py\", line 122, in run\n test(result)\n", " File \"/usr/lib/python3.13/unittest/case.py\", line 707, in __call__\n return self.run(*args, **kwds)\n", " File \"/usr/lib/python3.13/unittest/case.py\", line 651, in run\n self._callTestMethod(testMethod)\n", " File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 36, in timed\n try:return _fn(self,*args,**kwargs)\n", " File \"/usr/lib/python3.13/unittest/case.py\", line 606, in _callTestMethod\n if method() is not None:\n", " File \"/mnt/data/engine-performance/qualified-main-checkout/tools/standards_engine/tests/test_coverage_publication.py\", line 147, in test_review_verify_apply_recover_and_read_without_original_database\n result = facade.resolve(\n", " File \"/mnt/data/engine-performance/qualified-main-checkout/tools/standards_engine/standards_engine/tools.py\", line 372, in resolve\n result = self._engine.resolve(call)\n", " File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 25, in observe\n try:return original(*args,**kwargs)\n", " File \"/mnt/data/engine-performance/qualified-main-checkout/tools/standards_engine/standards_engine/context_projection.py\", line 60, in invoke\n return function(engine, call)\n", " File \"/mnt/data/engine-performance/qualified-main-checkout/tools/standards_engine/standards_engine/engine.py\", line 1620, in resolve\n successor = self._apply_submission(self._evaluate(state), call)\n", " File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 25, in observe\n try:return original(*args,**kwargs)\n", " File \"/mnt/data/engine-performance/qualified-main-checkout/tools/standards_engine/standards_engine/engine.py\", line 1779, in _evaluate\n return self._evaluate_compiled(state, accepted, proposed, revision)\n", " File \"/mnt/data/engine-performance/qualified-main-checkout/tools/standards_engine/standards_engine/engine.py\", line 1798, in _evaluate_compiled\n self._validate_projected_inputs(state, revision, accepted, proposed)\n", " File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 25, in observe\n try:return original(*args,**kwargs)\n", " File \"/mnt/data/engine-performance/qualified-main-checkout/tools/standards_engine/standards_engine/engine.py\", line 1829, in _validate_projected_inputs\n projection = self._proposal_projection(revision)\n", " File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 25, in observe\n try:return original(*args,**kwargs)\n", " File \"/mnt/data/engine-performance/qualified-main-checkout/tools/standards_engine/standards_engine/engine.py\", line 1683, in _proposal_projection\n capture = self._snapshots.load_content(revision.base_snapshot)\n", " File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 25, in observe\n try:return original(*args,**kwargs)\n", " File \"/mnt/data/engine-performance/qualified-main-checkout/tools/standards_snapshots/standards_snapshots/module.py\", line 112, in load_content\n if self._content_id(capture) != content_id:\n", " File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 25, in observe\n try:return original(*args,**kwargs)\n", " File \"/mnt/data/engine-performance/qualified-main-checkout/tools/standards_snapshots/standards_snapshots/module.py\", line 210, in _content_id\n return hash_identity(\n", " File \"/mnt/data/engine-performance/qualified-main-checkout/tools/standards_identity/standards_identity/encoding.py\", line 93, in hash_identity\n encoded = encode_identity_value(value)\n", " File \"/mnt/data/engine-performance/qualified-main-checkout/tools/standards_identity/standards_identity/encoding.py\", line 75, in encode_identity_value\n return _encode(value)\n", " File \"/mnt/data/engine-performance/qualified-main-checkout/tools/standards_identity/standards_identity/encoding.py\", line 191, in _encode\n return b\"[\" + b\",\".join(_encode(item) for item in value.values) + b\"]\"\n", " File \"/mnt/data/engine-performance/qualified-main-checkout/tools/standards_identity/standards_identity/encoding.py\", line 191, in \n return b\"[\" + b\",\".join(_encode(item) for item in value.values) + b\"]\"\n", " File \"/mnt/data/engine-performance/qualified-main-checkout/tools/standards_identity/standards_identity/encoding.py\", line 197, in _encode\n return b\"{\" + b\",\".join(encoded_members) + b\"}\"\n", " File \"/mnt/data/engine-performance/qualified-main-checkout/tools/standards_identity/standards_identity/encoding.py\", line 194, in \n _encode_string(key) + b\":\" + _encode(member_value)\n", " File \"/mnt/data/engine-performance/qualified-main-checkout/tools/standards_identity/standards_identity/encoding.py\", line 191, in _encode\n return b\"[\" + b\",\".join(_encode(item) for item in value.values) + b\"]\"\n", " File \"/mnt/data/engine-performance/qualified-main-checkout/tools/standards_identity/standards_identity/encoding.py\", line 191, in \n return b\"[\" + b\",\".join(_encode(item) for item in value.values) + b\"]\"\n", " File \"/mnt/data/engine-performance/qualified-main-checkout/tools/standards_identity/standards_identity/encoding.py\", line 187, in _encode\n return _encode_integer(value)\n", " File \"/mnt/data/engine-performance/qualified-main-checkout/tools/standards_identity/standards_identity/encoding.py\", line 210, in _encode_integer\n encoded = str(chunks.pop()).encode(\"ascii\")\n"]} +{"event": "observation", "test": "test_coverage_publication.EngineAuditPublicationTest.test_review_verify_apply_recover_and_read_without_original_database", "elapsed_s": 133.68188456300004, "stack": [" File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 58, in \n result=unittest.TextTestRunner(verbosity=1,resultclass=Result).run(suite)\n", " File \"/usr/lib/python3.13/unittest/runner.py\", line 240, in run\n test(result)\n", " File \"/usr/lib/python3.13/unittest/suite.py\", line 84, in __call__\n return self.run(*args, **kwds)\n", " File \"/usr/lib/python3.13/unittest/suite.py\", line 122, in run\n test(result)\n", " File \"/usr/lib/python3.13/unittest/case.py\", line 707, in __call__\n return self.run(*args, **kwds)\n", " File \"/usr/lib/python3.13/unittest/case.py\", line 651, in run\n self._callTestMethod(testMethod)\n", " File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 36, in timed\n try:return _fn(self,*args,**kwargs)\n", " File \"/usr/lib/python3.13/unittest/case.py\", line 606, in _callTestMethod\n if method() is not None:\n", " File \"/mnt/data/engine-performance/qualified-main-checkout/tools/standards_engine/tests/test_coverage_publication.py\", line 167, in test_review_verify_apply_recover_and_read_without_original_database\n verified = facade.verify_proposal(\n", " File \"/mnt/data/engine-performance/qualified-main-checkout/tools/standards_engine/standards_engine/tools.py\", line 230, in verify_proposal\n return self._result(\"verify_proposal\", self._engine.verify_proposal(call))\n", " File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 25, in observe\n try:return original(*args,**kwargs)\n", " File \"/mnt/data/engine-performance/qualified-main-checkout/tools/standards_engine/standards_engine/context_projection.py\", line 60, in invoke\n return function(engine, call)\n", " File \"/mnt/data/engine-performance/qualified-main-checkout/tools/standards_engine/standards_engine/engine.py\", line 735, in verify_proposal\n self._publish_coverage_into_candidate(\n", " File \"/mnt/data/engine-performance/qualified-main-checkout/tools/standards_engine/standards_engine/engine.py\", line 1403, in _publish_coverage_into_candidate\n evaluation = self._evaluate(state)\n", " File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 25, in observe\n try:return original(*args,**kwargs)\n", " File \"/mnt/data/engine-performance/qualified-main-checkout/tools/standards_engine/standards_engine/engine.py\", line 1778, in _evaluate\n proposed = self._proposal_projection(revision).compiled\n", " File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 25, in observe\n try:return original(*args,**kwargs)\n", " File \"/mnt/data/engine-performance/qualified-main-checkout/tools/standards_engine/standards_engine/engine.py\", line 1687, in _proposal_projection\n return self._logical_authoring.compile(\n", " File \"/mnt/data/engine-performance/qualified-main-checkout/tools/standards_engine/standards_engine/logical_authoring.py\", line 967, in compile\n self._apply_edit(\n", " File \"/mnt/data/engine-performance/qualified-main-checkout/tools/standards_engine/standards_engine/logical_authoring.py\", line 1021, in _apply_edit\n current = compile_current(files)\n", " File \"/mnt/data/engine-performance/qualified-main-checkout/tools/standards_engine/standards_engine/logical_authoring.py\", line 938, in compile_current\n _refresh_suite_input_projection(\n", " File \"/mnt/data/engine-performance/qualified-main-checkout/tools/standards_engine/standards_engine/logical_authoring.py\", line 2444, in _refresh_suite_input_projection\n files[_SUITE_INPUTS] = suite_input_projection_bytes(\n", " File \"/mnt/data/engine-performance/qualified-main-checkout/tools/standards_verifier/standards_verifier/suite_inputs.py\", line 162, in suite_input_projection_bytes\n compile_suite_input_manifest(root, repository_paths=repository_paths)\n", " File \"/mnt/data/engine-performance/qualified-main-checkout/tools/standards_verifier/standards_verifier/suite_inputs.py\", line 99, in compile_suite_input_manifest\n source = contained_file(repo_root, path)\n", " File \"/mnt/data/engine-performance/qualified-main-checkout/tools/standards_verifier/standards_verifier/paths.py\", line 62, in contained_file\n candidate = contained_path(\n", " File \"/mnt/data/engine-performance/qualified-main-checkout/tools/standards_verifier/standards_verifier/paths.py\", line 40, in contained_path\n resolved_candidate = candidate.resolve(strict=False)\n", " File \"/usr/lib/python3.13/pathlib/_local.py\", line 672, in resolve\n return self.with_segments(os.path.realpath(self, strict=strict))\n", " File \"\", line 494, in realpath\n"]} +{"event": "observation", "test": "test_coverage_publication.EngineAuditPublicationTest.test_review_verify_apply_recover_and_read_without_original_database", "elapsed_s": 178.70141451899985, "stack": [" File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 58, in \n result=unittest.TextTestRunner(verbosity=1,resultclass=Result).run(suite)\n", " File \"/usr/lib/python3.13/unittest/runner.py\", line 240, in run\n test(result)\n", " File \"/usr/lib/python3.13/unittest/suite.py\", line 84, in __call__\n return self.run(*args, **kwds)\n", " File \"/usr/lib/python3.13/unittest/suite.py\", line 122, in run\n test(result)\n", " File \"/usr/lib/python3.13/unittest/case.py\", line 707, in __call__\n return self.run(*args, **kwds)\n", " File \"/usr/lib/python3.13/unittest/case.py\", line 651, in run\n self._callTestMethod(testMethod)\n", " File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 36, in timed\n try:return _fn(self,*args,**kwargs)\n", " File \"/usr/lib/python3.13/unittest/case.py\", line 606, in _callTestMethod\n if method() is not None:\n", " File \"/mnt/data/engine-performance/qualified-main-checkout/tools/standards_engine/tests/test_coverage_publication.py\", line 179, in test_review_verify_apply_recover_and_read_without_original_database\n rejected = facade.apply_proposal(apply)\n", " File \"/mnt/data/engine-performance/qualified-main-checkout/tools/standards_engine/standards_engine/tools.py\", line 250, in apply_proposal\n return self._result(\"apply_proposal\", self._engine.apply_proposal(call))\n", " File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 25, in observe\n try:return original(*args,**kwargs)\n", " File \"/mnt/data/engine-performance/qualified-main-checkout/tools/standards_engine/standards_engine/context_projection.py\", line 60, in invoke\n return function(engine, call)\n", " File \"/mnt/data/engine-performance/qualified-main-checkout/tools/standards_engine/standards_engine/engine.py\", line 1229, in apply_proposal\n base_capture = self._snapshots.load_content(revision.base_snapshot)\n", " File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 25, in observe\n try:return original(*args,**kwargs)\n", " File \"/mnt/data/engine-performance/qualified-main-checkout/tools/standards_snapshots/standards_snapshots/module.py\", line 112, in load_content\n if self._content_id(capture) != content_id:\n", " File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 25, in observe\n try:return original(*args,**kwargs)\n", " File \"/mnt/data/engine-performance/qualified-main-checkout/tools/standards_snapshots/standards_snapshots/module.py\", line 210, in _content_id\n return hash_identity(\n", " File \"/mnt/data/engine-performance/qualified-main-checkout/tools/standards_identity/standards_identity/encoding.py\", line 93, in hash_identity\n encoded = encode_identity_value(value)\n", " File \"/mnt/data/engine-performance/qualified-main-checkout/tools/standards_identity/standards_identity/encoding.py\", line 75, in encode_identity_value\n return _encode(value)\n", " File \"/mnt/data/engine-performance/qualified-main-checkout/tools/standards_identity/standards_identity/encoding.py\", line 191, in _encode\n return b\"[\" + b\",\".join(_encode(item) for item in value.values) + b\"]\"\n", " File \"/mnt/data/engine-performance/qualified-main-checkout/tools/standards_identity/standards_identity/encoding.py\", line 191, in \n return b\"[\" + b\",\".join(_encode(item) for item in value.values) + b\"]\"\n", " File \"/mnt/data/engine-performance/qualified-main-checkout/tools/standards_identity/standards_identity/encoding.py\", line 197, in _encode\n return b\"{\" + b\",\".join(encoded_members) + b\"}\"\n", " File \"/mnt/data/engine-performance/qualified-main-checkout/tools/standards_identity/standards_identity/encoding.py\", line 195, in \n for key, member_value in value.members\n", " File \"/mnt/data/engine-performance/qualified-main-checkout/tools/standards_identity/standards_identity/encoding.py\", line 191, in _encode\n return b\"[\" + b\",\".join(_encode(item) for item in value.values) + b\"]\"\n", " File \"/mnt/data/engine-performance/qualified-main-checkout/tools/standards_identity/standards_identity/encoding.py\", line 191, in \n return b\"[\" + b\",\".join(_encode(item) for item in value.values) + b\"]\"\n", " File \"/mnt/data/engine-performance/qualified-main-checkout/tools/standards_identity/standards_identity/encoding.py\", line 187, in _encode\n return _encode_integer(value)\n", " File \"/mnt/data/engine-performance/qualified-main-checkout/tools/standards_identity/standards_identity/encoding.py\", line 215, in _encode_integer\n return (b\"-\" if negative else b\"\") + encoded + suffix\n", " File \"/mnt/data/engine-performance/qualified-main-checkout/tools/standards_identity/standards_identity/encoding.py\", line 213, in \n for chunk in reversed(chunks)\n"]} +{"event": "observation", "test": "test_coverage_publication.EngineAuditPublicationTest.test_review_verify_apply_recover_and_read_without_original_database", "elapsed_s": 223.76359985699992, "stack": [" File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 58, in \n result=unittest.TextTestRunner(verbosity=1,resultclass=Result).run(suite)\n", " File \"/usr/lib/python3.13/unittest/runner.py\", line 240, in run\n test(result)\n", " File \"/usr/lib/python3.13/unittest/suite.py\", line 84, in __call__\n return self.run(*args, **kwds)\n", " File \"/usr/lib/python3.13/unittest/suite.py\", line 122, in run\n test(result)\n", " File \"/usr/lib/python3.13/unittest/case.py\", line 707, in __call__\n return self.run(*args, **kwds)\n", " File \"/usr/lib/python3.13/unittest/case.py\", line 651, in run\n self._callTestMethod(testMethod)\n", " File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 36, in timed\n try:return _fn(self,*args,**kwargs)\n", " File \"/usr/lib/python3.13/unittest/case.py\", line 606, in _callTestMethod\n if method() is not None:\n", " File \"/mnt/data/engine-performance/qualified-main-checkout/tools/standards_engine/tests/test_coverage_publication.py\", line 196, in test_review_verify_apply_recover_and_read_without_original_database\n applied = facade.apply_proposal(apply)\n", " File \"/mnt/data/engine-performance/qualified-main-checkout/tools/standards_engine/standards_engine/tools.py\", line 250, in apply_proposal\n return self._result(\"apply_proposal\", self._engine.apply_proposal(call))\n", " File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 25, in observe\n try:return original(*args,**kwargs)\n", " File \"/mnt/data/engine-performance/qualified-main-checkout/tools/standards_engine/standards_engine/context_projection.py\", line 60, in invoke\n return function(engine, call)\n", " File \"/mnt/data/engine-performance/qualified-main-checkout/tools/standards_engine/standards_engine/engine.py\", line 1275, in apply_proposal\n verification = self._application_verifier(candidate.root)\n", " File \"/mnt/data/engine-performance/qualified-main-checkout/tools/standards_verifier/standards_verifier/cli.py\", line 76, in run_complete_verification\n results = tuple(Verifier(repo_root, registry).run(None))\n", " File \"/mnt/data/engine-performance/qualified-main-checkout/tools/standards_verifier/standards_verifier/engine.py\", line 66, in run\n result = self._run_suite(catalog.suite(suite_id), catalog)\n", " File \"/mnt/data/engine-performance/qualified-main-checkout/tools/standards_verifier/standards_verifier/engine.py\", line 100, in _run_suite\n diagnostics.extend(check.run(context))\n", " File \"/mnt/data/engine-performance/qualified-main-checkout/tools/standards_verifier/standards_verifier/checks/python_package_contract.py\", line 70, in run\n for finding in execute_python_package_contract(context.repo_root)\n", " File \"/mnt/data/engine-performance/qualified-main-checkout/tools/standards_verifier/standards_verifier/python_packages.py\", line 1312, in execute_python_package_contract\n completed = _execute_entrypoint(\n", " File \"/mnt/data/engine-performance/qualified-main-checkout/tools/standards_verifier/standards_verifier/python_packages.py\", line 1403, in _execute_entrypoint\n return subprocess.run(\n", " File \"/usr/lib/python3.13/subprocess.py\", line 556, in run\n stdout, stderr = process.communicate(input, timeout=timeout)\n", " File \"/usr/lib/python3.13/subprocess.py\", line 1222, in communicate\n stdout, stderr = self._communicate(input, endtime, timeout)\n", " File \"/usr/lib/python3.13/subprocess.py\", line 2128, in _communicate\n ready = selector.select(timeout)\n", " File \"/usr/lib/python3.13/selectors.py\", line 398, in select\n fd_event_list = self._selector.poll(timeout)\n"]} +{"event": "end", "test": "test_coverage_publication.EngineAuditPublicationTest.test_review_verify_apply_recover_and_read_without_original_database", "wall_s": 264.38809278099984, "cpu_s": 153.307691122, "status": "pass", "spans": {"tools.standards_engine.standards_engine.tools._contracts": {"calls": 2, "inclusive_s": 0.5807066939999004}, "StandardsEngine._compile": {"calls": 71, "inclusive_s": 51.16307631400059}, "SnapshotModule._content_id": {"calls": 34, "inclusive_s": 90.25317664300019}, "SnapshotModule.load_content": {"calls": 32, "inclusive_s": 85.15938130199925}, "StandardsEngine._proposal_projection": {"calls": 19, "inclusive_s": 98.44227604699972}, "AuthoringModule.read_revision": {"calls": 29, "inclusive_s": 0.9996140119990287}, "StandardsEngine.verify_proposal": {"calls": 2, "inclusive_s": 60.66197856400004}, "StandardsEngine._compiled_snapshot": {"calls": 8, "inclusive_s": 23.740933505000385}, "StandardsEngine._validate_projected_inputs": {"calls": 7, "inclusive_s": 35.00726574999976}, "StandardsEngine.analyze_proposal": {"calls": 1, "inclusive_s": 13.472675840000193}, "StandardsEngine._evaluate": {"calls": 6, "inclusive_s": 79.64916835300005}, "StandardsEngine.resolve": {"calls": 1, "inclusive_s": 26.082674275000045}, "StandardsEngine.review_proposal": {"calls": 1, "inclusive_s": 13.329997131000027}, "StandardsEngine.apply_proposal": {"calls": 2, "inclusive_s": 74.39644259800025}}, "setup_s": 1.531999942017137e-06, "body_s": 264.38789522499997, "teardown_s": 2.213000016126898e-06} +{"event": "summary", "total_s": 265.731163188, "run": 1, "errors": 0, "failures": 0, "skips": 0} diff --git a/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/qualified_audit.stderr b/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/qualified_audit.stderr new file mode 100644 index 00000000..7f629b22 --- /dev/null +++ b/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/qualified_audit.stderr @@ -0,0 +1,5 @@ +. +---------------------------------------------------------------------- +Ran 1 test in 264.388s + +OK diff --git a/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/qualified_audit.stdout b/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/qualified_audit.stdout new file mode 100644 index 00000000..4b046ab6 --- /dev/null +++ b/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/qualified_audit.stdout @@ -0,0 +1,2 @@ +START test_coverage_publication.EngineAuditPublicationTest.test_review_verify_apply_recover_and_read_without_original_database +END test_coverage_publication.EngineAuditPublicationTest.test_review_verify_apply_recover_and_read_without_original_database 264.388 pass diff --git a/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/qualified_navigation.jsonl b/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/qualified_navigation.jsonl new file mode 100644 index 00000000..b61ef389 --- /dev/null +++ b/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/qualified_navigation.jsonl @@ -0,0 +1,3 @@ +{"event": "start", "test": "test_navigation.NavigationTest.test_live_worktree_mutation_cannot_change_snapshot_reads", "at": 1790193178.5643399} +{"event": "end", "test": "test_navigation.NavigationTest.test_live_worktree_mutation_cannot_change_snapshot_reads", "wall_s": 23.633109572999956, "cpu_s": 13.941604526, "status": "pass", "spans": {"StandardsEngine._compile": {"calls": 4, "inclusive_s": 15.057444212000291}, "SnapshotModule._content_id": {"calls": 3, "inclusive_s": 8.228993120999576}, "SnapshotModule.load_content": {"calls": 2, "inclusive_s": 5.512171875999911}, "StandardsEngine._compiled_snapshot": {"calls": 2, "inclusive_s": 6.161481271000184}}, "setup_s": 1.8529999579186551e-06, "body_s": 23.632916239999986, "teardown_s": 1.8119999367627315e-06} +{"event": "summary", "total_s": 42.52990776399997, "run": 1, "errors": 0, "failures": 0, "skips": 0} diff --git a/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/qualified_navigation.stderr b/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/qualified_navigation.stderr new file mode 100644 index 00000000..6a26f8cb --- /dev/null +++ b/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/qualified_navigation.stderr @@ -0,0 +1,5 @@ +. +---------------------------------------------------------------------- +Ran 1 test in 40.959s + +OK diff --git a/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/qualified_navigation.stdout b/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/qualified_navigation.stdout new file mode 100644 index 00000000..d9fe23c0 --- /dev/null +++ b/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/qualified_navigation.stdout @@ -0,0 +1,2 @@ +START test_navigation.NavigationTest.test_live_worktree_mutation_cannot_change_snapshot_reads +END test_navigation.NavigationTest.test_live_worktree_mutation_cannot_change_snapshot_reads 23.633 pass diff --git a/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/scheduler.stderr b/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/scheduler.stderr new file mode 100644 index 00000000..e69de29b diff --git a/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/scheduler.stdout b/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/scheduler.stdout new file mode 100644 index 00000000..e69de29b diff --git a/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/slow-case-isolated.exit.json b/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/slow-case-isolated.exit.json new file mode 100644 index 00000000..07f4be7e --- /dev/null +++ b/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/slow-case-isolated.exit.json @@ -0,0 +1 @@ +{"returncode": 0, "elapsed_s": 139.02410125732422, "args": ["--test", "test_agent_workflow.AgentWorkflowTest.test_normative_proposal_stops_at_real_pending_work"]} \ No newline at end of file diff --git a/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/slow-case-isolated.jsonl b/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/slow-case-isolated.jsonl new file mode 100644 index 00000000..30b756ef --- /dev/null +++ b/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/slow-case-isolated.jsonl @@ -0,0 +1,6 @@ +{"event": "start", "test": "test_agent_workflow.AgentWorkflowTest.test_normative_proposal_stops_at_real_pending_work", "at": 1790191930.5449831} +{"event": "observation", "test": "test_agent_workflow.AgentWorkflowTest.test_normative_proposal_stops_at_real_pending_work", "elapsed_s": 27.01241582800003, "stack": [" File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 58, in \n result=unittest.TextTestRunner(verbosity=1,resultclass=Result).run(suite)\n", " File \"/usr/lib/python3.13/unittest/runner.py\", line 240, in run\n test(result)\n", " File \"/usr/lib/python3.13/unittest/suite.py\", line 84, in __call__\n return self.run(*args, **kwds)\n", " File \"/usr/lib/python3.13/unittest/suite.py\", line 122, in run\n test(result)\n", " File \"/usr/lib/python3.13/unittest/case.py\", line 707, in __call__\n return self.run(*args, **kwds)\n", " File \"/usr/lib/python3.13/unittest/case.py\", line 651, in run\n self._callTestMethod(testMethod)\n", " File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 36, in timed\n try:return _fn(self,*args,**kwargs)\n", " File \"/usr/lib/python3.13/unittest/case.py\", line 606, in _callTestMethod\n if method() is not None:\n", " File \"/mnt/data/engine-performance/benchmark-checkout/tools/standards_engine/tests/test_agent_workflow.py\", line 306, in test_normative_proposal_stops_at_real_pending_work\n invalid = self.facade.review(\n", " File \"/mnt/data/engine-performance/benchmark-checkout/tools/standards_engine/standards_engine/tools.py\", line 304, in review\n return self._result(\"review\", self._engine.review(call))\n", " File \"/mnt/data/engine-performance/benchmark-checkout/tools/standards_engine/standards_engine/context_projection.py\", line 60, in invoke\n return function(engine, call)\n", " File \"/mnt/data/engine-performance/benchmark-checkout/tools/standards_engine/standards_engine/engine.py\", line 946, in review\n return advance(self, \"review\", call)\n", " File \"/mnt/data/engine-performance/benchmark-checkout/tools/standards_engine/standards_engine/agent_workflow.py\", line 193, in advance\n current = view(engine, bound)\n", " File \"/mnt/data/engine-performance/benchmark-checkout/tools/standards_engine/standards_engine/agent_workflow.py\", line 123, in view\n outcome = engine._analysis_result(engine._evaluate(bound.analysis))\n", " File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 25, in observe\n try:return original(*args,**kwargs)\n", " File \"/mnt/data/engine-performance/benchmark-checkout/tools/standards_engine/standards_engine/engine.py\", line 1779, in _evaluate\n return self._evaluate_compiled(state, accepted, proposed, revision)\n", " File \"/mnt/data/engine-performance/benchmark-checkout/tools/standards_engine/standards_engine/engine.py\", line 1798, in _evaluate_compiled\n self._validate_projected_inputs(state, revision, accepted, proposed)\n", " File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 25, in observe\n try:return original(*args,**kwargs)\n", " File \"/mnt/data/engine-performance/benchmark-checkout/tools/standards_engine/standards_engine/engine.py\", line 1829, in _validate_projected_inputs\n projection = self._proposal_projection(revision)\n", " File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 25, in observe\n try:return original(*args,**kwargs)\n", " File \"/mnt/data/engine-performance/benchmark-checkout/tools/standards_engine/standards_engine/engine.py\", line 1683, in _proposal_projection\n capture = self._snapshots.load_content(revision.base_snapshot)\n", " File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 25, in observe\n try:return original(*args,**kwargs)\n", " File \"/mnt/data/engine-performance/benchmark-checkout/tools/standards_snapshots/standards_snapshots/module.py\", line 112, in load_content\n if self._content_id(capture) != content_id:\n", " File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 25, in observe\n try:return original(*args,**kwargs)\n", " File \"/mnt/data/engine-performance/benchmark-checkout/tools/standards_snapshots/standards_snapshots/module.py\", line 210, in _content_id\n return hash_identity(\n", " File \"/mnt/data/engine-performance/benchmark-checkout/tools/standards_identity/standards_identity/encoding.py\", line 93, in hash_identity\n encoded = encode_identity_value(value)\n", " File \"/mnt/data/engine-performance/benchmark-checkout/tools/standards_identity/standards_identity/encoding.py\", line 75, in encode_identity_value\n return _encode(value)\n", " File \"/mnt/data/engine-performance/benchmark-checkout/tools/standards_identity/standards_identity/encoding.py\", line 191, in _encode\n return b\"[\" + b\",\".join(_encode(item) for item in value.values) + b\"]\"\n", " File \"/mnt/data/engine-performance/benchmark-checkout/tools/standards_identity/standards_identity/encoding.py\", line 191, in \n return b\"[\" + b\",\".join(_encode(item) for item in value.values) + b\"]\"\n", " File \"/mnt/data/engine-performance/benchmark-checkout/tools/standards_identity/standards_identity/encoding.py\", line 197, in _encode\n return b\"{\" + b\",\".join(encoded_members) + b\"}\"\n", " File \"/mnt/data/engine-performance/benchmark-checkout/tools/standards_identity/standards_identity/encoding.py\", line 194, in \n _encode_string(key) + b\":\" + _encode(member_value)\n", " File \"/mnt/data/engine-performance/benchmark-checkout/tools/standards_identity/standards_identity/encoding.py\", line 191, in _encode\n return b\"[\" + b\",\".join(_encode(item) for item in value.values) + b\"]\"\n", " File \"/mnt/data/engine-performance/benchmark-checkout/tools/standards_identity/standards_identity/encoding.py\", line 191, in \n return b\"[\" + b\",\".join(_encode(item) for item in value.values) + b\"]\"\n", " File \"/mnt/data/engine-performance/benchmark-checkout/tools/standards_identity/standards_identity/encoding.py\", line 187, in _encode\n return _encode_integer(value)\n", " File \"/mnt/data/engine-performance/benchmark-checkout/tools/standards_identity/standards_identity/encoding.py\", line 211, in _encode_integer\n suffix = b\"\".join(\n", " File \"/mnt/data/engine-performance/benchmark-checkout/tools/standards_identity/standards_identity/encoding.py\", line 211, in \n suffix = b\"\".join(\n"]} +{"event": "observation", "test": "test_agent_workflow.AgentWorkflowTest.test_normative_proposal_stops_at_real_pending_work", "elapsed_s": 72.15908542600005, "stack": [" File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 58, in \n result=unittest.TextTestRunner(verbosity=1,resultclass=Result).run(suite)\n", " File \"/usr/lib/python3.13/unittest/runner.py\", line 240, in run\n test(result)\n", " File \"/usr/lib/python3.13/unittest/suite.py\", line 84, in __call__\n return self.run(*args, **kwds)\n", " File \"/usr/lib/python3.13/unittest/suite.py\", line 122, in run\n test(result)\n", " File \"/usr/lib/python3.13/unittest/case.py\", line 707, in __call__\n return self.run(*args, **kwds)\n", " File \"/usr/lib/python3.13/unittest/case.py\", line 651, in run\n self._callTestMethod(testMethod)\n", " File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 36, in timed\n try:return _fn(self,*args,**kwargs)\n", " File \"/usr/lib/python3.13/unittest/case.py\", line 606, in _callTestMethod\n if method() is not None:\n", " File \"/mnt/data/engine-performance/benchmark-checkout/tools/standards_engine/tests/test_agent_workflow.py\", line 328, in test_normative_proposal_stops_at_real_pending_work\n resolved = self.facade.resolve_workflow(\n", " File \"/mnt/data/engine-performance/benchmark-checkout/tools/standards_engine/standards_engine/tools.py\", line 298, in resolve_workflow\n return self._result(\"resolve_workflow\", self._engine.resolve_workflow(call))\n", " File \"/mnt/data/engine-performance/benchmark-checkout/tools/standards_engine/standards_engine/context_projection.py\", line 60, in invoke\n return function(engine, call)\n", " File \"/mnt/data/engine-performance/benchmark-checkout/tools/standards_engine/standards_engine/engine.py\", line 940, in resolve_workflow\n return advance(self, \"resolve_workflow\", call)\n", " File \"/mnt/data/engine-performance/benchmark-checkout/tools/standards_engine/standards_engine/agent_workflow.py\", line 228, in advance\n result = engine.resolve(\n", " File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 25, in observe\n try:return original(*args,**kwargs)\n", " File \"/mnt/data/engine-performance/benchmark-checkout/tools/standards_engine/standards_engine/context_projection.py\", line 60, in invoke\n return function(engine, call)\n", " File \"/mnt/data/engine-performance/benchmark-checkout/tools/standards_engine/standards_engine/engine.py\", line 1620, in resolve\n successor = self._apply_submission(self._evaluate(state), call)\n", " File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 25, in observe\n try:return original(*args,**kwargs)\n", " File \"/mnt/data/engine-performance/benchmark-checkout/tools/standards_engine/standards_engine/engine.py\", line 1779, in _evaluate\n return self._evaluate_compiled(state, accepted, proposed, revision)\n", " File \"/mnt/data/engine-performance/benchmark-checkout/tools/standards_engine/standards_engine/engine.py\", line 1798, in _evaluate_compiled\n self._validate_projected_inputs(state, revision, accepted, proposed)\n", " File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 25, in observe\n try:return original(*args,**kwargs)\n", " File \"/mnt/data/engine-performance/benchmark-checkout/tools/standards_engine/standards_engine/engine.py\", line 1829, in _validate_projected_inputs\n projection = self._proposal_projection(revision)\n", " File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 25, in observe\n try:return original(*args,**kwargs)\n", " File \"/mnt/data/engine-performance/benchmark-checkout/tools/standards_engine/standards_engine/engine.py\", line 1683, in _proposal_projection\n capture = self._snapshots.load_content(revision.base_snapshot)\n", " File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 25, in observe\n try:return original(*args,**kwargs)\n", " File \"/mnt/data/engine-performance/benchmark-checkout/tools/standards_snapshots/standards_snapshots/module.py\", line 112, in load_content\n if self._content_id(capture) != content_id:\n", " File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 25, in observe\n try:return original(*args,**kwargs)\n", " File \"/mnt/data/engine-performance/benchmark-checkout/tools/standards_snapshots/standards_snapshots/module.py\", line 210, in _content_id\n return hash_identity(\n", " File \"/mnt/data/engine-performance/benchmark-checkout/tools/standards_identity/standards_identity/encoding.py\", line 93, in hash_identity\n encoded = encode_identity_value(value)\n", " File \"/mnt/data/engine-performance/benchmark-checkout/tools/standards_identity/standards_identity/encoding.py\", line 75, in encode_identity_value\n return _encode(value)\n", " File \"/mnt/data/engine-performance/benchmark-checkout/tools/standards_identity/standards_identity/encoding.py\", line 191, in _encode\n return b\"[\" + b\",\".join(_encode(item) for item in value.values) + b\"]\"\n", " File \"/mnt/data/engine-performance/benchmark-checkout/tools/standards_identity/standards_identity/encoding.py\", line 191, in \n return b\"[\" + b\",\".join(_encode(item) for item in value.values) + b\"]\"\n", " File \"/mnt/data/engine-performance/benchmark-checkout/tools/standards_identity/standards_identity/encoding.py\", line 197, in _encode\n return b\"{\" + b\",\".join(encoded_members) + b\"}\"\n", " File \"/mnt/data/engine-performance/benchmark-checkout/tools/standards_identity/standards_identity/encoding.py\", line 194, in \n _encode_string(key) + b\":\" + _encode(member_value)\n", " File \"/mnt/data/engine-performance/benchmark-checkout/tools/standards_identity/standards_identity/encoding.py\", line 191, in _encode\n return b\"[\" + b\",\".join(_encode(item) for item in value.values) + b\"]\"\n", " File \"/mnt/data/engine-performance/benchmark-checkout/tools/standards_identity/standards_identity/encoding.py\", line 191, in \n return b\"[\" + b\",\".join(_encode(item) for item in value.values) + b\"]\"\n", " File \"/mnt/data/engine-performance/benchmark-checkout/tools/standards_identity/standards_identity/encoding.py\", line 187, in _encode\n return _encode_integer(value)\n", " File \"/mnt/data/engine-performance/benchmark-checkout/tools/standards_identity/standards_identity/encoding.py\", line 215, in _encode_integer\n return (b\"-\" if negative else b\"\") + encoded + suffix\n"]} +{"event": "observation", "test": "test_agent_workflow.AgentWorkflowTest.test_normative_proposal_stops_at_real_pending_work", "elapsed_s": 117.24326897100002, "stack": [" File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 58, in \n result=unittest.TextTestRunner(verbosity=1,resultclass=Result).run(suite)\n", " File \"/usr/lib/python3.13/unittest/runner.py\", line 240, in run\n test(result)\n", " File \"/usr/lib/python3.13/unittest/suite.py\", line 84, in __call__\n return self.run(*args, **kwds)\n", " File \"/usr/lib/python3.13/unittest/suite.py\", line 122, in run\n test(result)\n", " File \"/usr/lib/python3.13/unittest/case.py\", line 707, in __call__\n return self.run(*args, **kwds)\n", " File \"/usr/lib/python3.13/unittest/case.py\", line 651, in run\n self._callTestMethod(testMethod)\n", " File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 36, in timed\n try:return _fn(self,*args,**kwargs)\n", " File \"/usr/lib/python3.13/unittest/case.py\", line 606, in _callTestMethod\n if method() is not None:\n", " File \"/mnt/data/engine-performance/benchmark-checkout/tools/standards_engine/tests/test_agent_workflow.py\", line 333, in test_normative_proposal_stops_at_real_pending_work\n changed = self.facade.resolve_workflow(\n", " File \"/mnt/data/engine-performance/benchmark-checkout/tools/standards_engine/standards_engine/tools.py\", line 298, in resolve_workflow\n return self._result(\"resolve_workflow\", self._engine.resolve_workflow(call))\n", " File \"/mnt/data/engine-performance/benchmark-checkout/tools/standards_engine/standards_engine/context_projection.py\", line 60, in invoke\n return function(engine, call)\n", " File \"/mnt/data/engine-performance/benchmark-checkout/tools/standards_engine/standards_engine/engine.py\", line 940, in resolve_workflow\n return advance(self, \"resolve_workflow\", call)\n", " File \"/mnt/data/engine-performance/benchmark-checkout/tools/standards_engine/standards_engine/agent_workflow.py\", line 228, in advance\n result = engine.resolve(\n", " File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 25, in observe\n try:return original(*args,**kwargs)\n", " File \"/mnt/data/engine-performance/benchmark-checkout/tools/standards_engine/standards_engine/context_projection.py\", line 60, in invoke\n return function(engine, call)\n", " File \"/mnt/data/engine-performance/benchmark-checkout/tools/standards_engine/standards_engine/engine.py\", line 1621, in resolve\n return self._evaluate_publish_project(successor)\n", " File \"/mnt/data/engine-performance/benchmark-checkout/tools/standards_engine/standards_engine/engine.py\", line 1935, in _evaluate_publish_project\n evaluation = self._evaluate(state) if evaluation is None else evaluation\n", " File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 25, in observe\n try:return original(*args,**kwargs)\n", " File \"/mnt/data/engine-performance/benchmark-checkout/tools/standards_engine/standards_engine/engine.py\", line 1779, in _evaluate\n return self._evaluate_compiled(state, accepted, proposed, revision)\n", " File \"/mnt/data/engine-performance/benchmark-checkout/tools/standards_engine/standards_engine/engine.py\", line 1798, in _evaluate_compiled\n self._validate_projected_inputs(state, revision, accepted, proposed)\n", " File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 25, in observe\n try:return original(*args,**kwargs)\n", " File \"/mnt/data/engine-performance/benchmark-checkout/tools/standards_engine/standards_engine/engine.py\", line 1829, in _validate_projected_inputs\n projection = self._proposal_projection(revision)\n", " File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 25, in observe\n try:return original(*args,**kwargs)\n", " File \"/mnt/data/engine-performance/benchmark-checkout/tools/standards_engine/standards_engine/engine.py\", line 1683, in _proposal_projection\n capture = self._snapshots.load_content(revision.base_snapshot)\n", " File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 25, in observe\n try:return original(*args,**kwargs)\n", " File \"/mnt/data/engine-performance/benchmark-checkout/tools/standards_snapshots/standards_snapshots/module.py\", line 112, in load_content\n if self._content_id(capture) != content_id:\n", " File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 25, in observe\n try:return original(*args,**kwargs)\n", " File \"/mnt/data/engine-performance/benchmark-checkout/tools/standards_snapshots/standards_snapshots/module.py\", line 210, in _content_id\n return hash_identity(\n", " File \"/mnt/data/engine-performance/benchmark-checkout/tools/standards_identity/standards_identity/encoding.py\", line 93, in hash_identity\n encoded = encode_identity_value(value)\n", " File \"/mnt/data/engine-performance/benchmark-checkout/tools/standards_identity/standards_identity/encoding.py\", line 75, in encode_identity_value\n return _encode(value)\n", " File \"/mnt/data/engine-performance/benchmark-checkout/tools/standards_identity/standards_identity/encoding.py\", line 191, in _encode\n return b\"[\" + b\",\".join(_encode(item) for item in value.values) + b\"]\"\n", " File \"/mnt/data/engine-performance/benchmark-checkout/tools/standards_identity/standards_identity/encoding.py\", line 191, in \n return b\"[\" + b\",\".join(_encode(item) for item in value.values) + b\"]\"\n", " File \"/mnt/data/engine-performance/benchmark-checkout/tools/standards_identity/standards_identity/encoding.py\", line 197, in _encode\n return b\"{\" + b\",\".join(encoded_members) + b\"}\"\n", " File \"/mnt/data/engine-performance/benchmark-checkout/tools/standards_identity/standards_identity/encoding.py\", line 194, in \n _encode_string(key) + b\":\" + _encode(member_value)\n", " File \"/mnt/data/engine-performance/benchmark-checkout/tools/standards_identity/standards_identity/encoding.py\", line 191, in _encode\n return b\"[\" + b\",\".join(_encode(item) for item in value.values) + b\"]\"\n", " File \"/mnt/data/engine-performance/benchmark-checkout/tools/standards_identity/standards_identity/encoding.py\", line 191, in \n return b\"[\" + b\",\".join(_encode(item) for item in value.values) + b\"]\"\n", " File \"/mnt/data/engine-performance/benchmark-checkout/tools/standards_identity/standards_identity/encoding.py\", line 187, in _encode\n return _encode_integer(value)\n", " File \"/mnt/data/engine-performance/benchmark-checkout/tools/standards_identity/standards_identity/encoding.py\", line 215, in _encode_integer\n return (b\"-\" if negative else b\"\") + encoded + suffix\n"]} +{"event": "end", "test": "test_agent_workflow.AgentWorkflowTest.test_normative_proposal_stops_at_real_pending_work", "wall_s": 119.85453770599997, "cpu_s": 116.38708710799999, "status": "pass", "spans": {"SnapshotModule._content_id": {"calls": 32, "inclusive_s": 86.12665090599961}, "SnapshotModule.load_content": {"calls": 32, "inclusive_s": 86.52746553700024}, "StandardsEngine._compile": {"calls": 52, "inclusive_s": 18.528486693000218}, "StandardsEngine._proposal_projection": {"calls": 21, "inclusive_s": 84.51311811399984}, "AuthoringModule.read_revision": {"calls": 24, "inclusive_s": 0.870184725999934}, "StandardsEngine._compiled_snapshot": {"calls": 10, "inclusive_s": 30.64803233700013}, "StandardsEngine._validate_projected_inputs": {"calls": 10, "inclusive_s": 39.88725049199991}, "StandardsEngine.analyze_proposal": {"calls": 1, "inclusive_s": 11.149374213999977}, "StandardsEngine.propose": {"calls": 1, "inclusive_s": 18.229894804000025}, "StandardsEngine._evaluate": {"calls": 9, "inclusive_s": 100.68586447200005}, "StandardsEngine.resolve": {"calls": 3, "inclusive_s": 55.64746698700014}}, "setup_s": 1.962999988336378e-06, "body_s": 119.85423706600005, "teardown_s": 2.2429999262385536e-06} +{"event": "summary", "total_s": 137.86281190300002, "run": 1, "errors": 0, "failures": 0, "skips": 0} diff --git a/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/slow-case-isolated.stderr b/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/slow-case-isolated.stderr new file mode 100644 index 00000000..242af7b9 --- /dev/null +++ b/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/slow-case-isolated.stderr @@ -0,0 +1,5 @@ +. +---------------------------------------------------------------------- +Ran 1 test in 136.463s + +OK diff --git a/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/slow-case-isolated.stdout b/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/slow-case-isolated.stdout new file mode 100644 index 00000000..ede09650 --- /dev/null +++ b/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/slow-case-isolated.stdout @@ -0,0 +1,2 @@ +START test_agent_workflow.AgentWorkflowTest.test_normative_proposal_stops_at_real_pending_work +END test_agent_workflow.AgentWorkflowTest.test_normative_proposal_stops_at_real_pending_work 119.855 pass diff --git a/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/source-integrity.json b/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/source-integrity.json new file mode 100644 index 00000000..a0961ebb --- /dev/null +++ b/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/source-integrity.json @@ -0,0 +1,56 @@ +{ + "checkouts": [ + { + "checkout": "Coding-Standards", + "head": "8750761133b66297a2bfac4e495fd1c8a893b96a", + "branch": "implementation/purpose-separated-standards-engine", + "accepted_main": "366c1d90a24bbfb50973f62b155a5f3396c0f107", + "tracked_diff": "", + "status_porcelain": "" + }, + { + "checkout": "benchmark-checkout", + "head": "8750761133b66297a2bfac4e495fd1c8a893b96a", + "branch": "implementation/purpose-separated-standards-engine", + "accepted_main": "8750761133b66297a2bfac4e495fd1c8a893b96a", + "tracked_diff": "", + "status_porcelain": "" + }, + { + "checkout": "qualified-main-checkout", + "head": "8750761133b66297a2bfac4e495fd1c8a893b96a", + "branch": "main", + "accepted_main": "8750761133b66297a2bfac4e495fd1c8a893b96a", + "tracked_diff": "", + "status_porcelain": "" + } + ], + "selected_source_sha256": { + "tools/standards_engine/standards_engine/engine.py": "1c163e2cd93a4354d5ad229ad727b3028d6e00c050a4554c640601e8b1742fbf", + "tools/standards_engine/standards_engine/mcp.py": "abe942b581905efd080fc8dff845dc92e1f6c27a0e6b5dfc747b02d6544a4881", + "tools/standards_engine/standards_engine/tools.py": "dc4e3add4b93dfb2de4c32aca3c838793cdb18eb49d0a953082cae1dcae57c0c", + "tools/standards_engine/standards_engine/context_projection.py": "cda2c10e0de915eb09440847e45c22dada2d5092091c55b3a8700a6bfd79d8de", + "tools/standards_identity/standards_identity/encoding.py": "577a30f295d8010df286cacd940fa5a1bae410272d9ed353d9d3298184d4628f", + "tools/standards_snapshots/standards_snapshots/module.py": "08dbecc15bf61d139044f50646d22ff8193d889aef75b1c08ae4b88eced438f5", + "tools/standards_snapshots/standards_snapshots/store.py": "75ce60863cd2e77f47bf471ba5c36963ad8427159a05396e748b748a2b8b1383", + "tools/repository_git/repository_git/repository.py": "ebdc15ffb94a54a4a5d6f56a49fd4d219644ef20f66114e54cb187580347e194", + "tools/standards_engine/PURPOSE-SEPARATION.md": "efb6c18daee56f1615f8ade7938590356b4418ab38638ef4cb759eafc28742ec", + "tools/standards_engine/tests/platform_harness.py": "6c19218784bdf37c9cb3edd0bc417a8fd42cdb1348cfc76ebf12a1532878a9bb", + "CORE-STANDARDS.md": "f6b4320dc96ec702dc3673390b45734767c53704229c8f8ef96dff48b8655900", + "STANDARDS-ROUTER.md": "bf74f561c40aaa16387d8559ae2353a686216eaea25c15342d7a534441cd5aeb", + "topics/performance.md": "ff1ce8f1e7592c14bbb8f84fd2d6fef2434e861c29ddf517fe5f9ba9d983ae40", + "workflows/verification.md": "06ddcd7f0f80c4459f117d242a3f664cdb6e11d7e9649e7ba2f955e5a4cf684c", + "topics/architecture.md": "d35471532ba216056a4a88474fac15f2aada1de866ada136efb31ce26dc06036", + "topics/architecture/replay.md": "678edd13bdaf6db9604c8dd4e98cc68e358d6e39eba8089d4f0ab69b52a085c5", + "topics/concurrency.md": "5b82d0d8ff127750d3c1501ba5fe1e6afb5cb3a3eb55fcfc25040b811d4cf313", + "topics/contracts.md": "3190700189e589d7baec3551ff6330ca7afd64d8f425566cb621db9dd1399532", + "profiles/boundaries/persistence.md": "9ec9473c865a4293433d0f22d0b82b6089fce9a72b47c7f735612a20faf1734b", + "topics/security.md": "6623902d266d7b831ebca661721daea4e238a5bf5b3ab5a49ec9746e3a957f05", + "workflows/development-proportionality.md": "2ed335f76610f0f6d896ba0021c2e3d3ba322df4cfffabb6c8108f99b08b698d" + }, + "local_user_path_available": false, + "production_source_changes": false, + "normative_changes": false, + "candidate_optimization_implemented": false, + "measurement_wrappers_outside_repository": true +} \ No newline at end of file diff --git a/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/test_agent_workflow.exit.json b/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/test_agent_workflow.exit.json new file mode 100644 index 00000000..59dd1893 --- /dev/null +++ b/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/test_agent_workflow.exit.json @@ -0,0 +1 @@ +{"returncode": 0, "elapsed_s": 249.3859453201294, "args": ["--pattern", "test_agent_workflow.py", "--exclude", "/mnt/data/engine-performance/evidence/completed-for-parallel.json"]} \ No newline at end of file diff --git a/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/test_agent_workflow.jsonl b/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/test_agent_workflow.jsonl new file mode 100644 index 00000000..fe1c851f --- /dev/null +++ b/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/test_agent_workflow.jsonl @@ -0,0 +1,12 @@ +{"event": "start", "test": "test_agent_workflow.AgentWorkflowTest.test_reference_proposal_composes_analysis_without_review_or_application", "at": 1790192601.7912552} +{"event": "observation", "test": "test_agent_workflow.AgentWorkflowTest.test_reference_proposal_composes_analysis_without_review_or_application", "elapsed_s": 23.016943960000162, "stack": [" File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 58, in \n result=unittest.TextTestRunner(verbosity=1,resultclass=Result).run(suite)\n", " File \"/usr/lib/python3.13/unittest/runner.py\", line 240, in run\n test(result)\n", " File \"/usr/lib/python3.13/unittest/suite.py\", line 84, in __call__\n return self.run(*args, **kwds)\n", " File \"/usr/lib/python3.13/unittest/suite.py\", line 122, in run\n test(result)\n", " File \"/usr/lib/python3.13/unittest/case.py\", line 707, in __call__\n return self.run(*args, **kwds)\n", " File \"/usr/lib/python3.13/unittest/case.py\", line 651, in run\n self._callTestMethod(testMethod)\n", " File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 36, in timed\n try:return _fn(self,*args,**kwargs)\n", " File \"/usr/lib/python3.13/unittest/case.py\", line 606, in _callTestMethod\n if method() is not None:\n", " File \"/mnt/data/engine-performance/module-checkouts/test_agent_workflow/tools/standards_engine/tests/test_agent_workflow.py\", line 151, in test_reference_proposal_composes_analysis_without_review_or_application\n status = self.facade.workflow_status({\"context\": result[\"context\"]})\n", " File \"/mnt/data/engine-performance/module-checkouts/test_agent_workflow/tools/standards_engine/standards_engine/tools.py\", line 322, in workflow_status\n return self._result(\"workflow_status\", self._engine.workflow_status(call))\n", " File \"/mnt/data/engine-performance/module-checkouts/test_agent_workflow/tools/standards_engine/standards_engine/context_projection.py\", line 60, in invoke\n return function(engine, call)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_agent_workflow/tools/standards_engine/standards_engine/engine.py\", line 964, in workflow_status\n return advance(self, \"workflow_status\", call)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_agent_workflow/tools/standards_engine/standards_engine/agent_workflow.py\", line 192, in advance\n return view(engine, bound)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_agent_workflow/tools/standards_engine/standards_engine/agent_workflow.py\", line 123, in view\n outcome = engine._analysis_result(engine._evaluate(bound.analysis))\n", " File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 25, in observe\n try:return original(*args,**kwargs)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_agent_workflow/tools/standards_engine/standards_engine/engine.py\", line 1763, in _evaluate\n accepted = self._compiled_snapshot(state.base_snapshot)\n", " File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 25, in observe\n try:return original(*args,**kwargs)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_agent_workflow/tools/standards_engine/standards_engine/engine.py\", line 1672, in _compiled_snapshot\n capture = self._snapshots.load_content(snapshot)\n", " File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 25, in observe\n try:return original(*args,**kwargs)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_agent_workflow/tools/standards_snapshots/standards_snapshots/module.py\", line 112, in load_content\n if self._content_id(capture) != content_id:\n", " File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 25, in observe\n try:return original(*args,**kwargs)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_agent_workflow/tools/standards_snapshots/standards_snapshots/module.py\", line 210, in _content_id\n return hash_identity(\n", " File \"/mnt/data/engine-performance/module-checkouts/test_agent_workflow/tools/standards_identity/standards_identity/encoding.py\", line 93, in hash_identity\n encoded = encode_identity_value(value)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_agent_workflow/tools/standards_identity/standards_identity/encoding.py\", line 75, in encode_identity_value\n return _encode(value)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_agent_workflow/tools/standards_identity/standards_identity/encoding.py\", line 191, in _encode\n return b\"[\" + b\",\".join(_encode(item) for item in value.values) + b\"]\"\n", " File \"/mnt/data/engine-performance/module-checkouts/test_agent_workflow/tools/standards_identity/standards_identity/encoding.py\", line 191, in \n return b\"[\" + b\",\".join(_encode(item) for item in value.values) + b\"]\"\n", " File \"/mnt/data/engine-performance/module-checkouts/test_agent_workflow/tools/standards_identity/standards_identity/encoding.py\", line 197, in _encode\n return b\"{\" + b\",\".join(encoded_members) + b\"}\"\n", " File \"/mnt/data/engine-performance/module-checkouts/test_agent_workflow/tools/standards_identity/standards_identity/encoding.py\", line 194, in \n _encode_string(key) + b\":\" + _encode(member_value)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_agent_workflow/tools/standards_identity/standards_identity/encoding.py\", line 191, in _encode\n return b\"[\" + b\",\".join(_encode(item) for item in value.values) + b\"]\"\n", " File \"/mnt/data/engine-performance/module-checkouts/test_agent_workflow/tools/standards_identity/standards_identity/encoding.py\", line 191, in \n return b\"[\" + b\",\".join(_encode(item) for item in value.values) + b\"]\"\n", " File \"/mnt/data/engine-performance/module-checkouts/test_agent_workflow/tools/standards_identity/standards_identity/encoding.py\", line 187, in _encode\n return _encode_integer(value)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_agent_workflow/tools/standards_identity/standards_identity/encoding.py\", line 213, in _encode_integer\n for chunk in reversed(chunks)\n"]} +{"event": "end", "test": "test_agent_workflow.AgentWorkflowTest.test_reference_proposal_composes_analysis_without_review_or_application", "wall_s": 45.97590149400003, "cpu_s": 43.901939248000005, "status": "pass", "spans": {"SnapshotModule._content_id": {"calls": 11, "inclusive_s": 33.97026146700023}, "SnapshotModule.load_content": {"calls": 11, "inclusive_s": 34.110588498000425}, "StandardsEngine._compile": {"calls": 17, "inclusive_s": 6.515670991000434}, "StandardsEngine._proposal_projection": {"calls": 7, "inclusive_s": 31.168692516999727}, "AuthoringModule.read_revision": {"calls": 9, "inclusive_s": 0.35669399299968063}, "StandardsEngine._compiled_snapshot": {"calls": 3, "inclusive_s": 10.23800174400003}, "StandardsEngine._validate_projected_inputs": {"calls": 3, "inclusive_s": 13.345575469000096}, "StandardsEngine.analyze_proposal": {"calls": 1, "inclusive_s": 12.534926584999994}, "StandardsEngine.propose": {"calls": 1, "inclusive_s": 20.987752669999963}, "StandardsEngine._evaluate": {"calls": 2, "inclusive_s": 24.645366861000184}}, "setup_s": 1.871999984359718e-06, "body_s": 45.97562611100011, "teardown_s": 2.744000084931031e-06} +{"event": "start", "test": "test_agent_workflow.AgentWorkflowTest.test_review_is_explicit_and_current_authorization_is_required", "at": 1790192647.7673314} +{"event": "observation", "test": "test_agent_workflow.AgentWorkflowTest.test_review_is_explicit_and_current_authorization_is_required", "elapsed_s": 22.0541934769999, "stack": [" File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 58, in \n result=unittest.TextTestRunner(verbosity=1,resultclass=Result).run(suite)\n", " File \"/usr/lib/python3.13/unittest/runner.py\", line 240, in run\n test(result)\n", " File \"/usr/lib/python3.13/unittest/suite.py\", line 84, in __call__\n return self.run(*args, **kwds)\n", " File \"/usr/lib/python3.13/unittest/suite.py\", line 122, in run\n test(result)\n", " File \"/usr/lib/python3.13/unittest/case.py\", line 707, in __call__\n return self.run(*args, **kwds)\n", " File \"/usr/lib/python3.13/unittest/case.py\", line 651, in run\n self._callTestMethod(testMethod)\n", " File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 36, in timed\n try:return _fn(self,*args,**kwargs)\n", " File \"/usr/lib/python3.13/unittest/case.py\", line 606, in _callTestMethod\n if method() is not None:\n", " File \"/mnt/data/engine-performance/module-checkouts/test_agent_workflow/tools/standards_engine/tests/test_agent_workflow.py\", line 202, in test_review_is_explicit_and_current_authorization_is_required\n denied = AgentToolFacade(denied_engine, _contracts(self.root)).review(\n", " File \"/mnt/data/engine-performance/module-checkouts/test_agent_workflow/tools/standards_engine/standards_engine/tools.py\", line 304, in review\n return self._result(\"review\", self._engine.review(call))\n", " File \"/mnt/data/engine-performance/module-checkouts/test_agent_workflow/tools/standards_engine/standards_engine/context_projection.py\", line 60, in invoke\n return function(engine, call)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_agent_workflow/tools/standards_engine/standards_engine/engine.py\", line 946, in review\n return advance(self, \"review\", call)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_agent_workflow/tools/standards_engine/standards_engine/agent_workflow.py\", line 193, in advance\n current = view(engine, bound)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_agent_workflow/tools/standards_engine/standards_engine/agent_workflow.py\", line 123, in view\n outcome = engine._analysis_result(engine._evaluate(bound.analysis))\n", " File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 25, in observe\n try:return original(*args,**kwargs)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_agent_workflow/tools/standards_engine/standards_engine/engine.py\", line 1763, in _evaluate\n accepted = self._compiled_snapshot(state.base_snapshot)\n", " File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 25, in observe\n try:return original(*args,**kwargs)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_agent_workflow/tools/standards_engine/standards_engine/engine.py\", line 1672, in _compiled_snapshot\n capture = self._snapshots.load_content(snapshot)\n", " File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 25, in observe\n try:return original(*args,**kwargs)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_agent_workflow/tools/standards_snapshots/standards_snapshots/module.py\", line 112, in load_content\n if self._content_id(capture) != content_id:\n", " File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 25, in observe\n try:return original(*args,**kwargs)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_agent_workflow/tools/standards_snapshots/standards_snapshots/module.py\", line 210, in _content_id\n return hash_identity(\n", " File \"/mnt/data/engine-performance/module-checkouts/test_agent_workflow/tools/standards_identity/standards_identity/encoding.py\", line 93, in hash_identity\n encoded = encode_identity_value(value)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_agent_workflow/tools/standards_identity/standards_identity/encoding.py\", line 75, in encode_identity_value\n return _encode(value)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_agent_workflow/tools/standards_identity/standards_identity/encoding.py\", line 191, in _encode\n return b\"[\" + b\",\".join(_encode(item) for item in value.values) + b\"]\"\n", " File \"/mnt/data/engine-performance/module-checkouts/test_agent_workflow/tools/standards_identity/standards_identity/encoding.py\", line 191, in \n return b\"[\" + b\",\".join(_encode(item) for item in value.values) + b\"]\"\n", " File \"/mnt/data/engine-performance/module-checkouts/test_agent_workflow/tools/standards_identity/standards_identity/encoding.py\", line 197, in _encode\n return b\"{\" + b\",\".join(encoded_members) + b\"}\"\n", " File \"/mnt/data/engine-performance/module-checkouts/test_agent_workflow/tools/standards_identity/standards_identity/encoding.py\", line 194, in \n _encode_string(key) + b\":\" + _encode(member_value)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_agent_workflow/tools/standards_identity/standards_identity/encoding.py\", line 191, in _encode\n return b\"[\" + b\",\".join(_encode(item) for item in value.values) + b\"]\"\n", " File \"/mnt/data/engine-performance/module-checkouts/test_agent_workflow/tools/standards_identity/standards_identity/encoding.py\", line 191, in \n return b\"[\" + b\",\".join(_encode(item) for item in value.values) + b\"]\"\n", " File \"/mnt/data/engine-performance/module-checkouts/test_agent_workflow/tools/standards_identity/standards_identity/encoding.py\", line 187, in _encode\n return _encode_integer(value)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_agent_workflow/tools/standards_identity/standards_identity/encoding.py\", line 215, in _encode_integer\n return (b\"-\" if negative else b\"\") + encoded + suffix\n", " File \"/mnt/data/engine-performance/module-checkouts/test_agent_workflow/tools/standards_identity/standards_identity/encoding.py\", line 213, in \n for chunk in reversed(chunks)\n"]} +{"event": "observation", "test": "test_agent_workflow.AgentWorkflowTest.test_review_is_explicit_and_current_authorization_is_required", "elapsed_s": 67.13635163599997, "stack": [" File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 58, in \n result=unittest.TextTestRunner(verbosity=1,resultclass=Result).run(suite)\n", " File \"/usr/lib/python3.13/unittest/runner.py\", line 240, in run\n test(result)\n", " File \"/usr/lib/python3.13/unittest/suite.py\", line 84, in __call__\n return self.run(*args, **kwds)\n", " File \"/usr/lib/python3.13/unittest/suite.py\", line 122, in run\n test(result)\n", " File \"/usr/lib/python3.13/unittest/case.py\", line 707, in __call__\n return self.run(*args, **kwds)\n", " File \"/usr/lib/python3.13/unittest/case.py\", line 651, in run\n self._callTestMethod(testMethod)\n", " File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 36, in timed\n try:return _fn(self,*args,**kwargs)\n", " File \"/usr/lib/python3.13/unittest/case.py\", line 606, in _callTestMethod\n if method() is not None:\n", " File \"/mnt/data/engine-performance/module-checkouts/test_agent_workflow/tools/standards_engine/tests/test_agent_workflow.py\", line 209, in test_review_is_explicit_and_current_authorization_is_required\n ready = self.facade.review(\n", " File \"/mnt/data/engine-performance/module-checkouts/test_agent_workflow/tools/standards_engine/standards_engine/tools.py\", line 304, in review\n return self._result(\"review\", self._engine.review(call))\n", " File \"/mnt/data/engine-performance/module-checkouts/test_agent_workflow/tools/standards_engine/standards_engine/context_projection.py\", line 60, in invoke\n return function(engine, call)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_agent_workflow/tools/standards_engine/standards_engine/engine.py\", line 946, in review\n return advance(self, \"review\", call)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_agent_workflow/tools/standards_engine/standards_engine/agent_workflow.py\", line 242, in advance\n result = engine.review_proposal(\n", " File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 25, in observe\n try:return original(*args,**kwargs)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_agent_workflow/tools/standards_engine/standards_engine/context_projection.py\", line 60, in invoke\n return function(engine, call)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_agent_workflow/tools/standards_engine/standards_engine/engine.py\", line 1112, in review_proposal\n evaluation = self._evaluate(state)\n", " File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 25, in observe\n try:return original(*args,**kwargs)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_agent_workflow/tools/standards_engine/standards_engine/engine.py\", line 1779, in _evaluate\n return self._evaluate_compiled(state, accepted, proposed, revision)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_agent_workflow/tools/standards_engine/standards_engine/engine.py\", line 1798, in _evaluate_compiled\n self._validate_projected_inputs(state, revision, accepted, proposed)\n", " File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 25, in observe\n try:return original(*args,**kwargs)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_agent_workflow/tools/standards_engine/standards_engine/engine.py\", line 1829, in _validate_projected_inputs\n projection = self._proposal_projection(revision)\n", " File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 25, in observe\n try:return original(*args,**kwargs)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_agent_workflow/tools/standards_engine/standards_engine/engine.py\", line 1683, in _proposal_projection\n capture = self._snapshots.load_content(revision.base_snapshot)\n", " File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 25, in observe\n try:return original(*args,**kwargs)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_agent_workflow/tools/standards_snapshots/standards_snapshots/module.py\", line 112, in load_content\n if self._content_id(capture) != content_id:\n", " File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 25, in observe\n try:return original(*args,**kwargs)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_agent_workflow/tools/standards_snapshots/standards_snapshots/module.py\", line 207, in _content_id\n material = frame_path_byte_set(\n", " File \"/mnt/data/engine-performance/module-checkouts/test_agent_workflow/tools/standards_identity/standards_identity/encoding.py\", line 143, in frame_path_byte_set\n frame_path_bytes(components, content)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_agent_workflow/tools/standards_identity/standards_identity/encoding.py\", line 128, in frame_path_bytes\n return IdentityObject(\n", " File \"/mnt/data/engine-performance/module-checkouts/test_agent_workflow/tools/standards_identity/standards_identity/encoding.py\", line 26, in __init__\n object.__setattr__(self, \"values\", immutable)\n"]} +{"event": "end", "test": "test_agent_workflow.AgentWorkflowTest.test_review_is_explicit_and_current_authorization_is_required", "wall_s": 73.57862857499981, "cpu_s": 70.58365419900001, "status": "pass", "spans": {"SnapshotModule._content_id": {"calls": 17, "inclusive_s": 51.31874723599958}, "SnapshotModule.load_content": {"calls": 17, "inclusive_s": 51.56977411300022}, "StandardsEngine._compile": {"calls": 27, "inclusive_s": 10.972948618000828}, "StandardsEngine._proposal_projection": {"calls": 11, "inclusive_s": 51.909074998000506}, "AuthoringModule.read_revision": {"calls": 24, "inclusive_s": 0.9950342750003074}, "StandardsEngine._compiled_snapshot": {"calls": 5, "inclusive_s": 16.624696266999763}, "StandardsEngine._validate_projected_inputs": {"calls": 5, "inclusive_s": 24.21302184000001}, "StandardsEngine.analyze_proposal": {"calls": 1, "inclusive_s": 12.256030770000052}, "StandardsEngine.propose": {"calls": 1, "inclusive_s": 20.112275687000192}, "tools.standards_engine.standards_engine.tools._contracts": {"calls": 1, "inclusive_s": 0.27470564999998714}, "StandardsEngine._evaluate": {"calls": 4, "inclusive_s": 51.90615694500025}, "StandardsEngine.review_proposal": {"calls": 2, "inclusive_s": 27.128164710999954}}, "setup_s": 1.6429999050160404e-06, "body_s": 73.57850147400018, "teardown_s": 1.7029999526130268e-06} +{"event": "start", "test": "test_agent_workflow.AgentWorkflowTest.test_revision_advancement_does_not_retarget_old_context", "at": 1790192721.3460848} +{"event": "observation", "test": "test_agent_workflow.AgentWorkflowTest.test_revision_advancement_does_not_retarget_old_context", "elapsed_s": 38.626777575999995, "stack": [" File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 58, in \n result=unittest.TextTestRunner(verbosity=1,resultclass=Result).run(suite)\n", " File \"/usr/lib/python3.13/unittest/runner.py\", line 240, in run\n test(result)\n", " File \"/usr/lib/python3.13/unittest/suite.py\", line 84, in __call__\n return self.run(*args, **kwds)\n", " File \"/usr/lib/python3.13/unittest/suite.py\", line 122, in run\n test(result)\n", " File \"/usr/lib/python3.13/unittest/case.py\", line 707, in __call__\n return self.run(*args, **kwds)\n", " File \"/usr/lib/python3.13/unittest/case.py\", line 651, in run\n self._callTestMethod(testMethod)\n", " File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 36, in timed\n try:return _fn(self,*args,**kwargs)\n", " File \"/usr/lib/python3.13/unittest/case.py\", line 606, in _callTestMethod\n if method() is not None:\n", " File \"/mnt/data/engine-performance/module-checkouts/test_agent_workflow/tools/standards_engine/tests/test_agent_workflow.py\", line 160, in test_revision_advancement_does_not_retarget_old_context\n changed = self.facade.revise(\n", " File \"/mnt/data/engine-performance/module-checkouts/test_agent_workflow/tools/standards_engine/standards_engine/tools.py\", line 286, in revise\n return self._result(\"revise\", self._engine.revise(call))\n", " File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 25, in observe\n try:return original(*args,**kwargs)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_agent_workflow/tools/standards_engine/standards_engine/context_projection.py\", line 60, in invoke\n return function(engine, call)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_agent_workflow/tools/standards_engine/standards_engine/engine.py\", line 928, in revise\n return advance(self, \"revise\", call)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_agent_workflow/tools/standards_engine/standards_engine/agent_workflow.py\", line 224, in advance\n return analyze_revision(engine, result.revision)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_agent_workflow/tools/standards_engine/standards_engine/agent_workflow.py\", line 152, in analyze_revision\n result = engine.analyze_proposal(c.AnalyzeProposalCall(revision))\n", " File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 25, in observe\n try:return original(*args,**kwargs)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_agent_workflow/tools/standards_engine/standards_engine/context_projection.py\", line 60, in invoke\n return function(engine, call)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_agent_workflow/tools/standards_engine/standards_engine/engine.py\", line 1065, in analyze_proposal\n accepted = self._compiled_snapshot(revision.base_snapshot)\n", " File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 25, in observe\n try:return original(*args,**kwargs)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_agent_workflow/tools/standards_engine/standards_engine/engine.py\", line 1672, in _compiled_snapshot\n capture = self._snapshots.load_content(snapshot)\n", " File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 25, in observe\n try:return original(*args,**kwargs)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_agent_workflow/tools/standards_snapshots/standards_snapshots/module.py\", line 112, in load_content\n if self._content_id(capture) != content_id:\n", " File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 25, in observe\n try:return original(*args,**kwargs)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_agent_workflow/tools/standards_snapshots/standards_snapshots/module.py\", line 210, in _content_id\n return hash_identity(\n", " File \"/mnt/data/engine-performance/module-checkouts/test_agent_workflow/tools/standards_identity/standards_identity/encoding.py\", line 93, in hash_identity\n encoded = encode_identity_value(value)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_agent_workflow/tools/standards_identity/standards_identity/encoding.py\", line 75, in encode_identity_value\n return _encode(value)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_agent_workflow/tools/standards_identity/standards_identity/encoding.py\", line 191, in _encode\n return b\"[\" + b\",\".join(_encode(item) for item in value.values) + b\"]\"\n", " File \"/mnt/data/engine-performance/module-checkouts/test_agent_workflow/tools/standards_identity/standards_identity/encoding.py\", line 191, in \n return b\"[\" + b\",\".join(_encode(item) for item in value.values) + b\"]\"\n", " File \"/mnt/data/engine-performance/module-checkouts/test_agent_workflow/tools/standards_identity/standards_identity/encoding.py\", line 197, in _encode\n return b\"{\" + b\",\".join(encoded_members) + b\"}\"\n", " File \"/mnt/data/engine-performance/module-checkouts/test_agent_workflow/tools/standards_identity/standards_identity/encoding.py\", line 194, in \n _encode_string(key) + b\":\" + _encode(member_value)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_agent_workflow/tools/standards_identity/standards_identity/encoding.py\", line 191, in _encode\n return b\"[\" + b\",\".join(_encode(item) for item in value.values) + b\"]\"\n", " File \"/mnt/data/engine-performance/module-checkouts/test_agent_workflow/tools/standards_identity/standards_identity/encoding.py\", line 191, in \n return b\"[\" + b\",\".join(_encode(item) for item in value.values) + b\"]\"\n"]} +{"event": "observation", "test": "test_agent_workflow.AgentWorkflowTest.test_revision_advancement_does_not_retarget_old_context", "elapsed_s": 83.68298164399994, "stack": [" File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 58, in \n result=unittest.TextTestRunner(verbosity=1,resultclass=Result).run(suite)\n", " File \"/usr/lib/python3.13/unittest/runner.py\", line 240, in run\n test(result)\n", " File \"/usr/lib/python3.13/unittest/suite.py\", line 84, in __call__\n return self.run(*args, **kwds)\n", " File \"/usr/lib/python3.13/unittest/suite.py\", line 122, in run\n test(result)\n", " File \"/usr/lib/python3.13/unittest/case.py\", line 707, in __call__\n return self.run(*args, **kwds)\n", " File \"/usr/lib/python3.13/unittest/case.py\", line 651, in run\n self._callTestMethod(testMethod)\n", " File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 36, in timed\n try:return _fn(self,*args,**kwargs)\n", " File \"/usr/lib/python3.13/unittest/case.py\", line 606, in _callTestMethod\n if method() is not None:\n", " File \"/mnt/data/engine-performance/module-checkouts/test_agent_workflow/tools/standards_engine/tests/test_agent_workflow.py\", line 175, in test_revision_advancement_does_not_retarget_old_context\n resumed = self.facade.resume({\"context\": original[\"context\"]})\n", " File \"/mnt/data/engine-performance/module-checkouts/test_agent_workflow/tools/standards_engine/standards_engine/tools.py\", line 328, in resume\n return self._result(\"resume\", self._engine.resume(call))\n", " File \"/mnt/data/engine-performance/module-checkouts/test_agent_workflow/tools/standards_engine/standards_engine/context_projection.py\", line 60, in invoke\n return function(engine, call)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_agent_workflow/tools/standards_engine/standards_engine/engine.py\", line 970, in resume\n return advance(self, \"resume\", call)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_agent_workflow/tools/standards_engine/standards_engine/agent_workflow.py\", line 193, in advance\n current = view(engine, bound)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_agent_workflow/tools/standards_engine/standards_engine/agent_workflow.py\", line 123, in view\n outcome = engine._analysis_result(engine._evaluate(bound.analysis))\n", " File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 25, in observe\n try:return original(*args,**kwargs)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_agent_workflow/tools/standards_engine/standards_engine/engine.py\", line 1778, in _evaluate\n proposed = self._proposal_projection(revision).compiled\n", " File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 25, in observe\n try:return original(*args,**kwargs)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_agent_workflow/tools/standards_engine/standards_engine/engine.py\", line 1683, in _proposal_projection\n capture = self._snapshots.load_content(revision.base_snapshot)\n", " File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 25, in observe\n try:return original(*args,**kwargs)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_agent_workflow/tools/standards_snapshots/standards_snapshots/module.py\", line 112, in load_content\n if self._content_id(capture) != content_id:\n", " File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 25, in observe\n try:return original(*args,**kwargs)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_agent_workflow/tools/standards_snapshots/standards_snapshots/module.py\", line 210, in _content_id\n return hash_identity(\n", " File \"/mnt/data/engine-performance/module-checkouts/test_agent_workflow/tools/standards_identity/standards_identity/encoding.py\", line 93, in hash_identity\n encoded = encode_identity_value(value)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_agent_workflow/tools/standards_identity/standards_identity/encoding.py\", line 75, in encode_identity_value\n return _encode(value)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_agent_workflow/tools/standards_identity/standards_identity/encoding.py\", line 191, in _encode\n return b\"[\" + b\",\".join(_encode(item) for item in value.values) + b\"]\"\n", " File \"/mnt/data/engine-performance/module-checkouts/test_agent_workflow/tools/standards_identity/standards_identity/encoding.py\", line 191, in \n return b\"[\" + b\",\".join(_encode(item) for item in value.values) + b\"]\"\n", " File \"/mnt/data/engine-performance/module-checkouts/test_agent_workflow/tools/standards_identity/standards_identity/encoding.py\", line 197, in _encode\n return b\"{\" + b\",\".join(encoded_members) + b\"}\"\n", " File \"/mnt/data/engine-performance/module-checkouts/test_agent_workflow/tools/standards_identity/standards_identity/encoding.py\", line 194, in \n _encode_string(key) + b\":\" + _encode(member_value)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_agent_workflow/tools/standards_identity/standards_identity/encoding.py\", line 191, in _encode\n return b\"[\" + b\",\".join(_encode(item) for item in value.values) + b\"]\"\n", " File \"/mnt/data/engine-performance/module-checkouts/test_agent_workflow/tools/standards_identity/standards_identity/encoding.py\", line 191, in \n return b\"[\" + b\",\".join(_encode(item) for item in value.values) + b\"]\"\n", " File \"/mnt/data/engine-performance/module-checkouts/test_agent_workflow/tools/standards_identity/standards_identity/encoding.py\", line 187, in _encode\n return _encode_integer(value)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_agent_workflow/tools/standards_identity/standards_identity/encoding.py\", line 211, in _encode_integer\n suffix = b\"\".join(\n"]} +{"event": "end", "test": "test_agent_workflow.AgentWorkflowTest.test_revision_advancement_does_not_retarget_old_context", "wall_s": 106.61506452999993, "cpu_s": 100.177395083, "status": "pass", "spans": {"SnapshotModule._content_id": {"calls": 24, "inclusive_s": 72.5159207620004}, "SnapshotModule.load_content": {"calls": 24, "inclusive_s": 72.82949130399948}, "StandardsEngine._compile": {"calls": 39, "inclusive_s": 15.38517748999925}, "StandardsEngine._proposal_projection": {"calls": 16, "inclusive_s": 76.97884257400051}, "AuthoringModule.read_revision": {"calls": 27, "inclusive_s": 1.072347878000528}, "StandardsEngine._compiled_snapshot": {"calls": 7, "inclusive_s": 24.077731533000133}, "StandardsEngine._validate_projected_inputs": {"calls": 7, "inclusive_s": 32.81102572999998}, "StandardsEngine.analyze_proposal": {"calls": 3, "inclusive_s": 41.04210424300004}, "StandardsEngine.propose": {"calls": 1, "inclusive_s": 20.461109785999952}, "StandardsEngine._evaluate": {"calls": 4, "inclusive_s": 51.286958683000194}, "StandardsEngine.revise": {"calls": 1, "inclusive_s": 31.824692812999956}}, "setup_s": 9.009997938846936e-07, "body_s": 106.61478518099989, "teardown_s": 1.9130000055156415e-06} +{"event": "summary", "total_s": 248.17921604800017, "run": 3, "errors": 0, "failures": 0, "skips": 0} diff --git a/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/test_agent_workflow.stderr b/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/test_agent_workflow.stderr new file mode 100644 index 00000000..ab5e906e --- /dev/null +++ b/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/test_agent_workflow.stderr @@ -0,0 +1,5 @@ +... +---------------------------------------------------------------------- +Ran 3 tests in 246.727s + +OK diff --git a/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/test_agent_workflow.stdout b/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/test_agent_workflow.stdout new file mode 100644 index 00000000..ece8145f --- /dev/null +++ b/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/test_agent_workflow.stdout @@ -0,0 +1,6 @@ +START test_agent_workflow.AgentWorkflowTest.test_reference_proposal_composes_analysis_without_review_or_application +END test_agent_workflow.AgentWorkflowTest.test_reference_proposal_composes_analysis_without_review_or_application 45.976 pass +START test_agent_workflow.AgentWorkflowTest.test_review_is_explicit_and_current_authorization_is_required +END test_agent_workflow.AgentWorkflowTest.test_review_is_explicit_and_current_authorization_is_required 73.579 pass +START test_agent_workflow.AgentWorkflowTest.test_revision_advancement_does_not_retarget_old_context +END test_agent_workflow.AgentWorkflowTest.test_revision_advancement_does_not_retarget_old_context 106.615 pass diff --git a/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/test_analysis.exit.json b/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/test_analysis.exit.json new file mode 100644 index 00000000..473af9df --- /dev/null +++ b/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/test_analysis.exit.json @@ -0,0 +1 @@ +{"returncode": 1, "elapsed_s": 527.8418171405792, "args": ["--pattern", "test_analysis.py", "--exclude", "/mnt/data/engine-performance/evidence/completed-for-parallel.json"]} \ No newline at end of file diff --git a/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/test_analysis.jsonl b/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/test_analysis.jsonl new file mode 100644 index 00000000..6968ad49 --- /dev/null +++ b/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/test_analysis.jsonl @@ -0,0 +1,40 @@ +{"event": "start", "test": "test_analysis.AnalysisWorkflowTest.test_apply_create_and_retire_owns_topology_and_commit", "at": 1790192073.968663} +{"event": "end", "test": "test_analysis.AnalysisWorkflowTest.test_apply_create_and_retire_owns_topology_and_commit", "wall_s": 0.9364845249999689, "cpu_s": 0.43081531600000034, "status": "error", "spans": {"tools.standards_engine.standards_engine.tools._contracts": {"calls": 1, "inclusive_s": 0.27508107299991025}}, "setup_s": 1.662000045143941e-06, "body_s": 0.9345013919999019, "teardown_s": 3.1050000188770355e-06} +{"event": "start", "test": "test_analysis.AnalysisWorkflowTest.test_apply_proposal_composes_real_verification_and_cold_readback", "at": 1790192074.9052672} +{"event": "end", "test": "test_analysis.AnalysisWorkflowTest.test_apply_proposal_composes_real_verification_and_cold_readback", "wall_s": 0.8477959949999558, "cpu_s": 0.5127326119999989, "status": "error", "spans": {"tools.standards_engine.standards_engine.tools._contracts": {"calls": 1, "inclusive_s": 0.3506675840000071}}, "setup_s": 1.5120000398383127e-06, "body_s": 0.8468919189999724, "teardown_s": 2.2629999421042157e-06} +{"event": "start", "test": "test_analysis.AnalysisWorkflowTest.test_cold_load_rejects_obsolete_domain_contracts", "at": 1790192075.753147} +{"event": "end", "test": "test_analysis.AnalysisWorkflowTest.test_cold_load_rejects_obsolete_domain_contracts", "wall_s": 0.0034634709999181723, "cpu_s": 0.003464570000000222, "status": "pass", "spans": {}, "setup_s": 1.212000029227056e-06, "body_s": 0.003399494999939634, "teardown_s": 1.2220000371598871e-06} +{"event": "start", "test": "test_analysis.AnalysisWorkflowTest.test_coverage_exclusions_require_exact_evidence_before_resolution", "at": 1790192075.756674} +{"event": "observation", "test": "test_analysis.AnalysisWorkflowTest.test_coverage_exclusions_require_exact_evidence_before_resolution", "elapsed_s": 21.13444000200002, "stack": [" File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 58, in \n result=unittest.TextTestRunner(verbosity=1,resultclass=Result).run(suite)\n", " File \"/usr/lib/python3.13/unittest/runner.py\", line 240, in run\n test(result)\n", " File \"/usr/lib/python3.13/unittest/suite.py\", line 84, in __call__\n return self.run(*args, **kwds)\n", " File \"/usr/lib/python3.13/unittest/suite.py\", line 122, in run\n test(result)\n", " File \"/usr/lib/python3.13/unittest/case.py\", line 707, in __call__\n return self.run(*args, **kwds)\n", " File \"/usr/lib/python3.13/unittest/case.py\", line 651, in run\n self._callTestMethod(testMethod)\n", " File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 36, in timed\n try:return _fn(self,*args,**kwargs)\n", " File \"/usr/lib/python3.13/unittest/case.py\", line 606, in _callTestMethod\n if method() is not None:\n", " File \"/mnt/data/engine-performance/module-checkouts/test_analysis/tools/standards_engine/tests/test_analysis.py\", line 273, in test_coverage_exclusions_require_exact_evidence_before_resolution\n resolved = self.engine.resolve(ResolveCall.from_value(submission))\n", " File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 25, in observe\n try:return original(*args,**kwargs)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_analysis/tools/standards_engine/standards_engine/context_projection.py\", line 60, in invoke\n return function(engine, call)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_analysis/tools/standards_engine/standards_engine/engine.py\", line 1621, in resolve\n return self._evaluate_publish_project(successor)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_analysis/tools/standards_engine/standards_engine/engine.py\", line 1935, in _evaluate_publish_project\n evaluation = self._evaluate(state) if evaluation is None else evaluation\n", " File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 25, in observe\n try:return original(*args,**kwargs)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_analysis/tools/standards_engine/standards_engine/engine.py\", line 1763, in _evaluate\n accepted = self._compiled_snapshot(state.base_snapshot)\n", " File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 25, in observe\n try:return original(*args,**kwargs)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_analysis/tools/standards_engine/standards_engine/engine.py\", line 1672, in _compiled_snapshot\n capture = self._snapshots.load_content(snapshot)\n", " File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 25, in observe\n try:return original(*args,**kwargs)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_analysis/tools/standards_snapshots/standards_snapshots/module.py\", line 112, in load_content\n if self._content_id(capture) != content_id:\n", " File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 25, in observe\n try:return original(*args,**kwargs)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_analysis/tools/standards_snapshots/standards_snapshots/module.py\", line 210, in _content_id\n return hash_identity(\n", " File \"/mnt/data/engine-performance/module-checkouts/test_analysis/tools/standards_identity/standards_identity/encoding.py\", line 93, in hash_identity\n encoded = encode_identity_value(value)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_analysis/tools/standards_identity/standards_identity/encoding.py\", line 75, in encode_identity_value\n return _encode(value)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_analysis/tools/standards_identity/standards_identity/encoding.py\", line 191, in _encode\n return b\"[\" + b\",\".join(_encode(item) for item in value.values) + b\"]\"\n", " File \"/mnt/data/engine-performance/module-checkouts/test_analysis/tools/standards_identity/standards_identity/encoding.py\", line 191, in \n return b\"[\" + b\",\".join(_encode(item) for item in value.values) + b\"]\"\n", " File \"/mnt/data/engine-performance/module-checkouts/test_analysis/tools/standards_identity/standards_identity/encoding.py\", line 197, in _encode\n return b\"{\" + b\",\".join(encoded_members) + b\"}\"\n", " File \"/mnt/data/engine-performance/module-checkouts/test_analysis/tools/standards_identity/standards_identity/encoding.py\", line 194, in \n _encode_string(key) + b\":\" + _encode(member_value)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_analysis/tools/standards_identity/standards_identity/encoding.py\", line 191, in _encode\n return b\"[\" + b\",\".join(_encode(item) for item in value.values) + b\"]\"\n", " File \"/mnt/data/engine-performance/module-checkouts/test_analysis/tools/standards_identity/standards_identity/encoding.py\", line 191, in \n return b\"[\" + b\",\".join(_encode(item) for item in value.values) + b\"]\"\n", " File \"/mnt/data/engine-performance/module-checkouts/test_analysis/tools/standards_identity/standards_identity/encoding.py\", line 187, in _encode\n return _encode_integer(value)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_analysis/tools/standards_identity/standards_identity/encoding.py\", line 213, in _encode_integer\n for chunk in reversed(chunks)\n"]} +{"event": "end", "test": "test_analysis.AnalysisWorkflowTest.test_coverage_exclusions_require_exact_evidence_before_resolution", "wall_s": 26.66859798200005, "cpu_s": 26.592860243, "status": "pass", "spans": {"SnapshotModule._content_id": {"calls": 8, "inclusive_s": 23.456208726999876}, "SnapshotModule.load_content": {"calls": 8, "inclusive_s": 23.557374729000117}, "StandardsEngine._compile": {"calls": 8, "inclusive_s": 2.920664034999959}, "StandardsEngine._compiled_snapshot": {"calls": 8, "inclusive_s": 26.49969407100002}, "StandardsEngine.prepare": {"calls": 1, "inclusive_s": 6.852352669999959}, "StandardsEngine._evaluate": {"calls": 3, "inclusive_s": 19.780775237999933}, "StandardsEngine.resolve": {"calls": 2, "inclusive_s": 19.811532177999993}}, "setup_s": 7.719999075561645e-07, "body_s": 26.668490080000083, "teardown_s": 1.0109999948326731e-06} +{"event": "start", "test": "test_analysis.AnalysisWorkflowTest.test_equal_transition_is_idempotent_and_different_evidence_branches", "at": 1790192102.4253643} +{"event": "observation", "test": "test_analysis.AnalysisWorkflowTest.test_equal_transition_is_idempotent_and_different_evidence_branches", "elapsed_s": 39.61680409899998, "stack": [" File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 58, in \n result=unittest.TextTestRunner(verbosity=1,resultclass=Result).run(suite)\n", " File \"/usr/lib/python3.13/unittest/runner.py\", line 240, in run\n test(result)\n", " File \"/usr/lib/python3.13/unittest/suite.py\", line 84, in __call__\n return self.run(*args, **kwds)\n", " File \"/usr/lib/python3.13/unittest/suite.py\", line 122, in run\n test(result)\n", " File \"/usr/lib/python3.13/unittest/case.py\", line 707, in __call__\n return self.run(*args, **kwds)\n", " File \"/usr/lib/python3.13/unittest/case.py\", line 651, in run\n self._callTestMethod(testMethod)\n", " File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 36, in timed\n try:return _fn(self,*args,**kwargs)\n", " File \"/usr/lib/python3.13/unittest/case.py\", line 606, in _callTestMethod\n if method() is not None:\n", " File \"/mnt/data/engine-performance/module-checkouts/test_analysis/tools/standards_engine/tests/test_analysis.py\", line 1811, in test_equal_transition_is_idempotent_and_different_evidence_branches\n second = self.engine.resolve(\n", " File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 25, in observe\n try:return original(*args,**kwargs)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_analysis/tools/standards_engine/standards_engine/context_projection.py\", line 60, in invoke\n return function(engine, call)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_analysis/tools/standards_engine/standards_engine/engine.py\", line 1620, in resolve\n successor = self._apply_submission(self._evaluate(state), call)\n", " File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 25, in observe\n try:return original(*args,**kwargs)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_analysis/tools/standards_engine/standards_engine/engine.py\", line 1766, in _evaluate\n proposed = self._compiled_snapshot(proposed_ref.snapshot)\n", " File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 25, in observe\n try:return original(*args,**kwargs)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_analysis/tools/standards_engine/standards_engine/engine.py\", line 1672, in _compiled_snapshot\n capture = self._snapshots.load_content(snapshot)\n", " File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 25, in observe\n try:return original(*args,**kwargs)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_analysis/tools/standards_snapshots/standards_snapshots/module.py\", line 112, in load_content\n if self._content_id(capture) != content_id:\n", " File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 25, in observe\n try:return original(*args,**kwargs)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_analysis/tools/standards_snapshots/standards_snapshots/module.py\", line 210, in _content_id\n return hash_identity(\n", " File \"/mnt/data/engine-performance/module-checkouts/test_analysis/tools/standards_identity/standards_identity/encoding.py\", line 93, in hash_identity\n encoded = encode_identity_value(value)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_analysis/tools/standards_identity/standards_identity/encoding.py\", line 75, in encode_identity_value\n return _encode(value)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_analysis/tools/standards_identity/standards_identity/encoding.py\", line 191, in _encode\n return b\"[\" + b\",\".join(_encode(item) for item in value.values) + b\"]\"\n", " File \"/mnt/data/engine-performance/module-checkouts/test_analysis/tools/standards_identity/standards_identity/encoding.py\", line 191, in \n return b\"[\" + b\",\".join(_encode(item) for item in value.values) + b\"]\"\n", " File \"/mnt/data/engine-performance/module-checkouts/test_analysis/tools/standards_identity/standards_identity/encoding.py\", line 197, in _encode\n return b\"{\" + b\",\".join(encoded_members) + b\"}\"\n", " File \"/mnt/data/engine-performance/module-checkouts/test_analysis/tools/standards_identity/standards_identity/encoding.py\", line 195, in \n for key, member_value in value.members\n", " File \"/mnt/data/engine-performance/module-checkouts/test_analysis/tools/standards_identity/standards_identity/encoding.py\", line 191, in _encode\n return b\"[\" + b\",\".join(_encode(item) for item in value.values) + b\"]\"\n"]} +{"event": "end", "test": "test_analysis.AnalysisWorkflowTest.test_equal_transition_is_idempotent_and_different_evidence_branches", "wall_s": 48.434708839999985, "cpu_s": 48.375320581000004, "status": "pass", "spans": {"SnapshotModule._content_id": {"calls": 14, "inclusive_s": 42.46216013699984}, "SnapshotModule.load_content": {"calls": 14, "inclusive_s": 42.64311211200015}, "StandardsEngine._compile": {"calls": 14, "inclusive_s": 5.414200608000215}, "StandardsEngine._compiled_snapshot": {"calls": 14, "inclusive_s": 48.10116916599986}, "StandardsEngine.prepare": {"calls": 1, "inclusive_s": 6.183226340000033}, "StandardsEngine._evaluate": {"calls": 6, "inclusive_s": 42.14691884000001}, "StandardsEngine.resolve": {"calls": 3, "inclusive_s": 42.247957746}}, "setup_s": 1.212000029227056e-06, "body_s": 48.43458643500003, "teardown_s": 1.2710000873994431e-06} +{"event": "start", "test": "test_analysis.AnalysisWorkflowTest.test_policy_free_standard_creation_enters_public_analysis", "at": 1790192150.860184} +{"event": "end", "test": "test_analysis.AnalysisWorkflowTest.test_policy_free_standard_creation_enters_public_analysis", "wall_s": 20.175421899999947, "cpu_s": 19.547700186, "status": "pass", "spans": {"tools.standards_engine.standards_engine.tools._contracts": {"calls": 1, "inclusive_s": 0.27104242200005046}, "SnapshotModule._content_id": {"calls": 5, "inclusive_s": 14.811196141999972}, "SnapshotModule.load_content": {"calls": 5, "inclusive_s": 14.872044043000074}, "StandardsEngine._compile": {"calls": 7, "inclusive_s": 2.5334486219999235}, "StandardsEngine._proposal_projection": {"calls": 3, "inclusive_s": 13.48239132599997}, "AuthoringModule.read_revision": {"calls": 1, "inclusive_s": 0.03331580300005044}, "StandardsEngine._compiled_snapshot": {"calls": 1, "inclusive_s": 3.3516853660000834}, "StandardsEngine._validate_projected_inputs": {"calls": 1, "inclusive_s": 4.450838099000066}, "StandardsEngine.analyze_proposal": {"calls": 1, "inclusive_s": 12.390945547000001}}, "setup_s": 1.2419999393387116e-06, "body_s": 20.17533129399999, "teardown_s": 1.6430000187028782e-06} +{"event": "start", "test": "test_analysis.AnalysisWorkflowTest.test_prepare_persists_parent_bound_public_work", "at": 1790192171.0357153} +{"event": "end", "test": "test_analysis.AnalysisWorkflowTest.test_prepare_persists_parent_bound_public_work", "wall_s": 6.803947031999996, "cpu_s": 6.802693489999996, "status": "pass", "spans": {"SnapshotModule._content_id": {"calls": 2, "inclusive_s": 5.873476254000025}, "SnapshotModule.load_content": {"calls": 2, "inclusive_s": 5.8986362150000105}, "StandardsEngine._compile": {"calls": 2, "inclusive_s": 0.8496026449998908}, "StandardsEngine._compiled_snapshot": {"calls": 2, "inclusive_s": 6.753388430999962}, "StandardsEngine.prepare": {"calls": 1, "inclusive_s": 6.7979410689999895}}, "setup_s": 1.1309999763398082e-06, "body_s": 6.8038666620000186, "teardown_s": 1.1519999816300697e-06} +{"event": "start", "test": "test_analysis.AnalysisWorkflowTest.test_prior_analysis_reuses_the_same_valid_decision", "at": 1790192177.839756} +{"event": "observation", "test": "test_analysis.AnalysisWorkflowTest.test_prior_analysis_reuses_the_same_valid_decision", "elapsed_s": 9.260666724999965, "stack": [" File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 58, in \n result=unittest.TextTestRunner(verbosity=1,resultclass=Result).run(suite)\n", " File \"/usr/lib/python3.13/unittest/runner.py\", line 240, in run\n test(result)\n", " File \"/usr/lib/python3.13/unittest/suite.py\", line 84, in __call__\n return self.run(*args, **kwds)\n", " File \"/usr/lib/python3.13/unittest/suite.py\", line 122, in run\n test(result)\n", " File \"/usr/lib/python3.13/unittest/case.py\", line 707, in __call__\n return self.run(*args, **kwds)\n", " File \"/usr/lib/python3.13/unittest/case.py\", line 651, in run\n self._callTestMethod(testMethod)\n", " File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 36, in timed\n try:return _fn(self,*args,**kwargs)\n", " File \"/usr/lib/python3.13/unittest/case.py\", line 606, in _callTestMethod\n if method() is not None:\n", " File \"/mnt/data/engine-performance/module-checkouts/test_analysis/tools/standards_engine/tests/test_analysis.py\", line 1838, in test_prior_analysis_reuses_the_same_valid_decision\n child = self.engine.resolve(\n", " File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 25, in observe\n try:return original(*args,**kwargs)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_analysis/tools/standards_engine/standards_engine/context_projection.py\", line 60, in invoke\n return function(engine, call)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_analysis/tools/standards_engine/standards_engine/engine.py\", line 1620, in resolve\n successor = self._apply_submission(self._evaluate(state), call)\n", " File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 25, in observe\n try:return original(*args,**kwargs)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_analysis/tools/standards_engine/standards_engine/engine.py\", line 1763, in _evaluate\n accepted = self._compiled_snapshot(state.base_snapshot)\n", " File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 25, in observe\n try:return original(*args,**kwargs)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_analysis/tools/standards_engine/standards_engine/engine.py\", line 1672, in _compiled_snapshot\n capture = self._snapshots.load_content(snapshot)\n", " File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 25, in observe\n try:return original(*args,**kwargs)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_analysis/tools/standards_snapshots/standards_snapshots/module.py\", line 112, in load_content\n if self._content_id(capture) != content_id:\n", " File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 25, in observe\n try:return original(*args,**kwargs)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_analysis/tools/standards_snapshots/standards_snapshots/module.py\", line 210, in _content_id\n return hash_identity(\n", " File \"/mnt/data/engine-performance/module-checkouts/test_analysis/tools/standards_identity/standards_identity/encoding.py\", line 93, in hash_identity\n encoded = encode_identity_value(value)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_analysis/tools/standards_identity/standards_identity/encoding.py\", line 75, in encode_identity_value\n return _encode(value)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_analysis/tools/standards_identity/standards_identity/encoding.py\", line 191, in _encode\n return b\"[\" + b\",\".join(_encode(item) for item in value.values) + b\"]\"\n", " File \"/mnt/data/engine-performance/module-checkouts/test_analysis/tools/standards_identity/standards_identity/encoding.py\", line 191, in \n return b\"[\" + b\",\".join(_encode(item) for item in value.values) + b\"]\"\n", " File \"/mnt/data/engine-performance/module-checkouts/test_analysis/tools/standards_identity/standards_identity/encoding.py\", line 197, in _encode\n return b\"{\" + b\",\".join(encoded_members) + b\"}\"\n", " File \"/mnt/data/engine-performance/module-checkouts/test_analysis/tools/standards_identity/standards_identity/encoding.py\", line 194, in \n _encode_string(key) + b\":\" + _encode(member_value)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_analysis/tools/standards_identity/standards_identity/encoding.py\", line 191, in _encode\n return b\"[\" + b\",\".join(_encode(item) for item in value.values) + b\"]\"\n", " File \"/mnt/data/engine-performance/module-checkouts/test_analysis/tools/standards_identity/standards_identity/encoding.py\", line 191, in \n return b\"[\" + b\",\".join(_encode(item) for item in value.values) + b\"]\"\n", " File \"/mnt/data/engine-performance/module-checkouts/test_analysis/tools/standards_identity/standards_identity/encoding.py\", line 187, in _encode\n return _encode_integer(value)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_analysis/tools/standards_identity/standards_identity/encoding.py\", line 215, in _encode_integer\n return (b\"-\" if negative else b\"\") + encoded + suffix\n", " File \"/mnt/data/engine-performance/module-checkouts/test_analysis/tools/standards_identity/standards_identity/encoding.py\", line 213, in \n for chunk in reversed(chunks)\n"]} +{"event": "end", "test": "test_analysis.AnalysisWorkflowTest.test_prior_analysis_reuses_the_same_valid_decision", "wall_s": 32.52757305, "cpu_s": 32.436460015999984, "status": "pass", "spans": {"SnapshotModule._content_id": {"calls": 10, "inclusive_s": 28.483639260000132}, "SnapshotModule.load_content": {"calls": 10, "inclusive_s": 28.61195912700009}, "StandardsEngine._compile": {"calls": 10, "inclusive_s": 3.6635891659999515}, "StandardsEngine._compiled_snapshot": {"calls": 10, "inclusive_s": 32.30520685099975}, "StandardsEngine.prepare": {"calls": 2, "inclusive_s": 19.097226023000076}, "StandardsEngine._evaluate": {"calls": 3, "inclusive_s": 19.812580256000047}, "StandardsEngine.resolve": {"calls": 1, "inclusive_s": 13.427705994000007}}, "setup_s": 1.1119999498987454e-06, "body_s": 32.52746775200001, "teardown_s": 1.7819999129642383e-06} +{"event": "start", "test": "test_analysis.AnalysisWorkflowTest.test_proposal_analysis_derives_inputs_and_replays_exact_revision", "at": 1790192210.3674524} +{"event": "observation", "test": "test_analysis.AnalysisWorkflowTest.test_proposal_analysis_derives_inputs_and_replays_exact_revision", "elapsed_s": 21.792957170000022, "stack": [" File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 58, in \n result=unittest.TextTestRunner(verbosity=1,resultclass=Result).run(suite)\n", " File \"/usr/lib/python3.13/unittest/runner.py\", line 240, in run\n test(result)\n", " File \"/usr/lib/python3.13/unittest/suite.py\", line 84, in __call__\n return self.run(*args, **kwds)\n", " File \"/usr/lib/python3.13/unittest/suite.py\", line 122, in run\n test(result)\n", " File \"/usr/lib/python3.13/unittest/case.py\", line 707, in __call__\n return self.run(*args, **kwds)\n", " File \"/usr/lib/python3.13/unittest/case.py\", line 651, in run\n self._callTestMethod(testMethod)\n", " File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 36, in timed\n try:return _fn(self,*args,**kwargs)\n", " File \"/usr/lib/python3.13/unittest/case.py\", line 606, in _callTestMethod\n if method() is not None:\n", " File \"/mnt/data/engine-performance/module-checkouts/test_analysis/tools/standards_engine/tests/test_analysis.py\", line 917, in test_proposal_analysis_derives_inputs_and_replays_exact_revision\n revised = self.engine.revise_proposal(\n", " File \"/mnt/data/engine-performance/module-checkouts/test_analysis/tools/standards_engine/standards_engine/context_projection.py\", line 60, in invoke\n return function(engine, call)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_analysis/tools/standards_engine/standards_engine/engine.py\", line 874, in revise_proposal\n summary, revision = self._authoring.revise_proposal(\n", " File \"/mnt/data/engine-performance/module-checkouts/test_analysis/tools/standards_engine/standards_engine/authoring.py\", line 739, in revise_proposal\n self._validate_revision(revision)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_analysis/tools/standards_engine/standards_engine/engine.py\", line 1695, in _validate_logical_revision\n self._proposal_projection(revision)\n", " File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 25, in observe\n try:return original(*args,**kwargs)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_analysis/tools/standards_engine/standards_engine/engine.py\", line 1683, in _proposal_projection\n capture = self._snapshots.load_content(revision.base_snapshot)\n", " File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 25, in observe\n try:return original(*args,**kwargs)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_analysis/tools/standards_snapshots/standards_snapshots/module.py\", line 111, in load_content\n content_id, capture = self._store.load_content(snapshot)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_analysis/tools/standards_snapshots/standards_snapshots/store.py\", line 490, in load_content\n with self._transaction(write=False):\n", " File \"/mnt/data/engine-performance/module-checkouts/test_analysis/tools/standards_snapshots/standards_snapshots/model.py\", line 137, in __init__\n object.__setattr__(self, \"files\", selected)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_analysis/tools/standards_snapshots/standards_snapshots/store.py\", line 520, in \n for path, content in files\n", " File \"/mnt/data/engine-performance/module-checkouts/test_analysis/tools/standards_snapshots/standards_snapshots/model.py\", line 66, in parse\n return cls(components)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_analysis/tools/standards_snapshots/standards_snapshots/model.py\", line 21, in _scalar\n if \"\\0\" in value or any(0xD800 <= ord(character) <= 0xDFFF for character in value):\n", " File \"/mnt/data/engine-performance/module-checkouts/test_analysis/tools/standards_snapshots/standards_snapshots/model.py\", line 21, in \n if \"\\0\" in value or any(0xD800 <= ord(character) <= 0xDFFF for character in value):\n"]} +{"event": "observation", "test": "test_analysis.AnalysisWorkflowTest.test_proposal_analysis_derives_inputs_and_replays_exact_revision", "elapsed_s": 66.91357515300001, "stack": [" File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 58, in \n result=unittest.TextTestRunner(verbosity=1,resultclass=Result).run(suite)\n", " File \"/usr/lib/python3.13/unittest/runner.py\", line 240, in run\n test(result)\n", " File \"/usr/lib/python3.13/unittest/suite.py\", line 84, in __call__\n return self.run(*args, **kwds)\n", " File \"/usr/lib/python3.13/unittest/suite.py\", line 122, in run\n test(result)\n", " File \"/usr/lib/python3.13/unittest/case.py\", line 707, in __call__\n return self.run(*args, **kwds)\n", " File \"/usr/lib/python3.13/unittest/case.py\", line 651, in run\n self._callTestMethod(testMethod)\n", " File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 36, in timed\n try:return _fn(self,*args,**kwargs)\n", " File \"/usr/lib/python3.13/unittest/case.py\", line 606, in _callTestMethod\n if method() is not None:\n", " File \"/mnt/data/engine-performance/module-checkouts/test_analysis/tools/standards_engine/tests/test_analysis.py\", line 956, in test_proposal_analysis_derives_inputs_and_replays_exact_revision\n successor = self.engine.resolve(\n", " File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 25, in observe\n try:return original(*args,**kwargs)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_analysis/tools/standards_engine/standards_engine/context_projection.py\", line 60, in invoke\n return function(engine, call)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_analysis/tools/standards_engine/standards_engine/engine.py\", line 1621, in resolve\n return self._evaluate_publish_project(successor)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_analysis/tools/standards_engine/standards_engine/engine.py\", line 1935, in _evaluate_publish_project\n evaluation = self._evaluate(state) if evaluation is None else evaluation\n", " File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 25, in observe\n try:return original(*args,**kwargs)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_analysis/tools/standards_engine/standards_engine/engine.py\", line 1778, in _evaluate\n proposed = self._proposal_projection(revision).compiled\n", " File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 25, in observe\n try:return original(*args,**kwargs)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_analysis/tools/standards_engine/standards_engine/engine.py\", line 1683, in _proposal_projection\n capture = self._snapshots.load_content(revision.base_snapshot)\n", " File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 25, in observe\n try:return original(*args,**kwargs)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_analysis/tools/standards_snapshots/standards_snapshots/module.py\", line 112, in load_content\n if self._content_id(capture) != content_id:\n", " File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 25, in observe\n try:return original(*args,**kwargs)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_analysis/tools/standards_snapshots/standards_snapshots/module.py\", line 207, in _content_id\n material = frame_path_byte_set(\n", " File \"/mnt/data/engine-performance/module-checkouts/test_analysis/tools/standards_identity/standards_identity/encoding.py\", line 143, in frame_path_byte_set\n frame_path_bytes(components, content)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_analysis/tools/standards_identity/standards_identity/encoding.py\", line 131, in frame_path_bytes\n (\"bytes\", IdentityArray(content)),\n", " File \"/mnt/data/engine-performance/module-checkouts/test_analysis/tools/standards_identity/standards_identity/encoding.py\", line 25, in __init__\n _validate_value(value)\n"]} +{"event": "end", "test": "test_analysis.AnalysisWorkflowTest.test_proposal_analysis_derives_inputs_and_replays_exact_revision", "wall_s": 75.324488675, "cpu_s": 72.27664687999999, "status": "pass", "spans": {"SnapshotModule._content_id": {"calls": 19, "inclusive_s": 53.07678507199978}, "SnapshotModule.load_content": {"calls": 19, "inclusive_s": 53.32762847400022}, "StandardsEngine._compile": {"calls": 29, "inclusive_s": 10.753459752999902}, "StandardsEngine._proposal_projection": {"calls": 12, "inclusive_s": 52.8320083640001}, "tools.standards_engine.standards_engine.tools._contracts": {"calls": 1, "inclusive_s": 0.2813949449999882}, "AuthoringModule.read_revision": {"calls": 6, "inclusive_s": 0.23169997300010436}, "StandardsEngine._compiled_snapshot": {"calls": 5, "inclusive_s": 15.820940496000048}, "StandardsEngine._validate_projected_inputs": {"calls": 5, "inclusive_s": 21.492647853999983}, "StandardsEngine.analyze_proposal": {"calls": 2, "inclusive_s": 24.476863142999946}, "StandardsEngine._evaluate": {"calls": 3, "inclusive_s": 35.519099877999906}, "StandardsEngine.resolve": {"calls": 1, "inclusive_s": 23.876403325999945}}, "setup_s": 9.110000291912002e-07, "body_s": 75.32439356200007, "teardown_s": 1.1719999974957318e-06} +{"event": "start", "test": "test_analysis.AnalysisWorkflowTest.test_relationship_only_proposals_enter_a1c_and_replay_cold", "at": 1790192285.6920536} +{"event": "observation", "test": "test_analysis.AnalysisWorkflowTest.test_relationship_only_proposals_enter_a1c_and_replay_cold", "elapsed_s": 36.661482785999965, "stack": [" File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 58, in \n result=unittest.TextTestRunner(verbosity=1,resultclass=Result).run(suite)\n", " File \"/usr/lib/python3.13/unittest/runner.py\", line 240, in run\n test(result)\n", " File \"/usr/lib/python3.13/unittest/suite.py\", line 84, in __call__\n return self.run(*args, **kwds)\n", " File \"/usr/lib/python3.13/unittest/suite.py\", line 122, in run\n test(result)\n", " File \"/usr/lib/python3.13/unittest/case.py\", line 707, in __call__\n return self.run(*args, **kwds)\n", " File \"/usr/lib/python3.13/unittest/case.py\", line 651, in run\n self._callTestMethod(testMethod)\n", " File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 36, in timed\n try:return _fn(self,*args,**kwargs)\n", " File \"/usr/lib/python3.13/unittest/case.py\", line 606, in _callTestMethod\n if method() is not None:\n", " File \"/mnt/data/engine-performance/module-checkouts/test_analysis/tools/standards_engine/tests/test_analysis.py\", line 1111, in test_relationship_only_proposals_enter_a1c_and_replay_cold\n evaluation = self.engine._evaluate(\n", " File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 25, in observe\n try:return original(*args,**kwargs)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_analysis/tools/standards_engine/standards_engine/engine.py\", line 1779, in _evaluate\n return self._evaluate_compiled(state, accepted, proposed, revision)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_analysis/tools/standards_engine/standards_engine/engine.py\", line 1798, in _evaluate_compiled\n self._validate_projected_inputs(state, revision, accepted, proposed)\n", " File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 25, in observe\n try:return original(*args,**kwargs)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_analysis/tools/standards_engine/standards_engine/engine.py\", line 1829, in _validate_projected_inputs\n projection = self._proposal_projection(revision)\n", " File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 25, in observe\n try:return original(*args,**kwargs)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_analysis/tools/standards_engine/standards_engine/engine.py\", line 1683, in _proposal_projection\n capture = self._snapshots.load_content(revision.base_snapshot)\n", " File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 25, in observe\n try:return original(*args,**kwargs)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_analysis/tools/standards_snapshots/standards_snapshots/module.py\", line 112, in load_content\n if self._content_id(capture) != content_id:\n", " File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 25, in observe\n try:return original(*args,**kwargs)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_analysis/tools/standards_snapshots/standards_snapshots/module.py\", line 210, in _content_id\n return hash_identity(\n", " File \"/mnt/data/engine-performance/module-checkouts/test_analysis/tools/standards_identity/standards_identity/encoding.py\", line 93, in hash_identity\n encoded = encode_identity_value(value)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_analysis/tools/standards_identity/standards_identity/encoding.py\", line 75, in encode_identity_value\n return _encode(value)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_analysis/tools/standards_identity/standards_identity/encoding.py\", line 191, in _encode\n return b\"[\" + b\",\".join(_encode(item) for item in value.values) + b\"]\"\n", " File \"/mnt/data/engine-performance/module-checkouts/test_analysis/tools/standards_identity/standards_identity/encoding.py\", line 191, in \n return b\"[\" + b\",\".join(_encode(item) for item in value.values) + b\"]\"\n", " File \"/mnt/data/engine-performance/module-checkouts/test_analysis/tools/standards_identity/standards_identity/encoding.py\", line 197, in _encode\n return b\"{\" + b\",\".join(encoded_members) + b\"}\"\n", " File \"/mnt/data/engine-performance/module-checkouts/test_analysis/tools/standards_identity/standards_identity/encoding.py\", line 195, in \n for key, member_value in value.members\n", " File \"/mnt/data/engine-performance/module-checkouts/test_analysis/tools/standards_identity/standards_identity/encoding.py\", line 191, in _encode\n return b\"[\" + b\",\".join(_encode(item) for item in value.values) + b\"]\"\n", " File \"/mnt/data/engine-performance/module-checkouts/test_analysis/tools/standards_identity/standards_identity/encoding.py\", line 191, in \n return b\"[\" + b\",\".join(_encode(item) for item in value.values) + b\"]\"\n", " File \"/mnt/data/engine-performance/module-checkouts/test_analysis/tools/standards_identity/standards_identity/encoding.py\", line 187, in _encode\n return _encode_integer(value)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_analysis/tools/standards_identity/standards_identity/encoding.py\", line 215, in _encode_integer\n return (b\"-\" if negative else b\"\") + encoded + suffix\n"]} +{"event": "observation", "test": "test_analysis.AnalysisWorkflowTest.test_relationship_only_proposals_enter_a1c_and_replay_cold", "elapsed_s": 81.71791970499999, "stack": [" File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 58, in \n result=unittest.TextTestRunner(verbosity=1,resultclass=Result).run(suite)\n", " File \"/usr/lib/python3.13/unittest/runner.py\", line 240, in run\n test(result)\n", " File \"/usr/lib/python3.13/unittest/suite.py\", line 84, in __call__\n return self.run(*args, **kwds)\n", " File \"/usr/lib/python3.13/unittest/suite.py\", line 122, in run\n test(result)\n", " File \"/usr/lib/python3.13/unittest/case.py\", line 707, in __call__\n return self.run(*args, **kwds)\n", " File \"/usr/lib/python3.13/unittest/case.py\", line 651, in run\n self._callTestMethod(testMethod)\n", " File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 36, in timed\n try:return _fn(self,*args,**kwargs)\n", " File \"/usr/lib/python3.13/unittest/case.py\", line 606, in _callTestMethod\n if method() is not None:\n", " File \"/mnt/data/engine-performance/module-checkouts/test_analysis/tools/standards_engine/tests/test_analysis.py\", line 1097, in test_relationship_only_proposals_enter_a1c_and_replay_cold\n created = self.engine.create_proposal(\n", " File \"/mnt/data/engine-performance/module-checkouts/test_analysis/tools/standards_engine/standards_engine/context_projection.py\", line 60, in invoke\n return function(engine, call)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_analysis/tools/standards_engine/standards_engine/engine.py\", line 833, in create_proposal\n summary, revision = self._authoring.create_proposal(\n", " File \"/mnt/data/engine-performance/module-checkouts/test_analysis/tools/standards_engine/standards_engine/authoring.py\", line 678, in create_proposal\n self._validate_revision(revision)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_analysis/tools/standards_engine/standards_engine/engine.py\", line 1695, in _validate_logical_revision\n self._proposal_projection(revision)\n", " File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 25, in observe\n try:return original(*args,**kwargs)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_analysis/tools/standards_engine/standards_engine/engine.py\", line 1687, in _proposal_projection\n return self._logical_authoring.compile(\n", " File \"/mnt/data/engine-performance/module-checkouts/test_analysis/tools/standards_engine/standards_engine/logical_authoring.py\", line 983, in compile\n repository_paths = _refresh_suite_input_projection(\n", " File \"/mnt/data/engine-performance/module-checkouts/test_analysis/tools/standards_engine/standards_engine/logical_authoring.py\", line 2443, in _refresh_suite_input_projection\n git_output(root, (\"add\", \"--force\", \"--all\", \"--\"))\n", " File \"/mnt/data/engine-performance/module-checkouts/test_analysis/tools/repository_git/repository_git/repository.py\", line 91, in git_output\n result = git_command(\n", " File \"/mnt/data/engine-performance/module-checkouts/test_analysis/tools/repository_git/repository_git/repository.py\", line 75, in git_command\n return _run_bounded(\n", " File \"/mnt/data/engine-performance/module-checkouts/test_analysis/tools/repository_git/repository_git/repository.py\", line 859, in _run_bounded\n returncode = process.wait(timeout=COMMAND_TIMEOUT_SECONDS)\n", " File \"/usr/lib/python3.13/subprocess.py\", line 1280, in wait\n return self._wait(timeout=timeout)\n", " File \"/usr/lib/python3.13/subprocess.py\", line 2060, in _wait\n time.sleep(delay)\n"]} +{"event": "end", "test": "test_analysis.AnalysisWorkflowTest.test_relationship_only_proposals_enter_a1c_and_replay_cold", "wall_s": 119.039640512, "cpu_s": 114.099035275, "status": "pass", "spans": {"SnapshotModule._content_id": {"calls": 29, "inclusive_s": 83.91451419599969}, "SnapshotModule.load_content": {"calls": 29, "inclusive_s": 84.27799062400038}, "StandardsEngine._compile": {"calls": 47, "inclusive_s": 18.273312866000424}, "StandardsEngine._compiled_snapshot": {"calls": 8, "inclusive_s": 26.551895059999993}, "StandardsEngine._proposal_projection": {"calls": 17, "inclusive_s": 80.52476994599988}, "AuthoringModule.read_revision": {"calls": 7, "inclusive_s": 0.2864235549999421}, "StandardsEngine._validate_projected_inputs": {"calls": 7, "inclusive_s": 33.396522669999854}, "StandardsEngine.analyze_proposal": {"calls": 3, "inclusive_s": 38.920490361999896}, "StandardsEngine._evaluate": {"calls": 4, "inclusive_s": 51.903334007000126}}, "setup_s": 1.0410000186311663e-06, "body_s": 119.039542955, "teardown_s": 1.3420000186670222e-06} +{"event": "start", "test": "test_analysis.AnalysisWorkflowTest.test_resolved_parent_work_is_not_applicable_to_child", "at": 1790192404.7317955} +{"event": "observation", "test": "test_analysis.AnalysisWorkflowTest.test_resolved_parent_work_is_not_applicable_to_child", "elapsed_s": 7.692011065999964, "stack": [" File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 58, in \n result=unittest.TextTestRunner(verbosity=1,resultclass=Result).run(suite)\n", " File \"/usr/lib/python3.13/unittest/runner.py\", line 240, in run\n test(result)\n", " File \"/usr/lib/python3.13/unittest/suite.py\", line 84, in __call__\n return self.run(*args, **kwds)\n", " File \"/usr/lib/python3.13/unittest/suite.py\", line 122, in run\n test(result)\n", " File \"/usr/lib/python3.13/unittest/case.py\", line 707, in __call__\n return self.run(*args, **kwds)\n", " File \"/usr/lib/python3.13/unittest/case.py\", line 651, in run\n self._callTestMethod(testMethod)\n", " File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 36, in timed\n try:return _fn(self,*args,**kwargs)\n", " File \"/usr/lib/python3.13/unittest/case.py\", line 606, in _callTestMethod\n if method() is not None:\n", " File \"/mnt/data/engine-performance/module-checkouts/test_analysis/tools/standards_engine/tests/test_analysis.py\", line 1822, in test_resolved_parent_work_is_not_applicable_to_child\n child = self.engine.resolve(submission)\n", " File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 25, in observe\n try:return original(*args,**kwargs)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_analysis/tools/standards_engine/standards_engine/context_projection.py\", line 60, in invoke\n return function(engine, call)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_analysis/tools/standards_engine/standards_engine/engine.py\", line 1620, in resolve\n successor = self._apply_submission(self._evaluate(state), call)\n", " File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 25, in observe\n try:return original(*args,**kwargs)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_analysis/tools/standards_engine/standards_engine/engine.py\", line 1763, in _evaluate\n accepted = self._compiled_snapshot(state.base_snapshot)\n", " File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 25, in observe\n try:return original(*args,**kwargs)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_analysis/tools/standards_engine/standards_engine/engine.py\", line 1672, in _compiled_snapshot\n capture = self._snapshots.load_content(snapshot)\n", " File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 25, in observe\n try:return original(*args,**kwargs)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_analysis/tools/standards_snapshots/standards_snapshots/module.py\", line 112, in load_content\n if self._content_id(capture) != content_id:\n", " File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 25, in observe\n try:return original(*args,**kwargs)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_analysis/tools/standards_snapshots/standards_snapshots/module.py\", line 210, in _content_id\n return hash_identity(\n", " File \"/mnt/data/engine-performance/module-checkouts/test_analysis/tools/standards_identity/standards_identity/encoding.py\", line 93, in hash_identity\n encoded = encode_identity_value(value)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_analysis/tools/standards_identity/standards_identity/encoding.py\", line 75, in encode_identity_value\n return _encode(value)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_analysis/tools/standards_identity/standards_identity/encoding.py\", line 191, in _encode\n return b\"[\" + b\",\".join(_encode(item) for item in value.values) + b\"]\"\n", " File \"/mnt/data/engine-performance/module-checkouts/test_analysis/tools/standards_identity/standards_identity/encoding.py\", line 191, in \n return b\"[\" + b\",\".join(_encode(item) for item in value.values) + b\"]\"\n", " File \"/mnt/data/engine-performance/module-checkouts/test_analysis/tools/standards_identity/standards_identity/encoding.py\", line 197, in _encode\n return b\"{\" + b\",\".join(encoded_members) + b\"}\"\n", " File \"/mnt/data/engine-performance/module-checkouts/test_analysis/tools/standards_identity/standards_identity/encoding.py\", line 194, in \n _encode_string(key) + b\":\" + _encode(member_value)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_analysis/tools/standards_identity/standards_identity/encoding.py\", line 191, in _encode\n return b\"[\" + b\",\".join(_encode(item) for item in value.values) + b\"]\"\n", " File \"/mnt/data/engine-performance/module-checkouts/test_analysis/tools/standards_identity/standards_identity/encoding.py\", line 191, in \n return b\"[\" + b\",\".join(_encode(item) for item in value.values) + b\"]\"\n", " File \"/mnt/data/engine-performance/module-checkouts/test_analysis/tools/standards_identity/standards_identity/encoding.py\", line 187, in _encode\n return _encode_integer(value)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_analysis/tools/standards_identity/standards_identity/encoding.py\", line 213, in _encode_integer\n for chunk in reversed(chunks)\n"]} +{"event": "end", "test": "test_analysis.AnalysisWorkflowTest.test_resolved_parent_work_is_not_applicable_to_child", "wall_s": 26.149823355999956, "cpu_s": 26.14071819100002, "status": "pass", "spans": {"SnapshotModule._content_id": {"calls": 8, "inclusive_s": 22.95286463299999}, "SnapshotModule.load_content": {"calls": 8, "inclusive_s": 23.06065179399991}, "StandardsEngine._compile": {"calls": 8, "inclusive_s": 2.9018825409999636}, "StandardsEngine._compiled_snapshot": {"calls": 8, "inclusive_s": 25.984675856999843}, "StandardsEngine.prepare": {"calls": 1, "inclusive_s": 6.601469092000002}, "StandardsEngine._evaluate": {"calls": 3, "inclusive_s": 19.50470428199992}, "StandardsEngine.resolve": {"calls": 2, "inclusive_s": 19.54392377099998}}, "setup_s": 1.08200003978709e-06, "body_s": 26.14972487800003, "teardown_s": 1.7529999922771822e-06} +{"event": "start", "test": "test_analysis.AnalysisWorkflowTest.test_review_composition_publishes_readiness_for_complete_analysis", "at": 1790192430.8817263} +{"event": "observation", "test": "test_analysis.AnalysisWorkflowTest.test_review_composition_publishes_readiness_for_complete_analysis", "elapsed_s": 26.569624350999902, "stack": [" File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 58, in \n result=unittest.TextTestRunner(verbosity=1,resultclass=Result).run(suite)\n", " File \"/usr/lib/python3.13/unittest/runner.py\", line 240, in run\n test(result)\n", " File \"/usr/lib/python3.13/unittest/suite.py\", line 84, in __call__\n return self.run(*args, **kwds)\n", " File \"/usr/lib/python3.13/unittest/suite.py\", line 122, in run\n test(result)\n", " File \"/usr/lib/python3.13/unittest/case.py\", line 707, in __call__\n return self.run(*args, **kwds)\n", " File \"/usr/lib/python3.13/unittest/case.py\", line 651, in run\n self._callTestMethod(testMethod)\n", " File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 36, in timed\n try:return _fn(self,*args,**kwargs)\n", " File \"/usr/lib/python3.13/unittest/case.py\", line 606, in _callTestMethod\n if method() is not None:\n", " File \"/mnt/data/engine-performance/module-checkouts/test_analysis/tools/standards_engine/tests/test_analysis.py\", line 1180, in test_review_composition_publishes_readiness_for_complete_analysis\n facade.analyze_proposal({\"revision\": created.revision.as_contract()})\n", " File \"/mnt/data/engine-performance/module-checkouts/test_analysis/tools/standards_engine/standards_engine/tools.py\", line 238, in analyze_proposal\n return self._result(\"analyze_proposal\", self._engine.analyze_proposal(call))\n", " File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 25, in observe\n try:return original(*args,**kwargs)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_analysis/tools/standards_engine/standards_engine/context_projection.py\", line 60, in invoke\n return function(engine, call)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_analysis/tools/standards_engine/standards_engine/engine.py\", line 1097, in analyze_proposal\n self._evaluate_compiled(state, accepted, proposed, revision),\n", " File \"/mnt/data/engine-performance/module-checkouts/test_analysis/tools/standards_engine/standards_engine/engine.py\", line 1798, in _evaluate_compiled\n self._validate_projected_inputs(state, revision, accepted, proposed)\n", " File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 25, in observe\n try:return original(*args,**kwargs)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_analysis/tools/standards_engine/standards_engine/engine.py\", line 1829, in _validate_projected_inputs\n projection = self._proposal_projection(revision)\n", " File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 25, in observe\n try:return original(*args,**kwargs)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_analysis/tools/standards_engine/standards_engine/engine.py\", line 1683, in _proposal_projection\n capture = self._snapshots.load_content(revision.base_snapshot)\n", " File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 25, in observe\n try:return original(*args,**kwargs)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_analysis/tools/standards_snapshots/standards_snapshots/module.py\", line 112, in load_content\n if self._content_id(capture) != content_id:\n", " File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 25, in observe\n try:return original(*args,**kwargs)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_analysis/tools/standards_snapshots/standards_snapshots/module.py\", line 210, in _content_id\n return hash_identity(\n", " File \"/mnt/data/engine-performance/module-checkouts/test_analysis/tools/standards_identity/standards_identity/encoding.py\", line 93, in hash_identity\n encoded = encode_identity_value(value)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_analysis/tools/standards_identity/standards_identity/encoding.py\", line 75, in encode_identity_value\n return _encode(value)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_analysis/tools/standards_identity/standards_identity/encoding.py\", line 191, in _encode\n return b\"[\" + b\",\".join(_encode(item) for item in value.values) + b\"]\"\n", " File \"/mnt/data/engine-performance/module-checkouts/test_analysis/tools/standards_identity/standards_identity/encoding.py\", line 191, in \n return b\"[\" + b\",\".join(_encode(item) for item in value.values) + b\"]\"\n", " File \"/mnt/data/engine-performance/module-checkouts/test_analysis/tools/standards_identity/standards_identity/encoding.py\", line 197, in _encode\n return b\"{\" + b\",\".join(encoded_members) + b\"}\"\n", " File \"/mnt/data/engine-performance/module-checkouts/test_analysis/tools/standards_identity/standards_identity/encoding.py\", line 195, in \n for key, member_value in value.members\n", " File \"/mnt/data/engine-performance/module-checkouts/test_analysis/tools/standards_identity/standards_identity/encoding.py\", line 191, in _encode\n return b\"[\" + b\",\".join(_encode(item) for item in value.values) + b\"]\"\n", " File \"/mnt/data/engine-performance/module-checkouts/test_analysis/tools/standards_identity/standards_identity/encoding.py\", line 191, in \n return b\"[\" + b\",\".join(_encode(item) for item in value.values) + b\"]\"\n", " File \"/mnt/data/engine-performance/module-checkouts/test_analysis/tools/standards_identity/standards_identity/encoding.py\", line 187, in _encode\n return _encode_integer(value)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_analysis/tools/standards_identity/standards_identity/encoding.py\", line 215, in _encode_integer\n return (b\"-\" if negative else b\"\") + encoded + suffix\n"]} +{"event": "observation", "test": "test_analysis.AnalysisWorkflowTest.test_review_composition_publishes_readiness_for_complete_analysis", "elapsed_s": 71.63297614999988, "stack": [" File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 58, in \n result=unittest.TextTestRunner(verbosity=1,resultclass=Result).run(suite)\n", " File \"/usr/lib/python3.13/unittest/runner.py\", line 240, in run\n test(result)\n", " File \"/usr/lib/python3.13/unittest/suite.py\", line 84, in __call__\n return self.run(*args, **kwds)\n", " File \"/usr/lib/python3.13/unittest/suite.py\", line 122, in run\n test(result)\n", " File \"/usr/lib/python3.13/unittest/case.py\", line 707, in __call__\n return self.run(*args, **kwds)\n", " File \"/usr/lib/python3.13/unittest/case.py\", line 651, in run\n self._callTestMethod(testMethod)\n", " File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 36, in timed\n try:return _fn(self,*args,**kwargs)\n", " File \"/usr/lib/python3.13/unittest/case.py\", line 606, in _callTestMethod\n if method() is not None:\n", " File \"/mnt/data/engine-performance/module-checkouts/test_analysis/tools/standards_engine/tests/test_analysis.py\", line 1250, in test_review_composition_publishes_readiness_for_complete_analysis\n reviewed = ReviewProposalResult.from_value(facade.review_proposal(call))\n", " File \"/mnt/data/engine-performance/module-checkouts/test_analysis/tools/standards_engine/standards_engine/tools.py\", line 244, in review_proposal\n return self._result(\"review_proposal\", self._engine.review_proposal(call))\n", " File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 25, in observe\n try:return original(*args,**kwargs)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_analysis/tools/standards_engine/standards_engine/context_projection.py\", line 60, in invoke\n return function(engine, call)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_analysis/tools/standards_engine/standards_engine/engine.py\", line 1112, in review_proposal\n evaluation = self._evaluate(state)\n", " File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 25, in observe\n try:return original(*args,**kwargs)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_analysis/tools/standards_engine/standards_engine/engine.py\", line 1778, in _evaluate\n proposed = self._proposal_projection(revision).compiled\n", " File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 25, in observe\n try:return original(*args,**kwargs)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_analysis/tools/standards_engine/standards_engine/engine.py\", line 1683, in _proposal_projection\n capture = self._snapshots.load_content(revision.base_snapshot)\n", " File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 25, in observe\n try:return original(*args,**kwargs)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_analysis/tools/standards_snapshots/standards_snapshots/module.py\", line 112, in load_content\n if self._content_id(capture) != content_id:\n", " File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 25, in observe\n try:return original(*args,**kwargs)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_analysis/tools/standards_snapshots/standards_snapshots/module.py\", line 210, in _content_id\n return hash_identity(\n", " File \"/mnt/data/engine-performance/module-checkouts/test_analysis/tools/standards_identity/standards_identity/encoding.py\", line 93, in hash_identity\n encoded = encode_identity_value(value)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_analysis/tools/standards_identity/standards_identity/encoding.py\", line 75, in encode_identity_value\n return _encode(value)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_analysis/tools/standards_identity/standards_identity/encoding.py\", line 191, in _encode\n return b\"[\" + b\",\".join(_encode(item) for item in value.values) + b\"]\"\n", " File \"/mnt/data/engine-performance/module-checkouts/test_analysis/tools/standards_identity/standards_identity/encoding.py\", line 191, in \n return b\"[\" + b\",\".join(_encode(item) for item in value.values) + b\"]\"\n", " File \"/mnt/data/engine-performance/module-checkouts/test_analysis/tools/standards_identity/standards_identity/encoding.py\", line 197, in _encode\n return b\"{\" + b\",\".join(encoded_members) + b\"}\"\n", " File \"/mnt/data/engine-performance/module-checkouts/test_analysis/tools/standards_identity/standards_identity/encoding.py\", line 194, in \n _encode_string(key) + b\":\" + _encode(member_value)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_analysis/tools/standards_identity/standards_identity/encoding.py\", line 191, in _encode\n return b\"[\" + b\",\".join(_encode(item) for item in value.values) + b\"]\"\n", " File \"/mnt/data/engine-performance/module-checkouts/test_analysis/tools/standards_identity/standards_identity/encoding.py\", line 191, in \n return b\"[\" + b\",\".join(_encode(item) for item in value.values) + b\"]\"\n", " File \"/mnt/data/engine-performance/module-checkouts/test_analysis/tools/standards_identity/standards_identity/encoding.py\", line 187, in _encode\n return _encode_integer(value)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_analysis/tools/standards_identity/standards_identity/encoding.py\", line 210, in _encode_integer\n encoded = str(chunks.pop()).encode(\"ascii\")\n"]} +{"event": "observation", "test": "test_analysis.AnalysisWorkflowTest.test_review_composition_publishes_readiness_for_complete_analysis", "elapsed_s": 116.65794257199991, "stack": [" File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 58, in \n result=unittest.TextTestRunner(verbosity=1,resultclass=Result).run(suite)\n", " File \"/usr/lib/python3.13/unittest/runner.py\", line 240, in run\n test(result)\n", " File \"/usr/lib/python3.13/unittest/suite.py\", line 84, in __call__\n return self.run(*args, **kwds)\n", " File \"/usr/lib/python3.13/unittest/suite.py\", line 122, in run\n test(result)\n", " File \"/usr/lib/python3.13/unittest/case.py\", line 707, in __call__\n return self.run(*args, **kwds)\n", " File \"/usr/lib/python3.13/unittest/case.py\", line 651, in run\n self._callTestMethod(testMethod)\n", " File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 36, in timed\n try:return _fn(self,*args,**kwargs)\n", " File \"/usr/lib/python3.13/unittest/case.py\", line 606, in _callTestMethod\n if method() is not None:\n", " File \"/mnt/data/engine-performance/module-checkouts/test_analysis/tools/standards_engine/tests/test_analysis.py\", line 1641, in test_review_composition_publishes_readiness_for_complete_analysis\n recovery_required = facade.apply_proposal(\n", " File \"/mnt/data/engine-performance/module-checkouts/test_analysis/tools/standards_engine/standards_engine/tools.py\", line 250, in apply_proposal\n return self._result(\"apply_proposal\", self._engine.apply_proposal(call))\n", " File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 25, in observe\n try:return original(*args,**kwargs)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_analysis/tools/standards_engine/standards_engine/context_projection.py\", line 60, in invoke\n return function(engine, call)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_analysis/tools/standards_engine/standards_engine/engine.py\", line 1228, in apply_proposal\n projection = self._proposal_projection(revision)\n", " File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 25, in observe\n try:return original(*args,**kwargs)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_analysis/tools/standards_engine/standards_engine/engine.py\", line 1683, in _proposal_projection\n capture = self._snapshots.load_content(revision.base_snapshot)\n", " File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 25, in observe\n try:return original(*args,**kwargs)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_analysis/tools/standards_snapshots/standards_snapshots/module.py\", line 112, in load_content\n if self._content_id(capture) != content_id:\n", " File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 25, in observe\n try:return original(*args,**kwargs)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_analysis/tools/standards_snapshots/standards_snapshots/module.py\", line 210, in _content_id\n return hash_identity(\n", " File \"/mnt/data/engine-performance/module-checkouts/test_analysis/tools/standards_identity/standards_identity/encoding.py\", line 93, in hash_identity\n encoded = encode_identity_value(value)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_analysis/tools/standards_identity/standards_identity/encoding.py\", line 75, in encode_identity_value\n return _encode(value)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_analysis/tools/standards_identity/standards_identity/encoding.py\", line 191, in _encode\n return b\"[\" + b\",\".join(_encode(item) for item in value.values) + b\"]\"\n", " File \"/mnt/data/engine-performance/module-checkouts/test_analysis/tools/standards_identity/standards_identity/encoding.py\", line 191, in \n return b\"[\" + b\",\".join(_encode(item) for item in value.values) + b\"]\"\n", " File \"/mnt/data/engine-performance/module-checkouts/test_analysis/tools/standards_identity/standards_identity/encoding.py\", line 197, in _encode\n return b\"{\" + b\",\".join(encoded_members) + b\"}\"\n", " File \"/mnt/data/engine-performance/module-checkouts/test_analysis/tools/standards_identity/standards_identity/encoding.py\", line 194, in \n _encode_string(key) + b\":\" + _encode(member_value)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_analysis/tools/standards_identity/standards_identity/encoding.py\", line 191, in _encode\n return b\"[\" + b\",\".join(_encode(item) for item in value.values) + b\"]\"\n", " File \"/mnt/data/engine-performance/module-checkouts/test_analysis/tools/standards_identity/standards_identity/encoding.py\", line 191, in \n return b\"[\" + b\",\".join(_encode(item) for item in value.values) + b\"]\"\n", " File \"/mnt/data/engine-performance/module-checkouts/test_analysis/tools/standards_identity/standards_identity/encoding.py\", line 187, in _encode\n return _encode_integer(value)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_analysis/tools/standards_identity/standards_identity/encoding.py\", line 208, in _encode_integer\n remaining, chunk = divmod(remaining, _DECIMAL_CHUNK_BASE)\n"]} +{"event": "end", "test": "test_analysis.AnalysisWorkflowTest.test_review_composition_publishes_readiness_for_complete_analysis", "wall_s": 124.78088032799997, "cpu_s": 120.680856882, "status": "pass", "spans": {"SnapshotModule._content_id": {"calls": 31, "inclusive_s": 90.54928195100047}, "SnapshotModule.load_content": {"calls": 31, "inclusive_s": 90.96410686900072}, "StandardsEngine._compile": {"calls": 40, "inclusive_s": 16.10349661999942}, "StandardsEngine._compiled_snapshot": {"calls": 6, "inclusive_s": 21.09127997799976}, "StandardsEngine._proposal_projection": {"calls": 17, "inclusive_s": 75.94894800500072}, "tools.standards_engine.standards_engine.tools._contracts": {"calls": 1, "inclusive_s": 0.4506235279999373}, "AuthoringModule.read_revision": {"calls": 94, "inclusive_s": 3.7454485659987995}, "StandardsEngine._validate_projected_inputs": {"calls": 5, "inclusive_s": 22.78793418100031}, "StandardsEngine.analyze_proposal": {"calls": 1, "inclusive_s": 14.221476579999944}, "StandardsEngine._evaluate": {"calls": 4, "inclusive_s": 49.09456418900004}, "StandardsEngine.review_proposal": {"calls": 5, "inclusive_s": 25.0938802579999}, "StandardsEngine.resolve": {"calls": 1, "inclusive_s": 24.421623803000102}, "StandardsEngine.apply_proposal": {"calls": 9, "inclusive_s": 40.14167870700021}}, "setup_s": 1.102000055652752e-06, "body_s": 124.78079603100002, "teardown_s": 1.0520000159885967e-06} +{"event": "start", "test": "test_analysis.AnalysisWorkflowTest.test_snapshot_creation_rejects_changed_replay_path_closure", "at": 1790192555.6627204} +{"event": "end", "test": "test_analysis.AnalysisWorkflowTest.test_snapshot_creation_rejects_changed_replay_path_closure", "wall_s": 0.014184014999955252, "cpu_s": 0.006410742000014125, "status": "pass", "spans": {}, "setup_s": 1.0520000159885967e-06, "body_s": 0.014120560000037585, "teardown_s": 1.0620001376082655e-06} +{"event": "start", "test": "test_analysis.AnalysisWorkflowTest.test_state_and_children_are_inspectable_in_a_fresh_process", "at": 1790192555.6769722} +{"event": "end", "test": "test_analysis.AnalysisWorkflowTest.test_state_and_children_are_inspectable_in_a_fresh_process", "wall_s": 22.679404170999987, "cpu_s": 20.204798887000038, "status": "pass", "spans": {"SnapshotModule._content_id": {"calls": 6, "inclusive_s": 17.410922324000012}, "SnapshotModule.load_content": {"calls": 6, "inclusive_s": 17.482281217000263}, "StandardsEngine._compile": {"calls": 6, "inclusive_s": 2.5764331450002373}, "StandardsEngine._compiled_snapshot": {"calls": 6, "inclusive_s": 20.074982206999948}, "StandardsEngine.prepare": {"calls": 1, "inclusive_s": 6.478115178000053}, "StandardsEngine._evaluate": {"calls": 2, "inclusive_s": 13.71836364600017}, "StandardsEngine.resolve": {"calls": 1, "inclusive_s": 13.747873888999948}}, "setup_s": 6.710001798637677e-07, "body_s": 22.67931815199995, "teardown_s": 1.2419998256518738e-06} +{"event": "summary", "total_s": 526.4753461139999, "run": 14, "errors": 2, "failures": 0, "skips": 0} diff --git a/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/test_analysis.stderr b/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/test_analysis.stderr new file mode 100644 index 00000000..f68d1b57 --- /dev/null +++ b/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/test_analysis.stderr @@ -0,0 +1,59 @@ +EE............ +====================================================================== +ERROR: test_apply_create_and_retire_owns_topology_and_commit (test_analysis.AnalysisWorkflowTest.test_apply_create_and_retire_owns_topology_and_commit) +---------------------------------------------------------------------- +Traceback (most recent call last): + File "/mnt/data/engine-performance/harness/run_timed_suite.py", line 36, in timed + try:return _fn(self,*args,**kwargs) + ~~~^^^^^^^^^^^^^^^^^^^^^ + File "/usr/lib/python3.13/unittest/case.py", line 606, in _callTestMethod + if method() is not None: + ~~~~~~^^ + File "/mnt/data/engine-performance/module-checkouts/test_analysis/tools/standards_engine/tests/test_analysis.py", line 599, in test_apply_create_and_retire_owns_topology_and_commit + initial = engine._repository.branch_revision("main") + File "/mnt/data/engine-performance/module-checkouts/test_analysis/tools/repository_git/repository_git/repository.py", line 211, in branch_revision + return self._revision(f"refs/heads/{branch}^{{commit}}") + ~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "/mnt/data/engine-performance/module-checkouts/test_analysis/tools/repository_git/repository_git/repository.py", line 658, in _revision + output = git_output( + self._repository, + ("rev-parse", "--verify", "--end-of-options", revision), + max_output_bytes=256, + ) + File "/mnt/data/engine-performance/module-checkouts/test_analysis/tools/repository_git/repository_git/repository.py", line 99, in git_output + raise unavailable( + ...<2 lines>... + ) +tools.repository_git.repository_git.errors.GitRepositoryError: REPOSITORY_GIT.COMMAND_UNAVAILABLE: Git exited with 128: fatal: Needed a single revision + +====================================================================== +ERROR: test_apply_proposal_composes_real_verification_and_cold_readback (test_analysis.AnalysisWorkflowTest.test_apply_proposal_composes_real_verification_and_cold_readback) +---------------------------------------------------------------------- +Traceback (most recent call last): + File "/mnt/data/engine-performance/harness/run_timed_suite.py", line 36, in timed + try:return _fn(self,*args,**kwargs) + ~~~^^^^^^^^^^^^^^^^^^^^^ + File "/usr/lib/python3.13/unittest/case.py", line 606, in _callTestMethod + if method() is not None: + ~~~~~~^^ + File "/mnt/data/engine-performance/module-checkouts/test_analysis/tools/standards_engine/tests/test_analysis.py", line 315, in test_apply_proposal_composes_real_verification_and_cold_readback + expected = engine._repository.branch_revision("main") + File "/mnt/data/engine-performance/module-checkouts/test_analysis/tools/repository_git/repository_git/repository.py", line 211, in branch_revision + return self._revision(f"refs/heads/{branch}^{{commit}}") + ~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "/mnt/data/engine-performance/module-checkouts/test_analysis/tools/repository_git/repository_git/repository.py", line 658, in _revision + output = git_output( + self._repository, + ("rev-parse", "--verify", "--end-of-options", revision), + max_output_bytes=256, + ) + File "/mnt/data/engine-performance/module-checkouts/test_analysis/tools/repository_git/repository_git/repository.py", line 99, in git_output + raise unavailable( + ...<2 lines>... + ) +tools.repository_git.repository_git.errors.GitRepositoryError: REPOSITORY_GIT.COMMAND_UNAVAILABLE: Git exited with 128: fatal: Needed a single revision + +---------------------------------------------------------------------- +Ran 14 tests in 524.967s + +FAILED (errors=2) diff --git a/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/test_analysis.stdout b/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/test_analysis.stdout new file mode 100644 index 00000000..6369b521 --- /dev/null +++ b/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/test_analysis.stdout @@ -0,0 +1,28 @@ +START test_analysis.AnalysisWorkflowTest.test_apply_create_and_retire_owns_topology_and_commit +END test_analysis.AnalysisWorkflowTest.test_apply_create_and_retire_owns_topology_and_commit 0.936 error +START test_analysis.AnalysisWorkflowTest.test_apply_proposal_composes_real_verification_and_cold_readback +END test_analysis.AnalysisWorkflowTest.test_apply_proposal_composes_real_verification_and_cold_readback 0.848 error +START test_analysis.AnalysisWorkflowTest.test_cold_load_rejects_obsolete_domain_contracts +END test_analysis.AnalysisWorkflowTest.test_cold_load_rejects_obsolete_domain_contracts 0.003 pass +START test_analysis.AnalysisWorkflowTest.test_coverage_exclusions_require_exact_evidence_before_resolution +END test_analysis.AnalysisWorkflowTest.test_coverage_exclusions_require_exact_evidence_before_resolution 26.669 pass +START test_analysis.AnalysisWorkflowTest.test_equal_transition_is_idempotent_and_different_evidence_branches +END test_analysis.AnalysisWorkflowTest.test_equal_transition_is_idempotent_and_different_evidence_branches 48.435 pass +START test_analysis.AnalysisWorkflowTest.test_policy_free_standard_creation_enters_public_analysis +END test_analysis.AnalysisWorkflowTest.test_policy_free_standard_creation_enters_public_analysis 20.175 pass +START test_analysis.AnalysisWorkflowTest.test_prepare_persists_parent_bound_public_work +END test_analysis.AnalysisWorkflowTest.test_prepare_persists_parent_bound_public_work 6.804 pass +START test_analysis.AnalysisWorkflowTest.test_prior_analysis_reuses_the_same_valid_decision +END test_analysis.AnalysisWorkflowTest.test_prior_analysis_reuses_the_same_valid_decision 32.528 pass +START test_analysis.AnalysisWorkflowTest.test_proposal_analysis_derives_inputs_and_replays_exact_revision +END test_analysis.AnalysisWorkflowTest.test_proposal_analysis_derives_inputs_and_replays_exact_revision 75.324 pass +START test_analysis.AnalysisWorkflowTest.test_relationship_only_proposals_enter_a1c_and_replay_cold +END test_analysis.AnalysisWorkflowTest.test_relationship_only_proposals_enter_a1c_and_replay_cold 119.04 pass +START test_analysis.AnalysisWorkflowTest.test_resolved_parent_work_is_not_applicable_to_child +END test_analysis.AnalysisWorkflowTest.test_resolved_parent_work_is_not_applicable_to_child 26.15 pass +START test_analysis.AnalysisWorkflowTest.test_review_composition_publishes_readiness_for_complete_analysis +END test_analysis.AnalysisWorkflowTest.test_review_composition_publishes_readiness_for_complete_analysis 124.781 pass +START test_analysis.AnalysisWorkflowTest.test_snapshot_creation_rejects_changed_replay_path_closure +END test_analysis.AnalysisWorkflowTest.test_snapshot_creation_rejects_changed_replay_path_closure 0.014 pass +START test_analysis.AnalysisWorkflowTest.test_state_and_children_are_inspectable_in_a_fresh_process +END test_analysis.AnalysisWorkflowTest.test_state_and_children_are_inspectable_in_a_fresh_process 22.679 pass diff --git a/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/test_applicability_contract.exit.json b/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/test_applicability_contract.exit.json new file mode 100644 index 00000000..84334d32 --- /dev/null +++ b/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/test_applicability_contract.exit.json @@ -0,0 +1 @@ +{"returncode": 0, "elapsed_s": 2.7882161140441895, "args": ["--pattern", "test_applicability_contract.py", "--exclude", "/mnt/data/engine-performance/evidence/completed-for-parallel.json"]} \ No newline at end of file diff --git a/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/test_applicability_contract.jsonl b/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/test_applicability_contract.jsonl new file mode 100644 index 00000000..fece69b6 --- /dev/null +++ b/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/test_applicability_contract.jsonl @@ -0,0 +1,5 @@ +{"event": "start", "test": "test_applicability_contract.ApplicabilityContractTest.test_former_applicability_implementations_are_not_fallbacks", "at": 1790192674.9927163} +{"event": "end", "test": "test_applicability_contract.ApplicabilityContractTest.test_former_applicability_implementations_are_not_fallbacks", "wall_s": 0.0002383270000336779, "cpu_s": 0.00023688200000027138, "status": "pass", "spans": {}, "setup_s": 1.5430000530614052e-06, "body_s": 0.0001091029998860904, "teardown_s": 1.0119999842572724e-06} +{"event": "start", "test": "test_applicability_contract.ApplicabilityContractTest.test_runtime_domains_cover_the_public_serialized_applicability_shapes", "at": 1790192674.9929965} +{"event": "end", "test": "test_applicability_contract.ApplicabilityContractTest.test_runtime_domains_cover_the_public_serialized_applicability_shapes", "wall_s": 0.0011829229999875679, "cpu_s": 0.0011836999999998987, "status": "pass", "spans": {}, "setup_s": 5.609999789157882e-07, "body_s": 0.001134931000024153, "teardown_s": 9.320001481682993e-07} +{"event": "summary", "total_s": 1.5766220230000272, "run": 2, "errors": 0, "failures": 0, "skips": 0} diff --git a/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/test_applicability_contract.stderr b/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/test_applicability_contract.stderr new file mode 100644 index 00000000..b017cbc8 --- /dev/null +++ b/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/test_applicability_contract.stderr @@ -0,0 +1,5 @@ +.. +---------------------------------------------------------------------- +Ran 2 tests in 0.002s + +OK diff --git a/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/test_applicability_contract.stdout b/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/test_applicability_contract.stdout new file mode 100644 index 00000000..6db7584a --- /dev/null +++ b/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/test_applicability_contract.stdout @@ -0,0 +1,4 @@ +START test_applicability_contract.ApplicabilityContractTest.test_former_applicability_implementations_are_not_fallbacks +END test_applicability_contract.ApplicabilityContractTest.test_former_applicability_implementations_are_not_fallbacks 0.0 pass +START test_applicability_contract.ApplicabilityContractTest.test_runtime_domains_cover_the_public_serialized_applicability_shapes +END test_applicability_contract.ApplicabilityContractTest.test_runtime_domains_cover_the_public_serialized_applicability_shapes 0.001 pass diff --git a/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/test_authoring.exit.json b/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/test_authoring.exit.json new file mode 100644 index 00000000..7f253763 --- /dev/null +++ b/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/test_authoring.exit.json @@ -0,0 +1 @@ +{"returncode": 0, "elapsed_s": 7.141693353652954, "args": ["--pattern", "test_authoring.py", "--exclude", "/mnt/data/engine-performance/evidence/completed-for-parallel.json"]} \ No newline at end of file diff --git a/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/test_authoring.jsonl b/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/test_authoring.jsonl new file mode 100644 index 00000000..e570bb67 --- /dev/null +++ b/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/test_authoring.jsonl @@ -0,0 +1,27 @@ +{"event": "start", "test": "test_authoring.AuthoringTests.test_application_intent_is_current_head_guarded_and_records_applied", "at": 1790192677.8493607} +{"event": "end", "test": "test_authoring.AuthoringTests.test_application_intent_is_current_head_guarded_and_records_applied", "wall_s": 0.08862302100010311, "cpu_s": 0.08851642199999965, "status": "pass", "spans": {"SnapshotModule._content_id": {"calls": 2, "inclusive_s": 0.00019236900016039726}, "SnapshotModule.load_content": {"calls": 1, "inclusive_s": 0.0002316869999958726}, "AuthoringModule.read_revision": {"calls": 16, "inclusive_s": 0.013270701000919871}}, "setup_s": 1.2519999472715426e-06, "body_s": 0.0884607870000309, "teardown_s": 1.9729998257389525e-06} +{"event": "start", "test": "test_authoring.AuthoringTests.test_create_and_find_are_durable_through_the_public_facade", "at": 1790192677.9380622} +{"event": "end", "test": "test_authoring.AuthoringTests.test_create_and_find_are_durable_through_the_public_facade", "wall_s": 3.0719260380001288, "cpu_s": 0.31553069899999997, "status": "pass", "spans": {"SnapshotModule._content_id": {"calls": 2, "inclusive_s": 0.0002937099998234771}, "tools.standards_engine.standards_engine.tools._contracts": {"calls": 1, "inclusive_s": 0.30300559600004817}, "SnapshotModule.load_content": {"calls": 1, "inclusive_s": 0.000543054999980086}}, "setup_s": 1.2919999790028669e-06, "body_s": 3.0718348709999646, "teardown_s": 2.333000111320871e-06} +{"event": "start", "test": "test_authoring.AuthoringTests.test_create_rejects_duplicate_facets_and_validator_failure_is_atomic", "at": 1790192681.0100825} +{"event": "end", "test": "test_authoring.AuthoringTests.test_create_rejects_duplicate_facets_and_validator_failure_is_atomic", "wall_s": 0.003729369999973642, "cpu_s": 0.0031714550000003783, "status": "pass", "spans": {"SnapshotModule._content_id": {"calls": 2, "inclusive_s": 0.00017646399987825134}, "SnapshotModule.load_content": {"calls": 1, "inclusive_s": 0.00018796199992721085}}, "setup_s": 8.409999736613827e-07, "body_s": 0.0036774229999991803, "teardown_s": 1.0119999842572724e-06} +{"event": "start", "test": "test_authoring.AuthoringTests.test_create_translates_invalid_change_set_unicode_to_a_typed_rejection", "at": 1790192681.013862} +{"event": "end", "test": "test_authoring.AuthoringTests.test_create_translates_invalid_change_set_unicode_to_a_typed_rejection", "wall_s": 0.33038177699995686, "cpu_s": 0.3234826500000003, "status": "pass", "spans": {"SnapshotModule._content_id": {"calls": 1, "inclusive_s": 0.00010377499984315364}, "tools.standards_engine.standards_engine.tools._contracts": {"calls": 1, "inclusive_s": 0.32204573000012715}}, "setup_s": 1.0420001217426034e-06, "body_s": 0.33027680999998665, "teardown_s": 1.5120001535251504e-06} +{"event": "start", "test": "test_authoring.AuthoringTests.test_discovery_rejects_a_revision_without_content_bound_authority", "at": 1790192681.344327} +{"event": "end", "test": "test_authoring.AuthoringTests.test_discovery_rejects_a_revision_without_content_bound_authority", "wall_s": 0.0031622110000171233, "cpu_s": 0.003162861999999933, "status": "pass", "spans": {"SnapshotModule._content_id": {"calls": 1, "inclusive_s": 0.00010861300006581587}}, "setup_s": 8.50999867907376e-07, "body_s": 0.003102400999978272, "teardown_s": 1.252000174645218e-06} +{"event": "start", "test": "test_authoring.AuthoringTests.test_discovery_rejects_the_old_revision_contract_as_unsupported", "at": 1790192681.3475525} +{"event": "end", "test": "test_authoring.AuthoringTests.test_discovery_rejects_the_old_revision_contract_as_unsupported", "wall_s": 0.3053237120000176, "cpu_s": 0.30494568300000013, "status": "pass", "spans": {"SnapshotModule._content_id": {"calls": 1, "inclusive_s": 8.843199998409546e-05}, "tools.standards_engine.standards_engine.tools._contracts": {"calls": 1, "inclusive_s": 0.29901922099998046}}, "setup_s": 8.209999577957205e-07, "body_s": 0.3052514840001095, "teardown_s": 1.7330000900983578e-06} +{"event": "start", "test": "test_authoring.AuthoringTests.test_proposal_discovery_uses_opaque_keyset_continuations", "at": 1790192681.6529577} +{"event": "end", "test": "test_authoring.AuthoringTests.test_proposal_discovery_uses_opaque_keyset_continuations", "wall_s": 0.006359233000011955, "cpu_s": 0.0063601150000001105, "status": "pass", "spans": {"SnapshotModule._content_id": {"calls": 3, "inclusive_s": 0.00023148600007516507}, "SnapshotModule.load_content": {"calls": 2, "inclusive_s": 0.0003297650000604335}}, "setup_s": 9.410000529896934e-07, "body_s": 0.006291171000157192, "teardown_s": 1.511999926151475e-06} +{"event": "start", "test": "test_authoring.AuthoringTests.test_proposals_follow_snapshot_quarantine_and_purge_lifecycle", "at": 1790192681.6593814} +{"event": "end", "test": "test_authoring.AuthoringTests.test_proposals_follow_snapshot_quarantine_and_purge_lifecycle", "wall_s": 0.006195707999950173, "cpu_s": 0.006196870999999771, "status": "pass", "spans": {"SnapshotModule._content_id": {"calls": 4, "inclusive_s": 0.0003461589999460557}, "SnapshotModule.load_content": {"calls": 2, "inclusive_s": 0.00028575900000760157}}, "setup_s": 1.1219999578315765e-06, "body_s": 0.00613872300004914, "teardown_s": 1.3720000424655154e-06} +{"event": "start", "test": "test_authoring.AuthoringTests.test_readiness_is_content_bound_durable_and_current_head_guarded", "at": 1790192681.6656418} +{"event": "end", "test": "test_authoring.AuthoringTests.test_readiness_is_content_bound_durable_and_current_head_guarded", "wall_s": 0.04336777000003167, "cpu_s": 0.04324419300000004, "status": "pass", "spans": {"SnapshotModule._content_id": {"calls": 2, "inclusive_s": 0.00016579799989813182}, "SnapshotModule.load_content": {"calls": 1, "inclusive_s": 0.00015677500005040201}, "AuthoringModule.read_revision": {"calls": 8, "inclusive_s": 0.0057419649999701505}}, "setup_s": 8.709998837730382e-07, "body_s": 0.04330353299997114, "teardown_s": 1.24100006360095e-06} +{"event": "start", "test": "test_authoring.AuthoringTests.test_readiness_rejects_incomplete_decisions_without_persistence", "at": 1790192681.7090843} +{"event": "end", "test": "test_authoring.AuthoringTests.test_readiness_rejects_incomplete_decisions_without_persistence", "wall_s": 0.004561536999972304, "cpu_s": 0.004562712999999885, "status": "pass", "spans": {"SnapshotModule._content_id": {"calls": 2, "inclusive_s": 0.0001449979999961215}, "SnapshotModule.load_content": {"calls": 1, "inclusive_s": 0.00022371499994733313}}, "setup_s": 9.220000265486306e-07, "body_s": 0.00450127700014491, "teardown_s": 1.1520000953169074e-06} +{"event": "start", "test": "test_authoring.AuthoringTests.test_readiness_rejects_invalid_proposal_commit_material", "at": 1790192681.7137072} +{"event": "end", "test": "test_authoring.AuthoringTests.test_readiness_rejects_invalid_proposal_commit_material", "wall_s": 0.004673555999943346, "cpu_s": 0.004674338000000056, "status": "pass", "spans": {"SnapshotModule._content_id": {"calls": 2, "inclusive_s": 0.00017019599999912316}, "SnapshotModule.load_content": {"calls": 1, "inclusive_s": 0.00016318400003001443}, "AuthoringModule.read_revision": {"calls": 1, "inclusive_s": 0.0006686319998152612}}, "setup_s": 7.31999989511678e-07, "body_s": 0.004620015999989846, "teardown_s": 1.1110000741609838e-06} +{"event": "start", "test": "test_authoring.AuthoringTests.test_revise_is_durable_and_stale_writes_leave_no_partial_record", "at": 1790192681.718439} +{"event": "end", "test": "test_authoring.AuthoringTests.test_revise_is_durable_and_stale_writes_leave_no_partial_record", "wall_s": 0.5830628559999695, "cpu_s": 0.5821428420000001, "status": "pass", "spans": {"SnapshotModule._content_id": {"calls": 2, "inclusive_s": 0.0001620330001514958}, "tools.standards_engine.standards_engine.tools._contracts": {"calls": 2, "inclusive_s": 0.5524579070001892}, "SnapshotModule.load_content": {"calls": 1, "inclusive_s": 0.0003691329998218862}, "AuthoringModule.read_revision": {"calls": 5, "inclusive_s": 0.00488358899974628}}, "setup_s": 8.010001693037339e-07, "body_s": 0.5829914890000509, "teardown_s": 1.6019998838601168e-06} +{"event": "start", "test": "test_authoring.AuthoringTests.test_stale_readiness_cannot_publish_application_intent", "at": 1790192682.3015833} +{"event": "end", "test": "test_authoring.AuthoringTests.test_stale_readiness_cannot_publish_application_intent", "wall_s": 0.018900578000057067, "cpu_s": 0.018734654000000184, "status": "pass", "spans": {"SnapshotModule._content_id": {"calls": 2, "inclusive_s": 0.00014435699995374307}, "SnapshotModule.load_content": {"calls": 1, "inclusive_s": 0.00016494700003022444}, "AuthoringModule.read_revision": {"calls": 4, "inclusive_s": 0.0034126749999359163}}, "setup_s": 1.0009998732130043e-06, "body_s": 0.01883100400004878, "teardown_s": 1.5619998521287926e-06} +{"event": "summary", "total_s": 5.961159401000032, "run": 13, "errors": 0, "failures": 0, "skips": 0} diff --git a/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/test_authoring.stderr b/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/test_authoring.stderr new file mode 100644 index 00000000..4fc126d3 --- /dev/null +++ b/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/test_authoring.stderr @@ -0,0 +1,5 @@ +............. +---------------------------------------------------------------------- +Ran 13 tests in 4.471s + +OK diff --git a/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/test_authoring.stdout b/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/test_authoring.stdout new file mode 100644 index 00000000..a9585266 --- /dev/null +++ b/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/test_authoring.stdout @@ -0,0 +1,26 @@ +START test_authoring.AuthoringTests.test_application_intent_is_current_head_guarded_and_records_applied +END test_authoring.AuthoringTests.test_application_intent_is_current_head_guarded_and_records_applied 0.089 pass +START test_authoring.AuthoringTests.test_create_and_find_are_durable_through_the_public_facade +END test_authoring.AuthoringTests.test_create_and_find_are_durable_through_the_public_facade 3.072 pass +START test_authoring.AuthoringTests.test_create_rejects_duplicate_facets_and_validator_failure_is_atomic +END test_authoring.AuthoringTests.test_create_rejects_duplicate_facets_and_validator_failure_is_atomic 0.004 pass +START test_authoring.AuthoringTests.test_create_translates_invalid_change_set_unicode_to_a_typed_rejection +END test_authoring.AuthoringTests.test_create_translates_invalid_change_set_unicode_to_a_typed_rejection 0.33 pass +START test_authoring.AuthoringTests.test_discovery_rejects_a_revision_without_content_bound_authority +END test_authoring.AuthoringTests.test_discovery_rejects_a_revision_without_content_bound_authority 0.003 pass +START test_authoring.AuthoringTests.test_discovery_rejects_the_old_revision_contract_as_unsupported +END test_authoring.AuthoringTests.test_discovery_rejects_the_old_revision_contract_as_unsupported 0.305 pass +START test_authoring.AuthoringTests.test_proposal_discovery_uses_opaque_keyset_continuations +END test_authoring.AuthoringTests.test_proposal_discovery_uses_opaque_keyset_continuations 0.006 pass +START test_authoring.AuthoringTests.test_proposals_follow_snapshot_quarantine_and_purge_lifecycle +END test_authoring.AuthoringTests.test_proposals_follow_snapshot_quarantine_and_purge_lifecycle 0.006 pass +START test_authoring.AuthoringTests.test_readiness_is_content_bound_durable_and_current_head_guarded +END test_authoring.AuthoringTests.test_readiness_is_content_bound_durable_and_current_head_guarded 0.043 pass +START test_authoring.AuthoringTests.test_readiness_rejects_incomplete_decisions_without_persistence +END test_authoring.AuthoringTests.test_readiness_rejects_incomplete_decisions_without_persistence 0.005 pass +START test_authoring.AuthoringTests.test_readiness_rejects_invalid_proposal_commit_material +END test_authoring.AuthoringTests.test_readiness_rejects_invalid_proposal_commit_material 0.005 pass +START test_authoring.AuthoringTests.test_revise_is_durable_and_stale_writes_leave_no_partial_record +END test_authoring.AuthoringTests.test_revise_is_durable_and_stale_writes_leave_no_partial_record 0.583 pass +START test_authoring.AuthoringTests.test_stale_readiness_cannot_publish_application_intent +END test_authoring.AuthoringTests.test_stale_readiness_cannot_publish_application_intent 0.019 pass diff --git a/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/test_coverage_publication.exit.json b/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/test_coverage_publication.exit.json new file mode 100644 index 00000000..050b787c --- /dev/null +++ b/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/test_coverage_publication.exit.json @@ -0,0 +1 @@ +{"returncode": 1, "elapsed_s": 38.43933916091919, "args": ["--pattern", "test_coverage_publication.py", "--exclude", "/mnt/data/engine-performance/evidence/completed-for-parallel.json"]} \ No newline at end of file diff --git a/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/test_coverage_publication.jsonl b/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/test_coverage_publication.jsonl new file mode 100644 index 00000000..f48966e3 --- /dev/null +++ b/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/test_coverage_publication.jsonl @@ -0,0 +1,3 @@ +{"event": "start", "test": "test_coverage_publication.EngineAuditPublicationTest.test_review_verify_apply_recover_and_read_without_original_database", "at": 1790192685.047487} +{"event": "end", "test": "test_coverage_publication.EngineAuditPublicationTest.test_review_verify_apply_recover_and_read_without_original_database", "wall_s": 35.84236262799982, "cpu_s": 3.2044950429999997, "status": "failure", "spans": {"tools.standards_engine.standards_engine.tools._contracts": {"calls": 1, "inclusive_s": 0.32440961099996457}}, "setup_s": 1.452000105928164e-06, "body_s": 35.840825042999995, "teardown_s": 2.9850000373699004e-06} +{"event": "summary", "total_s": 37.308470527000054, "run": 1, "errors": 0, "failures": 1, "skips": 0} diff --git a/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/test_coverage_publication.stderr b/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/test_coverage_publication.stderr new file mode 100644 index 00000000..0af01b9b --- /dev/null +++ b/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/test_coverage_publication.stderr @@ -0,0 +1,17 @@ +F +====================================================================== +FAIL: test_review_verify_apply_recover_and_read_without_original_database (test_coverage_publication.EngineAuditPublicationTest.test_review_verify_apply_recover_and_read_without_original_database) +---------------------------------------------------------------------- +Traceback (most recent call last): + File "/mnt/data/engine-performance/harness/run_timed_suite.py", line 36, in timed + try:return _fn(self,*args,**kwargs) + ~~~^^^^^^^^^^^^^^^^^^^^^ +AssertionError: 'rejected-result' != 'create-snapshot-result' +- rejected-result ++ create-snapshot-result + : {'kind': 'rejected-result', 'code': 'REPOSITORY_GIT.COMMAND_UNAVAILABLE', 'outcome': 'unavailable', 'message': 'Git exited with 128: fatal: Needed a single revision', 'details': {}, 'next_operations': []} + +---------------------------------------------------------------------- +Ran 1 test in 35.843s + +FAILED (failures=1) diff --git a/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/test_coverage_publication.stdout b/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/test_coverage_publication.stdout new file mode 100644 index 00000000..617da607 --- /dev/null +++ b/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/test_coverage_publication.stdout @@ -0,0 +1,2 @@ +START test_coverage_publication.EngineAuditPublicationTest.test_review_verify_apply_recover_and_read_without_original_database +END test_coverage_publication.EngineAuditPublicationTest.test_review_verify_apply_recover_and_read_without_original_database 35.842 failure diff --git a/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/test_evidence_maintenance.exit.json b/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/test_evidence_maintenance.exit.json new file mode 100644 index 00000000..289c2264 --- /dev/null +++ b/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/test_evidence_maintenance.exit.json @@ -0,0 +1 @@ +{"returncode": 0, "elapsed_s": 172.9561676979065, "args": ["--pattern", "test_evidence_maintenance.py", "--exclude", "/mnt/data/engine-performance/evidence/completed-for-parallel.json"]} \ No newline at end of file diff --git a/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/test_evidence_maintenance.jsonl b/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/test_evidence_maintenance.jsonl new file mode 100644 index 00000000..c398636b --- /dev/null +++ b/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/test_evidence_maintenance.jsonl @@ -0,0 +1,18 @@ +{"event": "start", "test": "test_evidence_maintenance.EvidenceMaintenanceInterfaceTest.test_preview_and_overlap_preserve_working_tree_then_apply_retires", "at": 1790192724.0390034} +{"event": "observation", "test": "test_evidence_maintenance.EvidenceMaintenanceInterfaceTest.test_preview_and_overlap_preserve_working_tree_then_apply_retires", "elapsed_s": 43.37627719400007, "stack": [" File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 58, in \n result=unittest.TextTestRunner(verbosity=1,resultclass=Result).run(suite)\n", " File \"/usr/lib/python3.13/unittest/runner.py\", line 240, in run\n test(result)\n", " File \"/usr/lib/python3.13/unittest/suite.py\", line 84, in __call__\n return self.run(*args, **kwds)\n", " File \"/usr/lib/python3.13/unittest/suite.py\", line 122, in run\n test(result)\n", " File \"/usr/lib/python3.13/unittest/case.py\", line 707, in __call__\n return self.run(*args, **kwds)\n", " File \"/usr/lib/python3.13/unittest/case.py\", line 651, in run\n self._callTestMethod(testMethod)\n", " File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 36, in timed\n try:return _fn(self,*args,**kwargs)\n", " File \"/usr/lib/python3.13/unittest/case.py\", line 606, in _callTestMethod\n if method() is not None:\n", " File \"/mnt/data/engine-performance/module-checkouts/test_evidence_maintenance/tools/standards_engine/tests/test_evidence_maintenance.py\", line 318, in test_preview_and_overlap_preserve_working_tree_then_apply_retires\n preview = facade.maintain_evidence(request)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_evidence_maintenance/tools/standards_engine/standards_engine/tools.py\", line 216, in maintain_evidence\n return self._result(\"maintain_evidence\", self._engine.maintain_evidence(call))\n", " File \"/mnt/data/engine-performance/module-checkouts/test_evidence_maintenance/tools/standards_engine/standards_engine/context_projection.py\", line 60, in invoke\n return function(engine, call)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_evidence_maintenance/tools/standards_engine/standards_engine/engine.py\", line 574, in maintain_evidence\n str(path): self._repository.read_file(expected, path) for path in paths\n", " File \"/mnt/data/engine-performance/module-checkouts/test_evidence_maintenance/tools/repository_git/repository_git/repository.py\", line 690, in read_file\n tree = self._object(repository, tree_oid, \"tree\", algorithm)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_evidence_maintenance/tools/repository_git/repository_git/repository.py\", line 746, in _object\n output = git_output(\n", " File \"/mnt/data/engine-performance/module-checkouts/test_evidence_maintenance/tools/repository_git/repository_git/repository.py\", line 91, in git_output\n result = git_command(\n", " File \"/mnt/data/engine-performance/module-checkouts/test_evidence_maintenance/tools/repository_git/repository_git/repository.py\", line 75, in git_command\n return _run_bounded(\n", " File \"/mnt/data/engine-performance/module-checkouts/test_evidence_maintenance/tools/repository_git/repository_git/repository.py\", line 812, in _run_bounded\n process = subprocess.Popen(\n", " File \"/usr/lib/python3.13/subprocess.py\", line 1039, in __init__\n self._execute_child(args, executable, preexec_fn, close_fds,\n", " File \"/usr/lib/python3.13/subprocess.py\", line 1902, in _execute_child\n self.pid = _fork_exec(\n"]} +{"event": "observation", "test": "test_evidence_maintenance.EvidenceMaintenanceInterfaceTest.test_preview_and_overlap_preserve_working_tree_then_apply_retires", "elapsed_s": 88.38002119099997, "stack": [" File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 58, in \n result=unittest.TextTestRunner(verbosity=1,resultclass=Result).run(suite)\n", " File \"/usr/lib/python3.13/unittest/runner.py\", line 240, in run\n test(result)\n", " File \"/usr/lib/python3.13/unittest/suite.py\", line 84, in __call__\n return self.run(*args, **kwds)\n", " File \"/usr/lib/python3.13/unittest/suite.py\", line 122, in run\n test(result)\n", " File \"/usr/lib/python3.13/unittest/case.py\", line 707, in __call__\n return self.run(*args, **kwds)\n", " File \"/usr/lib/python3.13/unittest/case.py\", line 651, in run\n self._callTestMethod(testMethod)\n", " File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 36, in timed\n try:return _fn(self,*args,**kwargs)\n", " File \"/usr/lib/python3.13/unittest/case.py\", line 606, in _callTestMethod\n if method() is not None:\n", " File \"/mnt/data/engine-performance/module-checkouts/test_evidence_maintenance/tools/standards_engine/tests/test_evidence_maintenance.py\", line 318, in test_preview_and_overlap_preserve_working_tree_then_apply_retires\n preview = facade.maintain_evidence(request)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_evidence_maintenance/tools/standards_engine/standards_engine/tools.py\", line 216, in maintain_evidence\n return self._result(\"maintain_evidence\", self._engine.maintain_evidence(call))\n", " File \"/mnt/data/engine-performance/module-checkouts/test_evidence_maintenance/tools/standards_engine/standards_engine/context_projection.py\", line 60, in invoke\n return function(engine, call)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_evidence_maintenance/tools/standards_engine/standards_engine/engine.py\", line 613, in maintain_evidence\n self._application_verifier(candidate.root)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_evidence_maintenance/tools/standards_verifier/standards_verifier/cli.py\", line 76, in run_complete_verification\n results = tuple(Verifier(repo_root, registry).run(None))\n", " File \"/mnt/data/engine-performance/module-checkouts/test_evidence_maintenance/tools/standards_verifier/standards_verifier/engine.py\", line 66, in run\n result = self._run_suite(catalog.suite(suite_id), catalog)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_evidence_maintenance/tools/standards_verifier/standards_verifier/engine.py\", line 100, in _run_suite\n diagnostics.extend(check.run(context))\n", " File \"/mnt/data/engine-performance/module-checkouts/test_evidence_maintenance/tools/standards_verifier/standards_verifier/checks/python_package_contract.py\", line 70, in run\n for finding in execute_python_package_contract(context.repo_root)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_evidence_maintenance/tools/standards_verifier/standards_verifier/python_packages.py\", line 1312, in execute_python_package_contract\n completed = _execute_entrypoint(\n", " File \"/mnt/data/engine-performance/module-checkouts/test_evidence_maintenance/tools/standards_verifier/standards_verifier/python_packages.py\", line 1403, in _execute_entrypoint\n return subprocess.run(\n", " File \"/usr/lib/python3.13/subprocess.py\", line 556, in run\n stdout, stderr = process.communicate(input, timeout=timeout)\n", " File \"/usr/lib/python3.13/subprocess.py\", line 1222, in communicate\n stdout, stderr = self._communicate(input, endtime, timeout)\n", " File \"/usr/lib/python3.13/subprocess.py\", line 2128, in _communicate\n ready = selector.select(timeout)\n", " File \"/usr/lib/python3.13/selectors.py\", line 398, in select\n fd_event_list = self._selector.poll(timeout)\n"]} +{"event": "observation", "test": "test_evidence_maintenance.EvidenceMaintenanceInterfaceTest.test_preview_and_overlap_preserve_working_tree_then_apply_retires", "elapsed_s": 133.38729670400016, "stack": [" File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 58, in \n result=unittest.TextTestRunner(verbosity=1,resultclass=Result).run(suite)\n", " File \"/usr/lib/python3.13/unittest/runner.py\", line 240, in run\n test(result)\n", " File \"/usr/lib/python3.13/unittest/suite.py\", line 84, in __call__\n return self.run(*args, **kwds)\n", " File \"/usr/lib/python3.13/unittest/suite.py\", line 122, in run\n test(result)\n", " File \"/usr/lib/python3.13/unittest/case.py\", line 707, in __call__\n return self.run(*args, **kwds)\n", " File \"/usr/lib/python3.13/unittest/case.py\", line 651, in run\n self._callTestMethod(testMethod)\n", " File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 36, in timed\n try:return _fn(self,*args,**kwargs)\n", " File \"/usr/lib/python3.13/unittest/case.py\", line 606, in _callTestMethod\n if method() is not None:\n", " File \"/mnt/data/engine-performance/module-checkouts/test_evidence_maintenance/tools/standards_engine/tests/test_evidence_maintenance.py\", line 332, in test_preview_and_overlap_preserve_working_tree_then_apply_retires\n overlap = facade.maintain_evidence({**request, \"apply\": True})\n", " File \"/mnt/data/engine-performance/module-checkouts/test_evidence_maintenance/tools/standards_engine/standards_engine/tools.py\", line 216, in maintain_evidence\n return self._result(\"maintain_evidence\", self._engine.maintain_evidence(call))\n", " File \"/mnt/data/engine-performance/module-checkouts/test_evidence_maintenance/tools/standards_engine/standards_engine/context_projection.py\", line 60, in invoke\n return function(engine, call)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_evidence_maintenance/tools/standards_engine/standards_engine/engine.py\", line 574, in maintain_evidence\n str(path): self._repository.read_file(expected, path) for path in paths\n", " File \"/mnt/data/engine-performance/module-checkouts/test_evidence_maintenance/tools/repository_git/repository_git/repository.py\", line 708, in read_file\n return self._object(repository, oid, \"blob\", algorithm)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_evidence_maintenance/tools/repository_git/repository_git/repository.py\", line 746, in _object\n output = git_output(\n", " File \"/mnt/data/engine-performance/module-checkouts/test_evidence_maintenance/tools/repository_git/repository_git/repository.py\", line 91, in git_output\n result = git_command(\n", " File \"/mnt/data/engine-performance/module-checkouts/test_evidence_maintenance/tools/repository_git/repository_git/repository.py\", line 75, in git_command\n return _run_bounded(\n", " File \"/mnt/data/engine-performance/module-checkouts/test_evidence_maintenance/tools/repository_git/repository_git/repository.py\", line 859, in _run_bounded\n returncode = process.wait(timeout=COMMAND_TIMEOUT_SECONDS)\n", " File \"/usr/lib/python3.13/subprocess.py\", line 1280, in wait\n return self._wait(timeout=timeout)\n", " File \"/usr/lib/python3.13/subprocess.py\", line 2060, in _wait\n time.sleep(delay)\n"]} +{"event": "end", "test": "test_evidence_maintenance.EvidenceMaintenanceInterfaceTest.test_preview_and_overlap_preserve_working_tree_then_apply_retires", "wall_s": 170.09449521300007, "cpu_s": 27.811621846999998, "status": "pass", "spans": {"tools.standards_engine.standards_engine.tools._contracts": {"calls": 1, "inclusive_s": 0.2847335619999285}, "StandardsEngine._compile": {"calls": 9, "inclusive_s": 3.5855562589999863}}, "setup_s": 1.2919999790028669e-06, "body_s": 170.09424823400013, "teardown_s": 2.9850000373699004e-06} +{"event": "start", "test": "test_evidence_maintenance.EvidenceMaintenanceTest.test_consumer_registration_enters_existing_policy_owner", "at": 1790192894.1336725} +{"event": "end", "test": "test_evidence_maintenance.EvidenceMaintenanceTest.test_consumer_registration_enters_existing_policy_owner", "wall_s": 0.0009054469999227877, "cpu_s": 0.0009058960000025706, "status": "pass", "spans": {}, "setup_s": 1.7419999949197518e-06, "body_s": 0.000821320999875752, "teardown_s": 1.3520000265998533e-06} +{"event": "start", "test": "test_evidence_maintenance.EvidenceMaintenanceTest.test_pruning_preserves_current_claims_and_removes_stale_receipts", "at": 1790192894.1346414} +{"event": "end", "test": "test_evidence_maintenance.EvidenceMaintenanceTest.test_pruning_preserves_current_claims_and_removes_stale_receipts", "wall_s": 0.0006454270001086115, "cpu_s": 0.0006464209999990089, "status": "pass", "spans": {}, "setup_s": 5.300000793795334e-07, "body_s": 0.0005908959999487706, "teardown_s": 7.310000000870787e-07} +{"event": "start", "test": "test_evidence_maintenance.EvidenceMaintenanceTest.test_registered_checker_retirement_removes_its_graph_edges", "at": 1790192894.135346} +{"event": "end", "test": "test_evidence_maintenance.EvidenceMaintenanceTest.test_registered_checker_retirement_removes_its_graph_edges", "wall_s": 0.0007658280001123785, "cpu_s": 0.0007659589999988725, "status": "pass", "spans": {}, "setup_s": 6.310001481324434e-07, "body_s": 0.0007253979999859439, "teardown_s": 4.7100002120714635e-07} +{"event": "start", "test": "test_evidence_maintenance.EvidenceMaintenanceTest.test_retirement_preserves_real_dependencies_and_normative_consumers", "at": 1790192894.1361535} +{"event": "end", "test": "test_evidence_maintenance.EvidenceMaintenanceTest.test_retirement_preserves_real_dependencies_and_normative_consumers", "wall_s": 0.0005765939999946568, "cpu_s": 0.0005770170000012342, "status": "pass", "spans": {}, "setup_s": 3.6999995245423634e-07, "body_s": 0.0005362040001273272, "teardown_s": 5.099998361401958e-07} +{"event": "start", "test": "test_evidence_maintenance.EvidenceMaintenanceTest.test_subject_unregistration_preserves_guidance_and_retained_units", "at": 1790192894.1367738} +{"event": "end", "test": "test_evidence_maintenance.EvidenceMaintenanceTest.test_subject_unregistration_preserves_guidance_and_retained_units", "wall_s": 0.000642994000145336, "cpu_s": 0.0006433860000001346, "status": "pass", "spans": {}, "setup_s": 3.8999996831989847e-07, "body_s": 0.0006015319997914048, "teardown_s": 8.919998890632996e-07} +{"event": "start", "test": "test_evidence_maintenance.EvidenceMaintenanceTest.test_unknown_retirement_does_not_mutate_authority", "at": 1790192894.1374652} +{"event": "end", "test": "test_evidence_maintenance.EvidenceMaintenanceTest.test_unknown_retirement_does_not_mutate_authority", "wall_s": 0.00022365499989973614, "cpu_s": 0.00022382300000245436, "status": "pass", "spans": {}, "setup_s": 4.010000793641666e-07, "body_s": 0.0001864900000327907, "teardown_s": 5.210001745581394e-07} +{"event": "summary", "total_s": 171.72643762500002, "run": 7, "errors": 0, "failures": 0, "skips": 0} diff --git a/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/test_evidence_maintenance.stderr b/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/test_evidence_maintenance.stderr new file mode 100644 index 00000000..a0d11d69 --- /dev/null +++ b/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/test_evidence_maintenance.stderr @@ -0,0 +1,5 @@ +....... +---------------------------------------------------------------------- +Ran 7 tests in 170.099s + +OK diff --git a/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/test_evidence_maintenance.stdout b/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/test_evidence_maintenance.stdout new file mode 100644 index 00000000..869d1881 --- /dev/null +++ b/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/test_evidence_maintenance.stdout @@ -0,0 +1,14 @@ +START test_evidence_maintenance.EvidenceMaintenanceInterfaceTest.test_preview_and_overlap_preserve_working_tree_then_apply_retires +END test_evidence_maintenance.EvidenceMaintenanceInterfaceTest.test_preview_and_overlap_preserve_working_tree_then_apply_retires 170.094 pass +START test_evidence_maintenance.EvidenceMaintenanceTest.test_consumer_registration_enters_existing_policy_owner +END test_evidence_maintenance.EvidenceMaintenanceTest.test_consumer_registration_enters_existing_policy_owner 0.001 pass +START test_evidence_maintenance.EvidenceMaintenanceTest.test_pruning_preserves_current_claims_and_removes_stale_receipts +END test_evidence_maintenance.EvidenceMaintenanceTest.test_pruning_preserves_current_claims_and_removes_stale_receipts 0.001 pass +START test_evidence_maintenance.EvidenceMaintenanceTest.test_registered_checker_retirement_removes_its_graph_edges +END test_evidence_maintenance.EvidenceMaintenanceTest.test_registered_checker_retirement_removes_its_graph_edges 0.001 pass +START test_evidence_maintenance.EvidenceMaintenanceTest.test_retirement_preserves_real_dependencies_and_normative_consumers +END test_evidence_maintenance.EvidenceMaintenanceTest.test_retirement_preserves_real_dependencies_and_normative_consumers 0.001 pass +START test_evidence_maintenance.EvidenceMaintenanceTest.test_subject_unregistration_preserves_guidance_and_retained_units +END test_evidence_maintenance.EvidenceMaintenanceTest.test_subject_unregistration_preserves_guidance_and_retained_units 0.001 pass +START test_evidence_maintenance.EvidenceMaintenanceTest.test_unknown_retirement_does_not_mutate_authority +END test_evidence_maintenance.EvidenceMaintenanceTest.test_unknown_retirement_does_not_mutate_authority 0.0 pass diff --git a/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/test_generated_contract.exit.json b/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/test_generated_contract.exit.json new file mode 100644 index 00000000..b2e48073 --- /dev/null +++ b/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/test_generated_contract.exit.json @@ -0,0 +1 @@ +{"returncode": 0, "elapsed_s": 78.73669791221619, "args": ["--pattern", "test_generated_contract.py", "--exclude", "/mnt/data/engine-performance/evidence/completed-for-parallel.json"]} \ No newline at end of file diff --git a/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/test_generated_contract.jsonl b/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/test_generated_contract.jsonl new file mode 100644 index 00000000..6afe471b --- /dev/null +++ b/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/test_generated_contract.jsonl @@ -0,0 +1,32 @@ +{"event": "start", "test": "test_generated_contract.GeneratedContractTest.test_agent_tools_are_the_exact_compiler_projection", "at": 1790192830.7982366} +{"event": "end", "test": "test_generated_contract.GeneratedContractTest.test_agent_tools_are_the_exact_compiler_projection", "wall_s": 0.3497903749998841, "cpu_s": 0.33218187499999985, "status": "pass", "spans": {}, "setup_s": 1.4930001270840876e-06, "body_s": 0.3494947219999176, "teardown_s": 2.0429999949556077e-06} +{"event": "start", "test": "test_generated_contract.GeneratedContractTest.test_authored_examples_satisfy_the_public_contract", "at": 1790192831.1480756} +{"event": "end", "test": "test_generated_contract.GeneratedContractTest.test_authored_examples_satisfy_the_public_contract", "wall_s": 0.31343709399993713, "cpu_s": 0.31339546500000015, "status": "pass", "spans": {}, "setup_s": 1.3919998309575021e-06, "body_s": 0.3133550509999168, "teardown_s": 1.5529999473073985e-06} +{"event": "start", "test": "test_generated_contract.GeneratedContractTest.test_compiler_owns_the_complete_public_definition_closure", "at": 1790192831.4615965} +{"event": "end", "test": "test_generated_contract.GeneratedContractTest.test_compiler_owns_the_complete_public_definition_closure", "wall_s": 0.5570163919999231, "cpu_s": 0.5569953689999996, "status": "pass", "spans": {}, "setup_s": 9.610000688553555e-07, "body_s": 0.5569459570001527, "teardown_s": 1.4419999843084952e-06} +{"event": "start", "test": "test_generated_contract.GeneratedContractTest.test_coverage_read_is_scoped_optional_and_uses_repository_authority", "at": 1790192832.018687} +{"event": "end", "test": "test_generated_contract.GeneratedContractTest.test_coverage_read_is_scoped_optional_and_uses_repository_authority", "wall_s": 24.364841370000022, "cpu_s": 11.261587766000002, "status": "pass", "spans": {"tools.standards_engine.standards_engine.tools._contracts": {"calls": 1, "inclusive_s": 0.25946734599983756}, "StandardsEngine._compile": {"calls": 3, "inclusive_s": 18.008914083999798}, "SnapshotModule._content_id": {"calls": 2, "inclusive_s": 5.992639433000022}, "SnapshotModule.load_content": {"calls": 1, "inclusive_s": 3.0955115499998556}, "StandardsEngine._compiled_snapshot": {"calls": 1, "inclusive_s": 3.5464254149999306}}, "setup_s": 1.0520000159885967e-06, "body_s": 24.36474692799993, "teardown_s": 2.0330001007096143e-06} +{"event": "start", "test": "test_generated_contract.GeneratedContractTest.test_generated_contract_projections_are_current", "at": 1790192856.3836231} +{"event": "end", "test": "test_generated_contract.GeneratedContractTest.test_generated_contract_projections_are_current", "wall_s": 2.4275369350000346, "cpu_s": 0.0007855459999994707, "status": "pass", "spans": {}, "setup_s": 1.1610000001383014e-06, "body_s": 2.427431105999858, "teardown_s": 2.4539999685657676e-06} +{"event": "start", "test": "test_generated_contract.GeneratedContractTest.test_generated_native_models_decode_complete_v20_values", "at": 1790192858.8112967} +{"event": "end", "test": "test_generated_contract.GeneratedContractTest.test_generated_native_models_decode_complete_v20_values", "wall_s": 0.0008958329999586567, "cpu_s": 0.000896123000000415, "status": "pass", "spans": {}, "setup_s": 1.171999883808894e-06, "body_s": 0.0008350319999408384, "teardown_s": 6.110001322667813e-07} +{"event": "start", "test": "test_generated_contract.GeneratedContractTest.test_identity_fixtures_use_valid_public_handle_versions", "at": 1790192858.8122575} +{"event": "end", "test": "test_generated_contract.GeneratedContractTest.test_identity_fixtures_use_valid_public_handle_versions", "wall_s": 0.3623784659998819, "cpu_s": 0.3547384969999996, "status": "pass", "spans": {}, "setup_s": 5.609999789157882e-07, "body_s": 0.36228603699987616, "teardown_s": 2.2240001271711662e-06} +{"event": "start", "test": "test_generated_contract.GeneratedContractTest.test_interface_operations_bind_generated_calls_results_and_facade", "at": 1790192859.1747246} +{"event": "end", "test": "test_generated_contract.GeneratedContractTest.test_interface_operations_bind_generated_calls_results_and_facade", "wall_s": 0.3012708680000742, "cpu_s": 0.3012554269999992, "status": "pass", "spans": {}, "setup_s": 1.34200013235386e-06, "body_s": 0.30118862399990576, "teardown_s": 1.5820000953681301e-06} +{"event": "start", "test": "test_generated_contract.GeneratedContractTest.test_local_evidence_rejects_missing_files_and_wrong_digests", "at": 1790192859.4760838} +{"event": "end", "test": "test_generated_contract.GeneratedContractTest.test_local_evidence_rejects_missing_files_and_wrong_digests", "wall_s": 0.0005778859999736596, "cpu_s": 0.0005787999999995463, "status": "pass", "spans": {}, "setup_s": 9.809998573473422e-07, "body_s": 0.0005292929999995977, "teardown_s": 7.809999260643963e-07} +{"event": "start", "test": "test_generated_contract.GeneratedContractTest.test_local_facade_binds_always_allow_authorization", "at": 1790192859.4767094} +{"event": "end", "test": "test_generated_contract.GeneratedContractTest.test_local_facade_binds_always_allow_authorization", "wall_s": 0.3300438349999695, "cpu_s": 0.315449804, "status": "pass", "spans": {"tools.standards_engine.standards_engine.tools._contracts": {"calls": 1, "inclusive_s": 0.3255562169999848}}, "setup_s": 4.409998837218154e-07, "body_s": 0.3299631530001079, "teardown_s": 1.883000095403986e-06} +{"event": "start", "test": "test_generated_contract.GeneratedContractTest.test_missing_verification_input_returns_a_typed_rejection", "at": 1790192859.8068585} +{"event": "end", "test": "test_generated_contract.GeneratedContractTest.test_missing_verification_input_returns_a_typed_rejection", "wall_s": 0.3414473729999372, "cpu_s": 0.3409116569999995, "status": "pass", "spans": {"tools.standards_engine.standards_engine.tools._contracts": {"calls": 1, "inclusive_s": 0.33274432799998976}}, "setup_s": 1.2719999631372048e-06, "body_s": 0.3413563679998788, "teardown_s": 1.7129998468590202e-06} +{"event": "start", "test": "test_generated_contract.GeneratedContractTest.test_prepare_facade_passes_the_complete_generated_call", "at": 1790192860.1488156} +{"event": "end", "test": "test_generated_contract.GeneratedContractTest.test_prepare_facade_passes_the_complete_generated_call", "wall_s": 0.3991837060000307, "cpu_s": 0.36432278000000196, "status": "pass", "spans": {}, "setup_s": 1.5529999473073985e-06, "body_s": 0.39908529900003487, "teardown_s": 1.8230000478069996e-06} +{"event": "start", "test": "test_generated_contract.GeneratedContractTest.test_review_call_requires_exactly_three_decisions", "at": 1790192860.548077} +{"event": "end", "test": "test_generated_contract.GeneratedContractTest.test_review_call_requires_exactly_three_decisions", "wall_s": 0.0009273299999676965, "cpu_s": 0.0009277390000015373, "status": "pass", "spans": {}, "setup_s": 9.309999313700246e-07, "body_s": 0.0008737699999983306, "teardown_s": 1.2220000371598871e-06} +{"event": "start", "test": "test_generated_contract.GeneratedContractTest.test_router_read_exposes_editable_definitions_only_when_requested", "at": 1790192860.5490541} +{"event": "observation", "test": "test_generated_contract.GeneratedContractTest.test_router_read_exposes_editable_definitions_only_when_requested", "elapsed_s": 13.78635964099999, "stack": [" File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 58, in \n result=unittest.TextTestRunner(verbosity=1,resultclass=Result).run(suite)\n", " File \"/usr/lib/python3.13/unittest/runner.py\", line 240, in run\n test(result)\n", " File \"/usr/lib/python3.13/unittest/suite.py\", line 84, in __call__\n return self.run(*args, **kwds)\n", " File \"/usr/lib/python3.13/unittest/suite.py\", line 122, in run\n test(result)\n", " File \"/usr/lib/python3.13/unittest/case.py\", line 707, in __call__\n return self.run(*args, **kwds)\n", " File \"/usr/lib/python3.13/unittest/case.py\", line 651, in run\n self._callTestMethod(testMethod)\n", " File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 36, in timed\n try:return _fn(self,*args,**kwargs)\n", " File \"/usr/lib/python3.13/unittest/case.py\", line 606, in _callTestMethod\n if method() is not None:\n", " File \"/mnt/data/engine-performance/module-checkouts/test_generated_contract/tools/standards_engine/tests/test_generated_contract.py\", line 176, in test_router_read_exposes_editable_definitions_only_when_requested\n created = facade.create_snapshot({\"kind\": \"create-snapshot\"})\n", " File \"/mnt/data/engine-performance/module-checkouts/test_generated_contract/tools/standards_engine/standards_engine/tools.py\", line 178, in create_snapshot\n return self._result(\"create_snapshot\", self._engine.create_snapshot(call))\n", " File \"/mnt/data/engine-performance/module-checkouts/test_generated_contract/tools/standards_engine/standards_engine/context_projection.py\", line 60, in invoke\n return function(engine, call)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_generated_contract/tools/standards_engine/standards_engine/engine.py\", line 492, in create_snapshot\n return self._capture_snapshot(call)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_generated_contract/tools/standards_engine/standards_engine/engine.py\", line 503, in _capture_snapshot\n first = self._compile(recording)\n", " File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 25, in observe\n try:return original(*args,**kwargs)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_generated_contract/tools/standards_engine/standards_engine/engine.py\", line 1716, in _compile\n corpus, impact, load_coverage_horizon(source, corpus, impact)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_generated_contract/tools/standards_analysis/standards_analysis/coverage.py\", line 548, in load_coverage_horizon\n return _load_coverage_horizon(source, corpus, compiled, path)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_generated_contract/tools/standards_analysis/standards_analysis/coverage.py\", line 448, in _load_coverage_horizon\n suite_inputs = load_suite_input_manifest(selected_source, suite_inputs_path)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_generated_contract/tools/standards_metadata/standards_metadata/suite_inputs.py\", line 587, in load_suite_input_manifest\n if file_digest(source.read_bytes(item.path)) != item.digest:\n", " File \"/mnt/data/engine-performance/module-checkouts/test_generated_contract/tools/standards_metadata/standards_metadata/source.py\", line 80, in read_bytes\n content = bytes(self._source.read_bytes(normalized))\n", " File \"/mnt/data/engine-performance/module-checkouts/test_generated_contract/tools/standards_engine/standards_engine/engine.py\", line 264, in read_bytes\n return self._repository.read_file(\n", " File \"/mnt/data/engine-performance/module-checkouts/test_generated_contract/tools/repository_git/repository_git/repository.py\", line 690, in read_file\n tree = self._object(repository, tree_oid, \"tree\", algorithm)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_generated_contract/tools/repository_git/repository_git/repository.py\", line 746, in _object\n output = git_output(\n", " File \"/mnt/data/engine-performance/module-checkouts/test_generated_contract/tools/repository_git/repository_git/repository.py\", line 91, in git_output\n result = git_command(\n", " File \"/mnt/data/engine-performance/module-checkouts/test_generated_contract/tools/repository_git/repository_git/repository.py\", line 75, in git_command\n return _run_bounded(\n", " File \"/mnt/data/engine-performance/module-checkouts/test_generated_contract/tools/repository_git/repository_git/repository.py\", line 812, in _run_bounded\n process = subprocess.Popen(\n", " File \"/usr/lib/python3.13/subprocess.py\", line 1005, in __init__\n errread, errwrite) = self._get_handles(stdin, stdout, stderr)\n", " File \"/usr/lib/python3.13/subprocess.py\", line 1746, in _get_handles\n errread, errwrite = os.pipe()\n"]} +{"event": "end", "test": "test_generated_contract.GeneratedContractTest.test_router_read_exposes_editable_definitions_only_when_requested", "wall_s": 45.94865077999998, "cpu_s": 28.291226355000003, "status": "pass", "spans": {"tools.standards_engine.standards_engine.tools._contracts": {"calls": 2, "inclusive_s": 0.6694645180000407}, "StandardsEngine._compile": {"calls": 8, "inclusive_s": 24.45089093899969}, "SnapshotModule._content_id": {"calls": 6, "inclusive_s": 18.52716218899991}, "SnapshotModule.load_content": {"calls": 5, "inclusive_s": 15.39862448100007}, "StandardsEngine._compiled_snapshot": {"calls": 2, "inclusive_s": 6.982958849999932}, "StandardsEngine._proposal_projection": {"calls": 2, "inclusive_s": 9.094811232999973}, "AuthoringModule.read_revision": {"calls": 1, "inclusive_s": 0.03475136800011569}, "StandardsEngine.query_proposal": {"calls": 1, "inclusive_s": 4.7547661940000125}}, "setup_s": 1.0209998890786665e-06, "body_s": 45.94857292300003, "teardown_s": 1.8729999737843173e-06} +{"event": "start", "test": "test_generated_contract.GeneratedContractTest.test_verification_is_exposed_without_publication_and_refresh_is_explicit", "at": 1790192906.4978092} +{"event": "end", "test": "test_generated_contract.GeneratedContractTest.test_verification_is_exposed_without_publication_and_refresh_is_explicit", "wall_s": 0.3495147439998618, "cpu_s": 0.3402527060000011, "status": "pass", "spans": {"tools.standards_engine.standards_engine.tools._contracts": {"calls": 1, "inclusive_s": 0.3407945229998859}}, "setup_s": 1.1419999736972386e-06, "body_s": 0.34942879499999435, "teardown_s": 1.6220001270994544e-06} +{"event": "summary", "total_s": 77.51479537199998, "run": 15, "errors": 0, "failures": 0, "skips": 0} diff --git a/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/test_generated_contract.stderr b/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/test_generated_contract.stderr new file mode 100644 index 00000000..380355bd --- /dev/null +++ b/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/test_generated_contract.stderr @@ -0,0 +1,5 @@ +............... +---------------------------------------------------------------------- +Ran 15 tests in 76.049s + +OK diff --git a/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/test_generated_contract.stdout b/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/test_generated_contract.stdout new file mode 100644 index 00000000..ca34371c --- /dev/null +++ b/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/test_generated_contract.stdout @@ -0,0 +1,30 @@ +START test_generated_contract.GeneratedContractTest.test_agent_tools_are_the_exact_compiler_projection +END test_generated_contract.GeneratedContractTest.test_agent_tools_are_the_exact_compiler_projection 0.35 pass +START test_generated_contract.GeneratedContractTest.test_authored_examples_satisfy_the_public_contract +END test_generated_contract.GeneratedContractTest.test_authored_examples_satisfy_the_public_contract 0.313 pass +START test_generated_contract.GeneratedContractTest.test_compiler_owns_the_complete_public_definition_closure +END test_generated_contract.GeneratedContractTest.test_compiler_owns_the_complete_public_definition_closure 0.557 pass +START test_generated_contract.GeneratedContractTest.test_coverage_read_is_scoped_optional_and_uses_repository_authority +END test_generated_contract.GeneratedContractTest.test_coverage_read_is_scoped_optional_and_uses_repository_authority 24.365 pass +START test_generated_contract.GeneratedContractTest.test_generated_contract_projections_are_current +END test_generated_contract.GeneratedContractTest.test_generated_contract_projections_are_current 2.428 pass +START test_generated_contract.GeneratedContractTest.test_generated_native_models_decode_complete_v20_values +END test_generated_contract.GeneratedContractTest.test_generated_native_models_decode_complete_v20_values 0.001 pass +START test_generated_contract.GeneratedContractTest.test_identity_fixtures_use_valid_public_handle_versions +END test_generated_contract.GeneratedContractTest.test_identity_fixtures_use_valid_public_handle_versions 0.362 pass +START test_generated_contract.GeneratedContractTest.test_interface_operations_bind_generated_calls_results_and_facade +END test_generated_contract.GeneratedContractTest.test_interface_operations_bind_generated_calls_results_and_facade 0.301 pass +START test_generated_contract.GeneratedContractTest.test_local_evidence_rejects_missing_files_and_wrong_digests +END test_generated_contract.GeneratedContractTest.test_local_evidence_rejects_missing_files_and_wrong_digests 0.001 pass +START test_generated_contract.GeneratedContractTest.test_local_facade_binds_always_allow_authorization +END test_generated_contract.GeneratedContractTest.test_local_facade_binds_always_allow_authorization 0.33 pass +START test_generated_contract.GeneratedContractTest.test_missing_verification_input_returns_a_typed_rejection +END test_generated_contract.GeneratedContractTest.test_missing_verification_input_returns_a_typed_rejection 0.341 pass +START test_generated_contract.GeneratedContractTest.test_prepare_facade_passes_the_complete_generated_call +END test_generated_contract.GeneratedContractTest.test_prepare_facade_passes_the_complete_generated_call 0.399 pass +START test_generated_contract.GeneratedContractTest.test_review_call_requires_exactly_three_decisions +END test_generated_contract.GeneratedContractTest.test_review_call_requires_exactly_three_decisions 0.001 pass +START test_generated_contract.GeneratedContractTest.test_router_read_exposes_editable_definitions_only_when_requested +END test_generated_contract.GeneratedContractTest.test_router_read_exposes_editable_definitions_only_when_requested 45.949 pass +START test_generated_contract.GeneratedContractTest.test_verification_is_exposed_without_publication_and_refresh_is_explicit +END test_generated_contract.GeneratedContractTest.test_verification_is_exposed_without_publication_and_refresh_is_explicit 0.35 pass diff --git a/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/test_logical_authoring.exit.json b/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/test_logical_authoring.exit.json new file mode 100644 index 00000000..a86596e4 --- /dev/null +++ b/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/test_logical_authoring.exit.json @@ -0,0 +1 @@ +{"returncode": 0, "elapsed_s": 71.84419202804565, "args": ["--pattern", "test_logical_authoring.py", "--exclude", "/mnt/data/engine-performance/evidence/completed-for-parallel.json"]} \ No newline at end of file diff --git a/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/test_logical_authoring.jsonl b/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/test_logical_authoring.jsonl new file mode 100644 index 00000000..d47b8b1f --- /dev/null +++ b/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/test_logical_authoring.jsonl @@ -0,0 +1,48 @@ +{"event": "start", "test": "test_logical_authoring.LogicalAuthoringTests.test_change_set_is_immutable_and_normalized_before_compilation", "at": 1790192054.2249067} +{"event": "end", "test": "test_logical_authoring.LogicalAuthoringTests.test_change_set_is_immutable_and_normalized_before_compilation", "wall_s": 0.002490982999916014, "cpu_s": 0.0024539880000000736, "status": "pass", "spans": {}, "setup_s": 4.085999989911215e-06, "body_s": 0.0022353800000018964, "teardown_s": 1.3929999340689392e-06} +{"event": "start", "test": "test_logical_authoring.LogicalAuthoringTests.test_compiler_projects_module_relationships_through_current_owners", "at": 1790192054.2274501} +{"event": "end", "test": "test_logical_authoring.LogicalAuthoringTests.test_compiler_projects_module_relationships_through_current_owners", "wall_s": 1.3956673940000428, "cpu_s": 1.2673994559999997, "status": "pass", "spans": {"StandardsEngine._compile": {"calls": 2, "inclusive_s": 0.8195816489999288}}, "setup_s": 9.609999551685178e-07, "body_s": 1.3955322819999765, "teardown_s": 2.9850000373699004e-06} +{"event": "start", "test": "test_logical_authoring.LogicalAuthoringTests.test_compiler_revises_one_registered_policy_and_derives_analysis_input", "at": 1790192055.6232378} +{"event": "end", "test": "test_logical_authoring.LogicalAuthoringTests.test_compiler_revises_one_registered_policy_and_derives_analysis_input", "wall_s": 1.400681820999921, "cpu_s": 1.2104111150000003, "status": "pass", "spans": {"StandardsEngine._compile": {"calls": 2, "inclusive_s": 0.7505432350000092}}, "setup_s": 9.310000450568623e-07, "body_s": 1.4005605090000017, "teardown_s": 1.4519999922413263e-06} +{"event": "start", "test": "test_logical_authoring.LogicalAuthoringTests.test_create_nested_standard_and_route_atomically", "at": 1790192057.0239596} +{"event": "end", "test": "test_logical_authoring.LogicalAuthoringTests.test_create_nested_standard_and_route_atomically", "wall_s": 2.125753185999997, "cpu_s": 1.7026875339999998, "status": "pass", "spans": {"StandardsEngine._compile": {"calls": 2, "inclusive_s": 0.7179073240000662}}, "setup_s": 7.710000318184029e-07, "body_s": 2.1256725149999056, "teardown_s": 1.562000079502468e-06} +{"event": "start", "test": "test_logical_authoring.LogicalAuthoringTests.test_create_standard_hides_all_required_repository_projections", "at": 1790192059.1497967} +{"event": "end", "test": "test_logical_authoring.LogicalAuthoringTests.test_create_standard_hides_all_required_repository_projections", "wall_s": 3.372146550000025, "cpu_s": 2.7594096310000005, "status": "pass", "spans": {"StandardsEngine._compile": {"calls": 3, "inclusive_s": 1.2598155739998447}}, "setup_s": 1.0520000159885967e-06, "body_s": 3.3720596289999776, "teardown_s": 1.6719999393899343e-06} +{"event": "start", "test": "test_logical_authoring.LogicalAuthoringTests.test_created_standard_can_be_retired_with_complete_explicit_closure", "at": 1790192062.522035} +{"event": "end", "test": "test_logical_authoring.LogicalAuthoringTests.test_created_standard_can_be_retired_with_complete_explicit_closure", "wall_s": 7.017569822000041, "cpu_s": 5.45769954, "status": "pass", "spans": {"StandardsEngine._compile": {"calls": 5, "inclusive_s": 1.9600994789999504}}, "setup_s": 1.6120000054797856e-06, "body_s": 7.0174661549999655, "teardown_s": 2.103000042552594e-06} +{"event": "start", "test": "test_logical_authoring.LogicalAuthoringTests.test_duplicate_route_target_rejected", "at": 1790192069.5397158} +{"event": "end", "test": "test_logical_authoring.LogicalAuthoringTests.test_duplicate_route_target_rejected", "wall_s": 0.41475834899995334, "cpu_s": 0.4093960610000007, "status": "pass", "spans": {"StandardsEngine._compile": {"calls": 1, "inclusive_s": 0.3980698059999668}}, "setup_s": 1.301999986935698e-06, "body_s": 0.41466422799999236, "teardown_s": 1.3520000265998533e-06} +{"event": "start", "test": "test_logical_authoring.LogicalAuthoringTests.test_fact_presentation_and_value_order_preserve_semantic_revision", "at": 1790192069.954547} +{"event": "end", "test": "test_logical_authoring.LogicalAuthoringTests.test_fact_presentation_and_value_order_preserve_semantic_revision", "wall_s": 1.6046006149999812, "cpu_s": 1.362150745000001, "status": "pass", "spans": {"StandardsEngine._compile": {"calls": 2, "inclusive_s": 0.7415163570000232}}, "setup_s": 1.0109999948326731e-06, "body_s": 1.6045091780000575, "teardown_s": 1.6420000292782788e-06} +{"event": "start", "test": "test_logical_authoring.LogicalAuthoringTests.test_fact_revision_and_referenced_removal_are_validated", "at": 1790192071.5592635} +{"event": "end", "test": "test_logical_authoring.LogicalAuthoringTests.test_fact_revision_and_referenced_removal_are_validated", "wall_s": 3.236105569000074, "cpu_s": 2.740712872000003, "status": "pass", "spans": {"StandardsEngine._compile": {"calls": 5, "inclusive_s": 1.5480020799999465}}, "setup_s": 1.06199991023459e-06, "body_s": 3.2360005710000905, "teardown_s": 1.9330000213813037e-06} +{"event": "start", "test": "test_logical_authoring.LogicalAuthoringTests.test_move_preserves_identity_and_relocates_relationship_authority", "at": 1790192074.7954695} +{"event": "end", "test": "test_logical_authoring.LogicalAuthoringTests.test_move_preserves_identity_and_relocates_relationship_authority", "wall_s": 3.2802626860000146, "cpu_s": 2.6836992980000005, "status": "pass", "spans": {"StandardsEngine._compile": {"calls": 3, "inclusive_s": 1.1700252339999224}}, "setup_s": 1.4519999922413263e-06, "body_s": 3.280149166000001, "teardown_s": 1.7930000240085064e-06} +{"event": "start", "test": "test_logical_authoring.LogicalAuthoringTests.test_new_fact_and_rule_compile_together_and_unused_fact_can_be_removed", "at": 1790192078.0758374} +{"event": "end", "test": "test_logical_authoring.LogicalAuthoringTests.test_new_fact_and_rule_compile_together_and_unused_fact_can_be_removed", "wall_s": 3.2291220409999823, "cpu_s": 2.683511332000002, "status": "pass", "spans": {"StandardsEngine._compile": {"calls": 4, "inclusive_s": 1.4575723619999508}}, "setup_s": 1.1619999895629007e-06, "body_s": 3.2290072889999237, "teardown_s": 1.8130000398741686e-06} +{"event": "start", "test": "test_logical_authoring.LogicalAuthoringTests.test_noop_and_cyclic_relationship_changes_are_typed", "at": 1790192081.3050458} +{"event": "end", "test": "test_logical_authoring.LogicalAuthoringTests.test_noop_and_cyclic_relationship_changes_are_typed", "wall_s": 1.409565366000038, "cpu_s": 1.1629133960000004, "status": "pass", "spans": {"StandardsEngine._compile": {"calls": 2, "inclusive_s": 0.7498911280000584}}, "setup_s": 9.410000529896934e-07, "body_s": 1.409467229000029, "teardown_s": 1.8430000636726618e-06} +{"event": "start", "test": "test_logical_authoring.LogicalAuthoringTests.test_null_applicability_is_unsupported_by_toml_authority", "at": 1790192082.714727} +{"event": "end", "test": "test_logical_authoring.LogicalAuthoringTests.test_null_applicability_is_unsupported_by_toml_authority", "wall_s": 0.00016490699999849312, "cpu_s": 0.00016446500000100173, "status": "pass", "spans": {}, "setup_s": 1.2619999552043737e-06, "body_s": 0.00010784199992031063, "teardown_s": 4.810000291399774e-07} +{"event": "start", "test": "test_logical_authoring.LogicalAuthoringTests.test_opaque_consumer_handle_is_snapshot_bound", "at": 1790192082.7149322} +{"event": "end", "test": "test_logical_authoring.LogicalAuthoringTests.test_opaque_consumer_handle_is_snapshot_bound", "wall_s": 1.530979059999936, "cpu_s": 1.2411999020000017, "status": "pass", "spans": {"StandardsEngine._compile": {"calls": 2, "inclusive_s": 0.681348703000026}}, "setup_s": 4.309999894758221e-07, "body_s": 1.5308959260000847, "teardown_s": 1.4620000001741573e-06} +{"event": "start", "test": "test_logical_authoring.LogicalAuthoringTests.test_policy_relationship_put_and_remove_replay_cumulatively", "at": 1790192084.2459886} +{"event": "end", "test": "test_logical_authoring.LogicalAuthoringTests.test_policy_relationship_put_and_remove_replay_cumulatively", "wall_s": 7.491521180999939, "cpu_s": 6.042186188999995, "status": "pass", "spans": {"StandardsEngine._compile": {"calls": 7, "inclusive_s": 2.5211507539999047}}, "setup_s": 8.81000005392707e-07, "body_s": 7.491436234000048, "teardown_s": 1.5529999473073985e-06} +{"event": "start", "test": "test_logical_authoring.LogicalAuthoringTests.test_retired_standard_successor_must_survive_the_final_program", "at": 1790192091.7375975} +{"event": "observation", "test": "test_logical_authoring.LogicalAuthoringTests.test_retired_standard_successor_must_survive_the_final_program", "elapsed_s": 5.169748156999958, "stack": [" File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 58, in \n result=unittest.TextTestRunner(verbosity=1,resultclass=Result).run(suite)\n", " File \"/usr/lib/python3.13/unittest/runner.py\", line 240, in run\n test(result)\n", " File \"/usr/lib/python3.13/unittest/suite.py\", line 84, in __call__\n return self.run(*args, **kwds)\n", " File \"/usr/lib/python3.13/unittest/suite.py\", line 122, in run\n test(result)\n", " File \"/usr/lib/python3.13/unittest/case.py\", line 707, in __call__\n return self.run(*args, **kwds)\n", " File \"/usr/lib/python3.13/unittest/case.py\", line 651, in run\n self._callTestMethod(testMethod)\n", " File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 36, in timed\n try:return _fn(self,*args,**kwargs)\n", " File \"/usr/lib/python3.13/unittest/case.py\", line 606, in _callTestMethod\n if method() is not None:\n", " File \"/mnt/data/engine-performance/module-checkouts/test_logical_authoring/tools/standards_engine/tests/test_logical_authoring.py\", line 804, in test_retired_standard_successor_must_survive_the_final_program\n LogicalAuthoringCompiler(StandardsEngine._compile).compile(\n", " File \"/mnt/data/engine-performance/module-checkouts/test_logical_authoring/tools/standards_engine/standards_engine/logical_authoring.py\", line 967, in compile\n self._apply_edit(\n", " File \"/mnt/data/engine-performance/module-checkouts/test_logical_authoring/tools/standards_engine/standards_engine/logical_authoring.py\", line 1058, in _apply_edit\n self._retire_standard(files, raw, base_snapshot, compile_current)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_logical_authoring/tools/standards_engine/standards_engine/logical_authoring.py\", line 1508, in _retire_standard\n compiled = compile_current(files)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_logical_authoring/tools/standards_engine/standards_engine/logical_authoring.py\", line 943, in compile_current\n return self._compile_authorities(FrozenContentSource(current))\n", " File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 25, in observe\n try:return original(*args,**kwargs)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_logical_authoring/tools/standards_engine/standards_engine/engine.py\", line 1729, in _compile\n load_indexes(source, corpus),\n", " File \"/mnt/data/engine-performance/module-checkouts/test_logical_authoring/tools/standards_engine/standards_engine/navigation_indexes.py\", line 198, in load_indexes\n enforcement = _navigation_checks(source)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_logical_authoring/tools/standards_engine/standards_engine/navigation_indexes.py\", line 77, in _navigation_checks\n document = tomllib.loads(source.read_bytes(suite[\"path\"]).decode(\"utf-8\"))\n", " File \"/usr/lib/python3.13/tomllib/_parser.py\", line 102, in loads\n pos = key_value_rule(src, pos, out, header, parse_float)\n", " File \"/usr/lib/python3.13/tomllib/_parser.py\", line 331, in key_value_rule\n for cont_key in relative_path_cont_keys:\n", " File \"/usr/lib/python3.13/tomllib/_parser.py\", line 330, in \n relative_path_cont_keys = (header + key[:i] for i in range(1, len(key)))\n"]} +{"event": "end", "test": "test_logical_authoring.LogicalAuthoringTests.test_retired_standard_successor_must_survive_the_final_program", "wall_s": 6.397583684999972, "cpu_s": 5.016520409000002, "status": "pass", "spans": {"StandardsEngine._compile": {"calls": 5, "inclusive_s": 2.0560742359998585}}, "setup_s": 9.810000847210176e-07, "body_s": 6.397484936000069, "teardown_s": 2.172999984395574e-06} +{"event": "start", "test": "test_logical_authoring.LogicalAuthoringTests.test_retirement_requires_and_applies_complete_relationship_dispositions", "at": 1790192098.1353126} +{"event": "end", "test": "test_logical_authoring.LogicalAuthoringTests.test_retirement_requires_and_applies_complete_relationship_dispositions", "wall_s": 4.319672667999953, "cpu_s": 3.5197028619999955, "status": "pass", "spans": {"StandardsEngine._compile": {"calls": 5, "inclusive_s": 1.7871796530000665}}, "setup_s": 1.3519999129130156e-06, "body_s": 4.319569913000009, "teardown_s": 1.4319999763756641e-06} +{"event": "start", "test": "test_logical_authoring.LogicalAuthoringTests.test_route_targets_can_be_swapped_in_one_atomic_change", "at": 1790192102.4550989} +{"event": "end", "test": "test_logical_authoring.LogicalAuthoringTests.test_route_targets_can_be_swapped_in_one_atomic_change", "wall_s": 1.5159105709999494, "cpu_s": 1.2789115320000022, "status": "pass", "spans": {"StandardsEngine._compile": {"calls": 2, "inclusive_s": 0.681451609000078}}, "setup_s": 1.0320000001229346e-06, "body_s": 1.5158029689999921, "teardown_s": 1.513000029262912e-06} +{"event": "start", "test": "test_logical_authoring.LogicalAuthoringTests.test_rule_update_and_removal_keep_readable_and_executable_routes_in_sync", "at": 1790192103.9711194} +{"event": "end", "test": "test_logical_authoring.LogicalAuthoringTests.test_rule_update_and_removal_keep_readable_and_executable_routes_in_sync", "wall_s": 3.391978442999971, "cpu_s": 2.8540866900000026, "status": "pass", "spans": {"StandardsEngine._compile": {"calls": 4, "inclusive_s": 1.6153495410000005}}, "setup_s": 1.0420000080557656e-06, "body_s": 3.3918469149999737, "teardown_s": 2.1629999764627428e-06} +{"event": "start", "test": "test_logical_authoring.LogicalAuthoringTests.test_supporting_records_and_withdrawal_use_the_final_candidate", "at": 1790192107.3631883} +{"event": "end", "test": "test_logical_authoring.LogicalAuthoringTests.test_supporting_records_and_withdrawal_use_the_final_candidate", "wall_s": 8.326510025999937, "cpu_s": 6.591046511000002, "status": "pass", "spans": {"StandardsEngine._compile": {"calls": 7, "inclusive_s": 2.791066844999932}}, "setup_s": 1.0219999921901035e-06, "body_s": 8.326404728000057, "teardown_s": 1.9020000081582111e-06} +{"event": "start", "test": "test_logical_authoring.LogicalAuthoringTests.test_unknown_route_fact_is_rejected_without_changing_base", "at": 1790192115.6897757} +{"event": "end", "test": "test_logical_authoring.LogicalAuthoringTests.test_unknown_route_fact_is_rejected_without_changing_base", "wall_s": 1.2290154559999564, "cpu_s": 0.9946683490000012, "status": "pass", "spans": {"StandardsEngine._compile": {"calls": 2, "inclusive_s": 0.380086279000011}}, "setup_s": 9.310000450568623e-07, "body_s": 1.2289312600000812, "teardown_s": 1.7830000160756754e-06} +{"event": "start", "test": "test_logical_authoring.LogicalAuthoringTests.test_whole_module_rescope_preserves_identity_and_explicit_meaning", "at": 1790192116.9188673} +{"event": "end", "test": "test_logical_authoring.LogicalAuthoringTests.test_whole_module_rescope_preserves_identity_and_explicit_meaning", "wall_s": 2.166954881000038, "cpu_s": 1.9287874219999992, "status": "pass", "spans": {"StandardsEngine._compile": {"calls": 3, "inclusive_s": 1.2524199109999472}}, "setup_s": 8.81000005392707e-07, "body_s": 2.1668664180000405, "teardown_s": 1.503000021330081e-06} +{"event": "start", "test": "test_logical_authoring.LogicalAuthoringTests.test_whole_standard_revision_requires_companion_policy_semantics", "at": 1790192119.085901} +{"event": "end", "test": "test_logical_authoring.LogicalAuthoringTests.test_whole_standard_revision_requires_companion_policy_semantics", "wall_s": 3.3094727169999487, "cpu_s": 2.7190540220000017, "status": "pass", "spans": {"StandardsEngine._compile": {"calls": 4, "inclusive_s": 1.5268864619999931}}, "setup_s": 8.719999868844752e-07, "body_s": 3.309368090000021, "teardown_s": 2.322999989701202e-06} +{"event": "summary", "total_s": 70.50387793199991, "run": 23, "errors": 0, "failures": 0, "skips": 0} diff --git a/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/test_logical_authoring.stderr b/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/test_logical_authoring.stderr new file mode 100644 index 00000000..27f94a42 --- /dev/null +++ b/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/test_logical_authoring.stderr @@ -0,0 +1,5 @@ +....................... +---------------------------------------------------------------------- +Ran 23 tests in 69.080s + +OK diff --git a/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/test_logical_authoring.stdout b/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/test_logical_authoring.stdout new file mode 100644 index 00000000..ed98cce8 --- /dev/null +++ b/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/test_logical_authoring.stdout @@ -0,0 +1,46 @@ +START test_logical_authoring.LogicalAuthoringTests.test_change_set_is_immutable_and_normalized_before_compilation +END test_logical_authoring.LogicalAuthoringTests.test_change_set_is_immutable_and_normalized_before_compilation 0.002 pass +START test_logical_authoring.LogicalAuthoringTests.test_compiler_projects_module_relationships_through_current_owners +END test_logical_authoring.LogicalAuthoringTests.test_compiler_projects_module_relationships_through_current_owners 1.396 pass +START test_logical_authoring.LogicalAuthoringTests.test_compiler_revises_one_registered_policy_and_derives_analysis_input +END test_logical_authoring.LogicalAuthoringTests.test_compiler_revises_one_registered_policy_and_derives_analysis_input 1.401 pass +START test_logical_authoring.LogicalAuthoringTests.test_create_nested_standard_and_route_atomically +END test_logical_authoring.LogicalAuthoringTests.test_create_nested_standard_and_route_atomically 2.126 pass +START test_logical_authoring.LogicalAuthoringTests.test_create_standard_hides_all_required_repository_projections +END test_logical_authoring.LogicalAuthoringTests.test_create_standard_hides_all_required_repository_projections 3.372 pass +START test_logical_authoring.LogicalAuthoringTests.test_created_standard_can_be_retired_with_complete_explicit_closure +END test_logical_authoring.LogicalAuthoringTests.test_created_standard_can_be_retired_with_complete_explicit_closure 7.018 pass +START test_logical_authoring.LogicalAuthoringTests.test_duplicate_route_target_rejected +END test_logical_authoring.LogicalAuthoringTests.test_duplicate_route_target_rejected 0.415 pass +START test_logical_authoring.LogicalAuthoringTests.test_fact_presentation_and_value_order_preserve_semantic_revision +END test_logical_authoring.LogicalAuthoringTests.test_fact_presentation_and_value_order_preserve_semantic_revision 1.605 pass +START test_logical_authoring.LogicalAuthoringTests.test_fact_revision_and_referenced_removal_are_validated +END test_logical_authoring.LogicalAuthoringTests.test_fact_revision_and_referenced_removal_are_validated 3.236 pass +START test_logical_authoring.LogicalAuthoringTests.test_move_preserves_identity_and_relocates_relationship_authority +END test_logical_authoring.LogicalAuthoringTests.test_move_preserves_identity_and_relocates_relationship_authority 3.28 pass +START test_logical_authoring.LogicalAuthoringTests.test_new_fact_and_rule_compile_together_and_unused_fact_can_be_removed +END test_logical_authoring.LogicalAuthoringTests.test_new_fact_and_rule_compile_together_and_unused_fact_can_be_removed 3.229 pass +START test_logical_authoring.LogicalAuthoringTests.test_noop_and_cyclic_relationship_changes_are_typed +END test_logical_authoring.LogicalAuthoringTests.test_noop_and_cyclic_relationship_changes_are_typed 1.41 pass +START test_logical_authoring.LogicalAuthoringTests.test_null_applicability_is_unsupported_by_toml_authority +END test_logical_authoring.LogicalAuthoringTests.test_null_applicability_is_unsupported_by_toml_authority 0.0 pass +START test_logical_authoring.LogicalAuthoringTests.test_opaque_consumer_handle_is_snapshot_bound +END test_logical_authoring.LogicalAuthoringTests.test_opaque_consumer_handle_is_snapshot_bound 1.531 pass +START test_logical_authoring.LogicalAuthoringTests.test_policy_relationship_put_and_remove_replay_cumulatively +END test_logical_authoring.LogicalAuthoringTests.test_policy_relationship_put_and_remove_replay_cumulatively 7.492 pass +START test_logical_authoring.LogicalAuthoringTests.test_retired_standard_successor_must_survive_the_final_program +END test_logical_authoring.LogicalAuthoringTests.test_retired_standard_successor_must_survive_the_final_program 6.398 pass +START test_logical_authoring.LogicalAuthoringTests.test_retirement_requires_and_applies_complete_relationship_dispositions +END test_logical_authoring.LogicalAuthoringTests.test_retirement_requires_and_applies_complete_relationship_dispositions 4.32 pass +START test_logical_authoring.LogicalAuthoringTests.test_route_targets_can_be_swapped_in_one_atomic_change +END test_logical_authoring.LogicalAuthoringTests.test_route_targets_can_be_swapped_in_one_atomic_change 1.516 pass +START test_logical_authoring.LogicalAuthoringTests.test_rule_update_and_removal_keep_readable_and_executable_routes_in_sync +END test_logical_authoring.LogicalAuthoringTests.test_rule_update_and_removal_keep_readable_and_executable_routes_in_sync 3.392 pass +START test_logical_authoring.LogicalAuthoringTests.test_supporting_records_and_withdrawal_use_the_final_candidate +END test_logical_authoring.LogicalAuthoringTests.test_supporting_records_and_withdrawal_use_the_final_candidate 8.327 pass +START test_logical_authoring.LogicalAuthoringTests.test_unknown_route_fact_is_rejected_without_changing_base +END test_logical_authoring.LogicalAuthoringTests.test_unknown_route_fact_is_rejected_without_changing_base 1.229 pass +START test_logical_authoring.LogicalAuthoringTests.test_whole_module_rescope_preserves_identity_and_explicit_meaning +END test_logical_authoring.LogicalAuthoringTests.test_whole_module_rescope_preserves_identity_and_explicit_meaning 2.167 pass +START test_logical_authoring.LogicalAuthoringTests.test_whole_standard_revision_requires_companion_policy_semantics +END test_logical_authoring.LogicalAuthoringTests.test_whole_standard_revision_requires_companion_policy_semantics 3.309 pass diff --git a/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/test_mcp.exit.json b/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/test_mcp.exit.json new file mode 100644 index 00000000..ff71dc30 --- /dev/null +++ b/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/test_mcp.exit.json @@ -0,0 +1 @@ +{"returncode": 0, "elapsed_s": 34.889617681503296, "args": ["--pattern", "test_mcp.py", "--exclude", "/mnt/data/engine-performance/evidence/completed-for-parallel.json"]} \ No newline at end of file diff --git a/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/test_mcp.jsonl b/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/test_mcp.jsonl new file mode 100644 index 00000000..6099ab0f --- /dev/null +++ b/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/test_mcp.jsonl @@ -0,0 +1,25 @@ +{"event": "start", "test": "test_mcp.MCPTest.test_authoring_description_carries_exact_contract_without_type_rendering", "at": 1790192897.2981517} +{"event": "end", "test": "test_mcp.MCPTest.test_authoring_description_carries_exact_contract_without_type_rendering", "wall_s": 0.15942649499993422, "cpu_s": 0.1592309529999998, "status": "pass", "spans": {}, "setup_s": 1.6230001165240537e-06, "body_s": 0.15917474899993067, "teardown_s": 2.534000032028416e-06} +{"event": "start", "test": "test_mcp.MCPTest.test_authoring_inputs_expose_structure_and_preserve_recursive_validation", "at": 1790192897.4576724} +{"event": "end", "test": "test_mcp.MCPTest.test_authoring_inputs_expose_structure_and_preserve_recursive_validation", "wall_s": 0.018413170000030732, "cpu_s": 0.018414463999999686, "status": "pass", "spans": {}, "setup_s": 1.0010001005866798e-06, "body_s": 0.018323796000004222, "teardown_s": 2.0229999790899456e-06} +{"event": "start", "test": "test_mcp.MCPTest.test_catalog_schemas_validate_authored_examples_and_resolve_refs", "at": 1790192897.4761646} +{"event": "end", "test": "test_mcp.MCPTest.test_catalog_schemas_validate_authored_examples_and_resolve_refs", "wall_s": 2.2242959790000896, "cpu_s": 2.222295457, "status": "pass", "spans": {}, "setup_s": 1.1219999578315765e-06, "body_s": 2.2242113719998997, "teardown_s": 1.511999926151475e-06} +{"event": "start", "test": "test_mcp.MCPTest.test_default_catalog_focuses_navigation_and_workflows", "at": 1790192899.700542} +{"event": "end", "test": "test_mcp.MCPTest.test_default_catalog_focuses_navigation_and_workflows", "wall_s": 0.016227161999950113, "cpu_s": 0.016228273999999487, "status": "pass", "spans": {}, "setup_s": 8.609999895270448e-07, "body_s": 0.016152890999819647, "teardown_s": 1.503000021330081e-06} +{"event": "start", "test": "test_mcp.MCPTest.test_default_guidance_uses_available_recovery_tools", "at": 1790192899.7168362} +{"event": "end", "test": "test_mcp.MCPTest.test_default_guidance_uses_available_recovery_tools", "wall_s": 0.00792960600006154, "cpu_s": 0.007930810000000399, "status": "pass", "spans": {}, "setup_s": 8.81000005392707e-07, "body_s": 0.007859471000074336, "teardown_s": 1.9130000055156415e-06} +{"event": "start", "test": "test_mcp.MCPTest.test_input_projection_preserves_reference_siblings", "at": 1790192899.7248456} +{"event": "end", "test": "test_mcp.MCPTest.test_input_projection_preserves_reference_siblings", "wall_s": 0.0002938200000244251, "cpu_s": 0.0002940979999994653, "status": "pass", "spans": {}, "setup_s": 1.4620000001741573e-06, "body_s": 0.0002341200001865218, "teardown_s": 5.510000846697949e-07} +{"event": "start", "test": "test_mcp.MCPTest.test_internal_failure_is_tool_error_without_retry", "at": 1790192899.725181} +{"event": "end", "test": "test_mcp.MCPTest.test_internal_failure_is_tool_error_without_retry", "wall_s": 0.01274198900000556, "cpu_s": 0.012742241999999848, "status": "pass", "spans": {}, "setup_s": 6.210000265127746e-07, "body_s": 0.012685663999945973, "teardown_s": 1.0610001481836662e-06} +{"event": "start", "test": "test_mcp.MCPTest.test_lifecycle_and_protocol_errors_never_open_engine", "at": 1790192899.7379715} +{"event": "end", "test": "test_mcp.MCPTest.test_lifecycle_and_protocol_errors_never_open_engine", "wall_s": 0.012078804999873682, "cpu_s": 0.012079757000000413, "status": "pass", "spans": {}, "setup_s": 5.909998890274437e-07, "body_s": 0.012013976999924125, "teardown_s": 1.401999952577171e-06} +{"event": "start", "test": "test_mcp.MCPTest.test_module_stdio_launch_from_unrelated_working_directory", "at": 1790192899.750129} +{"event": "end", "test": "test_mcp.MCPTest.test_module_stdio_launch_from_unrelated_working_directory", "wall_s": 2.495596599999999, "cpu_s": 0.006666169999999916, "status": "pass", "spans": {}, "setup_s": 1.2119999155402184e-06, "body_s": 2.4955018770001516, "teardown_s": 1.8430000636726618e-06} +{"event": "start", "test": "test_mcp.MCPTest.test_parse_errors_and_notifications_keep_stream_synchronized", "at": 1790192902.2458107} +{"event": "end", "test": "test_mcp.MCPTest.test_parse_errors_and_notifications_keep_stream_synchronized", "wall_s": 0.012755108000192195, "cpu_s": 0.01271436999999942, "status": "pass", "spans": {}, "setup_s": 1.1119998362119077e-06, "body_s": 0.012656791000154044, "teardown_s": 1.8929999896499794e-06} +{"event": "start", "test": "test_mcp.MCPTest.test_preserves_typed_outcomes_and_never_retries", "at": 1790192902.2586765} +{"event": "end", "test": "test_mcp.MCPTest.test_preserves_typed_outcomes_and_never_retries", "wall_s": 0.015502436000133457, "cpu_s": 0.015502976000000501, "status": "pass", "spans": {}, "setup_s": 1.1619999895629007e-06, "body_s": 0.015414022999948429, "teardown_s": 1.6420001429651165e-06} +{"event": "start", "test": "test_mcp.MCPTest.test_real_snapshot_read_and_validation_through_server", "at": 1790192902.2742915} +{"event": "end", "test": "test_mcp.MCPTest.test_real_snapshot_read_and_validation_through_server", "wall_s": 26.94432235399995, "cpu_s": 12.658780050999999, "status": "pass", "spans": {"tools.standards_engine.standards_engine.tools._contracts": {"calls": 1, "inclusive_s": 0.30132025200009593}, "StandardsEngine._compile": {"calls": 3, "inclusive_s": 19.737701360999836}, "SnapshotModule._content_id": {"calls": 2, "inclusive_s": 6.499171702000012}, "SnapshotModule.load_content": {"calls": 1, "inclusive_s": 3.2746611459999713}, "StandardsEngine._compiled_snapshot": {"calls": 1, "inclusive_s": 3.6547979399999804}}, "setup_s": 1.3520000265998533e-06, "body_s": 26.94421864900005, "teardown_s": 2.2540000372828217e-06} +{"event": "summary", "total_s": 33.59215314500011, "run": 12, "errors": 0, "failures": 0, "skips": 0} diff --git a/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/test_mcp.stderr b/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/test_mcp.stderr new file mode 100644 index 00000000..08294074 --- /dev/null +++ b/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/test_mcp.stderr @@ -0,0 +1,5 @@ +............ +---------------------------------------------------------------------- +Ran 12 tests in 31.921s + +OK diff --git a/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/test_mcp.stdout b/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/test_mcp.stdout new file mode 100644 index 00000000..14e58979 --- /dev/null +++ b/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/test_mcp.stdout @@ -0,0 +1,24 @@ +START test_mcp.MCPTest.test_authoring_description_carries_exact_contract_without_type_rendering +END test_mcp.MCPTest.test_authoring_description_carries_exact_contract_without_type_rendering 0.159 pass +START test_mcp.MCPTest.test_authoring_inputs_expose_structure_and_preserve_recursive_validation +END test_mcp.MCPTest.test_authoring_inputs_expose_structure_and_preserve_recursive_validation 0.018 pass +START test_mcp.MCPTest.test_catalog_schemas_validate_authored_examples_and_resolve_refs +END test_mcp.MCPTest.test_catalog_schemas_validate_authored_examples_and_resolve_refs 2.224 pass +START test_mcp.MCPTest.test_default_catalog_focuses_navigation_and_workflows +END test_mcp.MCPTest.test_default_catalog_focuses_navigation_and_workflows 0.016 pass +START test_mcp.MCPTest.test_default_guidance_uses_available_recovery_tools +END test_mcp.MCPTest.test_default_guidance_uses_available_recovery_tools 0.008 pass +START test_mcp.MCPTest.test_input_projection_preserves_reference_siblings +END test_mcp.MCPTest.test_input_projection_preserves_reference_siblings 0.0 pass +START test_mcp.MCPTest.test_internal_failure_is_tool_error_without_retry +END test_mcp.MCPTest.test_internal_failure_is_tool_error_without_retry 0.013 pass +START test_mcp.MCPTest.test_lifecycle_and_protocol_errors_never_open_engine +END test_mcp.MCPTest.test_lifecycle_and_protocol_errors_never_open_engine 0.012 pass +START test_mcp.MCPTest.test_module_stdio_launch_from_unrelated_working_directory +END test_mcp.MCPTest.test_module_stdio_launch_from_unrelated_working_directory 2.496 pass +START test_mcp.MCPTest.test_parse_errors_and_notifications_keep_stream_synchronized +END test_mcp.MCPTest.test_parse_errors_and_notifications_keep_stream_synchronized 0.013 pass +START test_mcp.MCPTest.test_preserves_typed_outcomes_and_never_retries +END test_mcp.MCPTest.test_preserves_typed_outcomes_and_never_retries 0.016 pass +START test_mcp.MCPTest.test_real_snapshot_read_and_validation_through_server +END test_mcp.MCPTest.test_real_snapshot_read_and_validation_through_server 26.944 pass diff --git a/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/test_navigation.exit.json b/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/test_navigation.exit.json new file mode 100644 index 00000000..bfa25c02 --- /dev/null +++ b/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/test_navigation.exit.json @@ -0,0 +1 @@ +{"returncode": 1, "elapsed_s": 106.81849074363708, "args": ["--pattern", "test_navigation.py", "--exclude", "/mnt/data/engine-performance/evidence/completed-for-parallel.json"]} \ No newline at end of file diff --git a/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/test_navigation.jsonl b/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/test_navigation.jsonl new file mode 100644 index 00000000..bb4b56c8 --- /dev/null +++ b/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/test_navigation.jsonl @@ -0,0 +1,17 @@ +{"event": "start", "test": "test_navigation.NavigationTest.test_development_proportionality_routes_directly_and_before_planning", "at": 1790192932.0247064} +{"event": "end", "test": "test_navigation.NavigationTest.test_development_proportionality_routes_directly_and_before_planning", "wall_s": 6.652997441000025, "cpu_s": 6.651642967999999, "status": "pass", "spans": {"SnapshotModule._content_id": {"calls": 2, "inclusive_s": 5.897144430999788}, "SnapshotModule.load_content": {"calls": 2, "inclusive_s": 5.920627540000169}, "StandardsEngine._compile": {"calls": 2, "inclusive_s": 0.6993948910003382}, "StandardsEngine._compiled_snapshot": {"calls": 2, "inclusive_s": 6.6255081550002615}}, "setup_s": 2.1440000637085177e-06, "body_s": 6.65279701999998, "teardown_s": 2.2739998257748084e-06} +{"event": "start", "test": "test_navigation.NavigationTest.test_live_worktree_mutation_cannot_change_snapshot_reads", "at": 1790192938.6777897} +{"event": "end", "test": "test_navigation.NavigationTest.test_live_worktree_mutation_cannot_change_snapshot_reads", "wall_s": 0.19790344700004425, "cpu_s": 0.02273119000000179, "status": "error", "spans": {}, "setup_s": 1.2420000530255493e-06, "body_s": 0.19620857600011732, "teardown_s": 2.06300001082127e-06} +{"event": "start", "test": "test_navigation.NavigationTest.test_proposal_creation_returns_typed_failure_for_invalid_projected_content", "at": 1790192938.8757732} +{"event": "end", "test": "test_navigation.NavigationTest.test_proposal_creation_returns_typed_failure_for_invalid_projected_content", "wall_s": 10.07355708199998, "cpu_s": 9.68388466, "status": "pass", "spans": {"SnapshotModule._content_id": {"calls": 3, "inclusive_s": 8.974126024999805}, "SnapshotModule.load_content": {"calls": 3, "inclusive_s": 9.017086623000068}, "StandardsEngine._compile": {"calls": 1, "inclusive_s": 0.3962364640001397}, "StandardsEngine._proposal_projection": {"calls": 1, "inclusive_s": 4.010532039000054}}, "setup_s": 9.109999155043624e-07, "body_s": 10.073470382000096, "teardown_s": 1.6429999050160404e-06} +{"event": "start", "test": "test_navigation.NavigationTest.test_proposal_query_projects_every_request_from_an_exact_revision", "at": 1790192948.949419} +{"event": "observation", "test": "test_navigation.NavigationTest.test_proposal_query_projects_every_request_from_an_exact_revision", "elapsed_s": 4.32168273100001, "stack": [" File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 58, in \n result=unittest.TextTestRunner(verbosity=1,resultclass=Result).run(suite)\n", " File \"/usr/lib/python3.13/unittest/runner.py\", line 240, in run\n test(result)\n", " File \"/usr/lib/python3.13/unittest/suite.py\", line 84, in __call__\n return self.run(*args, **kwds)\n", " File \"/usr/lib/python3.13/unittest/suite.py\", line 122, in run\n test(result)\n", " File \"/usr/lib/python3.13/unittest/case.py\", line 707, in __call__\n return self.run(*args, **kwds)\n", " File \"/usr/lib/python3.13/unittest/case.py\", line 651, in run\n self._callTestMethod(testMethod)\n", " File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 36, in timed\n try:return _fn(self,*args,**kwargs)\n", " File \"/usr/lib/python3.13/unittest/case.py\", line 606, in _callTestMethod\n if method() is not None:\n", " File \"/mnt/data/engine-performance/module-checkouts/test_navigation/tools/standards_engine/tests/test_navigation.py\", line 325, in test_proposal_query_projects_every_request_from_an_exact_revision\n created = self.engine.create_proposal(\n", " File \"/mnt/data/engine-performance/module-checkouts/test_navigation/tools/standards_engine/standards_engine/context_projection.py\", line 60, in invoke\n return function(engine, call)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_navigation/tools/standards_engine/standards_engine/engine.py\", line 833, in create_proposal\n summary, revision = self._authoring.create_proposal(\n", " File \"/mnt/data/engine-performance/module-checkouts/test_navigation/tools/standards_engine/standards_engine/authoring.py\", line 675, in create_proposal\n self._observe_repository_paths(base_snapshot),\n", " File \"/mnt/data/engine-performance/module-checkouts/test_navigation/tools/standards_engine/standards_engine/engine.py\", line 1698, in _repository_paths_for_snapshot\n capture = self._snapshots.load_content(snapshot)\n", " File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 25, in observe\n try:return original(*args,**kwargs)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_navigation/tools/standards_snapshots/standards_snapshots/module.py\", line 112, in load_content\n if self._content_id(capture) != content_id:\n", " File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 25, in observe\n try:return original(*args,**kwargs)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_navigation/tools/standards_snapshots/standards_snapshots/module.py\", line 210, in _content_id\n return hash_identity(\n", " File \"/mnt/data/engine-performance/module-checkouts/test_navigation/tools/standards_identity/standards_identity/encoding.py\", line 93, in hash_identity\n encoded = encode_identity_value(value)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_navigation/tools/standards_identity/standards_identity/encoding.py\", line 75, in encode_identity_value\n return _encode(value)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_navigation/tools/standards_identity/standards_identity/encoding.py\", line 191, in _encode\n return b\"[\" + b\",\".join(_encode(item) for item in value.values) + b\"]\"\n", " File \"/mnt/data/engine-performance/module-checkouts/test_navigation/tools/standards_identity/standards_identity/encoding.py\", line 191, in \n return b\"[\" + b\",\".join(_encode(item) for item in value.values) + b\"]\"\n", " File \"/mnt/data/engine-performance/module-checkouts/test_navigation/tools/standards_identity/standards_identity/encoding.py\", line 197, in _encode\n return b\"{\" + b\",\".join(encoded_members) + b\"}\"\n", " File \"/mnt/data/engine-performance/module-checkouts/test_navigation/tools/standards_identity/standards_identity/encoding.py\", line 194, in \n _encode_string(key) + b\":\" + _encode(member_value)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_navigation/tools/standards_identity/standards_identity/encoding.py\", line 191, in _encode\n return b\"[\" + b\",\".join(_encode(item) for item in value.values) + b\"]\"\n"]} +{"event": "end", "test": "test_navigation.NavigationTest.test_proposal_query_projects_every_request_from_an_exact_revision", "wall_s": 40.94343634300003, "cpu_s": 38.016495034, "status": "pass", "spans": {"SnapshotModule._content_id": {"calls": 9, "inclusive_s": 27.307487287999948}, "SnapshotModule.load_content": {"calls": 9, "inclusive_s": 27.458799088999513}, "StandardsEngine._compile": {"calls": 15, "inclusive_s": 5.636071870000478}, "StandardsEngine._compiled_snapshot": {"calls": 1, "inclusive_s": 3.4939931219998925}, "StandardsEngine._proposal_projection": {"calls": 7, "inclusive_s": 33.605788117999964}, "AuthoringModule.read_revision": {"calls": 6, "inclusive_s": 0.20675484300022617}, "StandardsEngine.query_proposal": {"calls": 5, "inclusive_s": 24.223014282999884}, "tools.standards_engine.standards_engine.tools._contracts": {"calls": 1, "inclusive_s": 0.2899917770000684}}, "setup_s": 1.1119998362119077e-06, "body_s": 40.943344475, "teardown_s": 1.782000026651076e-06} +{"event": "start", "test": "test_navigation.NavigationTest.test_read_related_and_inspect_share_the_snapshot_root", "at": 1790192989.8929448} +{"event": "observation", "test": "test_navigation.NavigationTest.test_read_related_and_inspect_share_the_snapshot_root", "elapsed_s": 8.389107907000152, "stack": [" File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 58, in \n result=unittest.TextTestRunner(verbosity=1,resultclass=Result).run(suite)\n", " File \"/usr/lib/python3.13/unittest/runner.py\", line 240, in run\n test(result)\n", " File \"/usr/lib/python3.13/unittest/suite.py\", line 84, in __call__\n return self.run(*args, **kwds)\n", " File \"/usr/lib/python3.13/unittest/suite.py\", line 122, in run\n test(result)\n", " File \"/usr/lib/python3.13/unittest/case.py\", line 707, in __call__\n return self.run(*args, **kwds)\n", " File \"/usr/lib/python3.13/unittest/case.py\", line 651, in run\n self._callTestMethod(testMethod)\n", " File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 36, in timed\n try:return _fn(self,*args,**kwargs)\n", " File \"/usr/lib/python3.13/unittest/case.py\", line 606, in _callTestMethod\n if method() is not None:\n", " File \"/mnt/data/engine-performance/module-checkouts/test_navigation/tools/standards_engine/tests/test_navigation.py\", line 255, in test_read_related_and_inspect_share_the_snapshot_root\n related = self.engine.query(\n", " File \"/mnt/data/engine-performance/module-checkouts/test_navigation/tools/standards_engine/standards_engine/context_projection.py\", line 60, in invoke\n return function(engine, call)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_navigation/tools/standards_engine/standards_engine/engine.py\", line 999, in query\n compiled = self._compiled_snapshot(self._snapshot_id(call.snapshot))\n", " File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 25, in observe\n try:return original(*args,**kwargs)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_navigation/tools/standards_engine/standards_engine/engine.py\", line 1672, in _compiled_snapshot\n capture = self._snapshots.load_content(snapshot)\n", " File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 25, in observe\n try:return original(*args,**kwargs)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_navigation/tools/standards_snapshots/standards_snapshots/module.py\", line 112, in load_content\n if self._content_id(capture) != content_id:\n", " File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 25, in observe\n try:return original(*args,**kwargs)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_navigation/tools/standards_snapshots/standards_snapshots/module.py\", line 210, in _content_id\n return hash_identity(\n", " File \"/mnt/data/engine-performance/module-checkouts/test_navigation/tools/standards_identity/standards_identity/encoding.py\", line 93, in hash_identity\n encoded = encode_identity_value(value)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_navigation/tools/standards_identity/standards_identity/encoding.py\", line 75, in encode_identity_value\n return _encode(value)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_navigation/tools/standards_identity/standards_identity/encoding.py\", line 191, in _encode\n return b\"[\" + b\",\".join(_encode(item) for item in value.values) + b\"]\"\n", " File \"/mnt/data/engine-performance/module-checkouts/test_navigation/tools/standards_identity/standards_identity/encoding.py\", line 191, in \n return b\"[\" + b\",\".join(_encode(item) for item in value.values) + b\"]\"\n", " File \"/mnt/data/engine-performance/module-checkouts/test_navigation/tools/standards_identity/standards_identity/encoding.py\", line 197, in _encode\n return b\"{\" + b\",\".join(encoded_members) + b\"}\"\n", " File \"/mnt/data/engine-performance/module-checkouts/test_navigation/tools/standards_identity/standards_identity/encoding.py\", line 194, in \n _encode_string(key) + b\":\" + _encode(member_value)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_navigation/tools/standards_identity/standards_identity/encoding.py\", line 191, in _encode\n return b\"[\" + b\",\".join(_encode(item) for item in value.values) + b\"]\"\n", " File \"/mnt/data/engine-performance/module-checkouts/test_navigation/tools/standards_identity/standards_identity/encoding.py\", line 191, in \n return b\"[\" + b\",\".join(_encode(item) for item in value.values) + b\"]\"\n", " File \"/mnt/data/engine-performance/module-checkouts/test_navigation/tools/standards_identity/standards_identity/encoding.py\", line 187, in _encode\n return _encode_integer(value)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_navigation/tools/standards_identity/standards_identity/encoding.py\", line 211, in _encode_integer\n suffix = b\"\".join(\n"]} +{"event": "end", "test": "test_navigation.NavigationTest.test_read_related_and_inspect_share_the_snapshot_root", "wall_s": 13.010178056000086, "cpu_s": 12.859278894999989, "status": "pass", "spans": {"SnapshotModule._content_id": {"calls": 4, "inclusive_s": 11.481821314999706}, "SnapshotModule.load_content": {"calls": 4, "inclusive_s": 11.533847069999865}, "StandardsEngine._compile": {"calls": 4, "inclusive_s": 1.4391946229998211}, "StandardsEngine._compiled_snapshot": {"calls": 4, "inclusive_s": 12.985528378999788}}, "setup_s": 9.309999313700246e-07, "body_s": 13.010090515000002, "teardown_s": 1.762000010785414e-06} +{"event": "start", "test": "test_navigation.NavigationTest.test_route_selects_direct_modules_and_required_closure", "at": 1790193002.9032042} +{"event": "end", "test": "test_navigation.NavigationTest.test_route_selects_direct_modules_and_required_closure", "wall_s": 3.7467559179999625, "cpu_s": 3.741890214999998, "status": "pass", "spans": {"SnapshotModule._content_id": {"calls": 1, "inclusive_s": 3.2907839930001046}, "SnapshotModule.load_content": {"calls": 1, "inclusive_s": 3.3055527520000396}, "StandardsEngine._compile": {"calls": 1, "inclusive_s": 0.4197067329998845}, "StandardsEngine._compiled_snapshot": {"calls": 1, "inclusive_s": 3.728896445999908}}, "setup_s": 8.919998890632996e-07, "body_s": 3.7466267039999366, "teardown_s": 1.973000053112628e-06} +{"event": "start", "test": "test_navigation.NavigationTest.test_unknown_and_invalid_route_facts_have_typed_results", "at": 1790193006.6500845} +{"event": "end", "test": "test_navigation.NavigationTest.test_unknown_and_invalid_route_facts_have_typed_results", "wall_s": 7.202050240000062, "cpu_s": 7.1698561439999935, "status": "pass", "spans": {"SnapshotModule._content_id": {"calls": 2, "inclusive_s": 6.406793711999853}, "SnapshotModule.load_content": {"calls": 2, "inclusive_s": 6.431147537999777}, "StandardsEngine._compile": {"calls": 2, "inclusive_s": 0.745237096999972}, "StandardsEngine._compiled_snapshot": {"calls": 2, "inclusive_s": 7.183237426999995}}, "setup_s": 1.7030001799867023e-06, "body_s": 7.201937201000192, "teardown_s": 2.2730000637238845e-06} +{"event": "summary", "total_s": 105.58538320600019, "run": 7, "errors": 1, "failures": 0, "skips": 0} diff --git a/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/test_navigation.stderr b/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/test_navigation.stderr new file mode 100644 index 00000000..cfa1acff --- /dev/null +++ b/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/test_navigation.stderr @@ -0,0 +1,20 @@ +.E..... +====================================================================== +ERROR: test_live_worktree_mutation_cannot_change_snapshot_reads (test_navigation.NavigationTest.test_live_worktree_mutation_cannot_change_snapshot_reads) +---------------------------------------------------------------------- +Traceback (most recent call last): + File "/mnt/data/engine-performance/harness/run_timed_suite.py", line 36, in timed + try:return _fn(self,*args,**kwargs) + ~~~^^^^^^^^^^^^^^^^^^^^^ + File "/usr/lib/python3.13/unittest/case.py", line 606, in _callTestMethod + if method() is not None: + ~~~~~~^^ + File "/mnt/data/engine-performance/module-checkouts/test_navigation/tools/standards_engine/tests/test_navigation.py", line 297, in test_live_worktree_mutation_cannot_change_snapshot_reads + snapshot = created.snapshot.snapshot + ^^^^^^^^^^^^^^^^ +AttributeError: 'RejectedResult' object has no attribute 'snapshot' + +---------------------------------------------------------------------- +Ran 7 tests in 104.021s + +FAILED (errors=1) diff --git a/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/test_navigation.stdout b/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/test_navigation.stdout new file mode 100644 index 00000000..87a419ad --- /dev/null +++ b/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/test_navigation.stdout @@ -0,0 +1,14 @@ +START test_navigation.NavigationTest.test_development_proportionality_routes_directly_and_before_planning +END test_navigation.NavigationTest.test_development_proportionality_routes_directly_and_before_planning 6.653 pass +START test_navigation.NavigationTest.test_live_worktree_mutation_cannot_change_snapshot_reads +END test_navigation.NavigationTest.test_live_worktree_mutation_cannot_change_snapshot_reads 0.198 error +START test_navigation.NavigationTest.test_proposal_creation_returns_typed_failure_for_invalid_projected_content +END test_navigation.NavigationTest.test_proposal_creation_returns_typed_failure_for_invalid_projected_content 10.074 pass +START test_navigation.NavigationTest.test_proposal_query_projects_every_request_from_an_exact_revision +END test_navigation.NavigationTest.test_proposal_query_projects_every_request_from_an_exact_revision 40.943 pass +START test_navigation.NavigationTest.test_read_related_and_inspect_share_the_snapshot_root +END test_navigation.NavigationTest.test_read_related_and_inspect_share_the_snapshot_root 13.01 pass +START test_navigation.NavigationTest.test_route_selects_direct_modules_and_required_closure +END test_navigation.NavigationTest.test_route_selects_direct_modules_and_required_closure 3.747 pass +START test_navigation.NavigationTest.test_unknown_and_invalid_route_facts_have_typed_results +END test_navigation.NavigationTest.test_unknown_and_invalid_route_facts_have_typed_results 7.202 pass diff --git a/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/test_navigation_indexes.exit.json b/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/test_navigation_indexes.exit.json new file mode 100644 index 00000000..076e7583 --- /dev/null +++ b/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/test_navigation_indexes.exit.json @@ -0,0 +1 @@ +{"returncode": 0, "elapsed_s": 621.571172952652, "args": ["--pattern", "test_navigation_indexes.py", "--exclude", "/mnt/data/engine-performance/evidence/completed-for-parallel.json"]} \ No newline at end of file diff --git a/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/test_navigation_indexes.jsonl b/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/test_navigation_indexes.jsonl new file mode 100644 index 00000000..2338358d --- /dev/null +++ b/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/test_navigation_indexes.jsonl @@ -0,0 +1,42 @@ +{"event": "start", "test": "test_navigation_indexes.NavigationIndexAuthorityTest.test_absent_catalog_exposes_no_authoring_capability", "at": 1790192053.2441804} +{"event": "end", "test": "test_navigation_indexes.NavigationIndexAuthorityTest.test_absent_catalog_exposes_no_authoring_capability", "wall_s": 0.0002584479999541145, "cpu_s": 0.0002558700000001579, "status": "pass", "spans": {}, "setup_s": 1.5519999578827992e-06, "body_s": 5.151699997441028e-05, "teardown_s": 7.510000159527408e-07} +{"event": "start", "test": "test_navigation_indexes.NavigationIndexAuthorityTest.test_bad_catalog_and_non_utf8_content_are_typed_rejections", "at": 1790192053.2444773} +{"event": "end", "test": "test_navigation_indexes.NavigationIndexAuthorityTest.test_bad_catalog_and_non_utf8_content_are_typed_rejections", "wall_s": 0.00046270300003925513, "cpu_s": 0.00046317900000003576, "status": "pass", "spans": {}, "setup_s": 5.100000635138713e-07, "body_s": 0.00042444600001090294, "teardown_s": 5.310000688041328e-07} +{"event": "start", "test": "test_navigation_indexes.NavigationIndexAuthorityTest.test_declared_routes_bind_their_owner_content_and_exact_declarations", "at": 1790192053.2449746} +{"event": "end", "test": "test_navigation_indexes.NavigationIndexAuthorityTest.test_declared_routes_bind_their_owner_content_and_exact_declarations", "wall_s": 0.0006040360000270084, "cpu_s": 0.0006045889999999332, "status": "pass", "spans": {}, "setup_s": 3.2100001590151805e-07, "body_s": 0.0005702949999886187, "teardown_s": 5.110000529384706e-07} +{"event": "start", "test": "test_navigation_indexes.NavigationIndexAuthorityTest.test_old_captured_index_without_route_inventory_remains_readable", "at": 1790192053.2456114} +{"event": "end", "test": "test_navigation_indexes.NavigationIndexAuthorityTest.test_old_captured_index_without_route_inventory_remains_readable", "wall_s": 0.00013393099993663782, "cpu_s": 0.0001341890000001733, "status": "pass", "spans": {}, "setup_s": 2.9099999210302485e-07, "body_s": 0.00010689099997307494, "teardown_s": 3.300000344097498e-07} +{"event": "start", "test": "test_navigation_indexes.NavigationIndexAuthorityTest.test_registration_cannot_make_a_normative_standard_writable", "at": 1790192053.2457707} +{"event": "end", "test": "test_navigation_indexes.NavigationIndexAuthorityTest.test_registration_cannot_make_a_normative_standard_writable", "wall_s": 8.351499991476885e-05, "cpu_s": 8.353400000027378e-05, "status": "pass", "spans": {}, "setup_s": 3.309999101475114e-07, "body_s": 5.980999992516445e-05, "teardown_s": 2.509999603717006e-07} +{"event": "start", "test": "test_navigation_indexes.NavigationIndexAuthorityTest.test_review_fingerprint_binds_destination_authority_without_inventing_policy_changes", "at": 1790192053.2458773} +{"event": "end", "test": "test_navigation_indexes.NavigationIndexAuthorityTest.test_review_fingerprint_binds_destination_authority_without_inventing_policy_changes", "wall_s": 0.00043708499993044825, "cpu_s": 0.00043740999999997143, "status": "pass", "spans": {}, "setup_s": 2.900000026784255e-07, "body_s": 0.0004079320000300868, "teardown_s": 5.010000450056395e-07} +{"event": "observation", "test": "between-test/fixture", "elapsed_s": 43.582110319000094, "stack": [" File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 58, in \n result=unittest.TextTestRunner(verbosity=1,resultclass=Result).run(suite)\n", " File \"/usr/lib/python3.13/unittest/runner.py\", line 240, in run\n test(result)\n", " File \"/usr/lib/python3.13/unittest/suite.py\", line 84, in __call__\n return self.run(*args, **kwds)\n", " File \"/usr/lib/python3.13/unittest/suite.py\", line 114, in run\n self._handleClassSetUp(test, result)\n", " File \"/usr/lib/python3.13/unittest/suite.py\", line 166, in _handleClassSetUp\n setUpClass()\n", " File \"/mnt/data/engine-performance/module-checkouts/test_navigation_indexes/tools/standards_engine/tests/test_navigation_indexes.py\", line 168, in setUpClass\n directory = cls.facade.read({\"target\": \"navigation-indexes\"})\n", " File \"/mnt/data/engine-performance/module-checkouts/test_navigation_indexes/tools/standards_engine/standards_engine/tools.py\", line 346, in read\n return self._result(\"read\", self._engine.read(call))\n", " File \"/mnt/data/engine-performance/module-checkouts/test_navigation_indexes/tools/standards_engine/standards_engine/context_projection.py\", line 60, in invoke\n return function(engine, call)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_navigation_indexes/tools/standards_engine/standards_engine/engine.py\", line 988, in read\n return navigate(self, \"read\", call)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_navigation_indexes/tools/standards_engine/standards_engine/agent_navigation.py\", line 26, in navigate\n created = engine.create_snapshot(\n", " File \"/mnt/data/engine-performance/module-checkouts/test_navigation_indexes/tools/standards_engine/standards_engine/context_projection.py\", line 60, in invoke\n return function(engine, call)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_navigation_indexes/tools/standards_engine/standards_engine/engine.py\", line 492, in create_snapshot\n return self._capture_snapshot(call)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_navigation_indexes/tools/standards_engine/standards_engine/engine.py\", line 503, in _capture_snapshot\n first = self._compile(recording)\n", " File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 25, in observe\n try:return original(*args,**kwargs)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_navigation_indexes/tools/standards_engine/standards_engine/engine.py\", line 1716, in _compile\n corpus, impact, load_coverage_horizon(source, corpus, impact)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_navigation_indexes/tools/standards_analysis/standards_analysis/coverage.py\", line 548, in load_coverage_horizon\n return _load_coverage_horizon(source, corpus, compiled, path)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_navigation_indexes/tools/standards_analysis/standards_analysis/coverage.py\", line 448, in _load_coverage_horizon\n suite_inputs = load_suite_input_manifest(selected_source, suite_inputs_path)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_navigation_indexes/tools/standards_metadata/standards_metadata/suite_inputs.py\", line 587, in load_suite_input_manifest\n if file_digest(source.read_bytes(item.path)) != item.digest:\n", " File \"/mnt/data/engine-performance/module-checkouts/test_navigation_indexes/tools/standards_metadata/standards_metadata/source.py\", line 80, in read_bytes\n content = bytes(self._source.read_bytes(normalized))\n", " File \"/mnt/data/engine-performance/module-checkouts/test_navigation_indexes/tools/standards_engine/standards_engine/engine.py\", line 264, in read_bytes\n return self._repository.read_file(\n", " File \"/mnt/data/engine-performance/module-checkouts/test_navigation_indexes/tools/repository_git/repository_git/repository.py\", line 684, in read_file\n commit = self._object(self._repository, revision.oid, \"commit\", algorithm)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_navigation_indexes/tools/repository_git/repository_git/repository.py\", line 746, in _object\n output = git_output(\n", " File \"/mnt/data/engine-performance/module-checkouts/test_navigation_indexes/tools/repository_git/repository_git/repository.py\", line 91, in git_output\n result = git_command(\n", " File \"/mnt/data/engine-performance/module-checkouts/test_navigation_indexes/tools/repository_git/repository_git/repository.py\", line 75, in git_command\n return _run_bounded(\n", " File \"/mnt/data/engine-performance/module-checkouts/test_navigation_indexes/tools/repository_git/repository_git/repository.py\", line 859, in _run_bounded\n returncode = process.wait(timeout=COMMAND_TIMEOUT_SECONDS)\n", " File \"/usr/lib/python3.13/subprocess.py\", line 1280, in wait\n return self._wait(timeout=timeout)\n", " File \"/usr/lib/python3.13/subprocess.py\", line 2060, in _wait\n time.sleep(delay)\n"]} +{"event": "start", "test": "test_navigation_indexes.NavigationIndexWorkflowTest.test_cross_snapshot_handle_is_not_an_authorization_to_retarget", "at": 1790192110.214873} +{"event": "observation", "test": "test_navigation_indexes.NavigationIndexWorkflowTest.test_cross_snapshot_handle_is_not_an_authorization_to_retarget", "elapsed_s": 31.62906539000005, "stack": [" File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 58, in \n result=unittest.TextTestRunner(verbosity=1,resultclass=Result).run(suite)\n", " File \"/usr/lib/python3.13/unittest/runner.py\", line 240, in run\n test(result)\n", " File \"/usr/lib/python3.13/unittest/suite.py\", line 84, in __call__\n return self.run(*args, **kwds)\n", " File \"/usr/lib/python3.13/unittest/suite.py\", line 122, in run\n test(result)\n", " File \"/usr/lib/python3.13/unittest/case.py\", line 707, in __call__\n return self.run(*args, **kwds)\n", " File \"/usr/lib/python3.13/unittest/case.py\", line 651, in run\n self._callTestMethod(testMethod)\n", " File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 36, in timed\n try:return _fn(self,*args,**kwargs)\n", " File \"/usr/lib/python3.13/unittest/case.py\", line 606, in _callTestMethod\n if method() is not None:\n", " File \"/mnt/data/engine-performance/module-checkouts/test_navigation_indexes/tools/standards_engine/tests/test_navigation_indexes.py\", line 312, in test_cross_snapshot_handle_is_not_an_authorization_to_retarget\n result = self.facade.propose(\n", " File \"/mnt/data/engine-performance/module-checkouts/test_navigation_indexes/tools/standards_engine/standards_engine/tools.py\", line 280, in propose\n return self._result(\"propose\", self._engine.propose(call))\n", " File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 25, in observe\n try:return original(*args,**kwargs)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_navigation_indexes/tools/standards_engine/standards_engine/context_projection.py\", line 60, in invoke\n return function(engine, call)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_navigation_indexes/tools/standards_engine/standards_engine/engine.py\", line 922, in propose\n return propose(self, call)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_navigation_indexes/tools/standards_engine/standards_engine/agent_workflow.py\", line 172, in propose\n result = engine.create_proposal(\n", " File \"/mnt/data/engine-performance/module-checkouts/test_navigation_indexes/tools/standards_engine/standards_engine/context_projection.py\", line 60, in invoke\n return function(engine, call)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_navigation_indexes/tools/standards_engine/standards_engine/engine.py\", line 833, in create_proposal\n summary, revision = self._authoring.create_proposal(\n", " File \"/mnt/data/engine-performance/module-checkouts/test_navigation_indexes/tools/standards_engine/standards_engine/authoring.py\", line 678, in create_proposal\n self._validate_revision(revision)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_navigation_indexes/tools/standards_engine/standards_engine/engine.py\", line 1695, in _validate_logical_revision\n self._proposal_projection(revision)\n", " File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 25, in observe\n try:return original(*args,**kwargs)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_navigation_indexes/tools/standards_engine/standards_engine/engine.py\", line 1683, in _proposal_projection\n capture = self._snapshots.load_content(revision.base_snapshot)\n", " File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 25, in observe\n try:return original(*args,**kwargs)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_navigation_indexes/tools/standards_snapshots/standards_snapshots/module.py\", line 112, in load_content\n if self._content_id(capture) != content_id:\n", " File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 25, in observe\n try:return original(*args,**kwargs)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_navigation_indexes/tools/standards_snapshots/standards_snapshots/module.py\", line 210, in _content_id\n return hash_identity(\n", " File \"/mnt/data/engine-performance/module-checkouts/test_navigation_indexes/tools/standards_identity/standards_identity/encoding.py\", line 93, in hash_identity\n encoded = encode_identity_value(value)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_navigation_indexes/tools/standards_identity/standards_identity/encoding.py\", line 75, in encode_identity_value\n return _encode(value)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_navigation_indexes/tools/standards_identity/standards_identity/encoding.py\", line 191, in _encode\n return b\"[\" + b\",\".join(_encode(item) for item in value.values) + b\"]\"\n", " File \"/mnt/data/engine-performance/module-checkouts/test_navigation_indexes/tools/standards_identity/standards_identity/encoding.py\", line 191, in \n return b\"[\" + b\",\".join(_encode(item) for item in value.values) + b\"]\"\n", " File \"/mnt/data/engine-performance/module-checkouts/test_navigation_indexes/tools/standards_identity/standards_identity/encoding.py\", line 197, in _encode\n return b\"{\" + b\",\".join(encoded_members) + b\"}\"\n", " File \"/mnt/data/engine-performance/module-checkouts/test_navigation_indexes/tools/standards_identity/standards_identity/encoding.py\", line 194, in \n _encode_string(key) + b\":\" + _encode(member_value)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_navigation_indexes/tools/standards_identity/standards_identity/encoding.py\", line 191, in _encode\n return b\"[\" + b\",\".join(_encode(item) for item in value.values) + b\"]\"\n", " File \"/mnt/data/engine-performance/module-checkouts/test_navigation_indexes/tools/standards_identity/standards_identity/encoding.py\", line 191, in \n return b\"[\" + b\",\".join(_encode(item) for item in value.values) + b\"]\"\n", " File \"/mnt/data/engine-performance/module-checkouts/test_navigation_indexes/tools/standards_identity/standards_identity/encoding.py\", line 187, in _encode\n return _encode_integer(value)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_navigation_indexes/tools/standards_identity/standards_identity/encoding.py\", line 215, in _encode_integer\n return (b\"-\" if negative else b\"\") + encoded + suffix\n"]} +{"event": "end", "test": "test_navigation_indexes.NavigationIndexWorkflowTest.test_cross_snapshot_handle_is_not_an_authorization_to_retarget", "wall_s": 33.26433106600007, "cpu_s": 21.11719368, "status": "pass", "spans": {"StandardsEngine._compile": {"calls": 5, "inclusive_s": 18.628652976999888}, "SnapshotModule._content_id": {"calls": 4, "inclusive_s": 13.796280792999823}, "SnapshotModule.load_content": {"calls": 3, "inclusive_s": 9.720510639000054}, "StandardsEngine._compiled_snapshot": {"calls": 1, "inclusive_s": 3.737449669000057}, "StandardsEngine._proposal_projection": {"calls": 1, "inclusive_s": 4.639604068999915}, "StandardsEngine.propose": {"calls": 1, "inclusive_s": 7.846489280000014}}, "setup_s": 1.4529999816659256e-06, "body_s": 33.264150234, "teardown_s": 1.9130000055156415e-06} +{"event": "start", "test": "test_navigation_indexes.NavigationIndexWorkflowTest.test_discovery_captures_exact_content_without_claiming_policy_authority", "at": 1790192143.4792955} +{"event": "end", "test": "test_navigation_indexes.NavigationIndexWorkflowTest.test_discovery_captures_exact_content_without_claiming_policy_authority", "wall_s": 6.4176668559999825, "cpu_s": 6.417170993000006, "status": "pass", "spans": {"SnapshotModule._content_id": {"calls": 2, "inclusive_s": 5.64280914099993}, "SnapshotModule.load_content": {"calls": 2, "inclusive_s": 5.665853855000023}, "StandardsEngine._compile": {"calls": 2, "inclusive_s": 0.7390312520001316}, "StandardsEngine._compiled_snapshot": {"calls": 2, "inclusive_s": 6.410344399999985}}, "setup_s": 1.2720000768240425e-06, "body_s": 6.417303713000024, "teardown_s": 1.301999986935698e-06} +{"event": "start", "test": "test_navigation_indexes.NavigationIndexWorkflowTest.test_fresh_mcp_process_exposes_snapshot_bound_navigation", "at": 1790192149.8970683} +{"event": "end", "test": "test_navigation_indexes.NavigationIndexWorkflowTest.test_fresh_mcp_process_exposes_snapshot_bound_navigation", "wall_s": 6.430835125000044, "cpu_s": 0.006623876999995559, "status": "pass", "spans": {}, "setup_s": 1.1419999736972386e-06, "body_s": 6.430742344999999, "teardown_s": 2.1329999526642496e-06} +{"event": "start", "test": "test_navigation_indexes.NavigationIndexWorkflowTest.test_invalid_selections_do_not_create_an_applicable_candidate", "at": 1790192156.3280158} +{"event": "end", "test": "test_navigation_indexes.NavigationIndexWorkflowTest.test_invalid_selections_do_not_create_an_applicable_candidate", "wall_s": 14.51954364200003, "cpu_s": 14.094891100000005, "status": "pass", "spans": {"StandardsEngine.propose": {"calls": 3, "inclusive_s": 14.504727373999913}, "SnapshotModule._content_id": {"calls": 4, "inclusive_s": 11.59131786499995}, "SnapshotModule.load_content": {"calls": 4, "inclusive_s": 11.652205450999872}, "StandardsEngine._compile": {"calls": 4, "inclusive_s": 1.4366306509999731}, "StandardsEngine._proposal_projection": {"calls": 2, "inclusive_s": 8.736718774999986}}, "setup_s": 1.212000029227056e-06, "body_s": 14.519430822000004, "teardown_s": 1.8829999817171483e-06} +{"event": "start", "test": "test_navigation_indexes.NavigationIndexWorkflowTest.test_retarget_dispositions_cannot_remove_unrelated_assertions", "at": 1790192170.847648} +{"event": "end", "test": "test_navigation_indexes.NavigationIndexWorkflowTest.test_retarget_dispositions_cannot_remove_unrelated_assertions", "wall_s": 14.319696383000064, "cpu_s": 13.990793657999994, "status": "pass", "spans": {"SnapshotModule._content_id": {"calls": 4, "inclusive_s": 11.49094601100012}, "SnapshotModule.load_content": {"calls": 4, "inclusive_s": 11.542382354999972}, "StandardsEngine._compile": {"calls": 4, "inclusive_s": 1.455395486000043}, "StandardsEngine._proposal_projection": {"calls": 2, "inclusive_s": 8.539058210000007}, "StandardsEngine.propose": {"calls": 2, "inclusive_s": 14.313452891999987}}, "setup_s": 1.2619999552043737e-06, "body_s": 14.319617795, "teardown_s": 1.73299997641152e-06} +{"event": "start", "test": "test_navigation_indexes.NavigationIndexWorkflowTest.test_z_exact_index_proposal_requires_review_and_applies_through_engine", "at": 1790192185.1674361} +{"event": "observation", "test": "test_navigation_indexes.NavigationIndexWorkflowTest.test_z_exact_index_proposal_requires_review_and_applies_through_engine", "elapsed_s": 1.8712319409999054, "stack": [" File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 58, in \n result=unittest.TextTestRunner(verbosity=1,resultclass=Result).run(suite)\n", " File \"/usr/lib/python3.13/unittest/runner.py\", line 240, in run\n test(result)\n", " File \"/usr/lib/python3.13/unittest/suite.py\", line 84, in __call__\n return self.run(*args, **kwds)\n", " File \"/usr/lib/python3.13/unittest/suite.py\", line 122, in run\n test(result)\n", " File \"/usr/lib/python3.13/unittest/case.py\", line 707, in __call__\n return self.run(*args, **kwds)\n", " File \"/usr/lib/python3.13/unittest/case.py\", line 651, in run\n self._callTestMethod(testMethod)\n", " File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 36, in timed\n try:return _fn(self,*args,**kwargs)\n", " File \"/usr/lib/python3.13/unittest/case.py\", line 606, in _callTestMethod\n if method() is not None:\n", " File \"/mnt/data/engine-performance/module-checkouts/test_navigation_indexes/tools/standards_engine/tests/test_navigation_indexes.py\", line 408, in test_z_exact_index_proposal_requires_review_and_applies_through_engine\n proposed = self.propose()\n", " File \"/mnt/data/engine-performance/module-checkouts/test_navigation_indexes/tools/standards_engine/tests/test_navigation_indexes.py\", line 272, in propose\n return self.facade.propose(\n", " File \"/mnt/data/engine-performance/module-checkouts/test_navigation_indexes/tools/standards_engine/standards_engine/tools.py\", line 280, in propose\n return self._result(\"propose\", self._engine.propose(call))\n", " File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 25, in observe\n try:return original(*args,**kwargs)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_navigation_indexes/tools/standards_engine/standards_engine/context_projection.py\", line 60, in invoke\n return function(engine, call)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_navigation_indexes/tools/standards_engine/standards_engine/engine.py\", line 922, in propose\n return propose(self, call)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_navigation_indexes/tools/standards_engine/standards_engine/agent_workflow.py\", line 172, in propose\n result = engine.create_proposal(\n", " File \"/mnt/data/engine-performance/module-checkouts/test_navigation_indexes/tools/standards_engine/standards_engine/context_projection.py\", line 60, in invoke\n return function(engine, call)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_navigation_indexes/tools/standards_engine/standards_engine/engine.py\", line 833, in create_proposal\n summary, revision = self._authoring.create_proposal(\n", " File \"/mnt/data/engine-performance/module-checkouts/test_navigation_indexes/tools/standards_engine/standards_engine/authoring.py\", line 675, in create_proposal\n self._observe_repository_paths(base_snapshot),\n", " File \"/mnt/data/engine-performance/module-checkouts/test_navigation_indexes/tools/standards_engine/standards_engine/engine.py\", line 1698, in _repository_paths_for_snapshot\n capture = self._snapshots.load_content(snapshot)\n", " File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 25, in observe\n try:return original(*args,**kwargs)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_navigation_indexes/tools/standards_snapshots/standards_snapshots/module.py\", line 112, in load_content\n if self._content_id(capture) != content_id:\n", " File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 25, in observe\n try:return original(*args,**kwargs)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_navigation_indexes/tools/standards_snapshots/standards_snapshots/module.py\", line 210, in _content_id\n return hash_identity(\n", " File \"/mnt/data/engine-performance/module-checkouts/test_navigation_indexes/tools/standards_identity/standards_identity/encoding.py\", line 93, in hash_identity\n encoded = encode_identity_value(value)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_navigation_indexes/tools/standards_identity/standards_identity/encoding.py\", line 75, in encode_identity_value\n return _encode(value)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_navigation_indexes/tools/standards_identity/standards_identity/encoding.py\", line 191, in _encode\n return b\"[\" + b\",\".join(_encode(item) for item in value.values) + b\"]\"\n", " File \"/mnt/data/engine-performance/module-checkouts/test_navigation_indexes/tools/standards_identity/standards_identity/encoding.py\", line 191, in \n return b\"[\" + b\",\".join(_encode(item) for item in value.values) + b\"]\"\n", " File \"/mnt/data/engine-performance/module-checkouts/test_navigation_indexes/tools/standards_identity/standards_identity/encoding.py\", line 197, in _encode\n return b\"{\" + b\",\".join(encoded_members) + b\"}\"\n", " File \"/mnt/data/engine-performance/module-checkouts/test_navigation_indexes/tools/standards_identity/standards_identity/encoding.py\", line 194, in \n _encode_string(key) + b\":\" + _encode(member_value)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_navigation_indexes/tools/standards_identity/standards_identity/encoding.py\", line 191, in _encode\n return b\"[\" + b\",\".join(_encode(item) for item in value.values) + b\"]\"\n"]} +{"event": "observation", "test": "test_navigation_indexes.NavigationIndexWorkflowTest.test_z_exact_index_proposal_requires_review_and_applies_through_engine", "elapsed_s": 46.938780115999975, "stack": [" File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 58, in \n result=unittest.TextTestRunner(verbosity=1,resultclass=Result).run(suite)\n", " File \"/usr/lib/python3.13/unittest/runner.py\", line 240, in run\n test(result)\n", " File \"/usr/lib/python3.13/unittest/suite.py\", line 84, in __call__\n return self.run(*args, **kwds)\n", " File \"/usr/lib/python3.13/unittest/suite.py\", line 122, in run\n test(result)\n", " File \"/usr/lib/python3.13/unittest/case.py\", line 707, in __call__\n return self.run(*args, **kwds)\n", " File \"/usr/lib/python3.13/unittest/case.py\", line 651, in run\n self._callTestMethod(testMethod)\n", " File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 36, in timed\n try:return _fn(self,*args,**kwargs)\n", " File \"/usr/lib/python3.13/unittest/case.py\", line 606, in _callTestMethod\n if method() is not None:\n", " File \"/mnt/data/engine-performance/module-checkouts/test_navigation_indexes/tools/standards_engine/tests/test_navigation_indexes.py\", line 432, in test_z_exact_index_proposal_requires_review_and_applies_through_engine\n resolved = self.facade.resolve_workflow(\n", " File \"/mnt/data/engine-performance/module-checkouts/test_navigation_indexes/tools/standards_engine/standards_engine/tools.py\", line 298, in resolve_workflow\n return self._result(\"resolve_workflow\", self._engine.resolve_workflow(call))\n", " File \"/mnt/data/engine-performance/module-checkouts/test_navigation_indexes/tools/standards_engine/standards_engine/context_projection.py\", line 60, in invoke\n return function(engine, call)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_navigation_indexes/tools/standards_engine/standards_engine/engine.py\", line 940, in resolve_workflow\n return advance(self, \"resolve_workflow\", call)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_navigation_indexes/tools/standards_engine/standards_engine/agent_workflow.py\", line 193, in advance\n current = view(engine, bound)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_navigation_indexes/tools/standards_engine/standards_engine/agent_workflow.py\", line 123, in view\n outcome = engine._analysis_result(engine._evaluate(bound.analysis))\n", " File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 25, in observe\n try:return original(*args,**kwargs)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_navigation_indexes/tools/standards_engine/standards_engine/engine.py\", line 1778, in _evaluate\n proposed = self._proposal_projection(revision).compiled\n", " File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 25, in observe\n try:return original(*args,**kwargs)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_navigation_indexes/tools/standards_engine/standards_engine/engine.py\", line 1683, in _proposal_projection\n capture = self._snapshots.load_content(revision.base_snapshot)\n", " File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 25, in observe\n try:return original(*args,**kwargs)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_navigation_indexes/tools/standards_snapshots/standards_snapshots/module.py\", line 112, in load_content\n if self._content_id(capture) != content_id:\n", " File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 25, in observe\n try:return original(*args,**kwargs)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_navigation_indexes/tools/standards_snapshots/standards_snapshots/module.py\", line 210, in _content_id\n return hash_identity(\n", " File \"/mnt/data/engine-performance/module-checkouts/test_navigation_indexes/tools/standards_identity/standards_identity/encoding.py\", line 93, in hash_identity\n encoded = encode_identity_value(value)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_navigation_indexes/tools/standards_identity/standards_identity/encoding.py\", line 75, in encode_identity_value\n return _encode(value)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_navigation_indexes/tools/standards_identity/standards_identity/encoding.py\", line 191, in _encode\n return b\"[\" + b\",\".join(_encode(item) for item in value.values) + b\"]\"\n", " File \"/mnt/data/engine-performance/module-checkouts/test_navigation_indexes/tools/standards_identity/standards_identity/encoding.py\", line 191, in \n return b\"[\" + b\",\".join(_encode(item) for item in value.values) + b\"]\"\n", " File \"/mnt/data/engine-performance/module-checkouts/test_navigation_indexes/tools/standards_identity/standards_identity/encoding.py\", line 197, in _encode\n return b\"{\" + b\",\".join(encoded_members) + b\"}\"\n", " File \"/mnt/data/engine-performance/module-checkouts/test_navigation_indexes/tools/standards_identity/standards_identity/encoding.py\", line 194, in \n _encode_string(key) + b\":\" + _encode(member_value)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_navigation_indexes/tools/standards_identity/standards_identity/encoding.py\", line 191, in _encode\n return b\"[\" + b\",\".join(_encode(item) for item in value.values) + b\"]\"\n", " File \"/mnt/data/engine-performance/module-checkouts/test_navigation_indexes/tools/standards_identity/standards_identity/encoding.py\", line 191, in \n return b\"[\" + b\",\".join(_encode(item) for item in value.values) + b\"]\"\n", " File \"/mnt/data/engine-performance/module-checkouts/test_navigation_indexes/tools/standards_identity/standards_identity/encoding.py\", line 187, in _encode\n return _encode_integer(value)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_navigation_indexes/tools/standards_identity/standards_identity/encoding.py\", line 211, in _encode_integer\n suffix = b\"\".join(\n"]} +{"event": "observation", "test": "test_navigation_indexes.NavigationIndexWorkflowTest.test_z_exact_index_proposal_requires_review_and_applies_through_engine", "elapsed_s": 92.00527775699993, "stack": [" File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 58, in \n result=unittest.TextTestRunner(verbosity=1,resultclass=Result).run(suite)\n", " File \"/usr/lib/python3.13/unittest/runner.py\", line 240, in run\n test(result)\n", " File \"/usr/lib/python3.13/unittest/suite.py\", line 84, in __call__\n return self.run(*args, **kwds)\n", " File \"/usr/lib/python3.13/unittest/suite.py\", line 122, in run\n test(result)\n", " File \"/usr/lib/python3.13/unittest/case.py\", line 707, in __call__\n return self.run(*args, **kwds)\n", " File \"/usr/lib/python3.13/unittest/case.py\", line 651, in run\n self._callTestMethod(testMethod)\n", " File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 36, in timed\n try:return _fn(self,*args,**kwargs)\n", " File \"/usr/lib/python3.13/unittest/case.py\", line 606, in _callTestMethod\n if method() is not None:\n", " File \"/mnt/data/engine-performance/module-checkouts/test_navigation_indexes/tools/standards_engine/tests/test_navigation_indexes.py\", line 446, in test_z_exact_index_proposal_requires_review_and_applies_through_engine\n ready = self.facade.review(\n", " File \"/mnt/data/engine-performance/module-checkouts/test_navigation_indexes/tools/standards_engine/standards_engine/tools.py\", line 304, in review\n return self._result(\"review\", self._engine.review(call))\n", " File \"/mnt/data/engine-performance/module-checkouts/test_navigation_indexes/tools/standards_engine/standards_engine/context_projection.py\", line 60, in invoke\n return function(engine, call)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_navigation_indexes/tools/standards_engine/standards_engine/engine.py\", line 946, in review\n return advance(self, \"review\", call)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_navigation_indexes/tools/standards_engine/standards_engine/agent_workflow.py\", line 193, in advance\n current = view(engine, bound)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_navigation_indexes/tools/standards_engine/standards_engine/agent_workflow.py\", line 123, in view\n outcome = engine._analysis_result(engine._evaluate(bound.analysis))\n", " File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 25, in observe\n try:return original(*args,**kwargs)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_navigation_indexes/tools/standards_engine/standards_engine/engine.py\", line 1779, in _evaluate\n return self._evaluate_compiled(state, accepted, proposed, revision)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_navigation_indexes/tools/standards_engine/standards_engine/engine.py\", line 1798, in _evaluate_compiled\n self._validate_projected_inputs(state, revision, accepted, proposed)\n", " File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 25, in observe\n try:return original(*args,**kwargs)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_navigation_indexes/tools/standards_engine/standards_engine/engine.py\", line 1829, in _validate_projected_inputs\n projection = self._proposal_projection(revision)\n", " File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 25, in observe\n try:return original(*args,**kwargs)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_navigation_indexes/tools/standards_engine/standards_engine/engine.py\", line 1683, in _proposal_projection\n capture = self._snapshots.load_content(revision.base_snapshot)\n", " File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 25, in observe\n try:return original(*args,**kwargs)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_navigation_indexes/tools/standards_snapshots/standards_snapshots/module.py\", line 112, in load_content\n if self._content_id(capture) != content_id:\n", " File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 25, in observe\n try:return original(*args,**kwargs)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_navigation_indexes/tools/standards_snapshots/standards_snapshots/module.py\", line 210, in _content_id\n return hash_identity(\n", " File \"/mnt/data/engine-performance/module-checkouts/test_navigation_indexes/tools/standards_identity/standards_identity/encoding.py\", line 93, in hash_identity\n encoded = encode_identity_value(value)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_navigation_indexes/tools/standards_identity/standards_identity/encoding.py\", line 75, in encode_identity_value\n return _encode(value)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_navigation_indexes/tools/standards_identity/standards_identity/encoding.py\", line 191, in _encode\n return b\"[\" + b\",\".join(_encode(item) for item in value.values) + b\"]\"\n", " File \"/mnt/data/engine-performance/module-checkouts/test_navigation_indexes/tools/standards_identity/standards_identity/encoding.py\", line 191, in \n return b\"[\" + b\",\".join(_encode(item) for item in value.values) + b\"]\"\n", " File \"/mnt/data/engine-performance/module-checkouts/test_navigation_indexes/tools/standards_identity/standards_identity/encoding.py\", line 197, in _encode\n return b\"{\" + b\",\".join(encoded_members) + b\"}\"\n", " File \"/mnt/data/engine-performance/module-checkouts/test_navigation_indexes/tools/standards_identity/standards_identity/encoding.py\", line 194, in \n _encode_string(key) + b\":\" + _encode(member_value)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_navigation_indexes/tools/standards_identity/standards_identity/encoding.py\", line 191, in _encode\n return b\"[\" + b\",\".join(_encode(item) for item in value.values) + b\"]\"\n", " File \"/mnt/data/engine-performance/module-checkouts/test_navigation_indexes/tools/standards_identity/standards_identity/encoding.py\", line 191, in \n return b\"[\" + b\",\".join(_encode(item) for item in value.values) + b\"]\"\n", " File \"/mnt/data/engine-performance/module-checkouts/test_navigation_indexes/tools/standards_identity/standards_identity/encoding.py\", line 187, in _encode\n return _encode_integer(value)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_navigation_indexes/tools/standards_identity/standards_identity/encoding.py\", line 215, in _encode_integer\n return (b\"-\" if negative else b\"\") + encoded + suffix\n"]} +{"event": "observation", "test": "test_navigation_indexes.NavigationIndexWorkflowTest.test_z_exact_index_proposal_requires_review_and_applies_through_engine", "elapsed_s": 137.06159478899997, "stack": [" File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 58, in \n result=unittest.TextTestRunner(verbosity=1,resultclass=Result).run(suite)\n", " File \"/usr/lib/python3.13/unittest/runner.py\", line 240, in run\n test(result)\n", " File \"/usr/lib/python3.13/unittest/suite.py\", line 84, in __call__\n return self.run(*args, **kwds)\n", " File \"/usr/lib/python3.13/unittest/suite.py\", line 122, in run\n test(result)\n", " File \"/usr/lib/python3.13/unittest/case.py\", line 707, in __call__\n return self.run(*args, **kwds)\n", " File \"/usr/lib/python3.13/unittest/case.py\", line 651, in run\n self._callTestMethod(testMethod)\n", " File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 36, in timed\n try:return _fn(self,*args,**kwargs)\n", " File \"/usr/lib/python3.13/unittest/case.py\", line 606, in _callTestMethod\n if method() is not None:\n", " File \"/mnt/data/engine-performance/module-checkouts/test_navigation_indexes/tools/standards_engine/tests/test_navigation_indexes.py\", line 450, in test_z_exact_index_proposal_requires_review_and_applies_through_engine\n checked = self.facade.verify_proposal(\n", " File \"/mnt/data/engine-performance/module-checkouts/test_navigation_indexes/tools/standards_engine/standards_engine/tools.py\", line 230, in verify_proposal\n return self._result(\"verify_proposal\", self._engine.verify_proposal(call))\n", " File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 25, in observe\n try:return original(*args,**kwargs)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_navigation_indexes/tools/standards_engine/standards_engine/context_projection.py\", line 60, in invoke\n return function(engine, call)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_navigation_indexes/tools/standards_engine/standards_engine/engine.py\", line 778, in verify_proposal\n self._application_verifier(candidate.root)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_navigation_indexes/tools/standards_verifier/standards_verifier/cli.py\", line 76, in run_complete_verification\n results = tuple(Verifier(repo_root, registry).run(None))\n", " File \"/mnt/data/engine-performance/module-checkouts/test_navigation_indexes/tools/standards_verifier/standards_verifier/engine.py\", line 66, in run\n result = self._run_suite(catalog.suite(suite_id), catalog)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_navigation_indexes/tools/standards_verifier/standards_verifier/engine.py\", line 100, in _run_suite\n diagnostics.extend(check.run(context))\n", " File \"/mnt/data/engine-performance/module-checkouts/test_navigation_indexes/tools/standards_verifier/standards_verifier/checks/python_package_contract.py\", line 70, in run\n for finding in execute_python_package_contract(context.repo_root)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_navigation_indexes/tools/standards_verifier/standards_verifier/python_packages.py\", line 1294, in execute_python_package_contract\n completed = subprocess.run(\n", " File \"/usr/lib/python3.13/subprocess.py\", line 556, in run\n stdout, stderr = process.communicate(input, timeout=timeout)\n", " File \"/usr/lib/python3.13/subprocess.py\", line 1222, in communicate\n stdout, stderr = self._communicate(input, endtime, timeout)\n", " File \"/usr/lib/python3.13/subprocess.py\", line 2128, in _communicate\n ready = selector.select(timeout)\n", " File \"/usr/lib/python3.13/selectors.py\", line 398, in select\n fd_event_list = self._selector.poll(timeout)\n"]} +{"event": "observation", "test": "test_navigation_indexes.NavigationIndexWorkflowTest.test_z_exact_index_proposal_requires_review_and_applies_through_engine", "elapsed_s": 182.06544848299995, "stack": [" File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 58, in \n result=unittest.TextTestRunner(verbosity=1,resultclass=Result).run(suite)\n", " File \"/usr/lib/python3.13/unittest/runner.py\", line 240, in run\n test(result)\n", " File \"/usr/lib/python3.13/unittest/suite.py\", line 84, in __call__\n return self.run(*args, **kwds)\n", " File \"/usr/lib/python3.13/unittest/suite.py\", line 122, in run\n test(result)\n", " File \"/usr/lib/python3.13/unittest/case.py\", line 707, in __call__\n return self.run(*args, **kwds)\n", " File \"/usr/lib/python3.13/unittest/case.py\", line 651, in run\n self._callTestMethod(testMethod)\n", " File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 36, in timed\n try:return _fn(self,*args,**kwargs)\n", " File \"/usr/lib/python3.13/unittest/case.py\", line 606, in _callTestMethod\n if method() is not None:\n", " File \"/mnt/data/engine-performance/module-checkouts/test_navigation_indexes/tools/standards_engine/tests/test_navigation_indexes.py\", line 458, in test_z_exact_index_proposal_requires_review_and_applies_through_engine\n applied = self.facade.apply({\"context\": ready[\"context\"]})\n", " File \"/mnt/data/engine-performance/module-checkouts/test_navigation_indexes/tools/standards_engine/standards_engine/tools.py\", line 310, in apply\n return self._result(\"apply\", self._engine.apply(call))\n", " File \"/mnt/data/engine-performance/module-checkouts/test_navigation_indexes/tools/standards_engine/standards_engine/context_projection.py\", line 60, in invoke\n return function(engine, call)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_navigation_indexes/tools/standards_engine/standards_engine/engine.py\", line 952, in apply\n return advance(self, \"apply\", call)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_navigation_indexes/tools/standards_engine/standards_engine/agent_workflow.py\", line 257, in advance\n result = engine.apply_proposal(\n", " File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 25, in observe\n try:return original(*args,**kwargs)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_navigation_indexes/tools/standards_engine/standards_engine/context_projection.py\", line 60, in invoke\n return function(engine, call)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_navigation_indexes/tools/standards_engine/standards_engine/engine.py\", line 1275, in apply_proposal\n verification = self._application_verifier(candidate.root)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_navigation_indexes/tools/standards_verifier/standards_verifier/cli.py\", line 76, in run_complete_verification\n results = tuple(Verifier(repo_root, registry).run(None))\n", " File \"/mnt/data/engine-performance/module-checkouts/test_navigation_indexes/tools/standards_verifier/standards_verifier/engine.py\", line 66, in run\n result = self._run_suite(catalog.suite(suite_id), catalog)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_navigation_indexes/tools/standards_verifier/standards_verifier/engine.py\", line 100, in _run_suite\n diagnostics.extend(check.run(context))\n", " File \"/mnt/data/engine-performance/module-checkouts/test_navigation_indexes/tools/standards_verifier/standards_verifier/checks/python_package_contract.py\", line 70, in run\n for finding in execute_python_package_contract(context.repo_root)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_navigation_indexes/tools/standards_verifier/standards_verifier/python_packages.py\", line 1294, in execute_python_package_contract\n completed = subprocess.run(\n", " File \"/usr/lib/python3.13/subprocess.py\", line 556, in run\n stdout, stderr = process.communicate(input, timeout=timeout)\n", " File \"/usr/lib/python3.13/subprocess.py\", line 1222, in communicate\n stdout, stderr = self._communicate(input, endtime, timeout)\n", " File \"/usr/lib/python3.13/subprocess.py\", line 2128, in _communicate\n ready = selector.select(timeout)\n", " File \"/usr/lib/python3.13/selectors.py\", line 398, in select\n fd_event_list = self._selector.poll(timeout)\n"]} +{"event": "observation", "test": "test_navigation_indexes.NavigationIndexWorkflowTest.test_z_exact_index_proposal_requires_review_and_applies_through_engine", "elapsed_s": 227.069445503, "stack": [" File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 58, in \n result=unittest.TextTestRunner(verbosity=1,resultclass=Result).run(suite)\n", " File \"/usr/lib/python3.13/unittest/runner.py\", line 240, in run\n test(result)\n", " File \"/usr/lib/python3.13/unittest/suite.py\", line 84, in __call__\n return self.run(*args, **kwds)\n", " File \"/usr/lib/python3.13/unittest/suite.py\", line 122, in run\n test(result)\n", " File \"/usr/lib/python3.13/unittest/case.py\", line 707, in __call__\n return self.run(*args, **kwds)\n", " File \"/usr/lib/python3.13/unittest/case.py\", line 651, in run\n self._callTestMethod(testMethod)\n", " File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 36, in timed\n try:return _fn(self,*args,**kwargs)\n", " File \"/usr/lib/python3.13/unittest/case.py\", line 606, in _callTestMethod\n if method() is not None:\n", " File \"/mnt/data/engine-performance/module-checkouts/test_navigation_indexes/tools/standards_engine/tests/test_navigation_indexes.py\", line 471, in test_z_exact_index_proposal_requires_review_and_applies_through_engine\n current = self.facade.read({\"target\": \"navigation.tooling\"})\n", " File \"/mnt/data/engine-performance/module-checkouts/test_navigation_indexes/tools/standards_engine/standards_engine/tools.py\", line 346, in read\n return self._result(\"read\", self._engine.read(call))\n", " File \"/mnt/data/engine-performance/module-checkouts/test_navigation_indexes/tools/standards_engine/standards_engine/context_projection.py\", line 60, in invoke\n return function(engine, call)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_navigation_indexes/tools/standards_engine/standards_engine/engine.py\", line 988, in read\n return navigate(self, \"read\", call)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_navigation_indexes/tools/standards_engine/standards_engine/agent_navigation.py\", line 26, in navigate\n created = engine.create_snapshot(\n", " File \"/mnt/data/engine-performance/module-checkouts/test_navigation_indexes/tools/standards_engine/standards_engine/context_projection.py\", line 60, in invoke\n return function(engine, call)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_navigation_indexes/tools/standards_engine/standards_engine/engine.py\", line 492, in create_snapshot\n return self._capture_snapshot(call)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_navigation_indexes/tools/standards_engine/standards_engine/engine.py\", line 503, in _capture_snapshot\n first = self._compile(recording)\n", " File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 25, in observe\n try:return original(*args,**kwargs)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_navigation_indexes/tools/standards_engine/standards_engine/engine.py\", line 1716, in _compile\n corpus, impact, load_coverage_horizon(source, corpus, impact)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_navigation_indexes/tools/standards_analysis/standards_analysis/coverage.py\", line 548, in load_coverage_horizon\n return _load_coverage_horizon(source, corpus, compiled, path)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_navigation_indexes/tools/standards_analysis/standards_analysis/coverage.py\", line 448, in _load_coverage_horizon\n suite_inputs = load_suite_input_manifest(selected_source, suite_inputs_path)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_navigation_indexes/tools/standards_metadata/standards_metadata/suite_inputs.py\", line 587, in load_suite_input_manifest\n if file_digest(source.read_bytes(item.path)) != item.digest:\n", " File \"/mnt/data/engine-performance/module-checkouts/test_navigation_indexes/tools/standards_metadata/standards_metadata/source.py\", line 80, in read_bytes\n content = bytes(self._source.read_bytes(normalized))\n", " File \"/mnt/data/engine-performance/module-checkouts/test_navigation_indexes/tools/standards_engine/standards_engine/engine.py\", line 264, in read_bytes\n return self._repository.read_file(\n", " File \"/mnt/data/engine-performance/module-checkouts/test_navigation_indexes/tools/repository_git/repository_git/repository.py\", line 684, in read_file\n commit = self._object(self._repository, revision.oid, \"commit\", algorithm)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_navigation_indexes/tools/repository_git/repository_git/repository.py\", line 746, in _object\n output = git_output(\n", " File \"/mnt/data/engine-performance/module-checkouts/test_navigation_indexes/tools/repository_git/repository_git/repository.py\", line 91, in git_output\n result = git_command(\n", " File \"/mnt/data/engine-performance/module-checkouts/test_navigation_indexes/tools/repository_git/repository_git/repository.py\", line 75, in git_command\n return _run_bounded(\n", " File \"/mnt/data/engine-performance/module-checkouts/test_navigation_indexes/tools/repository_git/repository_git/repository.py\", line 849, in _run_bounded\n stdout_thread.start()\n", " File \"/usr/lib/python3.13/threading.py\", line 981, in start\n self._started.wait() # Will set ident and native_id\n", " File \"/usr/lib/python3.13/threading.py\", line 659, in wait\n signaled = self._cond.wait(timeout)\n", " File \"/usr/lib/python3.13/threading.py\", line 359, in wait\n waiter.acquire()\n"]} +{"event": "end", "test": "test_navigation_indexes.NavigationIndexWorkflowTest.test_z_exact_index_proposal_requires_review_and_applies_through_engine", "wall_s": 250.161738701, "cpu_s": 159.509019199, "status": "pass", "spans": {"SnapshotModule._content_id": {"calls": 35, "inclusive_s": 97.48451044300054}, "SnapshotModule.load_content": {"calls": 33, "inclusive_s": 92.60219372699964}, "StandardsEngine._compile": {"calls": 70, "inclusive_s": 57.448773071999426}, "StandardsEngine._proposal_projection": {"calls": 19, "inclusive_s": 100.07323766800005}, "AuthoringModule.read_revision": {"calls": 37, "inclusive_s": 1.4419962350002606}, "StandardsEngine._compiled_snapshot": {"calls": 10, "inclusive_s": 31.589060742000015}, "StandardsEngine._validate_projected_inputs": {"calls": 7, "inclusive_s": 36.795908666999935}, "StandardsEngine.analyze_proposal": {"calls": 1, "inclusive_s": 13.64302653599998}, "StandardsEngine.propose": {"calls": 2, "inclusive_s": 29.74176670700001}, "StandardsEngine._evaluate": {"calls": 6, "inclusive_s": 82.31897506999996}, "StandardsEngine.query_proposal": {"calls": 1, "inclusive_s": 5.418068962000007}, "StandardsEngine.resolve": {"calls": 1, "inclusive_s": 27.518521481000107}, "StandardsEngine.review_proposal": {"calls": 1, "inclusive_s": 14.219083049000005}, "StandardsEngine.verify_proposal": {"calls": 1, "inclusive_s": 42.954929725000056}, "StandardsEngine.apply_proposal": {"calls": 1, "inclusive_s": 40.58280162400001}}, "setup_s": 1.4830000054644188e-06, "body_s": 250.16163315300003, "teardown_s": 1.8929999896499794e-06} +{"event": "observation", "test": "between-test/fixture", "elapsed_s": 21.915176998999982, "stack": [" File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 58, in \n result=unittest.TextTestRunner(verbosity=1,resultclass=Result).run(suite)\n", " File \"/usr/lib/python3.13/unittest/runner.py\", line 240, in run\n test(result)\n", " File \"/usr/lib/python3.13/unittest/suite.py\", line 84, in __call__\n return self.run(*args, **kwds)\n", " File \"/usr/lib/python3.13/unittest/suite.py\", line 114, in run\n self._handleClassSetUp(test, result)\n", " File \"/usr/lib/python3.13/unittest/suite.py\", line 166, in _handleClassSetUp\n setUpClass()\n", " File \"/mnt/data/engine-performance/module-checkouts/test_navigation_indexes/tools/standards_engine/tests/test_navigation_indexes.py\", line 147, in setUpClass\n refreshed = fixture_facade.verify_repository(\n", " File \"/mnt/data/engine-performance/module-checkouts/test_navigation_indexes/tools/standards_engine/standards_engine/tools.py\", line 224, in verify_repository\n return self._result(\"verify_repository\", self._engine.verify_repository(call))\n", " File \"/mnt/data/engine-performance/module-checkouts/test_navigation_indexes/tools/standards_engine/standards_engine/context_projection.py\", line 60, in invoke\n return function(engine, call)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_navigation_indexes/tools/standards_engine/standards_engine/engine.py\", line 696, in verify_repository\n self._application_verifier(self._repository.root)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_navigation_indexes/tools/standards_verifier/standards_verifier/cli.py\", line 76, in run_complete_verification\n results = tuple(Verifier(repo_root, registry).run(None))\n", " File \"/mnt/data/engine-performance/module-checkouts/test_navigation_indexes/tools/standards_verifier/standards_verifier/engine.py\", line 66, in run\n result = self._run_suite(catalog.suite(suite_id), catalog)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_navigation_indexes/tools/standards_verifier/standards_verifier/engine.py\", line 100, in _run_suite\n diagnostics.extend(check.run(context))\n", " File \"/mnt/data/engine-performance/module-checkouts/test_navigation_indexes/tools/standards_verifier/standards_verifier/checks/python_package_contract.py\", line 70, in run\n for finding in execute_python_package_contract(context.repo_root)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_navigation_indexes/tools/standards_verifier/standards_verifier/python_packages.py\", line 1294, in execute_python_package_contract\n completed = subprocess.run(\n", " File \"/usr/lib/python3.13/subprocess.py\", line 556, in run\n stdout, stderr = process.communicate(input, timeout=timeout)\n", " File \"/usr/lib/python3.13/subprocess.py\", line 1222, in communicate\n stdout, stderr = self._communicate(input, endtime, timeout)\n", " File \"/usr/lib/python3.13/subprocess.py\", line 2128, in _communicate\n ready = selector.select(timeout)\n", " File \"/usr/lib/python3.13/selectors.py\", line 398, in select\n fd_event_list = self._selector.poll(timeout)\n"]} +{"event": "start", "test": "test_navigation_indexes.ProtectedNavigationIndexTest.test_declared_routes_reject_omitted_owners_and_unsupported_artifacts", "at": 1790192494.1234124} +{"event": "observation", "test": "test_navigation_indexes.ProtectedNavigationIndexTest.test_declared_routes_reject_omitted_owners_and_unsupported_artifacts", "elapsed_s": 8.128547674999936, "stack": [" File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 58, in \n result=unittest.TextTestRunner(verbosity=1,resultclass=Result).run(suite)\n", " File \"/usr/lib/python3.13/unittest/runner.py\", line 240, in run\n test(result)\n", " File \"/usr/lib/python3.13/unittest/suite.py\", line 84, in __call__\n return self.run(*args, **kwds)\n", " File \"/usr/lib/python3.13/unittest/suite.py\", line 122, in run\n test(result)\n", " File \"/usr/lib/python3.13/unittest/case.py\", line 707, in __call__\n return self.run(*args, **kwds)\n", " File \"/usr/lib/python3.13/unittest/case.py\", line 651, in run\n self._callTestMethod(testMethod)\n", " File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 36, in timed\n try:return _fn(self,*args,**kwargs)\n", " File \"/usr/lib/python3.13/unittest/case.py\", line 606, in _callTestMethod\n if method() is not None:\n", " File \"/mnt/data/engine-performance/module-checkouts/test_navigation_indexes/tools/standards_engine/tests/test_navigation_indexes.py\", line 524, in test_declared_routes_reject_omitted_owners_and_unsupported_artifacts\n result = self.propose(artifact)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_navigation_indexes/tools/standards_engine/tests/test_navigation_indexes.py\", line 272, in propose\n return self.facade.propose(\n", " File \"/mnt/data/engine-performance/module-checkouts/test_navigation_indexes/tools/standards_engine/standards_engine/tools.py\", line 280, in propose\n return self._result(\"propose\", self._engine.propose(call))\n", " File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 25, in observe\n try:return original(*args,**kwargs)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_navigation_indexes/tools/standards_engine/standards_engine/context_projection.py\", line 60, in invoke\n return function(engine, call)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_navigation_indexes/tools/standards_engine/standards_engine/engine.py\", line 922, in propose\n return propose(self, call)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_navigation_indexes/tools/standards_engine/standards_engine/agent_workflow.py\", line 172, in propose\n result = engine.create_proposal(\n", " File \"/mnt/data/engine-performance/module-checkouts/test_navigation_indexes/tools/standards_engine/standards_engine/context_projection.py\", line 60, in invoke\n return function(engine, call)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_navigation_indexes/tools/standards_engine/standards_engine/engine.py\", line 833, in create_proposal\n summary, revision = self._authoring.create_proposal(\n", " File \"/mnt/data/engine-performance/module-checkouts/test_navigation_indexes/tools/standards_engine/standards_engine/authoring.py\", line 675, in create_proposal\n self._observe_repository_paths(base_snapshot),\n", " File \"/mnt/data/engine-performance/module-checkouts/test_navigation_indexes/tools/standards_engine/standards_engine/engine.py\", line 1698, in _repository_paths_for_snapshot\n capture = self._snapshots.load_content(snapshot)\n", " File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 25, in observe\n try:return original(*args,**kwargs)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_navigation_indexes/tools/standards_snapshots/standards_snapshots/module.py\", line 112, in load_content\n if self._content_id(capture) != content_id:\n", " File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 25, in observe\n try:return original(*args,**kwargs)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_navigation_indexes/tools/standards_snapshots/standards_snapshots/module.py\", line 210, in _content_id\n return hash_identity(\n", " File \"/mnt/data/engine-performance/module-checkouts/test_navigation_indexes/tools/standards_identity/standards_identity/encoding.py\", line 93, in hash_identity\n encoded = encode_identity_value(value)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_navigation_indexes/tools/standards_identity/standards_identity/encoding.py\", line 75, in encode_identity_value\n return _encode(value)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_navigation_indexes/tools/standards_identity/standards_identity/encoding.py\", line 191, in _encode\n return b\"[\" + b\",\".join(_encode(item) for item in value.values) + b\"]\"\n", " File \"/mnt/data/engine-performance/module-checkouts/test_navigation_indexes/tools/standards_identity/standards_identity/encoding.py\", line 191, in \n return b\"[\" + b\",\".join(_encode(item) for item in value.values) + b\"]\"\n", " File \"/mnt/data/engine-performance/module-checkouts/test_navigation_indexes/tools/standards_identity/standards_identity/encoding.py\", line 197, in _encode\n return b\"{\" + b\",\".join(encoded_members) + b\"}\"\n", " File \"/mnt/data/engine-performance/module-checkouts/test_navigation_indexes/tools/standards_identity/standards_identity/encoding.py\", line 194, in \n _encode_string(key) + b\":\" + _encode(member_value)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_navigation_indexes/tools/standards_identity/standards_identity/encoding.py\", line 191, in _encode\n return b\"[\" + b\",\".join(_encode(item) for item in value.values) + b\"]\"\n", " File \"/mnt/data/engine-performance/module-checkouts/test_navigation_indexes/tools/standards_identity/standards_identity/encoding.py\", line 191, in \n return b\"[\" + b\",\".join(_encode(item) for item in value.values) + b\"]\"\n", " File \"/mnt/data/engine-performance/module-checkouts/test_navigation_indexes/tools/standards_identity/standards_identity/encoding.py\", line 187, in _encode\n return _encode_integer(value)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_navigation_indexes/tools/standards_identity/standards_identity/encoding.py\", line 211, in _encode_integer\n suffix = b\"\".join(\n"]} +{"event": "end", "test": "test_navigation_indexes.ProtectedNavigationIndexTest.test_declared_routes_reject_omitted_owners_and_unsupported_artifacts", "wall_s": 15.122033638999937, "cpu_s": 14.621673411000017, "status": "pass", "spans": {"SnapshotModule._content_id": {"calls": 4, "inclusive_s": 11.931479115999764}, "SnapshotModule.load_content": {"calls": 4, "inclusive_s": 11.983747561999962}, "StandardsEngine._compile": {"calls": 4, "inclusive_s": 1.489893247000282}, "StandardsEngine._proposal_projection": {"calls": 2, "inclusive_s": 9.289307662999818}, "StandardsEngine.propose": {"calls": 2, "inclusive_s": 15.1174486230002}}, "setup_s": 1.8429998362989863e-06, "body_s": 15.121847179000042, "teardown_s": 2.172999984395574e-06} +{"event": "start", "test": "test_navigation_indexes.ProtectedNavigationIndexTest.test_z_declared_sections_survive_verified_index_application", "at": 1790192509.2455094} +{"event": "observation", "test": "test_navigation_indexes.ProtectedNavigationIndexTest.test_z_declared_sections_survive_verified_index_application", "elapsed_s": 38.08605277400011, "stack": [" File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 58, in \n result=unittest.TextTestRunner(verbosity=1,resultclass=Result).run(suite)\n", " File \"/usr/lib/python3.13/unittest/runner.py\", line 240, in run\n test(result)\n", " File \"/usr/lib/python3.13/unittest/suite.py\", line 84, in __call__\n return self.run(*args, **kwds)\n", " File \"/usr/lib/python3.13/unittest/suite.py\", line 122, in run\n test(result)\n", " File \"/usr/lib/python3.13/unittest/case.py\", line 707, in __call__\n return self.run(*args, **kwds)\n", " File \"/usr/lib/python3.13/unittest/case.py\", line 651, in run\n self._callTestMethod(testMethod)\n", " File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 36, in timed\n try:return _fn(self,*args,**kwargs)\n", " File \"/usr/lib/python3.13/unittest/case.py\", line 606, in _callTestMethod\n if method() is not None:\n", " File \"/mnt/data/engine-performance/module-checkouts/test_navigation_indexes/tools/standards_engine/tests/test_navigation_indexes.py\", line 551, in test_z_declared_sections_survive_verified_index_application\n resolved = self.facade.resolve_workflow(\n", " File \"/mnt/data/engine-performance/module-checkouts/test_navigation_indexes/tools/standards_engine/standards_engine/tools.py\", line 298, in resolve_workflow\n return self._result(\"resolve_workflow\", self._engine.resolve_workflow(call))\n", " File \"/mnt/data/engine-performance/module-checkouts/test_navigation_indexes/tools/standards_engine/standards_engine/context_projection.py\", line 60, in invoke\n return function(engine, call)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_navigation_indexes/tools/standards_engine/standards_engine/engine.py\", line 940, in resolve_workflow\n return advance(self, \"resolve_workflow\", call)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_navigation_indexes/tools/standards_engine/standards_engine/agent_workflow.py\", line 193, in advance\n current = view(engine, bound)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_navigation_indexes/tools/standards_engine/standards_engine/agent_workflow.py\", line 123, in view\n outcome = engine._analysis_result(engine._evaluate(bound.analysis))\n", " File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 25, in observe\n try:return original(*args,**kwargs)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_navigation_indexes/tools/standards_engine/standards_engine/engine.py\", line 1779, in _evaluate\n return self._evaluate_compiled(state, accepted, proposed, revision)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_navigation_indexes/tools/standards_engine/standards_engine/engine.py\", line 1798, in _evaluate_compiled\n self._validate_projected_inputs(state, revision, accepted, proposed)\n", " File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 25, in observe\n try:return original(*args,**kwargs)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_navigation_indexes/tools/standards_engine/standards_engine/engine.py\", line 1829, in _validate_projected_inputs\n projection = self._proposal_projection(revision)\n", " File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 25, in observe\n try:return original(*args,**kwargs)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_navigation_indexes/tools/standards_engine/standards_engine/engine.py\", line 1683, in _proposal_projection\n capture = self._snapshots.load_content(revision.base_snapshot)\n", " File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 25, in observe\n try:return original(*args,**kwargs)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_navigation_indexes/tools/standards_snapshots/standards_snapshots/module.py\", line 112, in load_content\n if self._content_id(capture) != content_id:\n", " File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 25, in observe\n try:return original(*args,**kwargs)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_navigation_indexes/tools/standards_snapshots/standards_snapshots/module.py\", line 210, in _content_id\n return hash_identity(\n", " File \"/mnt/data/engine-performance/module-checkouts/test_navigation_indexes/tools/standards_identity/standards_identity/encoding.py\", line 93, in hash_identity\n encoded = encode_identity_value(value)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_navigation_indexes/tools/standards_identity/standards_identity/encoding.py\", line 75, in encode_identity_value\n return _encode(value)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_navigation_indexes/tools/standards_identity/standards_identity/encoding.py\", line 191, in _encode\n return b\"[\" + b\",\".join(_encode(item) for item in value.values) + b\"]\"\n", " File \"/mnt/data/engine-performance/module-checkouts/test_navigation_indexes/tools/standards_identity/standards_identity/encoding.py\", line 191, in \n return b\"[\" + b\",\".join(_encode(item) for item in value.values) + b\"]\"\n", " File \"/mnt/data/engine-performance/module-checkouts/test_navigation_indexes/tools/standards_identity/standards_identity/encoding.py\", line 197, in _encode\n return b\"{\" + b\",\".join(encoded_members) + b\"}\"\n", " File \"/mnt/data/engine-performance/module-checkouts/test_navigation_indexes/tools/standards_identity/standards_identity/encoding.py\", line 194, in \n _encode_string(key) + b\":\" + _encode(member_value)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_navigation_indexes/tools/standards_identity/standards_identity/encoding.py\", line 191, in _encode\n return b\"[\" + b\",\".join(_encode(item) for item in value.values) + b\"]\"\n", " File \"/mnt/data/engine-performance/module-checkouts/test_navigation_indexes/tools/standards_identity/standards_identity/encoding.py\", line 191, in \n return b\"[\" + b\",\".join(_encode(item) for item in value.values) + b\"]\"\n", " File \"/mnt/data/engine-performance/module-checkouts/test_navigation_indexes/tools/standards_identity/standards_identity/encoding.py\", line 187, in _encode\n return _encode_integer(value)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_navigation_indexes/tools/standards_identity/standards_identity/encoding.py\", line 208, in _encode_integer\n remaining, chunk = divmod(remaining, _DECIMAL_CHUNK_BASE)\n"]} +{"event": "observation", "test": "test_navigation_indexes.ProtectedNavigationIndexTest.test_z_declared_sections_survive_verified_index_application", "elapsed_s": 83.095168952, "stack": [" File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 58, in \n result=unittest.TextTestRunner(verbosity=1,resultclass=Result).run(suite)\n", " File \"/usr/lib/python3.13/unittest/runner.py\", line 240, in run\n test(result)\n", " File \"/usr/lib/python3.13/unittest/suite.py\", line 84, in __call__\n return self.run(*args, **kwds)\n", " File \"/usr/lib/python3.13/unittest/suite.py\", line 122, in run\n test(result)\n", " File \"/usr/lib/python3.13/unittest/case.py\", line 707, in __call__\n return self.run(*args, **kwds)\n", " File \"/usr/lib/python3.13/unittest/case.py\", line 651, in run\n self._callTestMethod(testMethod)\n", " File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 36, in timed\n try:return _fn(self,*args,**kwargs)\n", " File \"/usr/lib/python3.13/unittest/case.py\", line 606, in _callTestMethod\n if method() is not None:\n", " File \"/mnt/data/engine-performance/module-checkouts/test_navigation_indexes/tools/standards_engine/tests/test_navigation_indexes.py\", line 565, in test_z_declared_sections_survive_verified_index_application\n ready = self.facade.review(\n", " File \"/mnt/data/engine-performance/module-checkouts/test_navigation_indexes/tools/standards_engine/standards_engine/tools.py\", line 304, in review\n return self._result(\"review\", self._engine.review(call))\n", " File \"/mnt/data/engine-performance/module-checkouts/test_navigation_indexes/tools/standards_engine/standards_engine/context_projection.py\", line 60, in invoke\n return function(engine, call)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_navigation_indexes/tools/standards_engine/standards_engine/engine.py\", line 946, in review\n return advance(self, \"review\", call)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_navigation_indexes/tools/standards_engine/standards_engine/agent_workflow.py\", line 193, in advance\n current = view(engine, bound)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_navigation_indexes/tools/standards_engine/standards_engine/agent_workflow.py\", line 123, in view\n outcome = engine._analysis_result(engine._evaluate(bound.analysis))\n", " File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 25, in observe\n try:return original(*args,**kwargs)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_navigation_indexes/tools/standards_engine/standards_engine/engine.py\", line 1779, in _evaluate\n return self._evaluate_compiled(state, accepted, proposed, revision)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_navigation_indexes/tools/standards_engine/standards_engine/engine.py\", line 1798, in _evaluate_compiled\n self._validate_projected_inputs(state, revision, accepted, proposed)\n", " File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 25, in observe\n try:return original(*args,**kwargs)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_navigation_indexes/tools/standards_engine/standards_engine/engine.py\", line 1829, in _validate_projected_inputs\n projection = self._proposal_projection(revision)\n", " File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 25, in observe\n try:return original(*args,**kwargs)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_navigation_indexes/tools/standards_engine/standards_engine/engine.py\", line 1687, in _proposal_projection\n return self._logical_authoring.compile(\n", " File \"/mnt/data/engine-performance/module-checkouts/test_navigation_indexes/tools/standards_engine/standards_engine/logical_authoring.py\", line 983, in compile\n repository_paths = _refresh_suite_input_projection(\n", " File \"/mnt/data/engine-performance/module-checkouts/test_navigation_indexes/tools/standards_engine/standards_engine/logical_authoring.py\", line 2443, in _refresh_suite_input_projection\n git_output(root, (\"add\", \"--force\", \"--all\", \"--\"))\n", " File \"/mnt/data/engine-performance/module-checkouts/test_navigation_indexes/tools/repository_git/repository_git/repository.py\", line 91, in git_output\n result = git_command(\n", " File \"/mnt/data/engine-performance/module-checkouts/test_navigation_indexes/tools/repository_git/repository_git/repository.py\", line 75, in git_command\n return _run_bounded(\n", " File \"/mnt/data/engine-performance/module-checkouts/test_navigation_indexes/tools/repository_git/repository_git/repository.py\", line 859, in _run_bounded\n returncode = process.wait(timeout=COMMAND_TIMEOUT_SECONDS)\n", " File \"/usr/lib/python3.13/subprocess.py\", line 1280, in wait\n return self._wait(timeout=timeout)\n", " File \"/usr/lib/python3.13/subprocess.py\", line 2060, in _wait\n time.sleep(delay)\n"]} +{"event": "observation", "test": "test_navigation_indexes.ProtectedNavigationIndexTest.test_z_declared_sections_survive_verified_index_application", "elapsed_s": 128.10360000900005, "stack": [" File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 58, in \n result=unittest.TextTestRunner(verbosity=1,resultclass=Result).run(suite)\n", " File \"/usr/lib/python3.13/unittest/runner.py\", line 240, in run\n test(result)\n", " File \"/usr/lib/python3.13/unittest/suite.py\", line 84, in __call__\n return self.run(*args, **kwds)\n", " File \"/usr/lib/python3.13/unittest/suite.py\", line 122, in run\n test(result)\n", " File \"/usr/lib/python3.13/unittest/case.py\", line 707, in __call__\n return self.run(*args, **kwds)\n", " File \"/usr/lib/python3.13/unittest/case.py\", line 651, in run\n self._callTestMethod(testMethod)\n", " File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 36, in timed\n try:return _fn(self,*args,**kwargs)\n", " File \"/usr/lib/python3.13/unittest/case.py\", line 606, in _callTestMethod\n if method() is not None:\n", " File \"/mnt/data/engine-performance/module-checkouts/test_navigation_indexes/tools/standards_engine/tests/test_navigation_indexes.py\", line 569, in test_z_declared_sections_survive_verified_index_application\n applied = self.facade.apply({\"context\": ready[\"context\"]})\n", " File \"/mnt/data/engine-performance/module-checkouts/test_navigation_indexes/tools/standards_engine/standards_engine/tools.py\", line 310, in apply\n return self._result(\"apply\", self._engine.apply(call))\n", " File \"/mnt/data/engine-performance/module-checkouts/test_navigation_indexes/tools/standards_engine/standards_engine/context_projection.py\", line 60, in invoke\n return function(engine, call)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_navigation_indexes/tools/standards_engine/standards_engine/engine.py\", line 952, in apply\n return advance(self, \"apply\", call)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_navigation_indexes/tools/standards_engine/standards_engine/agent_workflow.py\", line 257, in advance\n result = engine.apply_proposal(\n", " File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 25, in observe\n try:return original(*args,**kwargs)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_navigation_indexes/tools/standards_engine/standards_engine/context_projection.py\", line 60, in invoke\n return function(engine, call)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_navigation_indexes/tools/standards_engine/standards_engine/engine.py\", line 1275, in apply_proposal\n verification = self._application_verifier(candidate.root)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_navigation_indexes/tools/standards_verifier/standards_verifier/cli.py\", line 76, in run_complete_verification\n results = tuple(Verifier(repo_root, registry).run(None))\n", " File \"/mnt/data/engine-performance/module-checkouts/test_navigation_indexes/tools/standards_verifier/standards_verifier/engine.py\", line 66, in run\n result = self._run_suite(catalog.suite(suite_id), catalog)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_navigation_indexes/tools/standards_verifier/standards_verifier/engine.py\", line 100, in _run_suite\n diagnostics.extend(check.run(context))\n", " File \"/mnt/data/engine-performance/module-checkouts/test_navigation_indexes/tools/standards_verifier/standards_verifier/checks/python_package_contract.py\", line 70, in run\n for finding in execute_python_package_contract(context.repo_root)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_navigation_indexes/tools/standards_verifier/standards_verifier/python_packages.py\", line 1294, in execute_python_package_contract\n completed = subprocess.run(\n", " File \"/usr/lib/python3.13/subprocess.py\", line 556, in run\n stdout, stderr = process.communicate(input, timeout=timeout)\n", " File \"/usr/lib/python3.13/subprocess.py\", line 1222, in communicate\n stdout, stderr = self._communicate(input, endtime, timeout)\n", " File \"/usr/lib/python3.13/subprocess.py\", line 2128, in _communicate\n ready = selector.select(timeout)\n", " File \"/usr/lib/python3.13/selectors.py\", line 398, in select\n fd_event_list = self._selector.poll(timeout)\n"]} +{"event": "end", "test": "test_navigation_indexes.ProtectedNavigationIndexTest.test_z_declared_sections_survive_verified_index_application", "wall_s": 162.93120885300004, "cpu_s": 115.06860945200003, "status": "pass", "spans": {"SnapshotModule._content_id": {"calls": 25, "inclusive_s": 71.58972503600035}, "SnapshotModule.load_content": {"calls": 24, "inclusive_s": 69.14615657400009}, "StandardsEngine._compile": {"calls": 54, "inclusive_s": 35.60004277900043}, "StandardsEngine._proposal_projection": {"calls": 15, "inclusive_s": 79.20024530100022}, "AuthoringModule.read_revision": {"calls": 32, "inclusive_s": 1.1604997280005591}, "StandardsEngine._compiled_snapshot": {"calls": 7, "inclusive_s": 23.3778063069999}, "StandardsEngine._validate_projected_inputs": {"calls": 6, "inclusive_s": 32.37906826700032}, "StandardsEngine.analyze_proposal": {"calls": 1, "inclusive_s": 14.001725029999989}, "StandardsEngine.propose": {"calls": 1, "inclusive_s": 22.300446078999812}, "StandardsEngine.query_proposal": {"calls": 1, "inclusive_s": 5.075681583000005}, "StandardsEngine._evaluate": {"calls": 5, "inclusive_s": 70.51818729899992}, "StandardsEngine.resolve": {"calls": 1, "inclusive_s": 28.23561652499984}, "StandardsEngine.review_proposal": {"calls": 1, "inclusive_s": 14.597941455999944}, "StandardsEngine.apply_proposal": {"calls": 1, "inclusive_s": 41.47857569500002}}, "setup_s": 1.3619999208458466e-06, "body_s": 162.9311158339999, "teardown_s": 1.871999984359718e-06} +{"event": "summary", "total_s": 620.364129136, "run": 14, "errors": 0, "failures": 0, "skips": 0} diff --git a/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/test_navigation_indexes.stderr b/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/test_navigation_indexes.stderr new file mode 100644 index 00000000..49c5a8a9 --- /dev/null +++ b/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/test_navigation_indexes.stderr @@ -0,0 +1,5 @@ +.............. +---------------------------------------------------------------------- +Ran 14 tests in 618.948s + +OK diff --git a/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/test_navigation_indexes.stdout b/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/test_navigation_indexes.stdout new file mode 100644 index 00000000..53cca752 --- /dev/null +++ b/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/test_navigation_indexes.stdout @@ -0,0 +1,28 @@ +START test_navigation_indexes.NavigationIndexAuthorityTest.test_absent_catalog_exposes_no_authoring_capability +END test_navigation_indexes.NavigationIndexAuthorityTest.test_absent_catalog_exposes_no_authoring_capability 0.0 pass +START test_navigation_indexes.NavigationIndexAuthorityTest.test_bad_catalog_and_non_utf8_content_are_typed_rejections +END test_navigation_indexes.NavigationIndexAuthorityTest.test_bad_catalog_and_non_utf8_content_are_typed_rejections 0.0 pass +START test_navigation_indexes.NavigationIndexAuthorityTest.test_declared_routes_bind_their_owner_content_and_exact_declarations +END test_navigation_indexes.NavigationIndexAuthorityTest.test_declared_routes_bind_their_owner_content_and_exact_declarations 0.001 pass +START test_navigation_indexes.NavigationIndexAuthorityTest.test_old_captured_index_without_route_inventory_remains_readable +END test_navigation_indexes.NavigationIndexAuthorityTest.test_old_captured_index_without_route_inventory_remains_readable 0.0 pass +START test_navigation_indexes.NavigationIndexAuthorityTest.test_registration_cannot_make_a_normative_standard_writable +END test_navigation_indexes.NavigationIndexAuthorityTest.test_registration_cannot_make_a_normative_standard_writable 0.0 pass +START test_navigation_indexes.NavigationIndexAuthorityTest.test_review_fingerprint_binds_destination_authority_without_inventing_policy_changes +END test_navigation_indexes.NavigationIndexAuthorityTest.test_review_fingerprint_binds_destination_authority_without_inventing_policy_changes 0.0 pass +START test_navigation_indexes.NavigationIndexWorkflowTest.test_cross_snapshot_handle_is_not_an_authorization_to_retarget +END test_navigation_indexes.NavigationIndexWorkflowTest.test_cross_snapshot_handle_is_not_an_authorization_to_retarget 33.264 pass +START test_navigation_indexes.NavigationIndexWorkflowTest.test_discovery_captures_exact_content_without_claiming_policy_authority +END test_navigation_indexes.NavigationIndexWorkflowTest.test_discovery_captures_exact_content_without_claiming_policy_authority 6.418 pass +START test_navigation_indexes.NavigationIndexWorkflowTest.test_fresh_mcp_process_exposes_snapshot_bound_navigation +END test_navigation_indexes.NavigationIndexWorkflowTest.test_fresh_mcp_process_exposes_snapshot_bound_navigation 6.431 pass +START test_navigation_indexes.NavigationIndexWorkflowTest.test_invalid_selections_do_not_create_an_applicable_candidate +END test_navigation_indexes.NavigationIndexWorkflowTest.test_invalid_selections_do_not_create_an_applicable_candidate 14.52 pass +START test_navigation_indexes.NavigationIndexWorkflowTest.test_retarget_dispositions_cannot_remove_unrelated_assertions +END test_navigation_indexes.NavigationIndexWorkflowTest.test_retarget_dispositions_cannot_remove_unrelated_assertions 14.32 pass +START test_navigation_indexes.NavigationIndexWorkflowTest.test_z_exact_index_proposal_requires_review_and_applies_through_engine +END test_navigation_indexes.NavigationIndexWorkflowTest.test_z_exact_index_proposal_requires_review_and_applies_through_engine 250.162 pass +START test_navigation_indexes.ProtectedNavigationIndexTest.test_declared_routes_reject_omitted_owners_and_unsupported_artifacts +END test_navigation_indexes.ProtectedNavigationIndexTest.test_declared_routes_reject_omitted_owners_and_unsupported_artifacts 15.122 pass +START test_navigation_indexes.ProtectedNavigationIndexTest.test_z_declared_sections_survive_verified_index_application +END test_navigation_indexes.ProtectedNavigationIndexTest.test_z_declared_sections_survive_verified_index_application 162.931 pass diff --git a/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/test_platform_harness.exit.json b/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/test_platform_harness.exit.json new file mode 100644 index 00000000..1f271bd4 --- /dev/null +++ b/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/test_platform_harness.exit.json @@ -0,0 +1 @@ +{"returncode": 1, "elapsed_s": 30.98928213119507, "args": ["--pattern", "test_platform_harness.py", "--exclude", "/mnt/data/engine-performance/evidence/completed-for-parallel.json"]} \ No newline at end of file diff --git a/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/test_platform_harness.jsonl b/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/test_platform_harness.jsonl new file mode 100644 index 00000000..1890bcd9 --- /dev/null +++ b/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/test_platform_harness.jsonl @@ -0,0 +1,7 @@ +{"event": "start", "test": "test_platform_harness.PlatformHarnessTest.test_closed_store_round_trip_uses_public_operations", "at": 1790192932.3400958} +{"event": "end", "test": "test_platform_harness.PlatformHarnessTest.test_closed_store_round_trip_uses_public_operations", "wall_s": 28.083518951000087, "cpu_s": 14.510006931999998, "status": "error", "spans": {"tools.standards_engine.standards_engine.tools._contracts": {"calls": 1, "inclusive_s": 0.34794711500012454}, "StandardsEngine._compile": {"calls": 4, "inclusive_s": 18.82583936399965}, "SnapshotModule._content_id": {"calls": 3, "inclusive_s": 8.821007116000146}, "SnapshotModule.load_content": {"calls": 2, "inclusive_s": 5.730206360000011}, "StandardsEngine._compiled_snapshot": {"calls": 2, "inclusive_s": 6.39273158900005}}, "setup_s": 1.8230000478069996e-06, "body_s": 28.081901886999958, "teardown_s": 2.5740000637597404e-06} +{"event": "start", "test": "test_platform_harness.PlatformHarnessTest.test_concurrent_probe_rejects_mismatched_content", "at": 1790192960.423706} +{"event": "end", "test": "test_platform_harness.PlatformHarnessTest.test_concurrent_probe_rejects_mismatched_content", "wall_s": 0.0008339100002103805, "cpu_s": 0.0008341499999993118, "status": "pass", "spans": {}, "setup_s": 1.5929999790387228e-06, "body_s": 0.0007805499999449239, "teardown_s": 6.510001639981056e-07} +{"event": "start", "test": "test_platform_harness.PlatformHarnessTest.test_consume_rejects_changed_store_before_open", "at": 1790192960.424577} +{"event": "end", "test": "test_platform_harness.PlatformHarnessTest.test_consume_rejects_changed_store_before_open", "wall_s": 0.00044034000006831775, "cpu_s": 0.0004408650000016223, "status": "pass", "spans": {}, "setup_s": 3.800000740739051e-07, "body_s": 0.0004036949999317585, "teardown_s": 6.210000265127746e-07} +{"event": "summary", "total_s": 29.746895912000127, "run": 3, "errors": 1, "failures": 0, "skips": 0} diff --git a/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/test_platform_harness.stderr b/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/test_platform_harness.stderr new file mode 100644 index 00000000..81445085 --- /dev/null +++ b/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/test_platform_harness.stderr @@ -0,0 +1,29 @@ +E.. +====================================================================== +ERROR: test_closed_store_round_trip_uses_public_operations (test_platform_harness.PlatformHarnessTest.test_closed_store_round_trip_uses_public_operations) +---------------------------------------------------------------------- +Traceback (most recent call last): + File "/mnt/data/engine-performance/harness/run_timed_suite.py", line 36, in timed + try:return _fn(self,*args,**kwargs) + ~~~^^^^^^^^^^^^^^^^^^^^^ + File "/usr/lib/python3.13/unittest/case.py", line 606, in _callTestMethod + if method() is not None: + ~~~~~~^^ + File "/mnt/data/engine-performance/module-checkouts/test_platform_harness/tools/standards_engine/tests/test_platform_harness.py", line 26, in test_closed_store_round_trip_uses_public_operations + produced = produce(REPOSITORY_ROOT, producer_store, producer_manifest) + File "/mnt/data/engine-performance/module-checkouts/test_platform_harness/tools/standards_engine/tests/platform_harness.py", line 254, in produce + prepared = _expect( + facade.call( + ...<4 lines>... + "prepare", + ) + File "/mnt/data/engine-performance/module-checkouts/test_platform_harness/tools/standards_engine/tests/platform_harness.py", line 149, in _expect + raise HarnessError( + ...<2 lines>... + ) +tools.standards_engine.tests.platform_harness.HarnessError: prepare rejected with INTERFACE.INVALID_ARGUMENTS (invalid): CONTRACT.INVALID_INSTANCE: value does not satisfy the selected public contract + +---------------------------------------------------------------------- +Ran 3 tests in 28.085s + +FAILED (errors=1) diff --git a/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/test_platform_harness.stdout b/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/test_platform_harness.stdout new file mode 100644 index 00000000..289954c5 --- /dev/null +++ b/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/test_platform_harness.stdout @@ -0,0 +1,6 @@ +START test_platform_harness.PlatformHarnessTest.test_closed_store_round_trip_uses_public_operations +END test_platform_harness.PlatformHarnessTest.test_closed_store_round_trip_uses_public_operations 28.084 error +START test_platform_harness.PlatformHarnessTest.test_concurrent_probe_rejects_mismatched_content +END test_platform_harness.PlatformHarnessTest.test_concurrent_probe_rejects_mismatched_content 0.001 pass +START test_platform_harness.PlatformHarnessTest.test_consume_rejects_changed_store_before_open +END test_platform_harness.PlatformHarnessTest.test_consume_rejects_changed_store_before_open 0.0 pass diff --git a/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/test_purpose_projection.exit.json b/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/test_purpose_projection.exit.json new file mode 100644 index 00000000..48f025c2 --- /dev/null +++ b/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/test_purpose_projection.exit.json @@ -0,0 +1 @@ +{"returncode": 0, "elapsed_s": 61.860578298568726, "args": ["--pattern", "test_purpose_projection.py", "--exclude", "/mnt/data/engine-performance/evidence/completed-for-parallel.json"]} \ No newline at end of file diff --git a/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/test_purpose_projection.jsonl b/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/test_purpose_projection.jsonl new file mode 100644 index 00000000..bbb69a36 --- /dev/null +++ b/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/test_purpose_projection.jsonl @@ -0,0 +1,30 @@ +{"event": "start", "test": "test_purpose_projection.PurposeProjectionTest.test_authoring_read_retrieves_reasoning_and_exposure_state", "at": 1790192967.5581646} +{"event": "end", "test": "test_purpose_projection.PurposeProjectionTest.test_authoring_read_retrieves_reasoning_and_exposure_state", "wall_s": 6.883982284000012, "cpu_s": 6.831894689000001, "status": "pass", "spans": {"tools.standards_engine.standards_engine.tools._contracts": {"calls": 1, "inclusive_s": 0.2675915190000069}, "SnapshotModule._content_id": {"calls": 2, "inclusive_s": 5.871092886000042}, "SnapshotModule.load_content": {"calls": 2, "inclusive_s": 5.895023353999932}, "StandardsEngine._compile": {"calls": 2, "inclusive_s": 0.6897991930002263}, "StandardsEngine._compiled_snapshot": {"calls": 2, "inclusive_s": 6.590086898000209}}, "setup_s": 2.06300001082127e-06, "body_s": 6.8837280820000615, "teardown_s": 2.64400000560272e-06} +{"event": "start", "test": "test_purpose_projection.PurposeProjectionTest.test_catalog_has_no_authoring_schema_closure", "at": 1790192974.4422605} +{"event": "end", "test": "test_purpose_projection.PurposeProjectionTest.test_catalog_has_no_authoring_schema_closure", "wall_s": 0.005947324000089793, "cpu_s": 0.0059487740000001565, "status": "pass", "spans": {}, "setup_s": 1.4830000054644188e-06, "body_s": 0.005871100000149454, "teardown_s": 1.5020000319054816e-06} +{"event": "start", "test": "test_purpose_projection.PurposeProjectionTest.test_direct_hidden_read_and_privileged_request_are_bounded", "at": 1790192974.448285} +{"event": "end", "test": "test_purpose_projection.PurposeProjectionTest.test_direct_hidden_read_and_privileged_request_are_bounded", "wall_s": 3.3446539570002187, "cpu_s": 3.3194992080000016, "status": "pass", "spans": {"SnapshotModule._content_id": {"calls": 1, "inclusive_s": 2.9877014569999574}, "SnapshotModule.load_content": {"calls": 1, "inclusive_s": 3.0035553060001803}, "StandardsEngine._compile": {"calls": 1, "inclusive_s": 0.33619701399993573}, "StandardsEngine._compiled_snapshot": {"calls": 1, "inclusive_s": 3.3421327579999343}}, "setup_s": 1.1419999736972386e-06, "body_s": 3.344571604000066, "teardown_s": 1.2220000371598871e-06} +{"event": "start", "test": "test_purpose_projection.PurposeProjectionTest.test_domain_and_facade_admit_only_application_operations_before_work", "at": 1790192977.793012} +{"event": "end", "test": "test_purpose_projection.PurposeProjectionTest.test_domain_and_facade_admit_only_application_operations_before_work", "wall_s": 0.27427449999981945, "cpu_s": 0.27406303500000107, "status": "pass", "spans": {"tools.standards_engine.standards_engine.tools._contracts": {"calls": 1, "inclusive_s": 0.27104435899991586}, "StandardsEngine.prepare": {"calls": 1, "inclusive_s": 3.595399994082982e-05}, "StandardsEngine.resolve": {"calls": 1, "inclusive_s": 3.626400007306074e-05}, "StandardsEngine.query_proposal": {"calls": 1, "inclusive_s": 3.088700009357126e-05}, "StandardsEngine.analyze_proposal": {"calls": 1, "inclusive_s": 3.146800008835271e-05}, "StandardsEngine.review_proposal": {"calls": 1, "inclusive_s": 3.118699987680884e-05}, "StandardsEngine.apply_proposal": {"calls": 1, "inclusive_s": 3.1267000167645165e-05}, "StandardsEngine.verify_proposal": {"calls": 1, "inclusive_s": 3.010499995070859e-05}, "StandardsEngine.propose": {"calls": 1, "inclusive_s": 3.013500008819392e-05}, "StandardsEngine.revise": {"calls": 1, "inclusive_s": 3.044599998247577e-05}}, "setup_s": 8.609999895270448e-07, "body_s": 0.2741936990000795, "teardown_s": 1.0219998785032658e-06} +{"event": "start", "test": "test_purpose_projection.PurposeProjectionTest.test_hidden_intermediate_cannot_bridge_a_permitted_traversal", "at": 1790192978.0673945} +{"event": "end", "test": "test_purpose_projection.PurposeProjectionTest.test_hidden_intermediate_cannot_bridge_a_permitted_traversal", "wall_s": 0.0009880699999484932, "cpu_s": 0.0009891000000017414, "status": "pass", "spans": {}, "setup_s": 8.50999867907376e-07, "body_s": 0.0009310550001373485, "teardown_s": 1.4030001693754457e-06} +{"event": "start", "test": "test_purpose_projection.PurposeProjectionTest.test_invalid_host_purpose_creates_no_store", "at": 1790192978.0684354} +{"event": "end", "test": "test_purpose_projection.PurposeProjectionTest.test_invalid_host_purpose_creates_no_store", "wall_s": 0.0008688820000770647, "cpu_s": 0.0008699529999987021, "status": "pass", "spans": {}, "setup_s": 5.809999947814504e-07, "body_s": 0.0008153510000283859, "teardown_s": 6.709999524900923e-07} +{"event": "start", "test": "test_purpose_projection.PurposeProjectionTest.test_material_change_requires_new_exposure_but_rationale_change_does_not", "at": 1790192978.0693495} +{"event": "end", "test": "test_purpose_projection.PurposeProjectionTest.test_material_change_requires_new_exposure_but_rationale_change_does_not", "wall_s": 0.751673116999882, "cpu_s": 0.7505881820000013, "status": "pass", "spans": {"StandardsEngine._compile": {"calls": 2, "inclusive_s": 0.7259638379998705}}, "setup_s": 3.4000004234258085e-07, "body_s": 0.7515909349999674, "teardown_s": 2.4829998892528238e-06} +{"event": "start", "test": "test_purpose_projection.PurposeProjectionTest.test_native_query_and_handle_inspection_use_the_same_boundary", "at": 1790192978.8211215} +{"event": "end", "test": "test_purpose_projection.PurposeProjectionTest.test_native_query_and_handle_inspection_use_the_same_boundary", "wall_s": 10.745974101000002, "cpu_s": 10.702163911, "status": "pass", "spans": {"SnapshotModule._content_id": {"calls": 3, "inclusive_s": 9.514836979000165}, "SnapshotModule.load_content": {"calls": 3, "inclusive_s": 9.556561899999906}, "StandardsEngine._compile": {"calls": 3, "inclusive_s": 1.169424901999946}, "StandardsEngine._compiled_snapshot": {"calls": 3, "inclusive_s": 10.734665613000061}}, "setup_s": 1.0609999208099907e-06, "body_s": 10.745834742999932, "teardown_s": 1.9030001112696482e-06} +{"event": "start", "test": "test_purpose_projection.PurposeProjectionTest.test_read_has_exact_reviewed_content_and_explicit_permitted_fields", "at": 1790192989.5672066} +{"event": "end", "test": "test_purpose_projection.PurposeProjectionTest.test_read_has_exact_reviewed_content_and_explicit_permitted_fields", "wall_s": 6.40621535199989, "cpu_s": 6.330138001000002, "status": "pass", "spans": {"SnapshotModule._content_id": {"calls": 2, "inclusive_s": 5.651486762999866}, "SnapshotModule.load_content": {"calls": 2, "inclusive_s": 5.678975803999947}, "StandardsEngine._compile": {"calls": 2, "inclusive_s": 0.7090993839999555}, "StandardsEngine._compiled_snapshot": {"calls": 2, "inclusive_s": 6.39284672000008}}, "setup_s": 1.3020001006225357e-06, "body_s": 6.406086460000097, "teardown_s": 1.2220000371598871e-06} +{"event": "start", "test": "test_purpose_projection.PurposeProjectionTest.test_router_presentation_change_requires_explicit_renewal", "at": 1790192995.9735081} +{"event": "end", "test": "test_purpose_projection.PurposeProjectionTest.test_router_presentation_change_requires_explicit_renewal", "wall_s": 0.42546387900006266, "cpu_s": 0.42188948199999743, "status": "pass", "spans": {"StandardsEngine._compile": {"calls": 1, "inclusive_s": 0.40939145900006224}}, "setup_s": 8.81000005392707e-07, "body_s": 0.4253634480000983, "teardown_s": 2.0229999790899456e-06} +{"event": "start", "test": "test_purpose_projection.PurposeProjectionTest.test_routing_retains_unknown_facts_and_blocks_missing_required_content", "at": 1790192996.3990781} +{"event": "end", "test": "test_purpose_projection.PurposeProjectionTest.test_routing_retains_unknown_facts_and_blocks_missing_required_content", "wall_s": 10.40671178599996, "cpu_s": 10.371080810999999, "status": "pass", "spans": {"SnapshotModule._content_id": {"calls": 3, "inclusive_s": 9.167023071999893}, "SnapshotModule.load_content": {"calls": 3, "inclusive_s": 9.20336104900025}, "StandardsEngine._compile": {"calls": 3, "inclusive_s": 1.1691452300001401}, "StandardsEngine._compiled_snapshot": {"calls": 3, "inclusive_s": 10.381953586000009}}, "setup_s": 9.810000847210176e-07, "body_s": 10.406626937999818, "teardown_s": 1.863000079538324e-06} +{"event": "start", "test": "test_purpose_projection.PurposeProjectionTest.test_unexpected_observation_failure_returns_no_private_context", "at": 1790193006.8058736} +{"event": "observation", "test": "test_purpose_projection.PurposeProjectionTest.test_unexpected_observation_failure_returns_no_private_context", "elapsed_s": 0.10229251500004466, "stack": [" File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 58, in \n result=unittest.TextTestRunner(verbosity=1,resultclass=Result).run(suite)\n", " File \"/usr/lib/python3.13/unittest/runner.py\", line 240, in run\n test(result)\n", " File \"/usr/lib/python3.13/unittest/suite.py\", line 84, in __call__\n return self.run(*args, **kwds)\n", " File \"/usr/lib/python3.13/unittest/suite.py\", line 122, in run\n test(result)\n", " File \"/usr/lib/python3.13/unittest/case.py\", line 707, in __call__\n return self.run(*args, **kwds)\n", " File \"/usr/lib/python3.13/unittest/case.py\", line 651, in run\n self._callTestMethod(testMethod)\n", " File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 36, in timed\n try:return _fn(self,*args,**kwargs)\n", " File \"/usr/lib/python3.13/unittest/case.py\", line 606, in _callTestMethod\n if method() is not None:\n", " File \"/mnt/data/engine-performance/module-checkouts/test_purpose_projection/tools/standards_engine/tests/test_purpose_projection.py\", line 192, in test_unexpected_observation_failure_returns_no_private_context\n value = self.read()\n", " File \"/mnt/data/engine-performance/module-checkouts/test_purpose_projection/tools/standards_engine/tests/test_purpose_projection.py\", line 84, in read\n return self.facade.read({\"snapshot\": self.snapshot, \"target\": \"core\", **fields})\n", " File \"/mnt/data/engine-performance/module-checkouts/test_purpose_projection/tools/standards_engine/standards_engine/tools.py\", line 346, in read\n return self._result(\"read\", self._engine.read(call))\n", " File \"/mnt/data/engine-performance/module-checkouts/test_purpose_projection/tools/standards_engine/standards_engine/context_projection.py\", line 56, in invoke\n return application_dispatch(engine, function.__name__, call)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_purpose_projection/tools/standards_engine/standards_engine/context_projection.py\", line 242, in application_dispatch\n compiled = engine._compiled_snapshot(engine._snapshot_id(snapshot))\n", " File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 25, in observe\n try:return original(*args,**kwargs)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_purpose_projection/tools/standards_engine/standards_engine/engine.py\", line 1672, in _compiled_snapshot\n capture = self._snapshots.load_content(snapshot)\n", " File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 25, in observe\n try:return original(*args,**kwargs)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_purpose_projection/tools/standards_snapshots/standards_snapshots/module.py\", line 112, in load_content\n if self._content_id(capture) != content_id:\n", " File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 25, in observe\n try:return original(*args,**kwargs)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_purpose_projection/tools/standards_snapshots/standards_snapshots/module.py\", line 207, in _content_id\n material = frame_path_byte_set(\n", " File \"/mnt/data/engine-performance/module-checkouts/test_purpose_projection/tools/standards_identity/standards_identity/encoding.py\", line 143, in frame_path_byte_set\n frame_path_bytes(components, content)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_purpose_projection/tools/standards_identity/standards_identity/encoding.py\", line 131, in frame_path_bytes\n (\"bytes\", IdentityArray(content)),\n", " File \"/mnt/data/engine-performance/module-checkouts/test_purpose_projection/tools/standards_identity/standards_identity/encoding.py\", line 25, in __init__\n _validate_value(value)\n"]} +{"event": "end", "test": "test_purpose_projection.PurposeProjectionTest.test_unexpected_observation_failure_returns_no_private_context", "wall_s": 3.673200839999936, "cpu_s": 3.6731263180000013, "status": "pass", "spans": {"SnapshotModule._content_id": {"calls": 1, "inclusive_s": 3.235006700999975}, "SnapshotModule.load_content": {"calls": 1, "inclusive_s": 3.246210284999961}, "StandardsEngine._compile": {"calls": 1, "inclusive_s": 0.4204375319998235}, "StandardsEngine._compiled_snapshot": {"calls": 1, "inclusive_s": 3.67007880999995}}, "setup_s": 9.010000212583691e-07, "body_s": 3.673081060999948, "teardown_s": 2.0129998574702768e-06} +{"event": "start", "test": "test_purpose_projection.PurposeProjectionTest.test_unsupported_capture_is_preserved_and_classified", "at": 1790193010.4791727} +{"event": "end", "test": "test_purpose_projection.PurposeProjectionTest.test_unsupported_capture_is_preserved_and_classified", "wall_s": 12.047755135999978, "cpu_s": 11.993469476000001, "status": "pass", "spans": {"SnapshotModule._content_id": {"calls": 4, "inclusive_s": 11.942433389000144}, "SnapshotModule.load_content": {"calls": 3, "inclusive_s": 8.82091944900003}, "StandardsEngine._compile": {"calls": 1, "inclusive_s": 0.04812911199996961}, "StandardsEngine._compiled_snapshot": {"calls": 1, "inclusive_s": 2.9444060560001617}}, "setup_s": 1.562000079502468e-06, "body_s": 12.047611770999993, "teardown_s": 2.7240000690653687e-06} +{"event": "start", "test": "test_purpose_projection.PurposeProjectionTest.test_whole_module_discovers_references_owned_by_its_policy_units", "at": 1790193022.5270648} +{"event": "end", "test": "test_purpose_projection.PurposeProjectionTest.test_whole_module_discovers_references_owned_by_its_policy_units", "wall_s": 0.0019592669998473866, "cpu_s": 0.0019598129999991443, "status": "pass", "spans": {}, "setup_s": 9.620000582799548e-07, "body_s": 0.001901489999909245, "teardown_s": 5.499998678715201e-07} +{"event": "summary", "total_s": 60.631532289999996, "run": 14, "errors": 0, "failures": 0, "skips": 0} diff --git a/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/test_purpose_projection.stderr b/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/test_purpose_projection.stderr new file mode 100644 index 00000000..e4689fd5 --- /dev/null +++ b/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/test_purpose_projection.stderr @@ -0,0 +1,5 @@ +.............. +---------------------------------------------------------------------- +Ran 14 tests in 59.254s + +OK diff --git a/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/test_purpose_projection.stdout b/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/test_purpose_projection.stdout new file mode 100644 index 00000000..b67eff56 --- /dev/null +++ b/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/test_purpose_projection.stdout @@ -0,0 +1,28 @@ +START test_purpose_projection.PurposeProjectionTest.test_authoring_read_retrieves_reasoning_and_exposure_state +END test_purpose_projection.PurposeProjectionTest.test_authoring_read_retrieves_reasoning_and_exposure_state 6.884 pass +START test_purpose_projection.PurposeProjectionTest.test_catalog_has_no_authoring_schema_closure +END test_purpose_projection.PurposeProjectionTest.test_catalog_has_no_authoring_schema_closure 0.006 pass +START test_purpose_projection.PurposeProjectionTest.test_direct_hidden_read_and_privileged_request_are_bounded +END test_purpose_projection.PurposeProjectionTest.test_direct_hidden_read_and_privileged_request_are_bounded 3.345 pass +START test_purpose_projection.PurposeProjectionTest.test_domain_and_facade_admit_only_application_operations_before_work +END test_purpose_projection.PurposeProjectionTest.test_domain_and_facade_admit_only_application_operations_before_work 0.274 pass +START test_purpose_projection.PurposeProjectionTest.test_hidden_intermediate_cannot_bridge_a_permitted_traversal +END test_purpose_projection.PurposeProjectionTest.test_hidden_intermediate_cannot_bridge_a_permitted_traversal 0.001 pass +START test_purpose_projection.PurposeProjectionTest.test_invalid_host_purpose_creates_no_store +END test_purpose_projection.PurposeProjectionTest.test_invalid_host_purpose_creates_no_store 0.001 pass +START test_purpose_projection.PurposeProjectionTest.test_material_change_requires_new_exposure_but_rationale_change_does_not +END test_purpose_projection.PurposeProjectionTest.test_material_change_requires_new_exposure_but_rationale_change_does_not 0.752 pass +START test_purpose_projection.PurposeProjectionTest.test_native_query_and_handle_inspection_use_the_same_boundary +END test_purpose_projection.PurposeProjectionTest.test_native_query_and_handle_inspection_use_the_same_boundary 10.746 pass +START test_purpose_projection.PurposeProjectionTest.test_read_has_exact_reviewed_content_and_explicit_permitted_fields +END test_purpose_projection.PurposeProjectionTest.test_read_has_exact_reviewed_content_and_explicit_permitted_fields 6.406 pass +START test_purpose_projection.PurposeProjectionTest.test_router_presentation_change_requires_explicit_renewal +END test_purpose_projection.PurposeProjectionTest.test_router_presentation_change_requires_explicit_renewal 0.425 pass +START test_purpose_projection.PurposeProjectionTest.test_routing_retains_unknown_facts_and_blocks_missing_required_content +END test_purpose_projection.PurposeProjectionTest.test_routing_retains_unknown_facts_and_blocks_missing_required_content 10.407 pass +START test_purpose_projection.PurposeProjectionTest.test_unexpected_observation_failure_returns_no_private_context +END test_purpose_projection.PurposeProjectionTest.test_unexpected_observation_failure_returns_no_private_context 3.673 pass +START test_purpose_projection.PurposeProjectionTest.test_unsupported_capture_is_preserved_and_classified +END test_purpose_projection.PurposeProjectionTest.test_unsupported_capture_is_preserved_and_classified 12.048 pass +START test_purpose_projection.PurposeProjectionTest.test_whole_module_discovers_references_owned_by_its_policy_units +END test_purpose_projection.PurposeProjectionTest.test_whole_module_discovers_references_owned_by_its_policy_units 0.002 pass diff --git a/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/test_purpose_transport.exit.json b/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/test_purpose_transport.exit.json new file mode 100644 index 00000000..9a8984f2 --- /dev/null +++ b/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/test_purpose_transport.exit.json @@ -0,0 +1 @@ +{"returncode": 0, "elapsed_s": 72.52588272094727, "args": ["--pattern", "test_purpose_transport.py", "--exclude", "/mnt/data/engine-performance/evidence/completed-for-parallel.json"]} \ No newline at end of file diff --git a/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/test_purpose_transport.jsonl b/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/test_purpose_transport.jsonl new file mode 100644 index 00000000..4cc6a868 --- /dev/null +++ b/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/test_purpose_transport.jsonl @@ -0,0 +1,10 @@ +{"event": "start", "test": "test_purpose_transport.PurposeTransportTest.test_actual_stdio_has_qualified_catalog_and_identical_result_encodings", "at": 1790192976.6728888} +{"event": "end", "test": "test_purpose_transport.PurposeTransportTest.test_actual_stdio_has_qualified_catalog_and_identical_result_encodings", "wall_s": 10.214757588000111, "cpu_s": 0.00212328000000106, "status": "pass", "spans": {}, "setup_s": 1.582999857419054e-06, "body_s": 10.214478219000057, "teardown_s": 2.3939999209687812e-06} +{"event": "start", "test": "test_purpose_transport.PurposeTransportTest.test_cli_catalog_schema_example_and_denial_share_the_purpose", "at": 1790192986.8877342} +{"event": "end", "test": "test_purpose_transport.PurposeTransportTest.test_cli_catalog_schema_example_and_denial_share_the_purpose", "wall_s": 9.590868929999942, "cpu_s": 0.0034084060000001415, "status": "pass", "spans": {}, "setup_s": 1.3619999208458466e-06, "body_s": 9.590762910999956, "teardown_s": 2.4339999527001055e-06} +{"event": "start", "test": "test_purpose_transport.PurposeTransportTest.test_default_capture_reads_accepted_main_instead_of_unpublished_head", "at": 1790192996.4787014} +{"event": "observation", "test": "test_purpose_transport.PurposeTransportTest.test_default_capture_reads_accepted_main_instead_of_unpublished_head", "elapsed_s": 15.93342944699998, "stack": [" File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 58, in \n result=unittest.TextTestRunner(verbosity=1,resultclass=Result).run(suite)\n", " File \"/usr/lib/python3.13/unittest/runner.py\", line 240, in run\n test(result)\n", " File \"/usr/lib/python3.13/unittest/suite.py\", line 84, in __call__\n return self.run(*args, **kwds)\n", " File \"/usr/lib/python3.13/unittest/suite.py\", line 122, in run\n test(result)\n", " File \"/usr/lib/python3.13/unittest/case.py\", line 707, in __call__\n return self.run(*args, **kwds)\n", " File \"/usr/lib/python3.13/unittest/case.py\", line 651, in run\n self._callTestMethod(testMethod)\n", " File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 36, in timed\n try:return _fn(self,*args,**kwargs)\n", " File \"/usr/lib/python3.13/unittest/case.py\", line 606, in _callTestMethod\n if method() is not None:\n", " File \"/mnt/data/engine-performance/module-checkouts/test_purpose_transport/tools/standards_engine/tests/test_purpose_transport.py\", line 145, in test_default_capture_reads_accepted_main_instead_of_unpublished_head\n result = facade.read({\"target\": \"core\"})\n", " File \"/mnt/data/engine-performance/module-checkouts/test_purpose_transport/tools/standards_engine/standards_engine/tools.py\", line 346, in read\n return self._result(\"read\", self._engine.read(call))\n", " File \"/mnt/data/engine-performance/module-checkouts/test_purpose_transport/tools/standards_engine/standards_engine/context_projection.py\", line 56, in invoke\n return application_dispatch(engine, function.__name__, call)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_purpose_transport/tools/standards_engine/standards_engine/context_projection.py\", line 237, in application_dispatch\n captured = engine._capture_snapshot(c.CreateSnapshotCall(kind=\"create-snapshot\"))\n", " File \"/mnt/data/engine-performance/module-checkouts/test_purpose_transport/tools/standards_engine/standards_engine/engine.py\", line 503, in _capture_snapshot\n first = self._compile(recording)\n", " File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 25, in observe\n try:return original(*args,**kwargs)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_purpose_transport/tools/standards_engine/standards_engine/engine.py\", line 1729, in _compile\n load_indexes(source, corpus),\n", " File \"/mnt/data/engine-performance/module-checkouts/test_purpose_transport/tools/standards_engine/standards_engine/navigation_indexes.py\", line 221, in load_indexes\n file_digest(source.read_bytes(module.path)),\n", " File \"/mnt/data/engine-performance/module-checkouts/test_purpose_transport/tools/standards_metadata/standards_metadata/source.py\", line 80, in read_bytes\n content = bytes(self._source.read_bytes(normalized))\n", " File \"/mnt/data/engine-performance/module-checkouts/test_purpose_transport/tools/standards_engine/standards_engine/engine.py\", line 264, in read_bytes\n return self._repository.read_file(\n", " File \"/mnt/data/engine-performance/module-checkouts/test_purpose_transport/tools/repository_git/repository_git/repository.py\", line 690, in read_file\n tree = self._object(repository, tree_oid, \"tree\", algorithm)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_purpose_transport/tools/repository_git/repository_git/repository.py\", line 746, in _object\n output = git_output(\n", " File \"/mnt/data/engine-performance/module-checkouts/test_purpose_transport/tools/repository_git/repository_git/repository.py\", line 91, in git_output\n result = git_command(\n", " File \"/mnt/data/engine-performance/module-checkouts/test_purpose_transport/tools/repository_git/repository_git/repository.py\", line 75, in git_command\n return _run_bounded(\n", " File \"/mnt/data/engine-performance/module-checkouts/test_purpose_transport/tools/repository_git/repository_git/repository.py\", line 859, in _run_bounded\n returncode = process.wait(timeout=COMMAND_TIMEOUT_SECONDS)\n", " File \"/usr/lib/python3.13/subprocess.py\", line 1280, in wait\n return self._wait(timeout=timeout)\n", " File \"/usr/lib/python3.13/subprocess.py\", line 2060, in _wait\n time.sleep(delay)\n"]} +{"event": "end", "test": "test_purpose_transport.PurposeTransportTest.test_default_capture_reads_accepted_main_instead_of_unpublished_head", "wall_s": 23.968329625000024, "cpu_s": 11.26496945, "status": "pass", "spans": {"tools.standards_engine.standards_engine.tools._contracts": {"calls": 1, "inclusive_s": 0.34962161299995387}, "StandardsEngine._compile": {"calls": 3, "inclusive_s": 17.642536631999974}, "SnapshotModule._content_id": {"calls": 2, "inclusive_s": 5.675732595000227}, "SnapshotModule.load_content": {"calls": 1, "inclusive_s": 2.580083995999985}, "StandardsEngine._compiled_snapshot": {"calls": 1, "inclusive_s": 2.8970224689999213}}, "setup_s": 1.0609999208099907e-06, "body_s": 23.968212959999846, "teardown_s": 2.2530000478582224e-06} +{"event": "start", "test": "test_purpose_transport.PurposeTransportTest.test_two_cold_processes_preserve_exact_application_read", "at": 1790193020.4471767} +{"event": "end", "test": "test_purpose_transport.PurposeTransportTest.test_two_cold_processes_preserve_exact_application_read", "wall_s": 18.115720490000058, "cpu_s": 0.0026556860000006566, "status": "pass", "spans": {}, "setup_s": 1.3419999049801845e-06, "body_s": 18.11561705500003, "teardown_s": 1.9130000055156415e-06} +{"event": "summary", "total_s": 71.1532721430001, "run": 4, "errors": 0, "failures": 0, "skips": 0} diff --git a/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/test_purpose_transport.stderr b/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/test_purpose_transport.stderr new file mode 100644 index 00000000..3cca6202 --- /dev/null +++ b/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/test_purpose_transport.stderr @@ -0,0 +1,5 @@ +.... +---------------------------------------------------------------------- +Ran 4 tests in 69.489s + +OK diff --git a/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/test_purpose_transport.stdout b/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/test_purpose_transport.stdout new file mode 100644 index 00000000..b8957435 --- /dev/null +++ b/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/test_purpose_transport.stdout @@ -0,0 +1,8 @@ +START test_purpose_transport.PurposeTransportTest.test_actual_stdio_has_qualified_catalog_and_identical_result_encodings +END test_purpose_transport.PurposeTransportTest.test_actual_stdio_has_qualified_catalog_and_identical_result_encodings 10.215 pass +START test_purpose_transport.PurposeTransportTest.test_cli_catalog_schema_example_and_denial_share_the_purpose +END test_purpose_transport.PurposeTransportTest.test_cli_catalog_schema_example_and_denial_share_the_purpose 9.591 pass +START test_purpose_transport.PurposeTransportTest.test_default_capture_reads_accepted_main_instead_of_unpublished_head +END test_purpose_transport.PurposeTransportTest.test_default_capture_reads_accepted_main_instead_of_unpublished_head 23.968 pass +START test_purpose_transport.PurposeTransportTest.test_two_cold_processes_preserve_exact_application_read +END test_purpose_transport.PurposeTransportTest.test_two_cold_processes_preserve_exact_application_read 18.116 pass diff --git a/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/test_rendering.exit.json b/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/test_rendering.exit.json new file mode 100644 index 00000000..2bb4a3ac --- /dev/null +++ b/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/test_rendering.exit.json @@ -0,0 +1 @@ +{"returncode": 0, "elapsed_s": 2.7268269062042236, "args": ["--pattern", "test_rendering.py", "--exclude", "/mnt/data/engine-performance/evidence/completed-for-parallel.json"]} \ No newline at end of file diff --git a/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/test_rendering.jsonl b/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/test_rendering.jsonl new file mode 100644 index 00000000..74cde0a1 --- /dev/null +++ b/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/test_rendering.jsonl @@ -0,0 +1,21 @@ +{"event": "start", "test": "test_rendering.TextRenderingTest.test_application_purpose_is_distinct_from_authoring_publication", "at": 1790193016.8495686} +{"event": "end", "test": "test_rendering.TextRenderingTest.test_application_purpose_is_distinct_from_authoring_publication", "wall_s": 0.00048765099995762284, "cpu_s": 0.00048485099999995285, "status": "pass", "spans": {}, "setup_s": 1.3320000107341912e-06, "body_s": 0.00035164700011591776, "teardown_s": 8.519998573319754e-07} +{"event": "start", "test": "test_rendering.TextRenderingTest.test_coverage_projection_preserves_subject_and_status", "at": 1790193016.850093} +{"event": "end", "test": "test_rendering.TextRenderingTest.test_coverage_projection_preserves_subject_and_status", "wall_s": 7.709499982411216e-05, "cpu_s": 7.708500000003227e-05, "status": "pass", "spans": {}, "setup_s": 6.410000423784368e-07, "body_s": 4.399600015858596e-05, "teardown_s": 3.51000153386849e-07} +{"event": "start", "test": "test_rendering.TextRenderingTest.test_navigation_indexes_preserve_authority_and_exact_content", "at": 1790193016.8501954} +{"event": "end", "test": "test_rendering.TextRenderingTest.test_navigation_indexes_preserve_authority_and_exact_content", "wall_s": 6.589899999198678e-05, "cpu_s": 6.599799999973399e-05, "status": "pass", "spans": {}, "setup_s": 4.61000126961153e-07, "body_s": 1.0857000006581075e-05, "teardown_s": 3.000000106112566e-07} +{"event": "start", "test": "test_rendering.TextRenderingTest.test_pending_projection_is_deterministic_and_work_focused", "at": 1790193016.8502865} +{"event": "end", "test": "test_rendering.TextRenderingTest.test_pending_projection_is_deterministic_and_work_focused", "wall_s": 4.5618000058311736e-05, "cpu_s": 4.5628000000075275e-05, "status": "pass", "spans": {}, "setup_s": 2.399999630142702e-07, "body_s": 2.4235999944721698e-05, "teardown_s": 2.0999982552893925e-07} +{"event": "start", "test": "test_rendering.TextRenderingTest.test_projected_navigation_renders_revision_authority", "at": 1790193016.8503523} +{"event": "end", "test": "test_rendering.TextRenderingTest.test_projected_navigation_renders_revision_authority", "wall_s": 2.9423999876598828e-05, "cpu_s": 2.9513999999952745e-05, "status": "pass", "spans": {}, "setup_s": 2.5000008463393897e-07, "body_s": 9.533999900668277e-06, "teardown_s": 2.3099983081920072e-07} +{"event": "start", "test": "test_rendering.TextRenderingTest.test_proposal_projection_exposes_only_opaque_handles", "at": 1790193016.8503993} +{"event": "end", "test": "test_rendering.TextRenderingTest.test_proposal_projection_exposes_only_opaque_handles", "wall_s": 2.442599998175865e-05, "cpu_s": 2.4227000000376364e-05, "status": "pass", "spans": {}, "setup_s": 2.0099992070754524e-07, "body_s": 6.108999969001161e-06, "teardown_s": 1.999999312829459e-07} +{"event": "start", "test": "test_rendering.TextRenderingTest.test_proposal_review_renders_only_opaque_authority", "at": 1790193016.8504398} +{"event": "end", "test": "test_rendering.TextRenderingTest.test_proposal_review_renders_only_opaque_authority", "wall_s": 2.0360999997137696e-05, "cpu_s": 2.034000000028513e-05, "status": "pass", "spans": {}, "setup_s": 1.999999312829459e-07, "body_s": 4.025999942314229e-06, "teardown_s": 1.9000003703695256e-07} +{"event": "start", "test": "test_rendering.TextRenderingTest.test_rejection_projection_accepts_the_generated_result_type", "at": 1790193016.850476} +{"event": "end", "test": "test_rendering.TextRenderingTest.test_rejection_projection_accepts_the_generated_result_type", "wall_s": 0.00026092100006280816, "cpu_s": 0.0002611780000001396, "status": "pass", "spans": {}, "setup_s": 1.8999980966327712e-07, "body_s": 0.0002396590000444121, "teardown_s": 3.4000004234258085e-07} +{"event": "start", "test": "test_rendering.TextRenderingTest.test_unknown_result_variant_is_a_programming_error", "at": 1790193016.8507628} +{"event": "end", "test": "test_rendering.TextRenderingTest.test_unknown_result_variant_is_a_programming_error", "wall_s": 0.00010294399999111192, "cpu_s": 0.00010296299999978942, "status": "pass", "spans": {}, "setup_s": 2.499998572602635e-07, "body_s": 7.978899998306588e-05, "teardown_s": 3.200000264769187e-07} +{"event": "start", "test": "test_rendering.TextRenderingTest.test_verification_projection_preserves_revision_and_diagnostic_identity", "at": 1790193016.8508923} +{"event": "end", "test": "test_rendering.TextRenderingTest.test_verification_projection_preserves_revision_and_diagnostic_identity", "wall_s": 4.028000012112898e-05, "cpu_s": 4.02300000001965e-05, "status": "pass", "spans": {}, "setup_s": 2.1999994714860804e-07, "body_s": 1.947900000232039e-05, "teardown_s": 2.1100004232721403e-07} +{"event": "summary", "total_s": 1.5983275860000958, "run": 10, "errors": 0, "failures": 0, "skips": 0} diff --git a/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/test_rendering.stderr b/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/test_rendering.stderr new file mode 100644 index 00000000..2d56b43d --- /dev/null +++ b/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/test_rendering.stderr @@ -0,0 +1,5 @@ +.......... +---------------------------------------------------------------------- +Ran 10 tests in 0.001s + +OK diff --git a/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/test_rendering.stdout b/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/test_rendering.stdout new file mode 100644 index 00000000..3e953daf --- /dev/null +++ b/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/test_rendering.stdout @@ -0,0 +1,20 @@ +START test_rendering.TextRenderingTest.test_application_purpose_is_distinct_from_authoring_publication +END test_rendering.TextRenderingTest.test_application_purpose_is_distinct_from_authoring_publication 0.0 pass +START test_rendering.TextRenderingTest.test_coverage_projection_preserves_subject_and_status +END test_rendering.TextRenderingTest.test_coverage_projection_preserves_subject_and_status 0.0 pass +START test_rendering.TextRenderingTest.test_navigation_indexes_preserve_authority_and_exact_content +END test_rendering.TextRenderingTest.test_navigation_indexes_preserve_authority_and_exact_content 0.0 pass +START test_rendering.TextRenderingTest.test_pending_projection_is_deterministic_and_work_focused +END test_rendering.TextRenderingTest.test_pending_projection_is_deterministic_and_work_focused 0.0 pass +START test_rendering.TextRenderingTest.test_projected_navigation_renders_revision_authority +END test_rendering.TextRenderingTest.test_projected_navigation_renders_revision_authority 0.0 pass +START test_rendering.TextRenderingTest.test_proposal_projection_exposes_only_opaque_handles +END test_rendering.TextRenderingTest.test_proposal_projection_exposes_only_opaque_handles 0.0 pass +START test_rendering.TextRenderingTest.test_proposal_review_renders_only_opaque_authority +END test_rendering.TextRenderingTest.test_proposal_review_renders_only_opaque_authority 0.0 pass +START test_rendering.TextRenderingTest.test_rejection_projection_accepts_the_generated_result_type +END test_rendering.TextRenderingTest.test_rejection_projection_accepts_the_generated_result_type 0.0 pass +START test_rendering.TextRenderingTest.test_unknown_result_variant_is_a_programming_error +END test_rendering.TextRenderingTest.test_unknown_result_variant_is_a_programming_error 0.0 pass +START test_rendering.TextRenderingTest.test_verification_projection_preserves_revision_and_diagnostic_identity +END test_rendering.TextRenderingTest.test_verification_projection_preserves_revision_and_diagnostic_identity 0.0 pass diff --git a/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/test_supporting_workflow.exit.json b/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/test_supporting_workflow.exit.json new file mode 100644 index 00000000..b6040497 --- /dev/null +++ b/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/test_supporting_workflow.exit.json @@ -0,0 +1 @@ +{"returncode": 0, "elapsed_s": 843.1732437610626, "args": ["--pattern", "test_supporting_workflow.py", "--exclude", "/mnt/data/engine-performance/evidence/completed-for-parallel.json"]} \ No newline at end of file diff --git a/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/test_supporting_workflow.jsonl b/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/test_supporting_workflow.jsonl new file mode 100644 index 00000000..32bfe58f --- /dev/null +++ b/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/test_supporting_workflow.jsonl @@ -0,0 +1,21 @@ +{"event": "start", "test": "test_supporting_workflow.SupportingWorkflowTest.test_coordinated_publication_and_provenance_only_revision", "at": 1790192126.9088457} +{"event": "observation", "test": "test_supporting_workflow.SupportingWorkflowTest.test_coordinated_publication_and_provenance_only_revision", "elapsed_s": 42.039481879999926, "stack": [" File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 58, in \n result=unittest.TextTestRunner(verbosity=1,resultclass=Result).run(suite)\n", " File \"/usr/lib/python3.13/unittest/runner.py\", line 240, in run\n test(result)\n", " File \"/usr/lib/python3.13/unittest/suite.py\", line 84, in __call__\n return self.run(*args, **kwds)\n", " File \"/usr/lib/python3.13/unittest/suite.py\", line 122, in run\n test(result)\n", " File \"/usr/lib/python3.13/unittest/case.py\", line 707, in __call__\n return self.run(*args, **kwds)\n", " File \"/usr/lib/python3.13/unittest/case.py\", line 651, in run\n self._callTestMethod(testMethod)\n", " File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 36, in timed\n try:return _fn(self,*args,**kwargs)\n", " File \"/usr/lib/python3.13/unittest/case.py\", line 606, in _callTestMethod\n if method() is not None:\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/standards_engine/tests/test_supporting_workflow.py\", line 99, in test_coordinated_publication_and_provenance_only_revision\n proposed = self.author.propose({\"snapshot\": snapshot, \"change_set\": self.change(edits)})\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/standards_engine/standards_engine/tools.py\", line 280, in propose\n return self._result(\"propose\", self._engine.propose(call))\n", " File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 25, in observe\n try:return original(*args,**kwargs)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/standards_engine/standards_engine/context_projection.py\", line 60, in invoke\n return function(engine, call)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/standards_engine/standards_engine/engine.py\", line 922, in propose\n return propose(self, call)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/standards_engine/standards_engine/agent_workflow.py\", line 183, in propose\n return analyze_revision(engine, result.revision)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/standards_engine/standards_engine/agent_workflow.py\", line 152, in analyze_revision\n result = engine.analyze_proposal(c.AnalyzeProposalCall(revision))\n", " File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 25, in observe\n try:return original(*args,**kwargs)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/standards_engine/standards_engine/context_projection.py\", line 60, in invoke\n return function(engine, call)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/standards_engine/standards_engine/engine.py\", line 1066, in analyze_proposal\n projection = self._proposal_projection(revision)\n", " File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 25, in observe\n try:return original(*args,**kwargs)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/standards_engine/standards_engine/engine.py\", line 1683, in _proposal_projection\n capture = self._snapshots.load_content(revision.base_snapshot)\n", " File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 25, in observe\n try:return original(*args,**kwargs)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/standards_snapshots/standards_snapshots/module.py\", line 112, in load_content\n if self._content_id(capture) != content_id:\n", " File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 25, in observe\n try:return original(*args,**kwargs)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/standards_snapshots/standards_snapshots/module.py\", line 210, in _content_id\n return hash_identity(\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/standards_identity/standards_identity/encoding.py\", line 93, in hash_identity\n encoded = encode_identity_value(value)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/standards_identity/standards_identity/encoding.py\", line 75, in encode_identity_value\n return _encode(value)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/standards_identity/standards_identity/encoding.py\", line 191, in _encode\n return b\"[\" + b\",\".join(_encode(item) for item in value.values) + b\"]\"\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/standards_identity/standards_identity/encoding.py\", line 191, in \n return b\"[\" + b\",\".join(_encode(item) for item in value.values) + b\"]\"\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/standards_identity/standards_identity/encoding.py\", line 197, in _encode\n return b\"{\" + b\",\".join(encoded_members) + b\"}\"\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/standards_identity/standards_identity/encoding.py\", line 194, in \n _encode_string(key) + b\":\" + _encode(member_value)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/standards_identity/standards_identity/encoding.py\", line 191, in _encode\n return b\"[\" + b\",\".join(_encode(item) for item in value.values) + b\"]\"\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/standards_identity/standards_identity/encoding.py\", line 191, in \n return b\"[\" + b\",\".join(_encode(item) for item in value.values) + b\"]\"\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/standards_identity/standards_identity/encoding.py\", line 187, in _encode\n return _encode_integer(value)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/standards_identity/standards_identity/encoding.py\", line 211, in _encode_integer\n suffix = b\"\".join(\n"]} +{"event": "observation", "test": "test_supporting_workflow.SupportingWorkflowTest.test_coordinated_publication_and_provenance_only_revision", "elapsed_s": 87.43252861099995, "stack": [" File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 58, in \n result=unittest.TextTestRunner(verbosity=1,resultclass=Result).run(suite)\n", " File \"/usr/lib/python3.13/unittest/runner.py\", line 240, in run\n test(result)\n", " File \"/usr/lib/python3.13/unittest/suite.py\", line 84, in __call__\n return self.run(*args, **kwds)\n", " File \"/usr/lib/python3.13/unittest/suite.py\", line 122, in run\n test(result)\n", " File \"/usr/lib/python3.13/unittest/case.py\", line 707, in __call__\n return self.run(*args, **kwds)\n", " File \"/usr/lib/python3.13/unittest/case.py\", line 651, in run\n self._callTestMethod(testMethod)\n", " File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 36, in timed\n try:return _fn(self,*args,**kwargs)\n", " File \"/usr/lib/python3.13/unittest/case.py\", line 606, in _callTestMethod\n if method() is not None:\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/standards_engine/tests/test_supporting_workflow.py\", line 105, in test_coordinated_publication_and_provenance_only_revision\n self.publish(proposed)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/standards_engine/tests/test_supporting_workflow.py\", line 71, in publish\n complete = self.resolve(proposed)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/standards_engine/tests/test_supporting_workflow.py\", line 62, in resolve\n proposed = self.author.resolve_workflow({\"context\": proposed[\"context\"], \"submission\": {\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/standards_engine/standards_engine/tools.py\", line 298, in resolve_workflow\n return self._result(\"resolve_workflow\", self._engine.resolve_workflow(call))\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/standards_engine/standards_engine/context_projection.py\", line 60, in invoke\n return function(engine, call)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/standards_engine/standards_engine/engine.py\", line 940, in resolve_workflow\n return advance(self, \"resolve_workflow\", call)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/standards_engine/standards_engine/agent_workflow.py\", line 193, in advance\n current = view(engine, bound)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/standards_engine/standards_engine/agent_workflow.py\", line 123, in view\n outcome = engine._analysis_result(engine._evaluate(bound.analysis))\n", " File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 25, in observe\n try:return original(*args,**kwargs)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/standards_engine/standards_engine/engine.py\", line 1779, in _evaluate\n return self._evaluate_compiled(state, accepted, proposed, revision)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/standards_engine/standards_engine/engine.py\", line 1790, in _evaluate_compiled\n if revision is None or revision.revision_id != proposed_ref.revision_id:\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/standards_engine/standards_engine/authoring.py\", line 182, in revision_id\n return hash_identity(\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/standards_identity/standards_identity/encoding.py\", line 110, in hash_identity\n return f\"{id_prefix}:sha256:{hashlib.sha256(frame).hexdigest()}\"\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/standards_identity/standards_identity/encoding.py\", line 75, in encode_identity_value\n return _encode(value)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/standards_identity/standards_identity/encoding.py\", line 197, in _encode\n return b\"{\" + b\",\".join(encoded_members) + b\"}\"\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/standards_identity/standards_identity/encoding.py\", line 195, in \n for key, member_value in value.members\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/standards_identity/standards_identity/encoding.py\", line 191, in _encode\n return b\"[\" + b\",\".join(_encode(item) for item in value.values) + b\"]\"\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/standards_identity/standards_identity/encoding.py\", line 191, in \n return b\"[\" + b\",\".join(_encode(item) for item in value.values) + b\"]\"\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/standards_identity/standards_identity/encoding.py\", line 189, in _encode\n return _encode_string(value)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/standards_identity/standards_identity/encoding.py\", line 231, in _encode_string\n return b\"\".join(chunks)\n"]} +{"event": "observation", "test": "test_supporting_workflow.SupportingWorkflowTest.test_coordinated_publication_and_provenance_only_revision", "elapsed_s": 132.44905122399996, "stack": [" File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 58, in \n result=unittest.TextTestRunner(verbosity=1,resultclass=Result).run(suite)\n", " File \"/usr/lib/python3.13/unittest/runner.py\", line 240, in run\n test(result)\n", " File \"/usr/lib/python3.13/unittest/suite.py\", line 84, in __call__\n return self.run(*args, **kwds)\n", " File \"/usr/lib/python3.13/unittest/suite.py\", line 122, in run\n test(result)\n", " File \"/usr/lib/python3.13/unittest/case.py\", line 707, in __call__\n return self.run(*args, **kwds)\n", " File \"/usr/lib/python3.13/unittest/case.py\", line 651, in run\n self._callTestMethod(testMethod)\n", " File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 36, in timed\n try:return _fn(self,*args,**kwargs)\n", " File \"/usr/lib/python3.13/unittest/case.py\", line 606, in _callTestMethod\n if method() is not None:\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/standards_engine/tests/test_supporting_workflow.py\", line 105, in test_coordinated_publication_and_provenance_only_revision\n self.publish(proposed)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/standards_engine/tests/test_supporting_workflow.py\", line 71, in publish\n complete = self.resolve(proposed)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/standards_engine/tests/test_supporting_workflow.py\", line 62, in resolve\n proposed = self.author.resolve_workflow({\"context\": proposed[\"context\"], \"submission\": {\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/standards_engine/standards_engine/tools.py\", line 298, in resolve_workflow\n return self._result(\"resolve_workflow\", self._engine.resolve_workflow(call))\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/standards_engine/standards_engine/context_projection.py\", line 60, in invoke\n return function(engine, call)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/standards_engine/standards_engine/engine.py\", line 940, in resolve_workflow\n return advance(self, \"resolve_workflow\", call)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/standards_engine/standards_engine/agent_workflow.py\", line 193, in advance\n current = view(engine, bound)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/standards_engine/standards_engine/agent_workflow.py\", line 123, in view\n outcome = engine._analysis_result(engine._evaluate(bound.analysis))\n", " File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 25, in observe\n try:return original(*args,**kwargs)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/standards_engine/standards_engine/engine.py\", line 1779, in _evaluate\n return self._evaluate_compiled(state, accepted, proposed, revision)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/standards_engine/standards_engine/engine.py\", line 1798, in _evaluate_compiled\n self._validate_projected_inputs(state, revision, accepted, proposed)\n", " File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 25, in observe\n try:return original(*args,**kwargs)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/standards_engine/standards_engine/engine.py\", line 1829, in _validate_projected_inputs\n projection = self._proposal_projection(revision)\n", " File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 25, in observe\n try:return original(*args,**kwargs)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/standards_engine/standards_engine/engine.py\", line 1683, in _proposal_projection\n capture = self._snapshots.load_content(revision.base_snapshot)\n", " File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 25, in observe\n try:return original(*args,**kwargs)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/standards_snapshots/standards_snapshots/module.py\", line 112, in load_content\n if self._content_id(capture) != content_id:\n", " File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 25, in observe\n try:return original(*args,**kwargs)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/standards_snapshots/standards_snapshots/module.py\", line 210, in _content_id\n return hash_identity(\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/standards_identity/standards_identity/encoding.py\", line 93, in hash_identity\n encoded = encode_identity_value(value)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/standards_identity/standards_identity/encoding.py\", line 75, in encode_identity_value\n return _encode(value)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/standards_identity/standards_identity/encoding.py\", line 191, in _encode\n return b\"[\" + b\",\".join(_encode(item) for item in value.values) + b\"]\"\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/standards_identity/standards_identity/encoding.py\", line 191, in \n return b\"[\" + b\",\".join(_encode(item) for item in value.values) + b\"]\"\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/standards_identity/standards_identity/encoding.py\", line 197, in _encode\n return b\"{\" + b\",\".join(encoded_members) + b\"}\"\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/standards_identity/standards_identity/encoding.py\", line 194, in \n _encode_string(key) + b\":\" + _encode(member_value)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/standards_identity/standards_identity/encoding.py\", line 191, in _encode\n return b\"[\" + b\",\".join(_encode(item) for item in value.values) + b\"]\"\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/standards_identity/standards_identity/encoding.py\", line 191, in \n return b\"[\" + b\",\".join(_encode(item) for item in value.values) + b\"]\"\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/standards_identity/standards_identity/encoding.py\", line 187, in _encode\n return _encode_integer(value)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/standards_identity/standards_identity/encoding.py\", line 208, in _encode_integer\n remaining, chunk = divmod(remaining, _DECIMAL_CHUNK_BASE)\n"]} +{"event": "observation", "test": "test_supporting_workflow.SupportingWorkflowTest.test_coordinated_publication_and_provenance_only_revision", "elapsed_s": 177.53410705299996, "stack": [" File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 58, in \n result=unittest.TextTestRunner(verbosity=1,resultclass=Result).run(suite)\n", " File \"/usr/lib/python3.13/unittest/runner.py\", line 240, in run\n test(result)\n", " File \"/usr/lib/python3.13/unittest/suite.py\", line 84, in __call__\n return self.run(*args, **kwds)\n", " File \"/usr/lib/python3.13/unittest/suite.py\", line 122, in run\n test(result)\n", " File \"/usr/lib/python3.13/unittest/case.py\", line 707, in __call__\n return self.run(*args, **kwds)\n", " File \"/usr/lib/python3.13/unittest/case.py\", line 651, in run\n self._callTestMethod(testMethod)\n", " File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 36, in timed\n try:return _fn(self,*args,**kwargs)\n", " File \"/usr/lib/python3.13/unittest/case.py\", line 606, in _callTestMethod\n if method() is not None:\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/standards_engine/tests/test_supporting_workflow.py\", line 105, in test_coordinated_publication_and_provenance_only_revision\n self.publish(proposed)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/standards_engine/tests/test_supporting_workflow.py\", line 71, in publish\n complete = self.resolve(proposed)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/standards_engine/tests/test_supporting_workflow.py\", line 62, in resolve\n proposed = self.author.resolve_workflow({\"context\": proposed[\"context\"], \"submission\": {\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/standards_engine/standards_engine/tools.py\", line 298, in resolve_workflow\n return self._result(\"resolve_workflow\", self._engine.resolve_workflow(call))\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/standards_engine/standards_engine/context_projection.py\", line 60, in invoke\n return function(engine, call)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/standards_engine/standards_engine/engine.py\", line 940, in resolve_workflow\n return advance(self, \"resolve_workflow\", call)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/standards_engine/standards_engine/agent_workflow.py\", line 193, in advance\n current = view(engine, bound)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/standards_engine/standards_engine/agent_workflow.py\", line 123, in view\n outcome = engine._analysis_result(engine._evaluate(bound.analysis))\n", " File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 25, in observe\n try:return original(*args,**kwargs)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/standards_engine/standards_engine/engine.py\", line 1779, in _evaluate\n return self._evaluate_compiled(state, accepted, proposed, revision)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/standards_engine/standards_engine/engine.py\", line 1798, in _evaluate_compiled\n self._validate_projected_inputs(state, revision, accepted, proposed)\n", " File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 25, in observe\n try:return original(*args,**kwargs)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/standards_engine/standards_engine/engine.py\", line 1829, in _validate_projected_inputs\n projection = self._proposal_projection(revision)\n", " File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 25, in observe\n try:return original(*args,**kwargs)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/standards_engine/standards_engine/engine.py\", line 1687, in _proposal_projection\n return self._logical_authoring.compile(\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/standards_engine/standards_engine/logical_authoring.py\", line 989, in compile\n compiled = self._compile_authorities(source)\n", " File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 25, in observe\n try:return original(*args,**kwargs)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/standards_engine/standards_engine/engine.py\", line 1716, in _compile\n corpus, impact, load_coverage_horizon(source, corpus, impact)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/standards_analysis/standards_analysis/coverage.py\", line 548, in load_coverage_horizon\n return _load_coverage_horizon(source, corpus, compiled, path)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/standards_analysis/standards_analysis/coverage.py\", line 475, in _load_coverage_horizon\n dependency = suite_inputs.dependency(suite.id)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/standards_metadata/standards_metadata/suite_inputs.py\", line 625, in load_suite_input_manifest\n return manifest\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/standards_metadata/standards_metadata/suite_inputs.py\", line 289, in dependency\n return SuiteDependencyProjection(\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/standards_metadata/standards_metadata/suite_inputs.py\", line 100, in _identity_digest\n return file_digest(encode_identity_value(value))\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/standards_identity/standards_identity/encoding.py\", line 75, in encode_identity_value\n return _encode(value)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/standards_identity/standards_identity/encoding.py\", line 197, in _encode\n return b\"{\" + b\",\".join(encoded_members) + b\"}\"\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/standards_identity/standards_identity/encoding.py\", line 195, in \n for key, member_value in value.members\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/standards_identity/standards_identity/encoding.py\", line 191, in _encode\n return b\"[\" + b\",\".join(_encode(item) for item in value.values) + b\"]\"\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/standards_identity/standards_identity/encoding.py\", line 191, in \n return b\"[\" + b\",\".join(_encode(item) for item in value.values) + b\"]\"\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/standards_identity/standards_identity/encoding.py\", line 197, in _encode\n return b\"{\" + b\",\".join(encoded_members) + b\"}\"\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/standards_identity/standards_identity/encoding.py\", line 195, in \n for key, member_value in value.members\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/standards_identity/standards_identity/encoding.py\", line 189, in _encode\n return _encode_string(value)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/standards_identity/standards_identity/encoding.py\", line 231, in _encode_string\n return b\"\".join(chunks)\n"]} +{"event": "observation", "test": "test_supporting_workflow.SupportingWorkflowTest.test_coordinated_publication_and_provenance_only_revision", "elapsed_s": 222.64791226299997, "stack": [" File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 58, in \n result=unittest.TextTestRunner(verbosity=1,resultclass=Result).run(suite)\n", " File \"/usr/lib/python3.13/unittest/runner.py\", line 240, in run\n test(result)\n", " File \"/usr/lib/python3.13/unittest/suite.py\", line 84, in __call__\n return self.run(*args, **kwds)\n", " File \"/usr/lib/python3.13/unittest/suite.py\", line 122, in run\n test(result)\n", " File \"/usr/lib/python3.13/unittest/case.py\", line 707, in __call__\n return self.run(*args, **kwds)\n", " File \"/usr/lib/python3.13/unittest/case.py\", line 651, in run\n self._callTestMethod(testMethod)\n", " File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 36, in timed\n try:return _fn(self,*args,**kwargs)\n", " File \"/usr/lib/python3.13/unittest/case.py\", line 606, in _callTestMethod\n if method() is not None:\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/standards_engine/tests/test_supporting_workflow.py\", line 105, in test_coordinated_publication_and_provenance_only_revision\n self.publish(proposed)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/standards_engine/tests/test_supporting_workflow.py\", line 71, in publish\n complete = self.resolve(proposed)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/standards_engine/tests/test_supporting_workflow.py\", line 62, in resolve\n proposed = self.author.resolve_workflow({\"context\": proposed[\"context\"], \"submission\": {\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/standards_engine/standards_engine/tools.py\", line 298, in resolve_workflow\n return self._result(\"resolve_workflow\", self._engine.resolve_workflow(call))\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/standards_engine/standards_engine/context_projection.py\", line 60, in invoke\n return function(engine, call)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/standards_engine/standards_engine/engine.py\", line 940, in resolve_workflow\n return advance(self, \"resolve_workflow\", call)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/standards_engine/standards_engine/agent_workflow.py\", line 228, in advance\n result = engine.resolve(\n", " File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 25, in observe\n try:return original(*args,**kwargs)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/standards_engine/standards_engine/context_projection.py\", line 60, in invoke\n return function(engine, call)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/standards_engine/standards_engine/engine.py\", line 1620, in resolve\n successor = self._apply_submission(self._evaluate(state), call)\n", " File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 25, in observe\n try:return original(*args,**kwargs)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/standards_engine/standards_engine/engine.py\", line 1763, in _evaluate\n accepted = self._compiled_snapshot(state.base_snapshot)\n", " File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 25, in observe\n try:return original(*args,**kwargs)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/standards_engine/standards_engine/engine.py\", line 1672, in _compiled_snapshot\n capture = self._snapshots.load_content(snapshot)\n", " File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 25, in observe\n try:return original(*args,**kwargs)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/standards_snapshots/standards_snapshots/module.py\", line 112, in load_content\n if self._content_id(capture) != content_id:\n", " File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 25, in observe\n try:return original(*args,**kwargs)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/standards_snapshots/standards_snapshots/module.py\", line 210, in _content_id\n return hash_identity(\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/standards_identity/standards_identity/encoding.py\", line 93, in hash_identity\n encoded = encode_identity_value(value)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/standards_identity/standards_identity/encoding.py\", line 75, in encode_identity_value\n return _encode(value)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/standards_identity/standards_identity/encoding.py\", line 191, in _encode\n return b\"[\" + b\",\".join(_encode(item) for item in value.values) + b\"]\"\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/standards_identity/standards_identity/encoding.py\", line 191, in \n return b\"[\" + b\",\".join(_encode(item) for item in value.values) + b\"]\"\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/standards_identity/standards_identity/encoding.py\", line 197, in _encode\n return b\"{\" + b\",\".join(encoded_members) + b\"}\"\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/standards_identity/standards_identity/encoding.py\", line 194, in \n _encode_string(key) + b\":\" + _encode(member_value)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/standards_identity/standards_identity/encoding.py\", line 191, in _encode\n return b\"[\" + b\",\".join(_encode(item) for item in value.values) + b\"]\"\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/standards_identity/standards_identity/encoding.py\", line 191, in \n return b\"[\" + b\",\".join(_encode(item) for item in value.values) + b\"]\"\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/standards_identity/standards_identity/encoding.py\", line 187, in _encode\n return _encode_integer(value)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/standards_identity/standards_identity/encoding.py\", line 215, in _encode_integer\n return (b\"-\" if negative else b\"\") + encoded + suffix\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/standards_identity/standards_identity/encoding.py\", line 213, in \n for chunk in reversed(chunks)\n"]} +{"event": "observation", "test": "test_supporting_workflow.SupportingWorkflowTest.test_coordinated_publication_and_provenance_only_revision", "elapsed_s": 267.66812237399995, "stack": [" File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 58, in \n result=unittest.TextTestRunner(verbosity=1,resultclass=Result).run(suite)\n", " File \"/usr/lib/python3.13/unittest/runner.py\", line 240, in run\n test(result)\n", " File \"/usr/lib/python3.13/unittest/suite.py\", line 84, in __call__\n return self.run(*args, **kwds)\n", " File \"/usr/lib/python3.13/unittest/suite.py\", line 122, in run\n test(result)\n", " File \"/usr/lib/python3.13/unittest/case.py\", line 707, in __call__\n return self.run(*args, **kwds)\n", " File \"/usr/lib/python3.13/unittest/case.py\", line 651, in run\n self._callTestMethod(testMethod)\n", " File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 36, in timed\n try:return _fn(self,*args,**kwargs)\n", " File \"/usr/lib/python3.13/unittest/case.py\", line 606, in _callTestMethod\n if method() is not None:\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/standards_engine/tests/test_supporting_workflow.py\", line 105, in test_coordinated_publication_and_provenance_only_revision\n self.publish(proposed)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/standards_engine/tests/test_supporting_workflow.py\", line 71, in publish\n complete = self.resolve(proposed)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/standards_engine/tests/test_supporting_workflow.py\", line 62, in resolve\n proposed = self.author.resolve_workflow({\"context\": proposed[\"context\"], \"submission\": {\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/standards_engine/standards_engine/tools.py\", line 298, in resolve_workflow\n return self._result(\"resolve_workflow\", self._engine.resolve_workflow(call))\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/standards_engine/standards_engine/context_projection.py\", line 60, in invoke\n return function(engine, call)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/standards_engine/standards_engine/engine.py\", line 940, in resolve_workflow\n return advance(self, \"resolve_workflow\", call)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/standards_engine/standards_engine/agent_workflow.py\", line 228, in advance\n result = engine.resolve(\n", " File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 25, in observe\n try:return original(*args,**kwargs)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/standards_engine/standards_engine/context_projection.py\", line 60, in invoke\n return function(engine, call)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/standards_engine/standards_engine/engine.py\", line 1620, in resolve\n successor = self._apply_submission(self._evaluate(state), call)\n", " File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 25, in observe\n try:return original(*args,**kwargs)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/standards_engine/standards_engine/engine.py\", line 1763, in _evaluate\n accepted = self._compiled_snapshot(state.base_snapshot)\n", " File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 25, in observe\n try:return original(*args,**kwargs)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/standards_engine/standards_engine/engine.py\", line 1672, in _compiled_snapshot\n capture = self._snapshots.load_content(snapshot)\n", " File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 25, in observe\n try:return original(*args,**kwargs)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/standards_snapshots/standards_snapshots/module.py\", line 112, in load_content\n if self._content_id(capture) != content_id:\n", " File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 25, in observe\n try:return original(*args,**kwargs)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/standards_snapshots/standards_snapshots/module.py\", line 210, in _content_id\n return hash_identity(\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/standards_identity/standards_identity/encoding.py\", line 93, in hash_identity\n encoded = encode_identity_value(value)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/standards_identity/standards_identity/encoding.py\", line 75, in encode_identity_value\n return _encode(value)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/standards_identity/standards_identity/encoding.py\", line 191, in _encode\n return b\"[\" + b\",\".join(_encode(item) for item in value.values) + b\"]\"\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/standards_identity/standards_identity/encoding.py\", line 191, in \n return b\"[\" + b\",\".join(_encode(item) for item in value.values) + b\"]\"\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/standards_identity/standards_identity/encoding.py\", line 197, in _encode\n return b\"{\" + b\",\".join(encoded_members) + b\"}\"\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/standards_identity/standards_identity/encoding.py\", line 194, in \n _encode_string(key) + b\":\" + _encode(member_value)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/standards_identity/standards_identity/encoding.py\", line 191, in _encode\n return b\"[\" + b\",\".join(_encode(item) for item in value.values) + b\"]\"\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/standards_identity/standards_identity/encoding.py\", line 191, in \n return b\"[\" + b\",\".join(_encode(item) for item in value.values) + b\"]\"\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/standards_identity/standards_identity/encoding.py\", line 187, in _encode\n return _encode_integer(value)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/standards_identity/standards_identity/encoding.py\", line 210, in _encode_integer\n encoded = str(chunks.pop()).encode(\"ascii\")\n"]} +{"event": "observation", "test": "test_supporting_workflow.SupportingWorkflowTest.test_coordinated_publication_and_provenance_only_revision", "elapsed_s": 312.71352853999997, "stack": [" File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 58, in \n result=unittest.TextTestRunner(verbosity=1,resultclass=Result).run(suite)\n", " File \"/usr/lib/python3.13/unittest/runner.py\", line 240, in run\n test(result)\n", " File \"/usr/lib/python3.13/unittest/suite.py\", line 84, in __call__\n return self.run(*args, **kwds)\n", " File \"/usr/lib/python3.13/unittest/suite.py\", line 122, in run\n test(result)\n", " File \"/usr/lib/python3.13/unittest/case.py\", line 707, in __call__\n return self.run(*args, **kwds)\n", " File \"/usr/lib/python3.13/unittest/case.py\", line 651, in run\n self._callTestMethod(testMethod)\n", " File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 36, in timed\n try:return _fn(self,*args,**kwargs)\n", " File \"/usr/lib/python3.13/unittest/case.py\", line 606, in _callTestMethod\n if method() is not None:\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/standards_engine/tests/test_supporting_workflow.py\", line 105, in test_coordinated_publication_and_provenance_only_revision\n self.publish(proposed)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/standards_engine/tests/test_supporting_workflow.py\", line 71, in publish\n complete = self.resolve(proposed)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/standards_engine/tests/test_supporting_workflow.py\", line 62, in resolve\n proposed = self.author.resolve_workflow({\"context\": proposed[\"context\"], \"submission\": {\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/standards_engine/standards_engine/tools.py\", line 298, in resolve_workflow\n return self._result(\"resolve_workflow\", self._engine.resolve_workflow(call))\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/standards_engine/standards_engine/context_projection.py\", line 60, in invoke\n return function(engine, call)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/standards_engine/standards_engine/engine.py\", line 940, in resolve_workflow\n return advance(self, \"resolve_workflow\", call)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/standards_engine/standards_engine/agent_workflow.py\", line 228, in advance\n result = engine.resolve(\n", " File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 25, in observe\n try:return original(*args,**kwargs)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/standards_engine/standards_engine/context_projection.py\", line 60, in invoke\n return function(engine, call)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/standards_engine/standards_engine/engine.py\", line 1620, in resolve\n successor = self._apply_submission(self._evaluate(state), call)\n", " File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 25, in observe\n try:return original(*args,**kwargs)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/standards_engine/standards_engine/engine.py\", line 1778, in _evaluate\n proposed = self._proposal_projection(revision).compiled\n", " File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 25, in observe\n try:return original(*args,**kwargs)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/standards_engine/standards_engine/engine.py\", line 1683, in _proposal_projection\n capture = self._snapshots.load_content(revision.base_snapshot)\n", " File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 25, in observe\n try:return original(*args,**kwargs)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/standards_snapshots/standards_snapshots/module.py\", line 112, in load_content\n if self._content_id(capture) != content_id:\n", " File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 25, in observe\n try:return original(*args,**kwargs)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/standards_snapshots/standards_snapshots/module.py\", line 210, in _content_id\n return hash_identity(\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/standards_identity/standards_identity/encoding.py\", line 93, in hash_identity\n encoded = encode_identity_value(value)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/standards_identity/standards_identity/encoding.py\", line 75, in encode_identity_value\n return _encode(value)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/standards_identity/standards_identity/encoding.py\", line 191, in _encode\n return b\"[\" + b\",\".join(_encode(item) for item in value.values) + b\"]\"\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/standards_identity/standards_identity/encoding.py\", line 191, in \n return b\"[\" + b\",\".join(_encode(item) for item in value.values) + b\"]\"\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/standards_identity/standards_identity/encoding.py\", line 197, in _encode\n return b\"{\" + b\",\".join(encoded_members) + b\"}\"\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/standards_identity/standards_identity/encoding.py\", line 194, in \n _encode_string(key) + b\":\" + _encode(member_value)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/standards_identity/standards_identity/encoding.py\", line 191, in _encode\n return b\"[\" + b\",\".join(_encode(item) for item in value.values) + b\"]\"\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/standards_identity/standards_identity/encoding.py\", line 191, in \n return b\"[\" + b\",\".join(_encode(item) for item in value.values) + b\"]\"\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/standards_identity/standards_identity/encoding.py\", line 187, in _encode\n return _encode_integer(value)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/standards_identity/standards_identity/encoding.py\", line 213, in _encode_integer\n for chunk in reversed(chunks)\n"]} +{"event": "observation", "test": "test_supporting_workflow.SupportingWorkflowTest.test_coordinated_publication_and_provenance_only_revision", "elapsed_s": 357.7295964939999, "stack": [" File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 58, in \n result=unittest.TextTestRunner(verbosity=1,resultclass=Result).run(suite)\n", " File \"/usr/lib/python3.13/unittest/runner.py\", line 240, in run\n test(result)\n", " File \"/usr/lib/python3.13/unittest/suite.py\", line 84, in __call__\n return self.run(*args, **kwds)\n", " File \"/usr/lib/python3.13/unittest/suite.py\", line 122, in run\n test(result)\n", " File \"/usr/lib/python3.13/unittest/case.py\", line 707, in __call__\n return self.run(*args, **kwds)\n", " File \"/usr/lib/python3.13/unittest/case.py\", line 651, in run\n self._callTestMethod(testMethod)\n", " File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 36, in timed\n try:return _fn(self,*args,**kwargs)\n", " File \"/usr/lib/python3.13/unittest/case.py\", line 606, in _callTestMethod\n if method() is not None:\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/standards_engine/tests/test_supporting_workflow.py\", line 105, in test_coordinated_publication_and_provenance_only_revision\n self.publish(proposed)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/standards_engine/tests/test_supporting_workflow.py\", line 71, in publish\n complete = self.resolve(proposed)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/standards_engine/tests/test_supporting_workflow.py\", line 62, in resolve\n proposed = self.author.resolve_workflow({\"context\": proposed[\"context\"], \"submission\": {\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/standards_engine/standards_engine/tools.py\", line 298, in resolve_workflow\n return self._result(\"resolve_workflow\", self._engine.resolve_workflow(call))\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/standards_engine/standards_engine/context_projection.py\", line 60, in invoke\n return function(engine, call)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/standards_engine/standards_engine/engine.py\", line 940, in resolve_workflow\n return advance(self, \"resolve_workflow\", call)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/standards_engine/standards_engine/agent_workflow.py\", line 228, in advance\n result = engine.resolve(\n", " File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 25, in observe\n try:return original(*args,**kwargs)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/standards_engine/standards_engine/context_projection.py\", line 60, in invoke\n return function(engine, call)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/standards_engine/standards_engine/engine.py\", line 1620, in resolve\n successor = self._apply_submission(self._evaluate(state), call)\n", " File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 25, in observe\n try:return original(*args,**kwargs)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/standards_engine/standards_engine/engine.py\", line 1778, in _evaluate\n proposed = self._proposal_projection(revision).compiled\n", " File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 25, in observe\n try:return original(*args,**kwargs)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/standards_engine/standards_engine/engine.py\", line 1683, in _proposal_projection\n capture = self._snapshots.load_content(revision.base_snapshot)\n", " File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 25, in observe\n try:return original(*args,**kwargs)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/standards_snapshots/standards_snapshots/module.py\", line 112, in load_content\n if self._content_id(capture) != content_id:\n", " File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 25, in observe\n try:return original(*args,**kwargs)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/standards_snapshots/standards_snapshots/module.py\", line 207, in _content_id\n material = frame_path_byte_set(\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/standards_identity/standards_identity/encoding.py\", line 143, in frame_path_byte_set\n frame_path_bytes(components, content)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/standards_identity/standards_identity/encoding.py\", line 131, in frame_path_bytes\n (\"bytes\", IdentityArray(content)),\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/standards_identity/standards_identity/encoding.py\", line 25, in __init__\n _validate_value(value)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/standards_identity/standards_identity/encoding.py\", line 155, in _validate_value\n def _validate_value(value: object) -> None:\n"]} +{"event": "observation", "test": "test_supporting_workflow.SupportingWorkflowTest.test_coordinated_publication_and_provenance_only_revision", "elapsed_s": 402.75399070599997, "stack": [" File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 58, in \n result=unittest.TextTestRunner(verbosity=1,resultclass=Result).run(suite)\n", " File \"/usr/lib/python3.13/unittest/runner.py\", line 240, in run\n test(result)\n", " File \"/usr/lib/python3.13/unittest/suite.py\", line 84, in __call__\n return self.run(*args, **kwds)\n", " File \"/usr/lib/python3.13/unittest/suite.py\", line 122, in run\n test(result)\n", " File \"/usr/lib/python3.13/unittest/case.py\", line 707, in __call__\n return self.run(*args, **kwds)\n", " File \"/usr/lib/python3.13/unittest/case.py\", line 651, in run\n self._callTestMethod(testMethod)\n", " File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 36, in timed\n try:return _fn(self,*args,**kwargs)\n", " File \"/usr/lib/python3.13/unittest/case.py\", line 606, in _callTestMethod\n if method() is not None:\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/standards_engine/tests/test_supporting_workflow.py\", line 105, in test_coordinated_publication_and_provenance_only_revision\n self.publish(proposed)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/standards_engine/tests/test_supporting_workflow.py\", line 71, in publish\n complete = self.resolve(proposed)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/standards_engine/tests/test_supporting_workflow.py\", line 62, in resolve\n proposed = self.author.resolve_workflow({\"context\": proposed[\"context\"], \"submission\": {\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/standards_engine/standards_engine/tools.py\", line 298, in resolve_workflow\n return self._result(\"resolve_workflow\", self._engine.resolve_workflow(call))\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/standards_engine/standards_engine/context_projection.py\", line 60, in invoke\n return function(engine, call)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/standards_engine/standards_engine/engine.py\", line 940, in resolve_workflow\n return advance(self, \"resolve_workflow\", call)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/standards_engine/standards_engine/agent_workflow.py\", line 228, in advance\n result = engine.resolve(\n", " File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 25, in observe\n try:return original(*args,**kwargs)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/standards_engine/standards_engine/context_projection.py\", line 60, in invoke\n return function(engine, call)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/standards_engine/standards_engine/engine.py\", line 1620, in resolve\n successor = self._apply_submission(self._evaluate(state), call)\n", " File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 25, in observe\n try:return original(*args,**kwargs)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/standards_engine/standards_engine/engine.py\", line 1778, in _evaluate\n proposed = self._proposal_projection(revision).compiled\n", " File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 25, in observe\n try:return original(*args,**kwargs)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/standards_engine/standards_engine/engine.py\", line 1683, in _proposal_projection\n capture = self._snapshots.load_content(revision.base_snapshot)\n", " File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 25, in observe\n try:return original(*args,**kwargs)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/standards_snapshots/standards_snapshots/module.py\", line 112, in load_content\n if self._content_id(capture) != content_id:\n", " File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 25, in observe\n try:return original(*args,**kwargs)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/standards_snapshots/standards_snapshots/module.py\", line 207, in _content_id\n material = frame_path_byte_set(\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/standards_identity/standards_identity/encoding.py\", line 152, in frame_path_byte_set\n return IdentityArray(frame_path_bytes(path, content) for path, content in selected)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/standards_identity/standards_identity/encoding.py\", line 23, in __init__\n immutable = tuple(values)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/standards_identity/standards_identity/encoding.py\", line 152, in \n return IdentityArray(frame_path_bytes(path, content) for path, content in selected)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/standards_identity/standards_identity/encoding.py\", line 128, in frame_path_bytes\n return IdentityObject(\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/standards_identity/standards_identity/encoding.py\", line 26, in __init__\n object.__setattr__(self, \"values\", immutable)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/standards_identity/standards_identity/encoding.py\", line 158, in _validate_value\n return\n"]} +{"event": "observation", "test": "test_supporting_workflow.SupportingWorkflowTest.test_coordinated_publication_and_provenance_only_revision", "elapsed_s": 447.826780612, "stack": [" File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 58, in \n result=unittest.TextTestRunner(verbosity=1,resultclass=Result).run(suite)\n", " File \"/usr/lib/python3.13/unittest/runner.py\", line 240, in run\n test(result)\n", " File \"/usr/lib/python3.13/unittest/suite.py\", line 84, in __call__\n return self.run(*args, **kwds)\n", " File \"/usr/lib/python3.13/unittest/suite.py\", line 122, in run\n test(result)\n", " File \"/usr/lib/python3.13/unittest/case.py\", line 707, in __call__\n return self.run(*args, **kwds)\n", " File \"/usr/lib/python3.13/unittest/case.py\", line 651, in run\n self._callTestMethod(testMethod)\n", " File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 36, in timed\n try:return _fn(self,*args,**kwargs)\n", " File \"/usr/lib/python3.13/unittest/case.py\", line 606, in _callTestMethod\n if method() is not None:\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/standards_engine/tests/test_supporting_workflow.py\", line 105, in test_coordinated_publication_and_provenance_only_revision\n self.publish(proposed)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/standards_engine/tests/test_supporting_workflow.py\", line 72, in publish\n ready = self.author.review({\"context\": complete[\"context\"], \"decisions\": decisions(self.root)})\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/standards_engine/standards_engine/tools.py\", line 304, in review\n return self._result(\"review\", self._engine.review(call))\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/standards_engine/standards_engine/context_projection.py\", line 60, in invoke\n return function(engine, call)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/standards_engine/standards_engine/engine.py\", line 946, in review\n return advance(self, \"review\", call)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/standards_engine/standards_engine/agent_workflow.py\", line 242, in advance\n result = engine.review_proposal(\n", " File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 25, in observe\n try:return original(*args,**kwargs)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/standards_engine/standards_engine/context_projection.py\", line 60, in invoke\n return function(engine, call)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/standards_engine/standards_engine/engine.py\", line 1112, in review_proposal\n evaluation = self._evaluate(state)\n", " File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 25, in observe\n try:return original(*args,**kwargs)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/standards_engine/standards_engine/engine.py\", line 1778, in _evaluate\n proposed = self._proposal_projection(revision).compiled\n", " File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 25, in observe\n try:return original(*args,**kwargs)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/standards_engine/standards_engine/engine.py\", line 1683, in _proposal_projection\n capture = self._snapshots.load_content(revision.base_snapshot)\n", " File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 25, in observe\n try:return original(*args,**kwargs)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/standards_snapshots/standards_snapshots/module.py\", line 112, in load_content\n if self._content_id(capture) != content_id:\n", " File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 25, in observe\n try:return original(*args,**kwargs)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/standards_snapshots/standards_snapshots/module.py\", line 210, in _content_id\n return hash_identity(\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/standards_identity/standards_identity/encoding.py\", line 93, in hash_identity\n encoded = encode_identity_value(value)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/standards_identity/standards_identity/encoding.py\", line 75, in encode_identity_value\n return _encode(value)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/standards_identity/standards_identity/encoding.py\", line 191, in _encode\n return b\"[\" + b\",\".join(_encode(item) for item in value.values) + b\"]\"\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/standards_identity/standards_identity/encoding.py\", line 191, in \n return b\"[\" + b\",\".join(_encode(item) for item in value.values) + b\"]\"\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/standards_identity/standards_identity/encoding.py\", line 197, in _encode\n return b\"{\" + b\",\".join(encoded_members) + b\"}\"\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/standards_identity/standards_identity/encoding.py\", line 194, in \n _encode_string(key) + b\":\" + _encode(member_value)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/standards_identity/standards_identity/encoding.py\", line 191, in _encode\n return b\"[\" + b\",\".join(_encode(item) for item in value.values) + b\"]\"\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/standards_identity/standards_identity/encoding.py\", line 191, in \n return b\"[\" + b\",\".join(_encode(item) for item in value.values) + b\"]\"\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/standards_identity/standards_identity/encoding.py\", line 187, in _encode\n return _encode_integer(value)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/standards_identity/standards_identity/encoding.py\", line 215, in _encode_integer\n return (b\"-\" if negative else b\"\") + encoded + suffix\n"]} +{"event": "observation", "test": "test_supporting_workflow.SupportingWorkflowTest.test_coordinated_publication_and_provenance_only_revision", "elapsed_s": 492.860130388, "stack": [" File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 58, in \n result=unittest.TextTestRunner(verbosity=1,resultclass=Result).run(suite)\n", " File \"/usr/lib/python3.13/unittest/runner.py\", line 240, in run\n test(result)\n", " File \"/usr/lib/python3.13/unittest/suite.py\", line 84, in __call__\n return self.run(*args, **kwds)\n", " File \"/usr/lib/python3.13/unittest/suite.py\", line 122, in run\n test(result)\n", " File \"/usr/lib/python3.13/unittest/case.py\", line 707, in __call__\n return self.run(*args, **kwds)\n", " File \"/usr/lib/python3.13/unittest/case.py\", line 651, in run\n self._callTestMethod(testMethod)\n", " File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 36, in timed\n try:return _fn(self,*args,**kwargs)\n", " File \"/usr/lib/python3.13/unittest/case.py\", line 606, in _callTestMethod\n if method() is not None:\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/standards_engine/tests/test_supporting_workflow.py\", line 105, in test_coordinated_publication_and_provenance_only_revision\n self.publish(proposed)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/standards_engine/tests/test_supporting_workflow.py\", line 74, in publish\n applied = self.author.apply({\"context\": ready[\"context\"]})\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/standards_engine/standards_engine/tools.py\", line 310, in apply\n return self._result(\"apply\", self._engine.apply(call))\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/standards_engine/standards_engine/context_projection.py\", line 60, in invoke\n return function(engine, call)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/standards_engine/standards_engine/engine.py\", line 952, in apply\n return advance(self, \"apply\", call)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/standards_engine/standards_engine/agent_workflow.py\", line 257, in advance\n result = engine.apply_proposal(\n", " File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 25, in observe\n try:return original(*args,**kwargs)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/standards_engine/standards_engine/context_projection.py\", line 60, in invoke\n return function(engine, call)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/standards_engine/standards_engine/engine.py\", line 1275, in apply_proposal\n verification = self._application_verifier(candidate.root)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/standards_verifier/standards_verifier/cli.py\", line 76, in run_complete_verification\n results = tuple(Verifier(repo_root, registry).run(None))\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/standards_verifier/standards_verifier/engine.py\", line 66, in run\n result = self._run_suite(catalog.suite(suite_id), catalog)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/standards_verifier/standards_verifier/engine.py\", line 100, in _run_suite\n diagnostics.extend(check.run(context))\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/standards_verifier/standards_verifier/checks/python_package_contract.py\", line 70, in run\n for finding in execute_python_package_contract(context.repo_root)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/standards_verifier/standards_verifier/python_packages.py\", line 1294, in execute_python_package_contract\n completed = subprocess.run(\n", " File \"/usr/lib/python3.13/subprocess.py\", line 556, in run\n stdout, stderr = process.communicate(input, timeout=timeout)\n", " File \"/usr/lib/python3.13/subprocess.py\", line 1222, in communicate\n stdout, stderr = self._communicate(input, endtime, timeout)\n", " File \"/usr/lib/python3.13/subprocess.py\", line 2128, in _communicate\n ready = selector.select(timeout)\n", " File \"/usr/lib/python3.13/selectors.py\", line 398, in select\n fd_event_list = self._selector.poll(timeout)\n"]} +{"event": "observation", "test": "test_supporting_workflow.SupportingWorkflowTest.test_coordinated_publication_and_provenance_only_revision", "elapsed_s": 537.8725632799999, "stack": [" File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 58, in \n result=unittest.TextTestRunner(verbosity=1,resultclass=Result).run(suite)\n", " File \"/usr/lib/python3.13/unittest/runner.py\", line 240, in run\n test(result)\n", " File \"/usr/lib/python3.13/unittest/suite.py\", line 84, in __call__\n return self.run(*args, **kwds)\n", " File \"/usr/lib/python3.13/unittest/suite.py\", line 122, in run\n test(result)\n", " File \"/usr/lib/python3.13/unittest/case.py\", line 707, in __call__\n return self.run(*args, **kwds)\n", " File \"/usr/lib/python3.13/unittest/case.py\", line 651, in run\n self._callTestMethod(testMethod)\n", " File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 36, in timed\n try:return _fn(self,*args,**kwargs)\n", " File \"/usr/lib/python3.13/unittest/case.py\", line 606, in _callTestMethod\n if method() is not None:\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/standards_engine/tests/test_supporting_workflow.py\", line 110, in test_coordinated_publication_and_provenance_only_revision\n self.assertEqual(self.app.read({\"target\": REFERENCE})[\"kind\"], \"application-read-result\")\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/standards_engine/standards_engine/tools.py\", line 346, in read\n return self._result(\"read\", self._engine.read(call))\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/standards_engine/standards_engine/context_projection.py\", line 56, in invoke\n return application_dispatch(engine, function.__name__, call)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/standards_engine/standards_engine/context_projection.py\", line 237, in application_dispatch\n captured = engine._capture_snapshot(c.CreateSnapshotCall(kind=\"create-snapshot\"))\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/standards_engine/standards_engine/engine.py\", line 503, in _capture_snapshot\n first = self._compile(recording)\n", " File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 25, in observe\n try:return original(*args,**kwargs)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/standards_engine/standards_engine/engine.py\", line 1729, in _compile\n load_indexes(source, corpus),\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/standards_engine/standards_engine/navigation_indexes.py\", line 198, in load_indexes\n enforcement = _navigation_checks(source)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/standards_engine/standards_engine/navigation_indexes.py\", line 77, in _navigation_checks\n document = tomllib.loads(source.read_bytes(suite[\"path\"]).decode(\"utf-8\"))\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/standards_metadata/standards_metadata/source.py\", line 80, in read_bytes\n content = bytes(self._source.read_bytes(normalized))\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/standards_engine/standards_engine/engine.py\", line 264, in read_bytes\n return self._repository.read_file(\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/repository_git/repository_git/repository.py\", line 690, in read_file\n tree = self._object(repository, tree_oid, \"tree\", algorithm)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/repository_git/repository_git/repository.py\", line 746, in _object\n output = git_output(\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/repository_git/repository_git/repository.py\", line 91, in git_output\n result = git_command(\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/repository_git/repository_git/repository.py\", line 75, in git_command\n return _run_bounded(\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/repository_git/repository_git/repository.py\", line 871, in _run_bounded\n process.stderr.close()\n", " File \"/usr/lib/python3.13/subprocess.py\", line 1280, in wait\n return self._wait(timeout=timeout)\n", " File \"/usr/lib/python3.13/subprocess.py\", line 2072, in _wait\n return self.returncode\n"]} +{"event": "observation", "test": "test_supporting_workflow.SupportingWorkflowTest.test_coordinated_publication_and_provenance_only_revision", "elapsed_s": 582.883286361, "stack": [" File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 58, in \n result=unittest.TextTestRunner(verbosity=1,resultclass=Result).run(suite)\n", " File \"/usr/lib/python3.13/unittest/runner.py\", line 240, in run\n test(result)\n", " File \"/usr/lib/python3.13/unittest/suite.py\", line 84, in __call__\n return self.run(*args, **kwds)\n", " File \"/usr/lib/python3.13/unittest/suite.py\", line 122, in run\n test(result)\n", " File \"/usr/lib/python3.13/unittest/case.py\", line 707, in __call__\n return self.run(*args, **kwds)\n", " File \"/usr/lib/python3.13/unittest/case.py\", line 651, in run\n self._callTestMethod(testMethod)\n", " File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 36, in timed\n try:return _fn(self,*args,**kwargs)\n", " File \"/usr/lib/python3.13/unittest/case.py\", line 606, in _callTestMethod\n if method() is not None:\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/standards_engine/tests/test_supporting_workflow.py\", line 112, in test_coordinated_publication_and_provenance_only_revision\n exposed = self.app.read({\"target\": aid[\"canonical_id\"]})\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/standards_engine/standards_engine/tools.py\", line 346, in read\n return self._result(\"read\", self._engine.read(call))\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/standards_engine/standards_engine/context_projection.py\", line 56, in invoke\n return application_dispatch(engine, function.__name__, call)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/standards_engine/standards_engine/context_projection.py\", line 237, in application_dispatch\n captured = engine._capture_snapshot(c.CreateSnapshotCall(kind=\"create-snapshot\"))\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/standards_engine/standards_engine/engine.py\", line 503, in _capture_snapshot\n first = self._compile(recording)\n", " File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 25, in observe\n try:return original(*args,**kwargs)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/standards_engine/standards_engine/engine.py\", line 1716, in _compile\n corpus, impact, load_coverage_horizon(source, corpus, impact)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/standards_analysis/standards_analysis/coverage.py\", line 548, in load_coverage_horizon\n return _load_coverage_horizon(source, corpus, compiled, path)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/standards_analysis/standards_analysis/coverage.py\", line 475, in _load_coverage_horizon\n dependency = suite_inputs.dependency(suite.id)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/standards_metadata/standards_metadata/suite_inputs.py\", line 255, in dependency\n fingerprint = _identity_digest(\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/standards_metadata/standards_metadata/suite_inputs.py\", line 100, in _identity_digest\n return file_digest(encode_identity_value(value))\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/standards_metadata/standards_metadata/suite_inputs.py\", line 23, in file_digest\n return \"sha256:\" + hashlib.sha256(content).hexdigest()\n"]} +{"event": "observation", "test": "test_supporting_workflow.SupportingWorkflowTest.test_coordinated_publication_and_provenance_only_revision", "elapsed_s": 627.940816865, "stack": [" File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 58, in \n result=unittest.TextTestRunner(verbosity=1,resultclass=Result).run(suite)\n", " File \"/usr/lib/python3.13/unittest/runner.py\", line 240, in run\n test(result)\n", " File \"/usr/lib/python3.13/unittest/suite.py\", line 84, in __call__\n return self.run(*args, **kwds)\n", " File \"/usr/lib/python3.13/unittest/suite.py\", line 122, in run\n test(result)\n", " File \"/usr/lib/python3.13/unittest/case.py\", line 707, in __call__\n return self.run(*args, **kwds)\n", " File \"/usr/lib/python3.13/unittest/case.py\", line 651, in run\n self._callTestMethod(testMethod)\n", " File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 36, in timed\n try:return _fn(self,*args,**kwargs)\n", " File \"/usr/lib/python3.13/unittest/case.py\", line 606, in _callTestMethod\n if method() is not None:\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/standards_engine/tests/test_supporting_workflow.py\", line 119, in test_coordinated_publication_and_provenance_only_revision\n next_change = self.author.propose({\"change_set\": self.change([\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/standards_engine/standards_engine/tools.py\", line 280, in propose\n return self._result(\"propose\", self._engine.propose(call))\n", " File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 25, in observe\n try:return original(*args,**kwargs)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/standards_engine/standards_engine/context_projection.py\", line 60, in invoke\n return function(engine, call)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/standards_engine/standards_engine/engine.py\", line 922, in propose\n return propose(self, call)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/standards_engine/standards_engine/agent_workflow.py\", line 183, in propose\n return analyze_revision(engine, result.revision)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/standards_engine/standards_engine/agent_workflow.py\", line 152, in analyze_revision\n result = engine.analyze_proposal(c.AnalyzeProposalCall(revision))\n", " File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 25, in observe\n try:return original(*args,**kwargs)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/standards_engine/standards_engine/context_projection.py\", line 60, in invoke\n return function(engine, call)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/standards_engine/standards_engine/engine.py\", line 1066, in analyze_proposal\n projection = self._proposal_projection(revision)\n", " File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 25, in observe\n try:return original(*args,**kwargs)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/standards_engine/standards_engine/engine.py\", line 1683, in _proposal_projection\n capture = self._snapshots.load_content(revision.base_snapshot)\n", " File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 25, in observe\n try:return original(*args,**kwargs)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/standards_snapshots/standards_snapshots/module.py\", line 112, in load_content\n if self._content_id(capture) != content_id:\n", " File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 25, in observe\n try:return original(*args,**kwargs)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/standards_snapshots/standards_snapshots/module.py\", line 210, in _content_id\n return hash_identity(\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/standards_identity/standards_identity/encoding.py\", line 93, in hash_identity\n encoded = encode_identity_value(value)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/standards_identity/standards_identity/encoding.py\", line 75, in encode_identity_value\n return _encode(value)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/standards_identity/standards_identity/encoding.py\", line 191, in _encode\n return b\"[\" + b\",\".join(_encode(item) for item in value.values) + b\"]\"\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/standards_identity/standards_identity/encoding.py\", line 191, in \n return b\"[\" + b\",\".join(_encode(item) for item in value.values) + b\"]\"\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/standards_identity/standards_identity/encoding.py\", line 197, in _encode\n return b\"{\" + b\",\".join(encoded_members) + b\"}\"\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/standards_identity/standards_identity/encoding.py\", line 195, in \n for key, member_value in value.members\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/standards_identity/standards_identity/encoding.py\", line 191, in _encode\n return b\"[\" + b\",\".join(_encode(item) for item in value.values) + b\"]\"\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/standards_identity/standards_identity/encoding.py\", line 191, in \n return b\"[\" + b\",\".join(_encode(item) for item in value.values) + b\"]\"\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/standards_identity/standards_identity/encoding.py\", line 187, in _encode\n return _encode_integer(value)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/standards_identity/standards_identity/encoding.py\", line 215, in _encode_integer\n return (b\"-\" if negative else b\"\") + encoded + suffix\n"]} +{"event": "observation", "test": "test_supporting_workflow.SupportingWorkflowTest.test_coordinated_publication_and_provenance_only_revision", "elapsed_s": 673.020082169, "stack": [" File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 58, in \n result=unittest.TextTestRunner(verbosity=1,resultclass=Result).run(suite)\n", " File \"/usr/lib/python3.13/unittest/runner.py\", line 240, in run\n test(result)\n", " File \"/usr/lib/python3.13/unittest/suite.py\", line 84, in __call__\n return self.run(*args, **kwds)\n", " File \"/usr/lib/python3.13/unittest/suite.py\", line 122, in run\n test(result)\n", " File \"/usr/lib/python3.13/unittest/case.py\", line 707, in __call__\n return self.run(*args, **kwds)\n", " File \"/usr/lib/python3.13/unittest/case.py\", line 651, in run\n self._callTestMethod(testMethod)\n", " File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 36, in timed\n try:return _fn(self,*args,**kwargs)\n", " File \"/usr/lib/python3.13/unittest/case.py\", line 606, in _callTestMethod\n if method() is not None:\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/standards_engine/tests/test_supporting_workflow.py\", line 123, in test_coordinated_publication_and_provenance_only_revision\n self.publish(next_change)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/standards_engine/tests/test_supporting_workflow.py\", line 71, in publish\n complete = self.resolve(proposed)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/standards_engine/tests/test_supporting_workflow.py\", line 62, in resolve\n proposed = self.author.resolve_workflow({\"context\": proposed[\"context\"], \"submission\": {\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/standards_engine/standards_engine/tools.py\", line 298, in resolve_workflow\n return self._result(\"resolve_workflow\", self._engine.resolve_workflow(call))\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/standards_engine/standards_engine/context_projection.py\", line 60, in invoke\n return function(engine, call)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/standards_engine/standards_engine/engine.py\", line 940, in resolve_workflow\n return advance(self, \"resolve_workflow\", call)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/standards_engine/standards_engine/agent_workflow.py\", line 228, in advance\n result = engine.resolve(\n", " File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 25, in observe\n try:return original(*args,**kwargs)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/standards_engine/standards_engine/context_projection.py\", line 60, in invoke\n return function(engine, call)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/standards_engine/standards_engine/engine.py\", line 1621, in resolve\n return self._evaluate_publish_project(successor)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/standards_engine/standards_engine/engine.py\", line 1935, in _evaluate_publish_project\n evaluation = self._evaluate(state) if evaluation is None else evaluation\n", " File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 25, in observe\n try:return original(*args,**kwargs)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/standards_engine/standards_engine/engine.py\", line 1778, in _evaluate\n proposed = self._proposal_projection(revision).compiled\n", " File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 25, in observe\n try:return original(*args,**kwargs)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/standards_engine/standards_engine/engine.py\", line 1683, in _proposal_projection\n capture = self._snapshots.load_content(revision.base_snapshot)\n", " File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 25, in observe\n try:return original(*args,**kwargs)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/standards_snapshots/standards_snapshots/module.py\", line 112, in load_content\n if self._content_id(capture) != content_id:\n", " File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 25, in observe\n try:return original(*args,**kwargs)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/standards_snapshots/standards_snapshots/module.py\", line 210, in _content_id\n return hash_identity(\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/standards_identity/standards_identity/encoding.py\", line 93, in hash_identity\n encoded = encode_identity_value(value)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/standards_identity/standards_identity/encoding.py\", line 75, in encode_identity_value\n return _encode(value)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/standards_identity/standards_identity/encoding.py\", line 191, in _encode\n return b\"[\" + b\",\".join(_encode(item) for item in value.values) + b\"]\"\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/standards_identity/standards_identity/encoding.py\", line 191, in \n return b\"[\" + b\",\".join(_encode(item) for item in value.values) + b\"]\"\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/standards_identity/standards_identity/encoding.py\", line 197, in _encode\n return b\"{\" + b\",\".join(encoded_members) + b\"}\"\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/standards_identity/standards_identity/encoding.py\", line 194, in \n _encode_string(key) + b\":\" + _encode(member_value)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/standards_identity/standards_identity/encoding.py\", line 191, in _encode\n return b\"[\" + b\",\".join(_encode(item) for item in value.values) + b\"]\"\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/standards_identity/standards_identity/encoding.py\", line 191, in \n return b\"[\" + b\",\".join(_encode(item) for item in value.values) + b\"]\"\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/standards_identity/standards_identity/encoding.py\", line 187, in _encode\n return _encode_integer(value)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/standards_identity/standards_identity/encoding.py\", line 213, in _encode_integer\n for chunk in reversed(chunks)\n"]} +{"event": "observation", "test": "test_supporting_workflow.SupportingWorkflowTest.test_coordinated_publication_and_provenance_only_revision", "elapsed_s": 718.0421712959999, "stack": [" File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 58, in \n result=unittest.TextTestRunner(verbosity=1,resultclass=Result).run(suite)\n", " File \"/usr/lib/python3.13/unittest/runner.py\", line 240, in run\n test(result)\n", " File \"/usr/lib/python3.13/unittest/suite.py\", line 84, in __call__\n return self.run(*args, **kwds)\n", " File \"/usr/lib/python3.13/unittest/suite.py\", line 122, in run\n test(result)\n", " File \"/usr/lib/python3.13/unittest/case.py\", line 707, in __call__\n return self.run(*args, **kwds)\n", " File \"/usr/lib/python3.13/unittest/case.py\", line 651, in run\n self._callTestMethod(testMethod)\n", " File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 36, in timed\n try:return _fn(self,*args,**kwargs)\n", " File \"/usr/lib/python3.13/unittest/case.py\", line 606, in _callTestMethod\n if method() is not None:\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/standards_engine/tests/test_supporting_workflow.py\", line 123, in test_coordinated_publication_and_provenance_only_revision\n self.publish(next_change)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/standards_engine/tests/test_supporting_workflow.py\", line 74, in publish\n applied = self.author.apply({\"context\": ready[\"context\"]})\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/standards_engine/standards_engine/tools.py\", line 310, in apply\n return self._result(\"apply\", self._engine.apply(call))\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/standards_engine/standards_engine/context_projection.py\", line 60, in invoke\n return function(engine, call)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/standards_engine/standards_engine/engine.py\", line 952, in apply\n return advance(self, \"apply\", call)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/standards_engine/standards_engine/agent_workflow.py\", line 257, in advance\n result = engine.apply_proposal(\n", " File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 25, in observe\n try:return original(*args,**kwargs)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/standards_engine/standards_engine/context_projection.py\", line 60, in invoke\n return function(engine, call)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/standards_engine/standards_engine/engine.py\", line 1228, in apply_proposal\n projection = self._proposal_projection(revision)\n", " File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 25, in observe\n try:return original(*args,**kwargs)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/standards_engine/standards_engine/engine.py\", line 1687, in _proposal_projection\n return self._logical_authoring.compile(\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/standards_engine/standards_engine/logical_authoring.py\", line 974, in compile\n finish_edits(files, support_edits, base_compiled, base_snapshot, compile_current)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/standards_engine/standards_engine/supporting_authoring.py\", line 113, in finish_edits\n current = compile_current(files)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/standards_engine/standards_engine/logical_authoring.py\", line 943, in compile_current\n return self._compile_authorities(FrozenContentSource(current))\n", " File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 25, in observe\n try:return original(*args,**kwargs)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/standards_engine/standards_engine/engine.py\", line 1716, in _compile\n corpus, impact, load_coverage_horizon(source, corpus, impact)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/standards_analysis/standards_analysis/coverage.py\", line 548, in load_coverage_horizon\n return _load_coverage_horizon(source, corpus, compiled, path)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/standards_analysis/standards_analysis/coverage.py\", line 475, in _load_coverage_horizon\n dependency = suite_inputs.dependency(suite.id)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/standards_metadata/standards_metadata/suite_inputs.py\", line 625, in load_suite_input_manifest\n return manifest\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/standards_metadata/standards_metadata/suite_inputs.py\", line 289, in dependency\n return SuiteDependencyProjection(\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/standards_metadata/standards_metadata/suite_inputs.py\", line 100, in _identity_digest\n return file_digest(encode_identity_value(value))\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/standards_metadata/standards_metadata/suite_inputs.py\", line 23, in file_digest\n return \"sha256:\" + hashlib.sha256(content).hexdigest()\n"]} +{"event": "observation", "test": "test_supporting_workflow.SupportingWorkflowTest.test_coordinated_publication_and_provenance_only_revision", "elapsed_s": 763.0650783880001, "stack": [" File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 58, in \n result=unittest.TextTestRunner(verbosity=1,resultclass=Result).run(suite)\n", " File \"/usr/lib/python3.13/unittest/runner.py\", line 240, in run\n test(result)\n", " File \"/usr/lib/python3.13/unittest/suite.py\", line 84, in __call__\n return self.run(*args, **kwds)\n", " File \"/usr/lib/python3.13/unittest/suite.py\", line 122, in run\n test(result)\n", " File \"/usr/lib/python3.13/unittest/case.py\", line 707, in __call__\n return self.run(*args, **kwds)\n", " File \"/usr/lib/python3.13/unittest/case.py\", line 651, in run\n self._callTestMethod(testMethod)\n", " File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 36, in timed\n try:return _fn(self,*args,**kwargs)\n", " File \"/usr/lib/python3.13/unittest/case.py\", line 606, in _callTestMethod\n if method() is not None:\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/standards_engine/tests/test_supporting_workflow.py\", line 129, in test_coordinated_publication_and_provenance_only_revision\n historical = self.author.read({\"snapshot\": old_snapshot, \"target\": REASON})\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/standards_engine/standards_engine/tools.py\", line 346, in read\n return self._result(\"read\", self._engine.read(call))\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/standards_engine/standards_engine/context_projection.py\", line 60, in invoke\n return function(engine, call)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/standards_engine/standards_engine/engine.py\", line 988, in read\n return navigate(self, \"read\", call)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/standards_engine/standards_engine/agent_navigation.py\", line 52, in navigate\n result = engine.query(\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/standards_engine/standards_engine/context_projection.py\", line 60, in invoke\n return function(engine, call)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/standards_engine/standards_engine/engine.py\", line 999, in query\n compiled = self._compiled_snapshot(self._snapshot_id(call.snapshot))\n", " File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 25, in observe\n try:return original(*args,**kwargs)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/standards_engine/standards_engine/engine.py\", line 1673, in _compiled_snapshot\n return self._compile(\n", " File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 25, in observe\n try:return original(*args,**kwargs)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/standards_engine/standards_engine/engine.py\", line 1706, in _compile\n corpus = load_canonical_standards_corpus(source)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/standards_metadata/standards_metadata/corpus.py\", line 15, in load_canonical_standards_corpus\n modules = load_canonical_module_corpus(selected_source, module_registry)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/standards_metadata/standards_metadata/loader.py\", line 550, in load_canonical_module_corpus\n validation = validate_module_metadata(selected_source, members)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/standards_metadata/standards_metadata/loader.py\", line 442, in validate_module_metadata\n module, module_failures = _parse_module(selected_source, path)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/standards_metadata/standards_metadata/loader.py\", line 320, in _parse_module\n return (\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/standards_metadata/standards_metadata/loader.py\", line 69, in _field_values\n return values\n"]} +{"event": "observation", "test": "test_supporting_workflow.SupportingWorkflowTest.test_coordinated_publication_and_provenance_only_revision", "elapsed_s": 808.1360851679999, "stack": [" File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 58, in \n result=unittest.TextTestRunner(verbosity=1,resultclass=Result).run(suite)\n", " File \"/usr/lib/python3.13/unittest/runner.py\", line 240, in run\n test(result)\n", " File \"/usr/lib/python3.13/unittest/suite.py\", line 84, in __call__\n return self.run(*args, **kwds)\n", " File \"/usr/lib/python3.13/unittest/suite.py\", line 122, in run\n test(result)\n", " File \"/usr/lib/python3.13/unittest/case.py\", line 707, in __call__\n return self.run(*args, **kwds)\n", " File \"/usr/lib/python3.13/unittest/case.py\", line 651, in run\n self._callTestMethod(testMethod)\n", " File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 36, in timed\n try:return _fn(self,*args,**kwargs)\n", " File \"/usr/lib/python3.13/unittest/case.py\", line 606, in _callTestMethod\n if method() is not None:\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/standards_engine/tests/test_supporting_workflow.py\", line 133, in test_coordinated_publication_and_provenance_only_revision\n self.assertEqual(self.app.read({\"target\": RULE})[\"content\"], first[\"content\"])\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/standards_engine/standards_engine/tools.py\", line 346, in read\n return self._result(\"read\", self._engine.read(call))\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/standards_engine/standards_engine/context_projection.py\", line 56, in invoke\n return application_dispatch(engine, function.__name__, call)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/standards_engine/standards_engine/context_projection.py\", line 237, in application_dispatch\n captured = engine._capture_snapshot(c.CreateSnapshotCall(kind=\"create-snapshot\"))\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/standards_engine/standards_engine/engine.py\", line 525, in _capture_snapshot\n summary = self._snapshots.create_snapshot(\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/standards_snapshots/standards_snapshots/module.py\", line 96, in create_snapshot\n selected, self._content_id(capture), capture, self._time()\n", " File \"/mnt/data/engine-performance/harness/run_timed_suite.py\", line 25, in observe\n try:return original(*args,**kwargs)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/standards_snapshots/standards_snapshots/module.py\", line 210, in _content_id\n return hash_identity(\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/standards_identity/standards_identity/encoding.py\", line 93, in hash_identity\n encoded = encode_identity_value(value)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/standards_identity/standards_identity/encoding.py\", line 75, in encode_identity_value\n return _encode(value)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/standards_identity/standards_identity/encoding.py\", line 191, in _encode\n return b\"[\" + b\",\".join(_encode(item) for item in value.values) + b\"]\"\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/standards_identity/standards_identity/encoding.py\", line 191, in \n return b\"[\" + b\",\".join(_encode(item) for item in value.values) + b\"]\"\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/standards_identity/standards_identity/encoding.py\", line 197, in _encode\n return b\"{\" + b\",\".join(encoded_members) + b\"}\"\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/standards_identity/standards_identity/encoding.py\", line 194, in \n _encode_string(key) + b\":\" + _encode(member_value)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/standards_identity/standards_identity/encoding.py\", line 191, in _encode\n return b\"[\" + b\",\".join(_encode(item) for item in value.values) + b\"]\"\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/standards_identity/standards_identity/encoding.py\", line 191, in \n return b\"[\" + b\",\".join(_encode(item) for item in value.values) + b\"]\"\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/standards_identity/standards_identity/encoding.py\", line 187, in _encode\n return _encode_integer(value)\n", " File \"/mnt/data/engine-performance/module-checkouts/test_supporting_workflow/tools/standards_identity/standards_identity/encoding.py\", line 208, in _encode_integer\n remaining, chunk = divmod(remaining, _DECIMAL_CHUNK_BASE)\n"]} +{"event": "end", "test": "test_supporting_workflow.SupportingWorkflowTest.test_coordinated_publication_and_provenance_only_revision", "wall_s": 839.06457716, "cpu_s": 617.979156948, "status": "pass", "spans": {"StandardsEngine._compile": {"calls": 278, "inclusive_s": 272.50995425800204}, "SnapshotModule._content_id": {"calls": 130, "inclusive_s": 380.1300723730011}, "SnapshotModule.load_content": {"calls": 120, "inclusive_s": 351.9290852390002}, "StandardsEngine._compiled_snapshot": {"calls": 45, "inclusive_s": 149.25123034900093}, "StandardsEngine._proposal_projection": {"calls": 71, "inclusive_s": 390.30394770100065}, "AuthoringModule.read_revision": {"calls": 112, "inclusive_s": 4.9750788059994875}, "StandardsEngine._validate_projected_inputs": {"calls": 33, "inclusive_s": 180.49312692399974}, "StandardsEngine.analyze_proposal": {"calls": 2, "inclusive_s": 28.014346772000067}, "StandardsEngine.propose": {"calls": 2, "inclusive_s": 65.07483540499993}, "StandardsEngine.query_proposal": {"calls": 1, "inclusive_s": 5.360288601999969}, "StandardsEngine._evaluate": {"calls": 31, "inclusive_s": 447.10896152300006}, "StandardsEngine.resolve": {"calls": 9, "inclusive_s": 261.8513984890002}, "StandardsEngine.review_proposal": {"calls": 2, "inclusive_s": 30.047430176999796}, "StandardsEngine.apply_proposal": {"calls": 2, "inclusive_s": 90.44723361000001}}, "setup_s": 2.593999965938565e-06, "body_s": 839.064301737, "teardown_s": 1.8330001694266684e-06} +{"event": "summary", "total_s": 842.047302887, "run": 1, "errors": 0, "failures": 0, "skips": 0} diff --git a/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/test_supporting_workflow.stderr b/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/test_supporting_workflow.stderr new file mode 100644 index 00000000..5edd61fd --- /dev/null +++ b/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/test_supporting_workflow.stderr @@ -0,0 +1,5 @@ +. +---------------------------------------------------------------------- +Ran 1 test in 840.310s + +OK diff --git a/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/test_supporting_workflow.stdout b/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/test_supporting_workflow.stdout new file mode 100644 index 00000000..d9260a7e --- /dev/null +++ b/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/evidence/test_supporting_workflow.stdout @@ -0,0 +1,2 @@ +START test_supporting_workflow.SupportingWorkflowTest.test_coordinated_publication_and_provenance_only_revision +END test_supporting_workflow.SupportingWorkflowTest.test_coordinated_publication_and_provenance_only_revision 839.065 pass diff --git a/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/measurement-tools/after-tests.sh b/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/measurement-tools/after-tests.sh new file mode 100644 index 00000000..f040de9c --- /dev/null +++ b/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/measurement-tools/after-tests.sh @@ -0,0 +1,5 @@ +#!/bin/bash +set -u +pid=$(cat /mnt/data/engine-performance/evidence/test.pid) +while [ -r /proc/$pid/stat ] && [ "$(awk '{print $3}' /proc/$pid/stat)" != Z ]; do sleep 2; done +exec env PYTHONDONTWRITEBYTECODE=1 python -u /mnt/data/engine-performance/harness/measure_operations.py --repo /mnt/data/engine-performance/benchmark-checkout --output /mnt/data/engine-performance/evidence/operations --samples 3 --profile diff --git a/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/measurement-tools/measure_followup.py b/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/measurement-tools/measure_followup.py new file mode 100644 index 00000000..52d14d52 --- /dev/null +++ b/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/measurement-tools/measure_followup.py @@ -0,0 +1,79 @@ +"""External read-only baseline instrumentation; no candidate implementation.""" +from __future__ import annotations +import argparse,cProfile,concurrent.futures,gc,hashlib,json,os,pstats,shutil,subprocess,sys,tempfile,time +from pathlib import Path +p=argparse.ArgumentParser();p.add_argument('--repo',required=True);p.add_argument('--evidence',required=True);p.add_argument('--wait-pid',type=int);a=p.parse_args() +if a.wait_pid: + while Path(f'/proc/{a.wait_pid}/stat').exists() and Path(f'/proc/{a.wait_pid}/stat').read_text().split()[2]!='Z': time.sleep(3) +r=Path(a.repo).resolve();E=Path(a.evidence).resolve();O=E/'followup';O.mkdir(exist_ok=True) +for controller in ('qualified.pid','qualified-navigation.pid'): + if (E/controller).exists(): + qualified_pid=int((E/controller).read_text()) + while Path(f'/proc/{qualified_pid}/stat').exists() and Path(f'/proc/{qualified_pid}/stat').read_text().split()[2]!='Z': time.sleep(3) +os.chdir(r);sys.path[:0]=[str(r),str(r/'tools/standards_verifier')] +from tools.standards_engine.standards_engine import StandardsEngine +from tools.standards_engine.standards_engine import _generated_contract as c +from tools.standards_identity.standards_identity import frame_path_byte_set,hash_identity,encode_identity_value +from tools.standards_snapshots.standards_snapshots.module import SnapshotModule +S=json.loads((E/'operations/snapshot-0.json').read_text());engine=StandardsEngine.open_repository(r,store_path=E/'operations/store-0.sqlite3',purpose='authoring') +identity,capture=engine._snapshots._store.load_content(engine._snapshot_id(c.SnapshotHandle.from_value(S))) +rows=[] +def observe(label,fn): + t=time.perf_counter();cpu=time.process_time();v=fn();dt=time.perf_counter()-t + rows.append({'operation':label,'wall_s':dt,'cpu_s':time.process_time()-cpu}); print(label,dt,flush=True);return v +entries=tuple((f.path.components,f.content) for f in capture.files) +for i in range(3): + material=observe(f'identity_frame_{i}',lambda:frame_path_byte_set(entries)) + encoded=observe(f'identity_encode_{i}',lambda:encode_identity_value(material)) + observed=observe(f'identity_complete_hash_{i}',lambda:SnapshotModule._content_id(capture)) + assert observed==identity + # This micro-observation isolates SHA-256 cost. It is NOT a substitute identity. + observe(f'sha256_encoded_bytes_only_{i}',lambda:hashlib.sha256(encoded).digest()) + del material,encoded;gc.collect() +profile=cProfile.Profile();profile.enable();observed=SnapshotModule._content_id(capture);profile.disable();assert observed==identity +profile.dump_stats(str(O/'identity.pstats')) +with (O/'identity-profile.txt').open('w') as f:pstats.Stats(profile,stream=f).strip_dirs().sort_stats('cumulative').print_stats(50) +engine.close() +with tempfile.TemporaryDirectory(prefix='transport-baseline-',dir=O) as td: + root=Path(td)/'repo' + subprocess.run(['git','clone','--local','--quiet','--branch','implementation/purpose-separated-standards-engine',str(r),str(root)],check=True) + subprocess.run(['git','-C',str(root),'branch','main','HEAD'],check=True) + dest=root/'.standards-engine/snapshots-v1.sqlite3';dest.parent.mkdir(exist_ok=True) + # Original producer and all operation readers closed before this quiesced copy. + shutil.copy2(E/'operations/store-0.sqlite3',dest) + env={**os.environ,'PYTHONPATH':str(root),'PYTHONDONTWRITEBYTECODE':'1'} + payload={'snapshot':S,'request':{'kind':'read','target':'workflow.planning'}} + cli=[sys.executable,'-P',str(root/'.agents/skills/standards-engine/scripts/invoke.py'),'--purpose','authoring','--repo-root',str(root),'query'] + for i in range(3): + result=observe(f'fresh_python_cli_read_{i}',lambda:subprocess.run(cli,input=json.dumps(payload),text=True,capture_output=True,cwd=root,env=env)) + assert result.returncode==0,(result.returncode,result.stderr) + assert json.loads(result.stdout)['kind']=='read-result' + def simultaneous_read(index): + t=time.perf_counter(); result=subprocess.run(cli,input=json.dumps(payload),text=True,capture_output=True,cwd=root,env=env) + assert result.returncode==0,result.stderr + assert json.loads(result.stdout)['kind']=='read-result' + return {'reader':index,'wall_s':time.perf_counter()-t} + with concurrent.futures.ThreadPoolExecutor(max_workers=2) as pool: + concurrent_rows=observe('two_concurrent_process_reads_same_store',lambda:list(pool.map(simultaneous_read,range(2)))) + (O/'concurrent-readers.json').write_text(json.dumps(concurrent_rows,indent=2)) + for session in range(2): + stderr=(O/f'mcp-{session}.stderr').open('w');t=time.perf_counter() + proc=subprocess.Popen([sys.executable,'-P','-m','tools.standards_engine.standards_engine.mcp','--purpose','authoring','--repo-root',str(root)],cwd=root,env=env,text=True,stdin=subprocess.PIPE,stdout=subprocess.PIPE,stderr=stderr,bufsize=1) + def rpc(message): + proc.stdin.write(json.dumps(message)+'\n');proc.stdin.flush() + value=json.loads(proc.stdout.readline());assert 'error' not in value,value;return value['result'] + init=rpc({'jsonrpc':'2.0','id':1,'method':'initialize','params':{'protocolVersion':'2025-11-25','capabilities':{},'clientInfo':{'name':'performance-observer','version':'1'}}}) + rows.append({'operation':f'fresh_mcp_initialize_{session}','wall_s':time.perf_counter()-t,'cpu_s':None}) + proc.stdin.write(json.dumps({'jsonrpc':'2.0','method':'notifications/initialized'})+'\n');proc.stdin.flush() + catalog=observe(f'mcp_tools_list_{session}',lambda:rpc({'jsonrpc':'2.0','id':2,'method':'tools/list','params':{}})) + assert len(catalog['tools'])==15,len(catalog['tools']) + for i in range(3): + result=observe(f'mcp_{session}_read_{i}',lambda:rpc({'jsonrpc':'2.0','id':i+3,'method':'tools/call','params':{'name':'read','arguments':{'snapshot':S,'target':'workflow.planning'}}})) + assert not result.get('isError',False),result + assert result['structuredContent']['kind']=='compact-read-result' + if session==0: + implicit=observe('mcp_read_with_implicit_new_capture',lambda:rpc({'jsonrpc':'2.0','id':20,'method':'tools/call','params':{'name':'read','arguments':{'target':'workflow.planning'}}})) + assert not implicit.get('isError',False),implicit + proc.stdin.close();proc.wait();assert proc.returncode==0;proc.stdout.close();stderr.close() +(O/'measurements.json').write_text(json.dumps(rows,indent=2));(O/'source-size.json').write_text(json.dumps({'files':len(capture.files),'raw_bytes':sum(len(f.content) for f in capture.files),'identity':identity})) +print('FOLLOWUP COMPLETE',flush=True) diff --git a/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/measurement-tools/measure_operations.py b/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/measurement-tools/measure_operations.py new file mode 100644 index 00000000..69992500 --- /dev/null +++ b/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/measurement-tools/measure_operations.py @@ -0,0 +1,101 @@ +"""Observe existing Engine operations without changing their semantics or source.""" +from __future__ import annotations +import argparse,collections,contextlib,cProfile,functools,gc,hashlib,json,os,platform,pstats,resource,sys,time,tracemalloc +from pathlib import Path +p=argparse.ArgumentParser();p.add_argument('--repo',required=True);p.add_argument('--output',required=True);p.add_argument('--samples',type=int,default=3);p.add_argument('--profile',action='store_true');a=p.parse_args() +r=Path(a.repo).resolve();os.chdir(r);sys.path[:0]=[str(r),str(r/'tools/standards_verifier')];os.environ['PYTHONPATH']=str(r);os.environ['PYTHONDONTWRITEBYTECODE']='1' +from tools.standards_engine.standards_engine import StandardsEngine,AgentToolFacade +from tools.standards_engine.standards_engine import engine as em +from tools.standards_engine.standards_engine import supporting as sm,navigation_indexes as nm +from tools.standards_engine.standards_engine import tools as tm +from tools.standards_engine.tests.platform_harness import HarnessAuthorizer,_disposition +from tools.standards_analysis.standards_analysis import AnalysisExecutionContext +from tools.standards_engine.standards_engine import _generated_contract as c +from tools.standards_metadata.standards_metadata import FrozenContentSource +from tools.standards_snapshots.standards_snapshots.module import SnapshotModule +from tools.standards_snapshots.standards_snapshots.store import SQLiteSnapshotStore +from tools.repository_git.repository_git import repository as gm +out=Path(a.output);out.mkdir(parents=True,exist_ok=True);log=(out/'operations.jsonl').open('w',buffering=1) +stats={};stack=[];reads=collections.Counter();objects=collections.Counter();commands=collections.Counter();phase=None;current=None;unwrap=[] +def record(label,fn,args,kwargs): + global stack + t=time.perf_counter();frame=[0.0];stack.append(frame) + try:return fn(*args,**kwargs) + finally: + elapsed=time.perf_counter()-t;stack.pop();s=stats.setdefault(label,{'calls':0,'wall_s':0.,'self_s':0.});s['calls']+=1;s['wall_s']+=elapsed;s['self_s']+=elapsed-frame[0] + if stack:stack[-1][0]+=elapsed + +def patch(owner,name,label=None,static=False): + original=getattr(owner,name);label=label or name + @functools.wraps(original) + def wrapped(*args,**kwargs): + tag=label + if name=='_compile': + src=args[0];tag='_compile/'+type(getattr(src,'_source',src)).__name__ + if label=='git.read_bytes':reads[args[1]]+=1 + if label=='git.object':objects[(str(args[1]),args[2],args[3])]+=1 + if label=='git.command':commands[' '.join(args[1][:2])]+=1 + return record(tag,original,args,kwargs) + setattr(owner,name,staticmethod(wrapped) if static else wrapped);unwrap.append((owner,name,original,static)) +for name in ['_compiled_snapshot','_proposal_projection','_evaluate','_evaluate_compiled','_validate_projected_inputs','_load_analysis']: + patch(StandardsEngine,name,'engine.'+name) +patch(StandardsEngine,'_compile',static=True) +for name in ['load_canonical_standards_corpus','compile_policy_impact','load_supporting_content','standards_navigation_registry','load_router_projection','compile_coverage_definitions','load_coverage_horizon','load_repository_coverage_decisions','evaluate_analysis']: + patch(em,name,'compile.'+name) +patch(sm,'build_materials','compile.build_materials');patch(nm,'load_indexes','compile.load_indexes') +patch(em._GitRevisionSource,'read_bytes','git.read_bytes');patch(gm.GitRepository,'read_file','git.read_file');patch(gm.GitRepository,'_object','git.object');patch(gm,'git_output','git.command') +for name in ['load_content','maintain','publish_aggregate']: + patch(SnapshotModule,name,'snapshot.'+name) +for name in ['__init__','_verify_integrity','load_content','snapshot']: + patch(SQLiteSnapshotStore,name,'sqlite.'+name) +patch(tm,'_contracts','facade.contracts') +def op(label,fn): + global stats,reads,objects,commands,current + stats={};reads=collections.Counter();objects=collections.Counter();commands=collections.Counter();current=label + print('START',label,flush=True);t=time.perf_counter();cpu=time.process_time();status='ok' + try: + value=fn() + if isinstance(value,dict) and 'reject' in str(value.get('kind')):status=value.get('code','rejected') + return value + except Exception as e:status=type(e).__name__+': '+str(e);raise + finally: + row={'operation':label,'wall_s':time.perf_counter()-t,'cpu_s':time.process_time()-cpu,'status':status,'peak_rss_kib':resource.getrusage(resource.RUSAGE_SELF).ru_maxrss,'spans':stats,'git_reads':{'count':sum(reads.values()),'unique':len(reads),'top':reads.most_common(10)},'git_objects':{'count':sum(objects.values()),'unique':len(objects)},'git_commands':dict(commands)} + log.write(json.dumps(row)+'\n');print('END',label,row['wall_s'],status,flush=True) + +def require(value,kind): + if value.get('kind')!=kind:raise RuntimeError(f'Expected {kind}: {value}') + return value + +for sample in range(a.samples): + prefix=f's{sample}.';store=out/f'store-{sample}.sqlite3' + engine=op(prefix+'engine_open_new',lambda:StandardsEngine.open_repository(r,store_path=store,purpose='authoring',execution_context=AnalysisExecutionContext(HarnessAuthorizer()))) + facade=op(prefix+'facade_construct',lambda:AgentToolFacade(engine,tm._contracts(r))) + created=op(prefix+'create_snapshot',lambda:require(facade.create_snapshot({'kind':'create-snapshot'}),'create-snapshot-result')) + snapshot=created['snapshot']['snapshot'];(out/f'snapshot-{sample}.json').write_text(json.dumps(snapshot)) + for i in range(3): + read=op(prefix+f'query_read_{i}',lambda:require(facade.query({'snapshot':snapshot,'request':{'kind':'read','target':'workflow.planning'}}),'read-result')) + policy=read['policy']['handle'] + op(prefix+'inspect_policy',lambda:facade.inspect({'handle':policy})) + op(prefix+'route_explicit',lambda:facade.route({'snapshot':snapshot,'facts':{}})) + request={'kind':'analysis-request','base_snapshot':snapshot,'proposed_snapshot':snapshot,'changes':[{'kind':'modification','accepted_ids':['workflow.planning.written-plan-applicability'],'proposed_ids':['workflow.planning.written-plan-applicability'],'scope':{'kind':'whole-artifact'}}],'semantic_proposals':[],'contract_version':6} + prepared=op(prefix+'prepare_same_snapshot',lambda:require(facade.prepare({'request':request}),'pending-result')) + submission=_disposition(c.PendingResult.from_value(prepared)).as_contract() + resolved=op(prefix+'resolve',lambda:require(facade.resolve(submission),'pending-result')) + op(prefix+'inspect_analysis',lambda:facade.inspect({'handle':resolved['handle']})) + op(prefix+'inspect_snapshot',lambda:facade.inspect({'handle':snapshot})) + capture=engine._snapshots.load_content(engine._snapshot_id(c.SnapshotHandle.from_value(snapshot))) + (out/f'capture-size-{sample}.json').write_text(json.dumps({'store_bytes':store.stat().st_size,'files':len(capture.files),'content_bytes':sum(len(f.content) for f in capture.files)})) + op(prefix+'engine_close',engine.close) + for i in range(2): + fresh=op(prefix+f'reopen_{i}',lambda:StandardsEngine.open_repository(r,store_path=store,purpose='authoring')) + fresh_facade=op(prefix+f'reopen_facade_{i}',lambda:AgentToolFacade(fresh,tm._contracts(r))) + op(prefix+f'reopened_query_{i}',lambda:require(fresh_facade.query({'snapshot':snapshot,'request':{'kind':'read','target':'workflow.planning'}}),'read-result')) + fresh.close() +if a.profile: + for owner,name,original,static in reversed(unwrap):setattr(owner,name,staticmethod(original) if static else original) + src=FrozenContentSource((str(f.path),f.content) for f in capture.files) + prof=cProfile.Profile();prof.enable();compiled=StandardsEngine._compile(src);prof.disable();prof.dump_stats(str(out/'compile.pstats')) + with (out/'compile-profile.txt').open('w') as f:pstats.Stats(prof,stream=f).strip_dirs().sort_stats('cumulative').print_stats(70) + del compiled;gc.collect();tracemalloc.start();before=tracemalloc.get_traced_memory();compiled=StandardsEngine._compile(FrozenContentSource((str(f.path),f.content) for f in capture.files));cur,peak=tracemalloc.get_traced_memory();tracemalloc.stop() + (out/'compiled-memory.json').write_text(json.dumps({'retained_tracemalloc_bytes':cur-before[0],'peak_tracemalloc_bytes':peak-before[0],'capture_bytes':sum(len(f.content) for f in capture.files),'note':'single compilation allocation increment; excludes prior imports and existing captured byte objects; not process RSS cap'},indent=2)) +print('DONE',flush=True) diff --git a/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/measurement-tools/recheck_fixture_qualification.py b/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/measurement-tools/recheck_fixture_qualification.py new file mode 100644 index 00000000..15267a40 --- /dev/null +++ b/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/measurement-tools/recheck_fixture_qualification.py @@ -0,0 +1,15 @@ +"""Repeat three fixture-branch failures with the documented disposable main checkout.""" +import json,os,subprocess,sys,time +from pathlib import Path +W=Path('/mnt/data/engine-performance');E=W/'evidence';root=W/'benchmark-checkout';repo=W/'qualified-main-checkout' +subprocess.run(['git','clone','--local','--quiet','--branch','implementation/purpose-separated-standards-engine',str(root),str(repo)],check=True) +subprocess.run(['git','-C',str(repo),'checkout','-b','main','HEAD'],check=True,stdout=subprocess.DEVNULL) +tests=[ + ('qualified_apply_topology','test_analysis.AnalysisWorkflowTest.test_apply_create_and_retire_owns_topology_and_commit'), + ('qualified_apply_cold','test_analysis.AnalysisWorkflowTest.test_apply_proposal_composes_real_verification_and_cold_readback'), + ('qualified_audit','test_coverage_publication.EngineAuditPublicationTest.test_review_verify_apply_recover_and_read_without_original_database')] +for label,test in tests: + t=time.time() + with (E/f'{label}.stdout').open('w') as out,(E/f'{label}.stderr').open('w') as err: + rc=subprocess.call([sys.executable,'-u',str(W/'harness/run_timed_suite.py'),'--repo',str(repo),'--output',str(E/f'{label}.jsonl'),'--test',test],stdout=out,stderr=err,env={**os.environ,'PYTHONDONTWRITEBYTECODE':'1'}) + (E/f'{label}.exit.json').write_text(json.dumps({'returncode':rc,'elapsed_s':time.time()-t,'test':test,'qualification':'same source SHA; disposable checkout on local main, so nested test clones create main'})) diff --git a/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/measurement-tools/run_tests.py b/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/measurement-tools/run_tests.py new file mode 100644 index 00000000..0c457dae --- /dev/null +++ b/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/measurement-tools/run_tests.py @@ -0,0 +1,31 @@ +"""External timing runner; repository tests and assertions stay unchanged.""" +import argparse, faulthandler, json, os, sys, time, unittest +from pathlib import Path +p=argparse.ArgumentParser(); p.add_argument('--repo',required=True); p.add_argument('--output',required=True); p.add_argument('--pattern',default='test*.py'); p.add_argument('--test'); a=p.parse_args() +r=Path(a.repo).resolve(); os.chdir(r); sys.path[:0]=[str(r),str(r/'tools/standards_engine/tests'),str(r/'tools/standards_verifier')] +os.environ['PYTHONPATH']=os.pathsep.join(sys.path[:3]); os.environ['PYTHONDONTWRITEBYTECODE']='1' +log=Path(a.output).open('w',buffering=1); phases={} +for method,label in [('_callSetUp','setup'),('_callTestMethod','body'),('_callTearDown','teardown')]: + original=getattr(unittest.TestCase,method) + def timed(self,*args,_fn=original,_label=label,**kwargs): + t=time.perf_counter() + try: return _fn(self,*args,**kwargs) + finally: phases.setdefault(self.id(),{})[_label]=time.perf_counter()-t + setattr(unittest.TestCase,method,timed) +class TimingResult(unittest.TextTestResult): + def startTest(self,test): + super().startTest(test); self.started=time.perf_counter(); self.cpu=time.process_time(); self.result='pass' + log.write(json.dumps({'event':'start','test':test.id(),'at':time.time()})+'\n') + print('START',test.id(),flush=True); faulthandler.dump_traceback_later(60,repeat=True) + def addError(self,*args): self.result='error'; super().addError(*args) + def addFailure(self,*args): self.result='failure'; super().addFailure(*args) + def addSkip(self,*args): self.result='skip'; super().addSkip(*args) + def stopTest(self,test): + faulthandler.cancel_dump_traceback_later(); elapsed=time.perf_counter()-self.started + record={'event':'end','test':test.id(),'wall_s':elapsed,'cpu_s':time.process_time()-self.cpu,'status':self.result,**phases.get(test.id(),{})} + log.write(json.dumps(record)+'\n'); print('END',test.id(),f'{elapsed:.3f}s',self.result,flush=True); super().stopTest(test) +faulthandler.enable() +t=time.perf_counter(); suite=unittest.defaultTestLoader.loadTestsFromName(a.test) if a.test else unittest.defaultTestLoader.discover(str(r/'tools/standards_engine/tests'),pattern=a.pattern) +result=unittest.TextTestRunner(verbosity=1,resultclass=TimingResult).run(suite) +log.write(json.dumps({'event':'summary','total_s':time.perf_counter()-t,'run':result.testsRun,'errors':len(result.errors),'failures':len(result.failures),'skips':len(result.skipped)})+'\n') +sys.exit(not result.wasSuccessful()) diff --git a/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/measurement-tools/run_timed_suite.py b/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/measurement-tools/run_timed_suite.py new file mode 100644 index 00000000..2e0640bc --- /dev/null +++ b/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/measurement-tools/run_timed_suite.py @@ -0,0 +1,64 @@ +"""External observation only. Repository assertions and production behavior remain intact.""" +from __future__ import annotations +import argparse,collections,functools,json,os,sys,threading,time,traceback,unittest +from pathlib import Path +p=argparse.ArgumentParser();p.add_argument('--repo',required=True);p.add_argument('--output',required=True);p.add_argument('--pattern',default='test*.py');p.add_argument('--test');p.add_argument('--exclude');a=p.parse_args() +r=Path(a.repo).resolve();os.chdir(r);sys.path[:0]=[str(r),str(r/'tools/standards_engine/tests'),str(r/'tools/standards_verifier')];os.environ['PYTHONPATH']=os.pathsep.join(sys.path[:3]);os.environ['PYTHONDONTWRITEBYTECODE']='1' +f=Path(a.output).open('w',buffering=1);start=time.perf_counter();phase={};counts={};main_thread=threading.get_ident();active={'test':'collection/fixture','start':time.perf_counter()};finished=threading.Event() +def emit(value):f.write(json.dumps(value)+'\n') +def monitor(): + while not finished.wait(45): + frame=sys._current_frames().get(main_thread) + emit({'event':'observation','test':active['test'],'elapsed_s':time.perf_counter()-active['start'],'stack':traceback.format_stack(frame) if frame else []}) +threading.Thread(target=monitor,daemon=True).start() +from tools.standards_engine.standards_engine import StandardsEngine +from tools.standards_engine.standards_engine import engine as em +from tools.standards_engine.standards_engine.authoring import AuthoringModule +from tools.standards_snapshots.standards_snapshots.module import SnapshotModule +from tools.standards_engine.standards_engine import tools as tm + +def patch(owner,name,static=False): + original=getattr(owner,name);label=owner.__name__+'.'+name + @functools.wraps(original) + def observe(*args,**kwargs): + t=time.perf_counter() + try:return original(*args,**kwargs) + finally: + s=counts.setdefault(label,{'calls':0,'inclusive_s':0.});s['calls']+=1;s['inclusive_s']+=time.perf_counter()-t + setattr(owner,name,staticmethod(observe) if static else observe) +for n in ['_compiled_snapshot','_proposal_projection','_validate_projected_inputs','_evaluate','prepare','resolve','propose','revise','analyze_proposal','query_proposal','review_proposal','apply_proposal','verify_proposal']: + patch(StandardsEngine,n) +patch(StandardsEngine,'_compile',True);patch(SnapshotModule,'_content_id',True);patch(SnapshotModule,'load_content');patch(AuthoringModule,'read_revision');patch(tm,'_contracts') +for method,label in [('_callSetUp','setup_s'),('_callTestMethod','body_s'),('_callTearDown','teardown_s')]: + original=getattr(unittest.TestCase,method) + def timed(self,*args,_fn=original,_label=label,**kwargs): + t=time.perf_counter() + try:return _fn(self,*args,**kwargs) + finally:phase.setdefault(self.id(),{})[_label]=time.perf_counter()-t + setattr(unittest.TestCase,method,timed) +class Result(unittest.TextTestResult): + def startTest(self,test): + global counts + counts={};super().startTest(test);self.started=time.perf_counter();self.cpu=time.process_time();self.result='pass';active.update(test=test.id(),start=self.started) + emit({'event':'start','test':test.id(),'at':time.time()});print('START',test.id(),flush=True) + def addError(self,*args):self.result='error';super().addError(*args) + def addFailure(self,*args):self.result='failure';super().addFailure(*args) + def addSkip(self,*args):self.result='skip';super().addSkip(*args) + def stopTest(self,test): + row={'event':'end','test':test.id(),'wall_s':time.perf_counter()-self.started,'cpu_s':time.process_time()-self.cpu,'status':self.result,'spans':counts,**phase.get(test.id(),{})} + emit(row);print('END',test.id(),round(row['wall_s'],3),self.result,flush=True);super().stopTest(test);active.update(test='between-test/fixture',start=time.perf_counter()) +excluded=set(json.loads(Path(a.exclude).read_text())) if a.exclude else set() +def leaves(suite): + for v in suite: + if isinstance(v,unittest.TestSuite):yield from leaves(v) + else:yield v +suite=unittest.defaultTestLoader.loadTestsFromName(a.test) if a.test else unittest.defaultTestLoader.discover(str(r/'tools/standards_engine/tests'),pattern=a.pattern) +suite=unittest.TestSuite(v for v in leaves(suite) if v.id() not in excluded) +try: + result=unittest.TextTestRunner(verbosity=1,resultclass=Result).run(suite) + emit({'event':'summary','total_s':time.perf_counter()-start,'run':result.testsRun,'errors':len(result.errors),'failures':len(result.failures),'skips':len(result.skipped)}) + code=int(not result.wasSuccessful()) +except BaseException: + emit({'event':'runner-exception','traceback':traceback.format_exc()});code=2 +finally:finished.set() +sys.exit(code) diff --git a/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/measurement-tools/schedule_tests.py b/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/measurement-tools/schedule_tests.py new file mode 100644 index 00000000..e3b12e53 --- /dev/null +++ b/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/measurement-tools/schedule_tests.py @@ -0,0 +1,25 @@ +import concurrent.futures,json,os,subprocess,sys,time +from pathlib import Path +W=Path('/mnt/data/engine-performance'); E=W/'evidence'; H=W/'harness';root=W/'benchmark-checkout';env={**os.environ,'PYTHONDONTWRITEBYTECODE':'1'} +pid=int((E/'operations.pid').read_text()) +while Path(f'/proc/{pid}/stat').exists() and Path(f'/proc/{pid}/stat').read_text().split()[2]!='Z':time.sleep(2) +slow='test_agent_workflow.AgentWorkflowTest.test_normative_proposal_stops_at_real_pending_work' +def run(label,args,repo): + t=time.time() + with (E/f'{label}.stdout').open('w') as out,(E/f'{label}.stderr').open('w') as err: + code=subprocess.call([sys.executable,'-u',str(H/'run_timed_suite.py'),'--repo',str(repo),'--output',str(E/f'{label}.jsonl'),*args],stdout=out,stderr=err,env=env) + (E/f'{label}.exit.json').write_text(json.dumps({'returncode':code,'elapsed_s':time.time()-t,'args':args})) + return code +run('slow-case-isolated',['--test',slow],root) +excluded=json.loads((E/'completed-original.json').read_text());excluded.append(slow);(E/'completed-for-parallel.json').write_text(json.dumps(excluded)) +patterns=[p.name for p in (root/'tools/standards_engine/tests').glob('test*.py') if p.name!='test_agent_navigation.py'] +patterns.sort(key=lambda v:({'test_analysis.py':0,'test_navigation_indexes.py':1,'test_logical_authoring.py':2,'test_supporting_workflow.py':3}.get(v,4),v)) +def module(pattern): + label=pattern[:-3];repo=W/'module-checkouts'/label + repo.parent.mkdir(exist_ok=True) + subprocess.run(['git','clone','--local','--quiet','--branch','implementation/purpose-separated-standards-engine',str(root),str(repo)],check=True) + subprocess.run(['git','-C',str(repo),'branch','main','HEAD'],check=True) + return run(label,['--pattern',pattern,'--exclude',str(E/'completed-for-parallel.json')],repo) +with concurrent.futures.ThreadPoolExecutor(max_workers=3) as ex: + results=dict(zip(patterns,ex.map(module,patterns))) +(E/'parallel-summary.json').write_text(json.dumps(results,indent=2)) diff --git a/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/measurement-tools/summarize_evidence.py b/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/measurement-tools/summarize_evidence.py new file mode 100644 index 00000000..9437ac75 --- /dev/null +++ b/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/measurement-tools/summarize_evidence.py @@ -0,0 +1,197 @@ +"""Summarize measured artifacts without treating partial/failed cases as acceptance.""" +from pathlib import Path +import csv,json,statistics,subprocess,time +W=Path('/mnt/data/engine-performance');E=W/'evidence';D=Path('/mnt/data/standards-engine-performance-report');D.mkdir(exist_ok=True) +def lines(path): + result=[] + for line in path.read_text().splitlines(): + try: result.append(json.loads(line)) + except json.JSONDecodeError: pass + return result +ops=lines(E/'operations/operations.jsonl') +def group(name): + return [r for r in ops if r['operation'].split('.',1)[1]==name] +def fmt(values):return (statistics.median(values),min(values),max(values)) +# Individual repeated read/reopen entries remain in CSV; aggregate summary names their n. +with (D/'operation-baseline.csv').open('w',newline='') as f: + w=csv.writer(f);w.writerow(['operation','n','median_wall_s','min_wall_s','max_wall_s','median_cpu_s','execution_scope']) + for name in dict.fromkeys(r['operation'].split('.',1)[1] for r in ops): + rs=group(name);w.writerow([name,len(rs),*fmt([r['wall_s'] for r in rs]),statistics.median(r['cpu_s'] for r in rs),'isolated serial; three sweeps; same Python process except Engine/facade reopen']) +observations=[] +for path in sorted(E.glob('*.jsonl')): + if not (path.name.startswith(('test_','qualified_')) or path.name in {'per-test-full.jsonl','slow-case-isolated.jsonl'}):continue + lane=('isolated serial initial partial run' if path.name=='per-test-full.jsonl' else 'isolated serial slow-case reproduction' if path.name=='slow-case-isolated.jsonl' else 'disposable-main fixture qualification rerun; concurrent campaign' if path.name.startswith('qualified_') else 'isolated stores/checkouts; concurrent module campaign') + for row in lines(path): + if row.get('event')=='end':observations.append({**row,'lane':lane,'source_log':path.name}) +with (D/'per-test-baseline.csv').open('w',newline='') as f: + fields=['test','status','wall_s','cpu_s','setup_s','body_s','teardown_s','lane','source_log','content_id_calls','content_id_inclusive_s','compile_calls','compile_inclusive_s','proposal_projection_calls'] + w=csv.DictWriter(f,fieldnames=fields);w.writeheader() + for row in observations: + spans=row.get('spans',{});get=lambda name,key:spans.get(name,{}).get(key,'') + out={key:row.get(key,'') for key in fields};out.update(content_id_calls=get('SnapshotModule._content_id','calls'),content_id_inclusive_s=get('SnapshotModule._content_id','inclusive_s'),compile_calls=get('StandardsEngine._compile','calls'),compile_inclusive_s=get('StandardsEngine._compile','inclusive_s'),proposal_projection_calls=get('StandardsEngine._proposal_projection','calls'));w.writerow(out) +latest={} +# Prefer completed fixture-qualified reruns for the consolidated disposition, while retaining every attempt. +for row in observations: + prev=latest.get(row['test']) + if prev is None or row['source_log'].startswith('qualified_'):latest[row['test']]=row +counts={s:sum(r['status']==s for r in latest.values()) for s in ['pass','skip','error','failure']} +summary={'observed_distinct_tests':len(latest),'attempts':len(observations),'consolidated_statuses':counts,'per_test_is_not_one_serial_suite_run':True,'scheduler_complete':(E/'parallel-summary.json').exists(),'followup_complete':(E/'followup/measurements.json').exists(),'longest_completed':[{k:r.get(k) for k in ['test','wall_s','cpu_s','status','lane','source_log']} for r in sorted(latest.values(),key=lambda r:r['wall_s'],reverse=True)[:15]],'failures':[{k:r.get(k) for k in ['test','status','source_log','wall_s']} for r in latest.values() if r['status'] in {'failure','error'}]} +(D/'baseline-summary.json').write_text(json.dumps(summary,indent=2)) +body='''# Standards Engine performance evidence + +**Revision:** `8750761133b66297a2bfac4e495fd1c8a893b96a` +**Branch examined:** `implementation/purpose-separated-standards-engine` +**Date:** 2026-09-23 +**Status:** supporting measurements and design evidence, not installed acceptance or an optimized-candidate result. + +## What was and was not accessed + +The requested `/media/jeremy/.../Coding-Standards` path is not mounted in this environment. The remote branch was read through the GitHub connector; the exact published revision was reconstructed with Git CLI from the supplied full source bundle and incremental implementation bundle. The source reconstruction retains original local `main` at `366c1d9`. A disposable benchmark clone places the candidate on its own local `main`, following the documented pre-merge qualification procedure. None of these operations changes the user's repository, Codex configuration, or installed/archived store. + +All instrumentation resides outside the source tree. Wrappers record elapsed time, CPU time and call counts and then invoke the original functions. No candidate optimization, rewritten source function, weakened assertion, skipped integrity gate, altered lockfile, or normative-content change was used. Tests that intentionally create/edit synthetic repositories continue doing so in their own temporary directories. + +## Evidence classes and environment + +| Class | What it establishes | +| --- | --- | +| User-reported | 32.5-second representative platform test, 11.5-second capture, roughly 10-second analysis sequence and 1.7-second calls; 4.6 MB store. Not independently reproduced on the user's machine. | +| Local operation measurement | Three isolated serial sweeps on the exact published source; operation timing and internal inclusive spans. | +| Local test measurement | Individual unmodified Engine tests with wall/CPU/phase timing and Python stack samples; split runs and concurrency are identified per row. | +| External CI record | Existing Python 3.12 locked-environment run for this SHA; not a newly executed run. | +| Profile / memory diagnostic | Mechanism attribution and retained-allocation estimate; profiling overhead is not the unprofiled latency baseline. | +| Cost model / target | Hypothetical savings and proposed budgets in the design, explicitly not measured candidate performance. | + +The local environment is CPython 3.13.5, Linux 6.18.44, AMD EPYC 9V74, five visible logical CPUs with a four-CPU cgroup quota, approximately 6.24 GB available container memory allocation, no swap, and overlay-backed `/mnt/data` and `/tmp`. Git is 2.47.3. This is outside the project's supported Python 3.11/3.12 range. Installed `jsonschema` 4.26.0, `referencing` 0.37.0, `attrs` 26.1.0 and `jsonschema-specifications` 2025.9.1 match the inspected lock; installed `rpds-py` 2026.5.1 differs from pinned 2026.6.3. No claim of exact locked-environment acceptance is made. + +The machine's filesystem page cache was not forcibly cleared. “Fresh process” below means a new interpreter or MCP process, not cold physical storage. The three operation sweeps were isolated from the test campaign; later per-module tests used separate checkouts/stores concurrently. Concurrency can inflate those per-test wall times and they are not serial production latency percentiles. Parent `process_time` excludes child-process CPU. + +## Per-operation baseline + +Raw observations are in `evidence/operations/operations.jsonl`; [operation-baseline.csv](operation-baseline.csv) contains individual operation-group medians and ranges. The following table combines repeated reads where appropriate. + +| Operation | Samples | Median seconds | Minimum–maximum seconds | +| --- | ---: | ---: | ---: | +''' +selected=[('Engine open, new store',group('engine_open_new')),('Facade/interface construction',group('facade_construct')),('Create snapshot',group('create_snapshot')),('Explicit policy read',[r for r in ops if '.query_read_' in r['operation']]),('Policy inspection',group('inspect_policy')),('Route with explicit snapshot',group('route_explicit')),('Prepare, same snapshot in both roles',group('prepare_same_snapshot')),('Resolve submission',group('resolve')),('Analysis inspection',group('inspect_analysis')),('Snapshot inspection',group('inspect_snapshot')),('Reopen existing store',[r for r in ops if r['operation'].split('.',1)[1] in ['reopen_0','reopen_1']]),('Read after Engine reopen',[r for r in ops if '.reopened_query_' in r['operation']])] +for label,rs in selected: + med,lo,hi=fmt([r['wall_s'] for r in rs]);body+=f'| {label} | {len(rs)} | {med:.4f} | {lo:.4f}–{hi:.4f} |\n' +body+=''' +The operation workload uses an authoring Engine and explicit snapshot IDs. Preparation supplies the same snapshot as both accepted and proposed material, then exercises an existing test-authorizer evidence disposition. The external benchmark submits **current Analysis request version 6**. It is a valid current-contract benchmark, not a claim that the unchanged repository platform round-trip test passes. + +Each captured corpus contains **434 files and 3,708,028 raw bytes**. The temporary database is **4,558,848 bytes** (1,113 × 4,096-byte pages). No archived 240 MB database participates. The aggregate read median is descriptive for nine reads across three sweeps; this sample is too small to establish a reliable p95/p99. + +### Read and analysis attribution + +A representative read is approximately 2.9 seconds: approximately 0.011 seconds in SQLite content loading, 2.54 seconds in the loading layer's content-identity work, and 0.32 seconds in full compilation. The direct long-test instrumentation independently times `SnapshotModule._content_id`, confirming that attribution. Removing only compilation would therefore retain approximately 89% of current read cost. + +Same-snapshot `prepare` loads/verifies/compiles that snapshot **twice**; its median is 5.994 seconds. `resolve` evaluates pre- and post-submission states and loads/verifies/compiles the same material **four** times; its median is 12.120 seconds. The pure analysis evaluations themselves total approximately 0.047 seconds in the representative resolve. Keeping those two evaluations is necessary; reconstructing their unchanged inputs four times is the optimization opportunity. + +Analysis inspection is approximately 0.006 seconds and snapshot inspection approximately 0.0006 seconds. A generic statement that every inspection is slow would be inaccurate: policy-child inspection takes the compiled-snapshot path, while these simpler inspections do not. + +### Capture attribution + +The representative capture has **1,137 Git-backed source reads for 434 distinct paths**, expanding to **6,134 object requests for 524 distinct repository/OID/type combinations**. There are 6,135 Git commands including the accepted-branch resolution. `_object` starts one `git cat-file --batch` process per requested object; it does not retain a batch process between requests. + +The median Git-command span is approximately 11.34 seconds. First full compilation over Git-backed recording takes approximately 12.24 seconds. The required second fresh compilation over frozen content takes approximately 0.315 seconds. Remaining capture time includes exact content-ID generation and SQLite publication. These are nested spans: first-compilation time already includes the Git spans. + +Thus the intentional second compile is not the dominant 11.5–15-second capture cost. Repeated commit/tree/blob retrieval and process setup account for most observed capture latency. The count ratio suggests 91.5% duplicate object fetches, but unique-object timing has not been isolated; the projected capture speedup remains a cost model. + +## Long-case identification + +The isolated test `test_agent_workflow.AgentWorkflowTest.test_normative_proposal_stops_at_real_pending_work` completed successfully with: + +| Observation | Measured value | +| --- | ---: | +| Test body wall time | 119.854 seconds | +| Test parent-process CPU | 116.387 seconds | +| Entire one-test runner, including class setup/import work | 137.863 seconds | +| Content identity calls | 32 | +| Content identity inclusive time | 86.127 seconds | +| Full compiles | 52 | +| Compilation inclusive time | 18.528 seconds | +| Proposal projections | 21 | +| Projected-input validation calls | 10 | +| Resolve operations | 3 | + +Identity accounts for about 71.9% and compilation about 15.5% of the body. Proposal-projection spans include those costs and are not additive. All three in-body stack samples (approximately 27, 72 and 117 seconds) were inside identity integer/byte encoding. The last sample traces `resolve_workflow → resolve → _evaluate → _validate_projected_inputs → _proposal_projection → load_content → _content_id`. + +This identifies a reproducible roughly two-minute **case**, including a late duplicate projection, and shows that it is doing CPU work rather than waiting on a SQLite lock. The user's original unnamed two-minute case cannot be conclusively matched to this test. Other long cases are listed below; the original terminal output/test ID would be needed to identify which one the user saw. + +## Per-test campaign and qualifications + +''' +body+=f"The consolidated campaign currently records **{len(latest)} distinct completed tests**, with {counts['pass']} passing, {counts['skip']} skipped, {counts['error']} errors and {counts['failure']} failures across split runs. There are {len(observations)} recorded attempts, including qualification reruns. These are per-test observations, not a claim of one clean serial full-suite run. The full table is [per-test-baseline.csv](per-test-baseline.csv).\n\n" +body+='''The initial serial diagnostic run completed 13 tests and then ended while emitting a native `faulthandler` diagnostic during the next test. Its exit cause was not captured; cgroup OOM/pid-exhaustion counters did not identify a cause. This is not classified as a production crash or as the user's original incident. The continuation used a non-terminating Python-thread stack sampler instead, and the suspected slow test was rerun in isolation. + +The remaining cases ran in isolated module checkouts/stores with up to three module processes. A separate one-process fixture-qualification rerun overlapped part of that campaign, making the maximum four test runners. The source revision and file bytes remained the same. Class-fixture costs and imports are included in each runner summary, outside individual test-body timing; sums of test rows are not a serial suite elapsed time. + +Four initial cases using nested repository clones failed because nested `git clone` copied the checked-out feature branch but did not create its own local `main`. The parent benchmark clone did have candidate-local `main`. This is a fixture/checkout precondition, distinct from the Engine's correct accepted-main lookup. Those cases are rerun with an otherwise identical disposable source clone **checked out on local `main`**, so nested clones meet their assumed precondition. All failed attempts remain in the raw evidence and CSV. + +### Longest completed case observations + +| Test | Seconds | CPU seconds | Result | Scope | +| --- | ---: | ---: | --- | --- | +''' +for r in sorted(latest.values(),key=lambda r:r['wall_s'],reverse=True)[:10]: + body+=f"| `{r['test']}` | {r['wall_s']:.3f} | {r.get('cpu_s',0):.3f} | {r['status']} | {r['lane']} |\n" +body+=''' +### Existing CI record, separate environment + +The existing GitHub Actions job **107298850681**, run **35895666852**, used this exact SHA with Python 3.12 and the complete hash-pinned dependency installation, including `rpds-py` 2026.6.3. Its log reports: + +| Suite | Tests | Seconds | Result | +| --- | ---: | ---: | --- | +| Metadata | 31 | 0.350 | OK | +| Policy impact | 10 | 0.431 | OK | +| Contracts | 23 | 26.270 | OK | +| Analysis domain | 100 | 1.413 | OK | +| Verifier | 156 | 5.491 | OK | +| Engine | 157 | 2,946.090 | One error | + +The Engine run took **49.10 minutes**. Its dots are buffered and supply no per-test times, so they cannot identify a two-minute case. The one error is `test_closed_store_round_trip_uses_public_operations`: `platform_harness.py` constructs Analysis request version 5 while the supported interface requires version 6. Preparation returns `INTERFACE.INVALID_ARGUMENTS`; the subsequent final structural command was not reached because the workflow uses fail-fast shell execution. This is a caller-conformance issue, not evidence that accepting version 5 would be an optimization. + +The CI execution is independently useful because it demonstrates a long complete Engine run in the supported locked environment. It is not numerically interchangeable with this container's interpreter, hardware, resource limits, concurrency or per-test instrumentation. + +Primary run: https://github.com/MrScripty/Coding-Standards/actions/runs/35895666852 +Job: https://github.com/MrScripty/Coding-Standards/actions/runs/35895666852/job/107298850681 + +## Additional slow paths + +The coordinated supporting-content publication test completed in **839.065 seconds** during the concurrent campaign (617.979 seconds parent CPU), with **130 content-ID computations**, **278 compiles**, and **71 proposal projections**. Its identity span total was 380.130 seconds and its compilation span total 272.510 seconds. The compilation figure also includes Git-backed captures, so it cannot be read as 272 seconds of pure compiler CPU. This test deliberately crosses multiple captures, reviews, publication and historical-read boundaries. Its total counts are amplification evidence, not authority to eliminate all those checks or to promise a proportional whole-suite speedup. + +The evidence-maintenance preview/overlap/apply test took **170.094 seconds** but only 27.812 seconds of parent CPU. Samples at approximately 43 and 133 seconds were inside per-file Git object subprocess work; a sample at approximately 88 seconds was waiting for a required Python package-verification child process. This is a distinct slow path, not evidence of a database deadlock. Capture-only caching would not accelerate its bulk revision read unless the bounded verified Git reader is reused there as well. The required verifier execution remains intact. + +## Profiler and memory observations + +A compiler-only `cProfile` observation records about 6.25 million calls and 1.467 seconds of profiled execution, versus about 0.32 seconds in the unprofiled operation baseline. Its cumulative hot path is coverage/suite-input identity generation, including approximately 68,954 `_encode_string` calls and 2.46 million `ord` calls. The profiler's timings include instrumentation overhead and are used for attribution, not latency targets. + +A one-compilation `tracemalloc` observation records 3,649,110 additional retained bytes and 3,985,733 peak additional bytes. It excludes imports and the existing captured byte objects. Adding 3,708,028 raw capture bytes gives about 7.36 MB of representative retained material, supporting a two-entry cache design investigation, not proving a universal bound. Baseline process peak RSS includes other imports and identity-encoding temporaries; it must not be represented as cache size. + +''' +follow=E/'followup/measurements.json' +if follow.exists(): + rows=json.loads(follow.read_text());body+='''### Additional isolated identity and transport observations + +These runs begin after both test controllers finish, with no concurrent test runners. Fresh CLI and MCP calls use a consistent closed-store copy and current explicit snapshot. The hand-driven MCP test exercises actual stdio initialization, tool listing and calls, not the official SDK or configured Codex client. + +| Observation | Seconds | Interpretation | +| --- | ---: | --- | +''' + for row in rows: + body+=f"| `{row['operation']}` | {row['wall_s']:.4f} | {'Mechanism-only; not a replacement hash contract' if row['operation'].startswith('sha256_') else 'Existing implementation'} |\n" +else:body+='Additional isolated identity and transport measurements are pending in the live working report. Final delivery requires their explicit measured or unavailable disposition.\n' +body+=''' +## Conclusions supported by measurement + +The dominant repeated-read cost is exact content-ID serialization/rehashing, rather than SQLite I/O. The dominant capture cost is repeated verified Git-object subprocess work. Repeated immutable material/projection derivation amplifies both mechanisms in authoring workflows. The fixed frozen replay pass is small relative to current Git-backed capture and remains necessary. A compiled cache alone has much less benefit than the phrase “recompile each call” suggests. + +The archived 240 MB store, a deadlock, a 30/60/120-second timeout, network delay, or a specific Python-version regression has not been established as the cause of the user's original pause. The observed slow case is CPU-bound. SQLite write contention, large-store integrity-check growth, filesystem-cold behavior, a larger-than-budget cache population, optimized-candidate performance and configured-client behavior remain separate unmeasured claims. + +## Reproduction and source integrity + +See [README.md](README.md) for the isolated-checkout procedure and measurement commands. External harnesses are supplied under `measurement-tools/`. They measure the existing implementation; they are not proposed production code. All operation and test raw records retain status and scope. Supported-environment acceptance requires rerunning with the declared Python interpreter, exact lock and the actual required client. + +Source integrity and branch/head observations are recorded in `evidence/source-integrity.json`. The design report is [design.md](design.md). No runtime optimization, standards edit, commit, remote push or PR is part of this task. +''' +(D/'evidence.md').write_text(body) +print(json.dumps(summary,indent=2)) diff --git a/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/operation-baseline.csv b/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/operation-baseline.csv new file mode 100644 index 00000000..a8824ea0 --- /dev/null +++ b/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/operation-baseline.csv @@ -0,0 +1,20 @@ +operation,n,median_wall_s,min_wall_s,max_wall_s,median_cpu_s,execution_scope +engine_open_new,3,0.0027411379999762175,0.0018422809999947276,0.0036471070000061445,0.0027405539999989514,isolated serial; three sweeps; same Python process except Engine/facade reopen +facade_construct,3,0.28479900199999975,0.26844384000003174,0.2879713190000075,0.28477422699999977,isolated serial; three sweeps; same Python process except Engine/facade reopen +create_snapshot,3,15.233948413999997,14.999295378999989,16.264606757999957,7.102598803,isolated serial; three sweeps; same Python process except Engine/facade reopen +query_read_0,3,2.8882569200000034,2.851386198,3.0195219510000015,2.8849322369999992,isolated serial; three sweeps; same Python process except Engine/facade reopen +query_read_1,3,2.9156205319999913,2.853243651000014,3.0369377220000047,2.913406662,isolated serial; three sweeps; same Python process except Engine/facade reopen +query_read_2,3,2.9356448479999813,2.8843864529999905,2.9450300379999703,2.9350780249999993,isolated serial; three sweeps; same Python process except Engine/facade reopen +inspect_policy,3,2.902790402999983,2.867906268000013,2.939388970999971,2.902447487999993,isolated serial; three sweeps; same Python process except Engine/facade reopen +route_explicit,3,3.19512152599998,3.057167095000011,3.29525634700002,3.193528937,isolated serial; three sweeps; same Python process except Engine/facade reopen +prepare_same_snapshot,3,5.993509637000045,5.847683467000024,6.320639734999986,5.984644828,isolated serial; three sweeps; same Python process except Engine/facade reopen +resolve,3,12.120287040999983,11.562000888,12.743021826000017,12.10947603999999,isolated serial; three sweeps; same Python process except Engine/facade reopen +inspect_analysis,3,0.005975886999976865,0.00572523200003161,0.0060321509999994305,0.005976785000001428,isolated serial; three sweeps; same Python process except Engine/facade reopen +inspect_snapshot,3,0.0005627439999784656,0.0005613210000205981,0.000584817000003568,0.0005629659999968339,isolated serial; three sweeps; same Python process except Engine/facade reopen +engine_close,3,0.0004285219999928813,0.0003741510000168091,0.0004450470000278983,0.00042585300000297366,isolated serial; three sweeps; same Python process except Engine/facade reopen +reopen_0,3,0.004172403000040958,0.0040474560000234305,0.005199347999962356,0.0041745460000015555,isolated serial; three sweeps; same Python process except Engine/facade reopen +reopen_facade_0,3,0.27311807900002805,0.2647701589999656,0.3026405969999928,0.27287609100000054,isolated serial; three sweeps; same Python process except Engine/facade reopen +reopened_query_0,3,3.0625665750000053,2.841536691999977,3.078581342999996,3.059746089000001,isolated serial; three sweeps; same Python process except Engine/facade reopen +reopen_1,3,0.004871230999981435,0.004645824000022003,0.005793843999981618,0.004871661999999333,isolated serial; three sweeps; same Python process except Engine/facade reopen +reopen_facade_1,3,0.27991140300002826,0.26397920400000885,0.3117306949999943,0.27973826100000565,isolated serial; three sweeps; same Python process except Engine/facade reopen +reopened_query_1,3,3.010045933000015,2.861938054999996,3.0525170559999992,3.0062666049999933,isolated serial; three sweeps; same Python process except Engine/facade reopen diff --git a/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/per-test-baseline.csv b/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/per-test-baseline.csv new file mode 100644 index 00000000..1346a305 --- /dev/null +++ b/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/per-test-baseline.csv @@ -0,0 +1,162 @@ +test,status,wall_s,cpu_s,setup_s,body_s,teardown_s,lane,source_log,content_id_calls,content_id_inclusive_s,compile_calls,compile_inclusive_s,proposal_projection_calls +test_agent_navigation.AgentNavigationTest.test_boolean_nullable_set_facts_aliases_and_multiple_causes,pass,2.9496500130000243,2.9494568050000005,,,,isolated serial initial partial run,per-test-full.jsonl,,,,, +test_agent_navigation.AgentNavigationTest.test_capture_rejection_never_advances_to_query,pass,0.0006009409999876425,0.0006080040000000508,,,,isolated serial initial partial run,per-test-full.jsonl,,,,, +test_agent_navigation.AgentNavigationTest.test_compact_read_preserves_text_authority_and_full_detail,pass,6.200310903999991,6.197799321999998,,,,isolated serial initial partial run,per-test-full.jsonl,,,,, +test_agent_navigation.AgentNavigationTest.test_complete_explicit_facts_select_reviewed_modules,pass,5.937602570999985,5.928279748000001,,,,isolated serial initial partial run,per-test-full.jsonl,,,,, +test_agent_navigation.AgentNavigationTest.test_focused_read_continuations_are_callable_against_exact_snapshot,pass,8.897187876999993,8.876132591000001,,,,isolated serial initial partial run,per-test-full.jsonl,,,,, +test_agent_navigation.AgentNavigationTest.test_invalid_inputs_cannot_create_snapshot,pass,0.0007238450000102148,0.0007459150000030945,,,,isolated serial initial partial run,per-test-full.jsonl,,,,, +test_agent_navigation.AgentNavigationTest.test_invalid_routing_values_do_not_become_negative_facts,pass,5.772085035999993,5.767504948000003,,,,isolated serial initial partial run,per-test-full.jsonl,,,,, +test_agent_navigation.AgentNavigationTest.test_optional_capture_matches_explicit_route_and_preserves_unresolved,pass,23.507506769999992,13.729722799000001,,,,isolated serial initial partial run,per-test-full.jsonl,,,,, +test_agent_navigation.AgentNavigationTest.test_related_matches_native_permissions_and_projection,pass,11.623151938000007,11.604851077,,,,isolated serial initial partial run,per-test-full.jsonl,,,,, +test_agent_navigation.AgentNavigationTest.test_supplied_snapshot_never_captures_ambient_authority,pass,5.657629449999973,5.656173559999999,,,,isolated serial initial partial run,per-test-full.jsonl,,,,, +test_agent_navigation.AgentNavigationTest.test_vocabulary_matches_router_and_questions_are_typed,pass,9.504238713000007,9.497467037999996,,,,isolated serial initial partial run,per-test-full.jsonl,,,,, +test_agent_workflow.AgentWorkflowTest.test_analysis_rejection_retains_the_created_revision,pass,6.59389038499998,6.462765582000003,,,,isolated serial initial partial run,per-test-full.jsonl,,,,, +test_agent_workflow.AgentWorkflowTest.test_context_is_immutable_existing_identity_and_foreign_records_reject,pass,17.459513432999984,16.912731050999994,,,,isolated serial initial partial run,per-test-full.jsonl,,,,, +test_analysis.AnalysisWorkflowTest.test_apply_proposal_composes_real_verification_and_cold_readback,pass,105.71184679599992,37.010024707,1.8619998627400491e-06,105.71163771200008,2.6640000214683823e-06,disposable-main fixture qualification rerun; concurrent campaign,qualified_apply_cold.jsonl,8,21.3227173759999,9,17.45353602000023,3 +test_analysis.AnalysisWorkflowTest.test_apply_create_and_retire_owns_topology_and_commit,pass,179.66984623599978,72.619611824,2.003000190597959e-06,179.6696084900002,1.8729999737843173e-06,disposable-main fixture qualification rerun; concurrent campaign,qualified_apply_topology.jsonl,13,39.34830152800055,22,60.19399182300049,4 +test_coverage_publication.EngineAuditPublicationTest.test_review_verify_apply_recover_and_read_without_original_database,pass,264.38809278099984,153.307691122,1.531999942017137e-06,264.38789522499997,2.213000016126898e-06,disposable-main fixture qualification rerun; concurrent campaign,qualified_audit.jsonl,34,90.25317664300019,71,51.16307631400059,19 +test_navigation.NavigationTest.test_live_worktree_mutation_cannot_change_snapshot_reads,pass,23.633109572999956,13.941604526,1.8529999579186551e-06,23.632916239999986,1.8119999367627315e-06,disposable-main fixture qualification rerun; concurrent campaign,qualified_navigation.jsonl,3,8.228993120999576,4,15.057444212000291, +test_agent_workflow.AgentWorkflowTest.test_normative_proposal_stops_at_real_pending_work,pass,119.85453770599997,116.38708710799999,1.962999988336378e-06,119.85423706600005,2.2429999262385536e-06,isolated serial slow-case reproduction,slow-case-isolated.jsonl,32,86.12665090599961,52,18.528486693000218,21 +test_agent_workflow.AgentWorkflowTest.test_reference_proposal_composes_analysis_without_review_or_application,pass,45.97590149400003,43.901939248000005,1.871999984359718e-06,45.97562611100011,2.744000084931031e-06,isolated stores/checkouts; concurrent module campaign,test_agent_workflow.jsonl,11,33.97026146700023,17,6.515670991000434,7 +test_agent_workflow.AgentWorkflowTest.test_review_is_explicit_and_current_authorization_is_required,pass,73.57862857499981,70.58365419900001,1.6429999050160404e-06,73.57850147400018,1.7029999526130268e-06,isolated stores/checkouts; concurrent module campaign,test_agent_workflow.jsonl,17,51.31874723599958,27,10.972948618000828,11 +test_agent_workflow.AgentWorkflowTest.test_revision_advancement_does_not_retarget_old_context,pass,106.61506452999993,100.177395083,9.009997938846936e-07,106.61478518099989,1.9130000055156415e-06,isolated stores/checkouts; concurrent module campaign,test_agent_workflow.jsonl,24,72.5159207620004,39,15.38517748999925,16 +test_analysis.AnalysisWorkflowTest.test_apply_create_and_retire_owns_topology_and_commit,error,0.9364845249999689,0.43081531600000034,1.662000045143941e-06,0.9345013919999019,3.1050000188770355e-06,isolated stores/checkouts; concurrent module campaign,test_analysis.jsonl,,,,, +test_analysis.AnalysisWorkflowTest.test_apply_proposal_composes_real_verification_and_cold_readback,error,0.8477959949999558,0.5127326119999989,1.5120000398383127e-06,0.8468919189999724,2.2629999421042157e-06,isolated stores/checkouts; concurrent module campaign,test_analysis.jsonl,,,,, +test_analysis.AnalysisWorkflowTest.test_cold_load_rejects_obsolete_domain_contracts,pass,0.0034634709999181723,0.003464570000000222,1.212000029227056e-06,0.003399494999939634,1.2220000371598871e-06,isolated stores/checkouts; concurrent module campaign,test_analysis.jsonl,,,,, +test_analysis.AnalysisWorkflowTest.test_coverage_exclusions_require_exact_evidence_before_resolution,pass,26.66859798200005,26.592860243,7.719999075561645e-07,26.668490080000083,1.0109999948326731e-06,isolated stores/checkouts; concurrent module campaign,test_analysis.jsonl,8,23.456208726999876,8,2.920664034999959, +test_analysis.AnalysisWorkflowTest.test_equal_transition_is_idempotent_and_different_evidence_branches,pass,48.434708839999985,48.375320581000004,1.212000029227056e-06,48.43458643500003,1.2710000873994431e-06,isolated stores/checkouts; concurrent module campaign,test_analysis.jsonl,14,42.46216013699984,14,5.414200608000215, +test_analysis.AnalysisWorkflowTest.test_policy_free_standard_creation_enters_public_analysis,pass,20.175421899999947,19.547700186,1.2419999393387116e-06,20.17533129399999,1.6430000187028782e-06,isolated stores/checkouts; concurrent module campaign,test_analysis.jsonl,5,14.811196141999972,7,2.5334486219999235,3 +test_analysis.AnalysisWorkflowTest.test_prepare_persists_parent_bound_public_work,pass,6.803947031999996,6.802693489999996,1.1309999763398082e-06,6.8038666620000186,1.1519999816300697e-06,isolated stores/checkouts; concurrent module campaign,test_analysis.jsonl,2,5.873476254000025,2,0.8496026449998908, +test_analysis.AnalysisWorkflowTest.test_prior_analysis_reuses_the_same_valid_decision,pass,32.52757305,32.436460015999984,1.1119999498987454e-06,32.52746775200001,1.7819999129642383e-06,isolated stores/checkouts; concurrent module campaign,test_analysis.jsonl,10,28.483639260000132,10,3.6635891659999515, +test_analysis.AnalysisWorkflowTest.test_proposal_analysis_derives_inputs_and_replays_exact_revision,pass,75.324488675,72.27664687999999,9.110000291912002e-07,75.32439356200007,1.1719999974957318e-06,isolated stores/checkouts; concurrent module campaign,test_analysis.jsonl,19,53.07678507199978,29,10.753459752999902,12 +test_analysis.AnalysisWorkflowTest.test_relationship_only_proposals_enter_a1c_and_replay_cold,pass,119.039640512,114.099035275,1.0410000186311663e-06,119.039542955,1.3420000186670222e-06,isolated stores/checkouts; concurrent module campaign,test_analysis.jsonl,29,83.91451419599969,47,18.273312866000424,17 +test_analysis.AnalysisWorkflowTest.test_resolved_parent_work_is_not_applicable_to_child,pass,26.149823355999956,26.14071819100002,1.08200003978709e-06,26.14972487800003,1.7529999922771822e-06,isolated stores/checkouts; concurrent module campaign,test_analysis.jsonl,8,22.95286463299999,8,2.9018825409999636, +test_analysis.AnalysisWorkflowTest.test_review_composition_publishes_readiness_for_complete_analysis,pass,124.78088032799997,120.680856882,1.102000055652752e-06,124.78079603100002,1.0520000159885967e-06,isolated stores/checkouts; concurrent module campaign,test_analysis.jsonl,31,90.54928195100047,40,16.10349661999942,17 +test_analysis.AnalysisWorkflowTest.test_snapshot_creation_rejects_changed_replay_path_closure,pass,0.014184014999955252,0.006410742000014125,1.0520000159885967e-06,0.014120560000037585,1.0620001376082655e-06,isolated stores/checkouts; concurrent module campaign,test_analysis.jsonl,,,,, +test_analysis.AnalysisWorkflowTest.test_state_and_children_are_inspectable_in_a_fresh_process,pass,22.679404170999987,20.204798887000038,6.710001798637677e-07,22.67931815199995,1.2419998256518738e-06,isolated stores/checkouts; concurrent module campaign,test_analysis.jsonl,6,17.410922324000012,6,2.5764331450002373, +test_applicability_contract.ApplicabilityContractTest.test_former_applicability_implementations_are_not_fallbacks,pass,0.0002383270000336779,0.00023688200000027138,1.5430000530614052e-06,0.0001091029998860904,1.0119999842572724e-06,isolated stores/checkouts; concurrent module campaign,test_applicability_contract.jsonl,,,,, +test_applicability_contract.ApplicabilityContractTest.test_runtime_domains_cover_the_public_serialized_applicability_shapes,pass,0.0011829229999875679,0.0011836999999998987,5.609999789157882e-07,0.001134931000024153,9.320001481682993e-07,isolated stores/checkouts; concurrent module campaign,test_applicability_contract.jsonl,,,,, +test_authoring.AuthoringTests.test_application_intent_is_current_head_guarded_and_records_applied,pass,0.08862302100010311,0.08851642199999965,1.2519999472715426e-06,0.0884607870000309,1.9729998257389525e-06,isolated stores/checkouts; concurrent module campaign,test_authoring.jsonl,2,0.00019236900016039726,,, +test_authoring.AuthoringTests.test_create_and_find_are_durable_through_the_public_facade,pass,3.0719260380001288,0.31553069899999997,1.2919999790028669e-06,3.0718348709999646,2.333000111320871e-06,isolated stores/checkouts; concurrent module campaign,test_authoring.jsonl,2,0.0002937099998234771,,, +test_authoring.AuthoringTests.test_create_rejects_duplicate_facets_and_validator_failure_is_atomic,pass,0.003729369999973642,0.0031714550000003783,8.409999736613827e-07,0.0036774229999991803,1.0119999842572724e-06,isolated stores/checkouts; concurrent module campaign,test_authoring.jsonl,2,0.00017646399987825134,,, +test_authoring.AuthoringTests.test_create_translates_invalid_change_set_unicode_to_a_typed_rejection,pass,0.33038177699995686,0.3234826500000003,1.0420001217426034e-06,0.33027680999998665,1.5120001535251504e-06,isolated stores/checkouts; concurrent module campaign,test_authoring.jsonl,1,0.00010377499984315364,,, +test_authoring.AuthoringTests.test_discovery_rejects_a_revision_without_content_bound_authority,pass,0.0031622110000171233,0.003162861999999933,8.50999867907376e-07,0.003102400999978272,1.252000174645218e-06,isolated stores/checkouts; concurrent module campaign,test_authoring.jsonl,1,0.00010861300006581587,,, +test_authoring.AuthoringTests.test_discovery_rejects_the_old_revision_contract_as_unsupported,pass,0.3053237120000176,0.30494568300000013,8.209999577957205e-07,0.3052514840001095,1.7330000900983578e-06,isolated stores/checkouts; concurrent module campaign,test_authoring.jsonl,1,8.843199998409546e-05,,, +test_authoring.AuthoringTests.test_proposal_discovery_uses_opaque_keyset_continuations,pass,0.006359233000011955,0.0063601150000001105,9.410000529896934e-07,0.006291171000157192,1.511999926151475e-06,isolated stores/checkouts; concurrent module campaign,test_authoring.jsonl,3,0.00023148600007516507,,, +test_authoring.AuthoringTests.test_proposals_follow_snapshot_quarantine_and_purge_lifecycle,pass,0.006195707999950173,0.006196870999999771,1.1219999578315765e-06,0.00613872300004914,1.3720000424655154e-06,isolated stores/checkouts; concurrent module campaign,test_authoring.jsonl,4,0.0003461589999460557,,, +test_authoring.AuthoringTests.test_readiness_is_content_bound_durable_and_current_head_guarded,pass,0.04336777000003167,0.04324419300000004,8.709998837730382e-07,0.04330353299997114,1.24100006360095e-06,isolated stores/checkouts; concurrent module campaign,test_authoring.jsonl,2,0.00016579799989813182,,, +test_authoring.AuthoringTests.test_readiness_rejects_incomplete_decisions_without_persistence,pass,0.004561536999972304,0.004562712999999885,9.220000265486306e-07,0.00450127700014491,1.1520000953169074e-06,isolated stores/checkouts; concurrent module campaign,test_authoring.jsonl,2,0.0001449979999961215,,, +test_authoring.AuthoringTests.test_readiness_rejects_invalid_proposal_commit_material,pass,0.004673555999943346,0.004674338000000056,7.31999989511678e-07,0.004620015999989846,1.1110000741609838e-06,isolated stores/checkouts; concurrent module campaign,test_authoring.jsonl,2,0.00017019599999912316,,, +test_authoring.AuthoringTests.test_revise_is_durable_and_stale_writes_leave_no_partial_record,pass,0.5830628559999695,0.5821428420000001,8.010001693037339e-07,0.5829914890000509,1.6019998838601168e-06,isolated stores/checkouts; concurrent module campaign,test_authoring.jsonl,2,0.0001620330001514958,,, +test_authoring.AuthoringTests.test_stale_readiness_cannot_publish_application_intent,pass,0.018900578000057067,0.018734654000000184,1.0009998732130043e-06,0.01883100400004878,1.5619998521287926e-06,isolated stores/checkouts; concurrent module campaign,test_authoring.jsonl,2,0.00014435699995374307,,, +test_coverage_publication.EngineAuditPublicationTest.test_review_verify_apply_recover_and_read_without_original_database,failure,35.84236262799982,3.2044950429999997,1.452000105928164e-06,35.840825042999995,2.9850000373699004e-06,isolated stores/checkouts; concurrent module campaign,test_coverage_publication.jsonl,,,,, +test_evidence_maintenance.EvidenceMaintenanceInterfaceTest.test_preview_and_overlap_preserve_working_tree_then_apply_retires,pass,170.09449521300007,27.811621846999998,1.2919999790028669e-06,170.09424823400013,2.9850000373699004e-06,isolated stores/checkouts; concurrent module campaign,test_evidence_maintenance.jsonl,,,9,3.5855562589999863, +test_evidence_maintenance.EvidenceMaintenanceTest.test_consumer_registration_enters_existing_policy_owner,pass,0.0009054469999227877,0.0009058960000025706,1.7419999949197518e-06,0.000821320999875752,1.3520000265998533e-06,isolated stores/checkouts; concurrent module campaign,test_evidence_maintenance.jsonl,,,,, +test_evidence_maintenance.EvidenceMaintenanceTest.test_pruning_preserves_current_claims_and_removes_stale_receipts,pass,0.0006454270001086115,0.0006464209999990089,5.300000793795334e-07,0.0005908959999487706,7.310000000870787e-07,isolated stores/checkouts; concurrent module campaign,test_evidence_maintenance.jsonl,,,,, +test_evidence_maintenance.EvidenceMaintenanceTest.test_registered_checker_retirement_removes_its_graph_edges,pass,0.0007658280001123785,0.0007659589999988725,6.310001481324434e-07,0.0007253979999859439,4.7100002120714635e-07,isolated stores/checkouts; concurrent module campaign,test_evidence_maintenance.jsonl,,,,, +test_evidence_maintenance.EvidenceMaintenanceTest.test_retirement_preserves_real_dependencies_and_normative_consumers,pass,0.0005765939999946568,0.0005770170000012342,3.6999995245423634e-07,0.0005362040001273272,5.099998361401958e-07,isolated stores/checkouts; concurrent module campaign,test_evidence_maintenance.jsonl,,,,, +test_evidence_maintenance.EvidenceMaintenanceTest.test_subject_unregistration_preserves_guidance_and_retained_units,pass,0.000642994000145336,0.0006433860000001346,3.8999996831989847e-07,0.0006015319997914048,8.919998890632996e-07,isolated stores/checkouts; concurrent module campaign,test_evidence_maintenance.jsonl,,,,, +test_evidence_maintenance.EvidenceMaintenanceTest.test_unknown_retirement_does_not_mutate_authority,pass,0.00022365499989973614,0.00022382300000245436,4.010000793641666e-07,0.0001864900000327907,5.210001745581394e-07,isolated stores/checkouts; concurrent module campaign,test_evidence_maintenance.jsonl,,,,, +test_generated_contract.GeneratedContractTest.test_agent_tools_are_the_exact_compiler_projection,pass,0.3497903749998841,0.33218187499999985,1.4930001270840876e-06,0.3494947219999176,2.0429999949556077e-06,isolated stores/checkouts; concurrent module campaign,test_generated_contract.jsonl,,,,, +test_generated_contract.GeneratedContractTest.test_authored_examples_satisfy_the_public_contract,pass,0.31343709399993713,0.31339546500000015,1.3919998309575021e-06,0.3133550509999168,1.5529999473073985e-06,isolated stores/checkouts; concurrent module campaign,test_generated_contract.jsonl,,,,, +test_generated_contract.GeneratedContractTest.test_compiler_owns_the_complete_public_definition_closure,pass,0.5570163919999231,0.5569953689999996,9.610000688553555e-07,0.5569459570001527,1.4419999843084952e-06,isolated stores/checkouts; concurrent module campaign,test_generated_contract.jsonl,,,,, +test_generated_contract.GeneratedContractTest.test_coverage_read_is_scoped_optional_and_uses_repository_authority,pass,24.364841370000022,11.261587766000002,1.0520000159885967e-06,24.36474692799993,2.0330001007096143e-06,isolated stores/checkouts; concurrent module campaign,test_generated_contract.jsonl,2,5.992639433000022,3,18.008914083999798, +test_generated_contract.GeneratedContractTest.test_generated_contract_projections_are_current,pass,2.4275369350000346,0.0007855459999994707,1.1610000001383014e-06,2.427431105999858,2.4539999685657676e-06,isolated stores/checkouts; concurrent module campaign,test_generated_contract.jsonl,,,,, +test_generated_contract.GeneratedContractTest.test_generated_native_models_decode_complete_v20_values,pass,0.0008958329999586567,0.000896123000000415,1.171999883808894e-06,0.0008350319999408384,6.110001322667813e-07,isolated stores/checkouts; concurrent module campaign,test_generated_contract.jsonl,,,,, +test_generated_contract.GeneratedContractTest.test_identity_fixtures_use_valid_public_handle_versions,pass,0.3623784659998819,0.3547384969999996,5.609999789157882e-07,0.36228603699987616,2.2240001271711662e-06,isolated stores/checkouts; concurrent module campaign,test_generated_contract.jsonl,,,,, +test_generated_contract.GeneratedContractTest.test_interface_operations_bind_generated_calls_results_and_facade,pass,0.3012708680000742,0.3012554269999992,1.34200013235386e-06,0.30118862399990576,1.5820000953681301e-06,isolated stores/checkouts; concurrent module campaign,test_generated_contract.jsonl,,,,, +test_generated_contract.GeneratedContractTest.test_local_evidence_rejects_missing_files_and_wrong_digests,pass,0.0005778859999736596,0.0005787999999995463,9.809998573473422e-07,0.0005292929999995977,7.809999260643963e-07,isolated stores/checkouts; concurrent module campaign,test_generated_contract.jsonl,,,,, +test_generated_contract.GeneratedContractTest.test_local_facade_binds_always_allow_authorization,pass,0.3300438349999695,0.315449804,4.409998837218154e-07,0.3299631530001079,1.883000095403986e-06,isolated stores/checkouts; concurrent module campaign,test_generated_contract.jsonl,,,,, +test_generated_contract.GeneratedContractTest.test_missing_verification_input_returns_a_typed_rejection,pass,0.3414473729999372,0.3409116569999995,1.2719999631372048e-06,0.3413563679998788,1.7129998468590202e-06,isolated stores/checkouts; concurrent module campaign,test_generated_contract.jsonl,,,,, +test_generated_contract.GeneratedContractTest.test_prepare_facade_passes_the_complete_generated_call,pass,0.3991837060000307,0.36432278000000196,1.5529999473073985e-06,0.39908529900003487,1.8230000478069996e-06,isolated stores/checkouts; concurrent module campaign,test_generated_contract.jsonl,,,,, +test_generated_contract.GeneratedContractTest.test_review_call_requires_exactly_three_decisions,pass,0.0009273299999676965,0.0009277390000015373,9.309999313700246e-07,0.0008737699999983306,1.2220000371598871e-06,isolated stores/checkouts; concurrent module campaign,test_generated_contract.jsonl,,,,, +test_generated_contract.GeneratedContractTest.test_router_read_exposes_editable_definitions_only_when_requested,pass,45.94865077999998,28.291226355000003,1.0209998890786665e-06,45.94857292300003,1.8729999737843173e-06,isolated stores/checkouts; concurrent module campaign,test_generated_contract.jsonl,6,18.52716218899991,8,24.45089093899969,2 +test_generated_contract.GeneratedContractTest.test_verification_is_exposed_without_publication_and_refresh_is_explicit,pass,0.3495147439998618,0.3402527060000011,1.1419999736972386e-06,0.34942879499999435,1.6220001270994544e-06,isolated stores/checkouts; concurrent module campaign,test_generated_contract.jsonl,,,,, +test_logical_authoring.LogicalAuthoringTests.test_change_set_is_immutable_and_normalized_before_compilation,pass,0.002490982999916014,0.0024539880000000736,4.085999989911215e-06,0.0022353800000018964,1.3929999340689392e-06,isolated stores/checkouts; concurrent module campaign,test_logical_authoring.jsonl,,,,, +test_logical_authoring.LogicalAuthoringTests.test_compiler_projects_module_relationships_through_current_owners,pass,1.3956673940000428,1.2673994559999997,9.609999551685178e-07,1.3955322819999765,2.9850000373699004e-06,isolated stores/checkouts; concurrent module campaign,test_logical_authoring.jsonl,,,2,0.8195816489999288, +test_logical_authoring.LogicalAuthoringTests.test_compiler_revises_one_registered_policy_and_derives_analysis_input,pass,1.400681820999921,1.2104111150000003,9.310000450568623e-07,1.4005605090000017,1.4519999922413263e-06,isolated stores/checkouts; concurrent module campaign,test_logical_authoring.jsonl,,,2,0.7505432350000092, +test_logical_authoring.LogicalAuthoringTests.test_create_nested_standard_and_route_atomically,pass,2.125753185999997,1.7026875339999998,7.710000318184029e-07,2.1256725149999056,1.562000079502468e-06,isolated stores/checkouts; concurrent module campaign,test_logical_authoring.jsonl,,,2,0.7179073240000662, +test_logical_authoring.LogicalAuthoringTests.test_create_standard_hides_all_required_repository_projections,pass,3.372146550000025,2.7594096310000005,1.0520000159885967e-06,3.3720596289999776,1.6719999393899343e-06,isolated stores/checkouts; concurrent module campaign,test_logical_authoring.jsonl,,,3,1.2598155739998447, +test_logical_authoring.LogicalAuthoringTests.test_created_standard_can_be_retired_with_complete_explicit_closure,pass,7.017569822000041,5.45769954,1.6120000054797856e-06,7.0174661549999655,2.103000042552594e-06,isolated stores/checkouts; concurrent module campaign,test_logical_authoring.jsonl,,,5,1.9600994789999504, +test_logical_authoring.LogicalAuthoringTests.test_duplicate_route_target_rejected,pass,0.41475834899995334,0.4093960610000007,1.301999986935698e-06,0.41466422799999236,1.3520000265998533e-06,isolated stores/checkouts; concurrent module campaign,test_logical_authoring.jsonl,,,1,0.3980698059999668, +test_logical_authoring.LogicalAuthoringTests.test_fact_presentation_and_value_order_preserve_semantic_revision,pass,1.6046006149999812,1.362150745000001,1.0109999948326731e-06,1.6045091780000575,1.6420000292782788e-06,isolated stores/checkouts; concurrent module campaign,test_logical_authoring.jsonl,,,2,0.7415163570000232, +test_logical_authoring.LogicalAuthoringTests.test_fact_revision_and_referenced_removal_are_validated,pass,3.236105569000074,2.740712872000003,1.06199991023459e-06,3.2360005710000905,1.9330000213813037e-06,isolated stores/checkouts; concurrent module campaign,test_logical_authoring.jsonl,,,5,1.5480020799999465, +test_logical_authoring.LogicalAuthoringTests.test_move_preserves_identity_and_relocates_relationship_authority,pass,3.2802626860000146,2.6836992980000005,1.4519999922413263e-06,3.280149166000001,1.7930000240085064e-06,isolated stores/checkouts; concurrent module campaign,test_logical_authoring.jsonl,,,3,1.1700252339999224, +test_logical_authoring.LogicalAuthoringTests.test_new_fact_and_rule_compile_together_and_unused_fact_can_be_removed,pass,3.2291220409999823,2.683511332000002,1.1619999895629007e-06,3.2290072889999237,1.8130000398741686e-06,isolated stores/checkouts; concurrent module campaign,test_logical_authoring.jsonl,,,4,1.4575723619999508, +test_logical_authoring.LogicalAuthoringTests.test_noop_and_cyclic_relationship_changes_are_typed,pass,1.409565366000038,1.1629133960000004,9.410000529896934e-07,1.409467229000029,1.8430000636726618e-06,isolated stores/checkouts; concurrent module campaign,test_logical_authoring.jsonl,,,2,0.7498911280000584, +test_logical_authoring.LogicalAuthoringTests.test_null_applicability_is_unsupported_by_toml_authority,pass,0.00016490699999849312,0.00016446500000100173,1.2619999552043737e-06,0.00010784199992031063,4.810000291399774e-07,isolated stores/checkouts; concurrent module campaign,test_logical_authoring.jsonl,,,,, +test_logical_authoring.LogicalAuthoringTests.test_opaque_consumer_handle_is_snapshot_bound,pass,1.530979059999936,1.2411999020000017,4.309999894758221e-07,1.5308959260000847,1.4620000001741573e-06,isolated stores/checkouts; concurrent module campaign,test_logical_authoring.jsonl,,,2,0.681348703000026, +test_logical_authoring.LogicalAuthoringTests.test_policy_relationship_put_and_remove_replay_cumulatively,pass,7.491521180999939,6.042186188999995,8.81000005392707e-07,7.491436234000048,1.5529999473073985e-06,isolated stores/checkouts; concurrent module campaign,test_logical_authoring.jsonl,,,7,2.5211507539999047, +test_logical_authoring.LogicalAuthoringTests.test_retired_standard_successor_must_survive_the_final_program,pass,6.397583684999972,5.016520409000002,9.810000847210176e-07,6.397484936000069,2.172999984395574e-06,isolated stores/checkouts; concurrent module campaign,test_logical_authoring.jsonl,,,5,2.0560742359998585, +test_logical_authoring.LogicalAuthoringTests.test_retirement_requires_and_applies_complete_relationship_dispositions,pass,4.319672667999953,3.5197028619999955,1.3519999129130156e-06,4.319569913000009,1.4319999763756641e-06,isolated stores/checkouts; concurrent module campaign,test_logical_authoring.jsonl,,,5,1.7871796530000665, +test_logical_authoring.LogicalAuthoringTests.test_route_targets_can_be_swapped_in_one_atomic_change,pass,1.5159105709999494,1.2789115320000022,1.0320000001229346e-06,1.5158029689999921,1.513000029262912e-06,isolated stores/checkouts; concurrent module campaign,test_logical_authoring.jsonl,,,2,0.681451609000078, +test_logical_authoring.LogicalAuthoringTests.test_rule_update_and_removal_keep_readable_and_executable_routes_in_sync,pass,3.391978442999971,2.8540866900000026,1.0420000080557656e-06,3.3918469149999737,2.1629999764627428e-06,isolated stores/checkouts; concurrent module campaign,test_logical_authoring.jsonl,,,4,1.6153495410000005, +test_logical_authoring.LogicalAuthoringTests.test_supporting_records_and_withdrawal_use_the_final_candidate,pass,8.326510025999937,6.591046511000002,1.0219999921901035e-06,8.326404728000057,1.9020000081582111e-06,isolated stores/checkouts; concurrent module campaign,test_logical_authoring.jsonl,,,7,2.791066844999932, +test_logical_authoring.LogicalAuthoringTests.test_unknown_route_fact_is_rejected_without_changing_base,pass,1.2290154559999564,0.9946683490000012,9.310000450568623e-07,1.2289312600000812,1.7830000160756754e-06,isolated stores/checkouts; concurrent module campaign,test_logical_authoring.jsonl,,,2,0.380086279000011, +test_logical_authoring.LogicalAuthoringTests.test_whole_module_rescope_preserves_identity_and_explicit_meaning,pass,2.166954881000038,1.9287874219999992,8.81000005392707e-07,2.1668664180000405,1.503000021330081e-06,isolated stores/checkouts; concurrent module campaign,test_logical_authoring.jsonl,,,3,1.2524199109999472, +test_logical_authoring.LogicalAuthoringTests.test_whole_standard_revision_requires_companion_policy_semantics,pass,3.3094727169999487,2.7190540220000017,8.719999868844752e-07,3.309368090000021,2.322999989701202e-06,isolated stores/checkouts; concurrent module campaign,test_logical_authoring.jsonl,,,4,1.5268864619999931, +test_mcp.MCPTest.test_authoring_description_carries_exact_contract_without_type_rendering,pass,0.15942649499993422,0.1592309529999998,1.6230001165240537e-06,0.15917474899993067,2.534000032028416e-06,isolated stores/checkouts; concurrent module campaign,test_mcp.jsonl,,,,, +test_mcp.MCPTest.test_authoring_inputs_expose_structure_and_preserve_recursive_validation,pass,0.018413170000030732,0.018414463999999686,1.0010001005866798e-06,0.018323796000004222,2.0229999790899456e-06,isolated stores/checkouts; concurrent module campaign,test_mcp.jsonl,,,,, +test_mcp.MCPTest.test_catalog_schemas_validate_authored_examples_and_resolve_refs,pass,2.2242959790000896,2.222295457,1.1219999578315765e-06,2.2242113719998997,1.511999926151475e-06,isolated stores/checkouts; concurrent module campaign,test_mcp.jsonl,,,,, +test_mcp.MCPTest.test_default_catalog_focuses_navigation_and_workflows,pass,0.016227161999950113,0.016228273999999487,8.609999895270448e-07,0.016152890999819647,1.503000021330081e-06,isolated stores/checkouts; concurrent module campaign,test_mcp.jsonl,,,,, +test_mcp.MCPTest.test_default_guidance_uses_available_recovery_tools,pass,0.00792960600006154,0.007930810000000399,8.81000005392707e-07,0.007859471000074336,1.9130000055156415e-06,isolated stores/checkouts; concurrent module campaign,test_mcp.jsonl,,,,, +test_mcp.MCPTest.test_input_projection_preserves_reference_siblings,pass,0.0002938200000244251,0.0002940979999994653,1.4620000001741573e-06,0.0002341200001865218,5.510000846697949e-07,isolated stores/checkouts; concurrent module campaign,test_mcp.jsonl,,,,, +test_mcp.MCPTest.test_internal_failure_is_tool_error_without_retry,pass,0.01274198900000556,0.012742241999999848,6.210000265127746e-07,0.012685663999945973,1.0610001481836662e-06,isolated stores/checkouts; concurrent module campaign,test_mcp.jsonl,,,,, +test_mcp.MCPTest.test_lifecycle_and_protocol_errors_never_open_engine,pass,0.012078804999873682,0.012079757000000413,5.909998890274437e-07,0.012013976999924125,1.401999952577171e-06,isolated stores/checkouts; concurrent module campaign,test_mcp.jsonl,,,,, +test_mcp.MCPTest.test_module_stdio_launch_from_unrelated_working_directory,pass,2.495596599999999,0.006666169999999916,1.2119999155402184e-06,2.4955018770001516,1.8430000636726618e-06,isolated stores/checkouts; concurrent module campaign,test_mcp.jsonl,,,,, +test_mcp.MCPTest.test_parse_errors_and_notifications_keep_stream_synchronized,pass,0.012755108000192195,0.01271436999999942,1.1119998362119077e-06,0.012656791000154044,1.8929999896499794e-06,isolated stores/checkouts; concurrent module campaign,test_mcp.jsonl,,,,, +test_mcp.MCPTest.test_preserves_typed_outcomes_and_never_retries,pass,0.015502436000133457,0.015502976000000501,1.1619999895629007e-06,0.015414022999948429,1.6420001429651165e-06,isolated stores/checkouts; concurrent module campaign,test_mcp.jsonl,,,,, +test_mcp.MCPTest.test_real_snapshot_read_and_validation_through_server,pass,26.94432235399995,12.658780050999999,1.3520000265998533e-06,26.94421864900005,2.2540000372828217e-06,isolated stores/checkouts; concurrent module campaign,test_mcp.jsonl,2,6.499171702000012,3,19.737701360999836, +test_navigation.NavigationTest.test_development_proportionality_routes_directly_and_before_planning,pass,6.652997441000025,6.651642967999999,2.1440000637085177e-06,6.65279701999998,2.2739998257748084e-06,isolated stores/checkouts; concurrent module campaign,test_navigation.jsonl,2,5.897144430999788,2,0.6993948910003382, +test_navigation.NavigationTest.test_live_worktree_mutation_cannot_change_snapshot_reads,error,0.19790344700004425,0.02273119000000179,1.2420000530255493e-06,0.19620857600011732,2.06300001082127e-06,isolated stores/checkouts; concurrent module campaign,test_navigation.jsonl,,,,, +test_navigation.NavigationTest.test_proposal_creation_returns_typed_failure_for_invalid_projected_content,pass,10.07355708199998,9.68388466,9.109999155043624e-07,10.073470382000096,1.6429999050160404e-06,isolated stores/checkouts; concurrent module campaign,test_navigation.jsonl,3,8.974126024999805,1,0.3962364640001397,1 +test_navigation.NavigationTest.test_proposal_query_projects_every_request_from_an_exact_revision,pass,40.94343634300003,38.016495034,1.1119998362119077e-06,40.943344475,1.782000026651076e-06,isolated stores/checkouts; concurrent module campaign,test_navigation.jsonl,9,27.307487287999948,15,5.636071870000478,7 +test_navigation.NavigationTest.test_read_related_and_inspect_share_the_snapshot_root,pass,13.010178056000086,12.859278894999989,9.309999313700246e-07,13.010090515000002,1.762000010785414e-06,isolated stores/checkouts; concurrent module campaign,test_navigation.jsonl,4,11.481821314999706,4,1.4391946229998211, +test_navigation.NavigationTest.test_route_selects_direct_modules_and_required_closure,pass,3.7467559179999625,3.741890214999998,8.919998890632996e-07,3.7466267039999366,1.973000053112628e-06,isolated stores/checkouts; concurrent module campaign,test_navigation.jsonl,1,3.2907839930001046,1,0.4197067329998845, +test_navigation.NavigationTest.test_unknown_and_invalid_route_facts_have_typed_results,pass,7.202050240000062,7.1698561439999935,1.7030001799867023e-06,7.201937201000192,2.2730000637238845e-06,isolated stores/checkouts; concurrent module campaign,test_navigation.jsonl,2,6.406793711999853,2,0.745237096999972, +test_navigation_indexes.NavigationIndexAuthorityTest.test_absent_catalog_exposes_no_authoring_capability,pass,0.0002584479999541145,0.0002558700000001579,1.5519999578827992e-06,5.151699997441028e-05,7.510000159527408e-07,isolated stores/checkouts; concurrent module campaign,test_navigation_indexes.jsonl,,,,, +test_navigation_indexes.NavigationIndexAuthorityTest.test_bad_catalog_and_non_utf8_content_are_typed_rejections,pass,0.00046270300003925513,0.00046317900000003576,5.100000635138713e-07,0.00042444600001090294,5.310000688041328e-07,isolated stores/checkouts; concurrent module campaign,test_navigation_indexes.jsonl,,,,, +test_navigation_indexes.NavigationIndexAuthorityTest.test_declared_routes_bind_their_owner_content_and_exact_declarations,pass,0.0006040360000270084,0.0006045889999999332,3.2100001590151805e-07,0.0005702949999886187,5.110000529384706e-07,isolated stores/checkouts; concurrent module campaign,test_navigation_indexes.jsonl,,,,, +test_navigation_indexes.NavigationIndexAuthorityTest.test_old_captured_index_without_route_inventory_remains_readable,pass,0.00013393099993663782,0.0001341890000001733,2.9099999210302485e-07,0.00010689099997307494,3.300000344097498e-07,isolated stores/checkouts; concurrent module campaign,test_navigation_indexes.jsonl,,,,, +test_navigation_indexes.NavigationIndexAuthorityTest.test_registration_cannot_make_a_normative_standard_writable,pass,8.351499991476885e-05,8.353400000027378e-05,3.309999101475114e-07,5.980999992516445e-05,2.509999603717006e-07,isolated stores/checkouts; concurrent module campaign,test_navigation_indexes.jsonl,,,,, +test_navigation_indexes.NavigationIndexAuthorityTest.test_review_fingerprint_binds_destination_authority_without_inventing_policy_changes,pass,0.00043708499993044825,0.00043740999999997143,2.900000026784255e-07,0.0004079320000300868,5.010000450056395e-07,isolated stores/checkouts; concurrent module campaign,test_navigation_indexes.jsonl,,,,, +test_navigation_indexes.NavigationIndexWorkflowTest.test_cross_snapshot_handle_is_not_an_authorization_to_retarget,pass,33.26433106600007,21.11719368,1.4529999816659256e-06,33.264150234,1.9130000055156415e-06,isolated stores/checkouts; concurrent module campaign,test_navigation_indexes.jsonl,4,13.796280792999823,5,18.628652976999888,1 +test_navigation_indexes.NavigationIndexWorkflowTest.test_discovery_captures_exact_content_without_claiming_policy_authority,pass,6.4176668559999825,6.417170993000006,1.2720000768240425e-06,6.417303713000024,1.301999986935698e-06,isolated stores/checkouts; concurrent module campaign,test_navigation_indexes.jsonl,2,5.64280914099993,2,0.7390312520001316, +test_navigation_indexes.NavigationIndexWorkflowTest.test_fresh_mcp_process_exposes_snapshot_bound_navigation,pass,6.430835125000044,0.006623876999995559,1.1419999736972386e-06,6.430742344999999,2.1329999526642496e-06,isolated stores/checkouts; concurrent module campaign,test_navigation_indexes.jsonl,,,,, +test_navigation_indexes.NavigationIndexWorkflowTest.test_invalid_selections_do_not_create_an_applicable_candidate,pass,14.51954364200003,14.094891100000005,1.212000029227056e-06,14.519430822000004,1.8829999817171483e-06,isolated stores/checkouts; concurrent module campaign,test_navigation_indexes.jsonl,4,11.59131786499995,4,1.4366306509999731,2 +test_navigation_indexes.NavigationIndexWorkflowTest.test_retarget_dispositions_cannot_remove_unrelated_assertions,pass,14.319696383000064,13.990793657999994,1.2619999552043737e-06,14.319617795,1.73299997641152e-06,isolated stores/checkouts; concurrent module campaign,test_navigation_indexes.jsonl,4,11.49094601100012,4,1.455395486000043,2 +test_navigation_indexes.NavigationIndexWorkflowTest.test_z_exact_index_proposal_requires_review_and_applies_through_engine,pass,250.161738701,159.509019199,1.4830000054644188e-06,250.16163315300003,1.8929999896499794e-06,isolated stores/checkouts; concurrent module campaign,test_navigation_indexes.jsonl,35,97.48451044300054,70,57.448773071999426,19 +test_navigation_indexes.ProtectedNavigationIndexTest.test_declared_routes_reject_omitted_owners_and_unsupported_artifacts,pass,15.122033638999937,14.621673411000017,1.8429998362989863e-06,15.121847179000042,2.172999984395574e-06,isolated stores/checkouts; concurrent module campaign,test_navigation_indexes.jsonl,4,11.931479115999764,4,1.489893247000282,2 +test_navigation_indexes.ProtectedNavigationIndexTest.test_z_declared_sections_survive_verified_index_application,pass,162.93120885300004,115.06860945200003,1.3619999208458466e-06,162.9311158339999,1.871999984359718e-06,isolated stores/checkouts; concurrent module campaign,test_navigation_indexes.jsonl,25,71.58972503600035,54,35.60004277900043,15 +test_platform_harness.PlatformHarnessTest.test_closed_store_round_trip_uses_public_operations,error,28.083518951000087,14.510006931999998,1.8230000478069996e-06,28.081901886999958,2.5740000637597404e-06,isolated stores/checkouts; concurrent module campaign,test_platform_harness.jsonl,3,8.821007116000146,4,18.82583936399965, +test_platform_harness.PlatformHarnessTest.test_concurrent_probe_rejects_mismatched_content,pass,0.0008339100002103805,0.0008341499999993118,1.5929999790387228e-06,0.0007805499999449239,6.510001639981056e-07,isolated stores/checkouts; concurrent module campaign,test_platform_harness.jsonl,,,,, +test_platform_harness.PlatformHarnessTest.test_consume_rejects_changed_store_before_open,pass,0.00044034000006831775,0.0004408650000016223,3.800000740739051e-07,0.0004036949999317585,6.210000265127746e-07,isolated stores/checkouts; concurrent module campaign,test_platform_harness.jsonl,,,,, +test_purpose_projection.PurposeProjectionTest.test_authoring_read_retrieves_reasoning_and_exposure_state,pass,6.883982284000012,6.831894689000001,2.06300001082127e-06,6.8837280820000615,2.64400000560272e-06,isolated stores/checkouts; concurrent module campaign,test_purpose_projection.jsonl,2,5.871092886000042,2,0.6897991930002263, +test_purpose_projection.PurposeProjectionTest.test_catalog_has_no_authoring_schema_closure,pass,0.005947324000089793,0.0059487740000001565,1.4830000054644188e-06,0.005871100000149454,1.5020000319054816e-06,isolated stores/checkouts; concurrent module campaign,test_purpose_projection.jsonl,,,,, +test_purpose_projection.PurposeProjectionTest.test_direct_hidden_read_and_privileged_request_are_bounded,pass,3.3446539570002187,3.3194992080000016,1.1419999736972386e-06,3.344571604000066,1.2220000371598871e-06,isolated stores/checkouts; concurrent module campaign,test_purpose_projection.jsonl,1,2.9877014569999574,1,0.33619701399993573, +test_purpose_projection.PurposeProjectionTest.test_domain_and_facade_admit_only_application_operations_before_work,pass,0.27427449999981945,0.27406303500000107,8.609999895270448e-07,0.2741936990000795,1.0219998785032658e-06,isolated stores/checkouts; concurrent module campaign,test_purpose_projection.jsonl,,,,, +test_purpose_projection.PurposeProjectionTest.test_hidden_intermediate_cannot_bridge_a_permitted_traversal,pass,0.0009880699999484932,0.0009891000000017414,8.50999867907376e-07,0.0009310550001373485,1.4030001693754457e-06,isolated stores/checkouts; concurrent module campaign,test_purpose_projection.jsonl,,,,, +test_purpose_projection.PurposeProjectionTest.test_invalid_host_purpose_creates_no_store,pass,0.0008688820000770647,0.0008699529999987021,5.809999947814504e-07,0.0008153510000283859,6.709999524900923e-07,isolated stores/checkouts; concurrent module campaign,test_purpose_projection.jsonl,,,,, +test_purpose_projection.PurposeProjectionTest.test_material_change_requires_new_exposure_but_rationale_change_does_not,pass,0.751673116999882,0.7505881820000013,3.4000004234258085e-07,0.7515909349999674,2.4829998892528238e-06,isolated stores/checkouts; concurrent module campaign,test_purpose_projection.jsonl,,,2,0.7259638379998705, +test_purpose_projection.PurposeProjectionTest.test_native_query_and_handle_inspection_use_the_same_boundary,pass,10.745974101000002,10.702163911,1.0609999208099907e-06,10.745834742999932,1.9030001112696482e-06,isolated stores/checkouts; concurrent module campaign,test_purpose_projection.jsonl,3,9.514836979000165,3,1.169424901999946, +test_purpose_projection.PurposeProjectionTest.test_read_has_exact_reviewed_content_and_explicit_permitted_fields,pass,6.40621535199989,6.330138001000002,1.3020001006225357e-06,6.406086460000097,1.2220000371598871e-06,isolated stores/checkouts; concurrent module campaign,test_purpose_projection.jsonl,2,5.651486762999866,2,0.7090993839999555, +test_purpose_projection.PurposeProjectionTest.test_router_presentation_change_requires_explicit_renewal,pass,0.42546387900006266,0.42188948199999743,8.81000005392707e-07,0.4253634480000983,2.0229999790899456e-06,isolated stores/checkouts; concurrent module campaign,test_purpose_projection.jsonl,,,1,0.40939145900006224, +test_purpose_projection.PurposeProjectionTest.test_routing_retains_unknown_facts_and_blocks_missing_required_content,pass,10.40671178599996,10.371080810999999,9.810000847210176e-07,10.406626937999818,1.863000079538324e-06,isolated stores/checkouts; concurrent module campaign,test_purpose_projection.jsonl,3,9.167023071999893,3,1.1691452300001401, +test_purpose_projection.PurposeProjectionTest.test_unexpected_observation_failure_returns_no_private_context,pass,3.673200839999936,3.6731263180000013,9.010000212583691e-07,3.673081060999948,2.0129998574702768e-06,isolated stores/checkouts; concurrent module campaign,test_purpose_projection.jsonl,1,3.235006700999975,1,0.4204375319998235, +test_purpose_projection.PurposeProjectionTest.test_unsupported_capture_is_preserved_and_classified,pass,12.047755135999978,11.993469476000001,1.562000079502468e-06,12.047611770999993,2.7240000690653687e-06,isolated stores/checkouts; concurrent module campaign,test_purpose_projection.jsonl,4,11.942433389000144,1,0.04812911199996961, +test_purpose_projection.PurposeProjectionTest.test_whole_module_discovers_references_owned_by_its_policy_units,pass,0.0019592669998473866,0.0019598129999991443,9.620000582799548e-07,0.001901489999909245,5.499998678715201e-07,isolated stores/checkouts; concurrent module campaign,test_purpose_projection.jsonl,,,,, +test_purpose_transport.PurposeTransportTest.test_actual_stdio_has_qualified_catalog_and_identical_result_encodings,pass,10.214757588000111,0.00212328000000106,1.582999857419054e-06,10.214478219000057,2.3939999209687812e-06,isolated stores/checkouts; concurrent module campaign,test_purpose_transport.jsonl,,,,, +test_purpose_transport.PurposeTransportTest.test_cli_catalog_schema_example_and_denial_share_the_purpose,pass,9.590868929999942,0.0034084060000001415,1.3619999208458466e-06,9.590762910999956,2.4339999527001055e-06,isolated stores/checkouts; concurrent module campaign,test_purpose_transport.jsonl,,,,, +test_purpose_transport.PurposeTransportTest.test_default_capture_reads_accepted_main_instead_of_unpublished_head,pass,23.968329625000024,11.26496945,1.0609999208099907e-06,23.968212959999846,2.2530000478582224e-06,isolated stores/checkouts; concurrent module campaign,test_purpose_transport.jsonl,2,5.675732595000227,3,17.642536631999974, +test_purpose_transport.PurposeTransportTest.test_two_cold_processes_preserve_exact_application_read,pass,18.115720490000058,0.0026556860000006566,1.3419999049801845e-06,18.11561705500003,1.9130000055156415e-06,isolated stores/checkouts; concurrent module campaign,test_purpose_transport.jsonl,,,,, +test_rendering.TextRenderingTest.test_application_purpose_is_distinct_from_authoring_publication,pass,0.00048765099995762284,0.00048485099999995285,1.3320000107341912e-06,0.00035164700011591776,8.519998573319754e-07,isolated stores/checkouts; concurrent module campaign,test_rendering.jsonl,,,,, +test_rendering.TextRenderingTest.test_coverage_projection_preserves_subject_and_status,pass,7.709499982411216e-05,7.708500000003227e-05,6.410000423784368e-07,4.399600015858596e-05,3.51000153386849e-07,isolated stores/checkouts; concurrent module campaign,test_rendering.jsonl,,,,, +test_rendering.TextRenderingTest.test_navigation_indexes_preserve_authority_and_exact_content,pass,6.589899999198678e-05,6.599799999973399e-05,4.61000126961153e-07,1.0857000006581075e-05,3.000000106112566e-07,isolated stores/checkouts; concurrent module campaign,test_rendering.jsonl,,,,, +test_rendering.TextRenderingTest.test_pending_projection_is_deterministic_and_work_focused,pass,4.5618000058311736e-05,4.5628000000075275e-05,2.399999630142702e-07,2.4235999944721698e-05,2.0999982552893925e-07,isolated stores/checkouts; concurrent module campaign,test_rendering.jsonl,,,,, +test_rendering.TextRenderingTest.test_projected_navigation_renders_revision_authority,pass,2.9423999876598828e-05,2.9513999999952745e-05,2.5000008463393897e-07,9.533999900668277e-06,2.3099983081920072e-07,isolated stores/checkouts; concurrent module campaign,test_rendering.jsonl,,,,, +test_rendering.TextRenderingTest.test_proposal_projection_exposes_only_opaque_handles,pass,2.442599998175865e-05,2.4227000000376364e-05,2.0099992070754524e-07,6.108999969001161e-06,1.999999312829459e-07,isolated stores/checkouts; concurrent module campaign,test_rendering.jsonl,,,,, +test_rendering.TextRenderingTest.test_proposal_review_renders_only_opaque_authority,pass,2.0360999997137696e-05,2.034000000028513e-05,1.999999312829459e-07,4.025999942314229e-06,1.9000003703695256e-07,isolated stores/checkouts; concurrent module campaign,test_rendering.jsonl,,,,, +test_rendering.TextRenderingTest.test_rejection_projection_accepts_the_generated_result_type,pass,0.00026092100006280816,0.0002611780000001396,1.8999980966327712e-07,0.0002396590000444121,3.4000004234258085e-07,isolated stores/checkouts; concurrent module campaign,test_rendering.jsonl,,,,, +test_rendering.TextRenderingTest.test_unknown_result_variant_is_a_programming_error,pass,0.00010294399999111192,0.00010296299999978942,2.499998572602635e-07,7.978899998306588e-05,3.200000264769187e-07,isolated stores/checkouts; concurrent module campaign,test_rendering.jsonl,,,,, +test_rendering.TextRenderingTest.test_verification_projection_preserves_revision_and_diagnostic_identity,pass,4.028000012112898e-05,4.02300000001965e-05,2.1999994714860804e-07,1.947900000232039e-05,2.1100004232721403e-07,isolated stores/checkouts; concurrent module campaign,test_rendering.jsonl,,,,, +test_supporting_workflow.SupportingWorkflowTest.test_coordinated_publication_and_provenance_only_revision,pass,839.06457716,617.979156948,2.593999965938565e-06,839.064301737,1.8330001694266684e-06,isolated stores/checkouts; concurrent module campaign,test_supporting_workflow.jsonl,130,380.1300723730011,278,272.50995425800204,71 From 63338566110bf8de9d0a84fddf3322cc6bb6c0c9 Mon Sep 17 00:00:00 2001 From: ChatGPT Date: Wed, 23 Sep 2026 21:36:29 +0000 Subject: [PATCH 07/26] perf(engine): reuse verified immutable work within operations Preserve Identity-v2 bytes while accelerating scalar and path encoding. Reuse bounded verified Git objects per exact-revision capture, and carry immutable analysis inputs across fresh decision evaluations without retaining authorization or publication state. Keep capture replay independent, accepted-main selection unchanged, and the transport/store lifetime per call. Repair disposable test clones to establish their own candidate main. Add behavioral regressions and paired performance evidence. Verification: 166 distinct Engine tests covered across the full run and four fixture reruns; 421 supporting package tests run with one existing interpreter-dependent skip; 73 structural suites / 121 checks. Local Python 3.13 evidence remains distinct from supported pinned qualification. --- .../baseline-capture-size-0.json | 1 + .../baseline-capture-size-1.json | 1 + .../baseline-capture-size-2.json | 1 + .../baseline-long.jsonl | 5 + .../baseline-long.log | 7 + .../baseline-operations.jsonl | 57 +++ .../baseline-primitives.json | 84 ++++ .../baseline-transport.json | 60 +++ .../candidate-capture-size-0.json | 1 + .../candidate-capture-size-1.json | 1 + .../candidate-capture-size-2.json | 1 + .../candidate-operations.jsonl | 57 +++ .../candidate-primitives.json | 96 ++++ .../candidate-transport.json | 60 +++ .../performance-core-evidence/comparison.csv | 16 + .../environment.json | 20 + .../final-checks-complete.json | 1 + .../final-test-candidate.txt | 1 + .../fixture-reruns.log | 9 + .../full-engine.jsonl | 353 +++++++++++++++ .../performance-core-evidence/full-engine.log | 418 ++++++++++++++++++ .../measure_primitives.py | 97 ++++ .../measure_transport.py | 91 ++++ .../package-graph_engine.log | 42 ++ .../package-repository_git.log | 21 + .../package-standards_analysis.log | 105 +++++ .../package-standards_applicability.log | 17 + .../package-standards_contracts.log | 28 ++ .../package-standards_graph.log | 7 + .../package-standards_identity.log | 16 + .../package-standards_metadata.log | 36 ++ .../package-standards_policy_impact.log | 15 + .../package-standards_snapshots.log | 28 ++ .../package-standards_verifier.log | 167 +++++++ .../package-summary.json | 68 +++ .../per-test-disposition.csv | 167 +++++++ .../structural-final-code.json | 11 + .../test-candidate.txt | 1 + .../tested-source.json | 62 +++ .../reports/performance-core-increment.md | 135 ++++++ .../generated/suite-inputs.json | 18 +- tools/repository_git/README.md | 17 + .../repository_git/repository_git/__init__.py | 2 + .../repository_git/repository.py | 138 +++++- tools/repository_git/tests/test_repository.py | 139 ++++++ tools/standards_engine/PURPOSE-SEPARATION.md | 22 + .../standards_engine/engine.py | 187 ++++++-- .../standards_engine/logical_authoring.py | 13 +- tools/standards_engine/tests/test_analysis.py | 138 +++++- .../tests/test_logical_authoring.py | 22 + .../standards_engine/tests/test_navigation.py | 6 + tools/standards_identity/README.md | 9 + .../standards_identity/encoding.py | 50 +-- .../standards_identity/tests/test_identity.py | 69 +++ 54 files changed, 3103 insertions(+), 91 deletions(-) create mode 100644 docs/plans/purpose-separated-standards-engine/reports/performance-core-evidence/baseline-capture-size-0.json create mode 100644 docs/plans/purpose-separated-standards-engine/reports/performance-core-evidence/baseline-capture-size-1.json create mode 100644 docs/plans/purpose-separated-standards-engine/reports/performance-core-evidence/baseline-capture-size-2.json create mode 100644 docs/plans/purpose-separated-standards-engine/reports/performance-core-evidence/baseline-long.jsonl create mode 100644 docs/plans/purpose-separated-standards-engine/reports/performance-core-evidence/baseline-long.log create mode 100644 docs/plans/purpose-separated-standards-engine/reports/performance-core-evidence/baseline-operations.jsonl create mode 100644 docs/plans/purpose-separated-standards-engine/reports/performance-core-evidence/baseline-primitives.json create mode 100644 docs/plans/purpose-separated-standards-engine/reports/performance-core-evidence/baseline-transport.json create mode 100644 docs/plans/purpose-separated-standards-engine/reports/performance-core-evidence/candidate-capture-size-0.json create mode 100644 docs/plans/purpose-separated-standards-engine/reports/performance-core-evidence/candidate-capture-size-1.json create mode 100644 docs/plans/purpose-separated-standards-engine/reports/performance-core-evidence/candidate-capture-size-2.json create mode 100644 docs/plans/purpose-separated-standards-engine/reports/performance-core-evidence/candidate-operations.jsonl create mode 100644 docs/plans/purpose-separated-standards-engine/reports/performance-core-evidence/candidate-primitives.json create mode 100644 docs/plans/purpose-separated-standards-engine/reports/performance-core-evidence/candidate-transport.json create mode 100644 docs/plans/purpose-separated-standards-engine/reports/performance-core-evidence/comparison.csv create mode 100644 docs/plans/purpose-separated-standards-engine/reports/performance-core-evidence/environment.json create mode 100644 docs/plans/purpose-separated-standards-engine/reports/performance-core-evidence/final-checks-complete.json create mode 100644 docs/plans/purpose-separated-standards-engine/reports/performance-core-evidence/final-test-candidate.txt create mode 100644 docs/plans/purpose-separated-standards-engine/reports/performance-core-evidence/fixture-reruns.log create mode 100644 docs/plans/purpose-separated-standards-engine/reports/performance-core-evidence/full-engine.jsonl create mode 100644 docs/plans/purpose-separated-standards-engine/reports/performance-core-evidence/full-engine.log create mode 100644 docs/plans/purpose-separated-standards-engine/reports/performance-core-evidence/measure_primitives.py create mode 100644 docs/plans/purpose-separated-standards-engine/reports/performance-core-evidence/measure_transport.py create mode 100644 docs/plans/purpose-separated-standards-engine/reports/performance-core-evidence/package-graph_engine.log create mode 100644 docs/plans/purpose-separated-standards-engine/reports/performance-core-evidence/package-repository_git.log create mode 100644 docs/plans/purpose-separated-standards-engine/reports/performance-core-evidence/package-standards_analysis.log create mode 100644 docs/plans/purpose-separated-standards-engine/reports/performance-core-evidence/package-standards_applicability.log create mode 100644 docs/plans/purpose-separated-standards-engine/reports/performance-core-evidence/package-standards_contracts.log create mode 100644 docs/plans/purpose-separated-standards-engine/reports/performance-core-evidence/package-standards_graph.log create mode 100644 docs/plans/purpose-separated-standards-engine/reports/performance-core-evidence/package-standards_identity.log create mode 100644 docs/plans/purpose-separated-standards-engine/reports/performance-core-evidence/package-standards_metadata.log create mode 100644 docs/plans/purpose-separated-standards-engine/reports/performance-core-evidence/package-standards_policy_impact.log create mode 100644 docs/plans/purpose-separated-standards-engine/reports/performance-core-evidence/package-standards_snapshots.log create mode 100644 docs/plans/purpose-separated-standards-engine/reports/performance-core-evidence/package-standards_verifier.log create mode 100644 docs/plans/purpose-separated-standards-engine/reports/performance-core-evidence/package-summary.json create mode 100644 docs/plans/purpose-separated-standards-engine/reports/performance-core-evidence/per-test-disposition.csv create mode 100644 docs/plans/purpose-separated-standards-engine/reports/performance-core-evidence/structural-final-code.json create mode 100644 docs/plans/purpose-separated-standards-engine/reports/performance-core-evidence/test-candidate.txt create mode 100644 docs/plans/purpose-separated-standards-engine/reports/performance-core-evidence/tested-source.json create mode 100644 docs/plans/purpose-separated-standards-engine/reports/performance-core-increment.md diff --git a/docs/plans/purpose-separated-standards-engine/reports/performance-core-evidence/baseline-capture-size-0.json b/docs/plans/purpose-separated-standards-engine/reports/performance-core-evidence/baseline-capture-size-0.json new file mode 100644 index 00000000..b605d5d1 --- /dev/null +++ b/docs/plans/purpose-separated-standards-engine/reports/performance-core-evidence/baseline-capture-size-0.json @@ -0,0 +1 @@ +{"store_bytes": 4558848, "files": 434, "content_bytes": 3708262} \ No newline at end of file diff --git a/docs/plans/purpose-separated-standards-engine/reports/performance-core-evidence/baseline-capture-size-1.json b/docs/plans/purpose-separated-standards-engine/reports/performance-core-evidence/baseline-capture-size-1.json new file mode 100644 index 00000000..b605d5d1 --- /dev/null +++ b/docs/plans/purpose-separated-standards-engine/reports/performance-core-evidence/baseline-capture-size-1.json @@ -0,0 +1 @@ +{"store_bytes": 4558848, "files": 434, "content_bytes": 3708262} \ No newline at end of file diff --git a/docs/plans/purpose-separated-standards-engine/reports/performance-core-evidence/baseline-capture-size-2.json b/docs/plans/purpose-separated-standards-engine/reports/performance-core-evidence/baseline-capture-size-2.json new file mode 100644 index 00000000..b605d5d1 --- /dev/null +++ b/docs/plans/purpose-separated-standards-engine/reports/performance-core-evidence/baseline-capture-size-2.json @@ -0,0 +1 @@ +{"store_bytes": 4558848, "files": 434, "content_bytes": 3708262} \ No newline at end of file diff --git a/docs/plans/purpose-separated-standards-engine/reports/performance-core-evidence/baseline-long.jsonl b/docs/plans/purpose-separated-standards-engine/reports/performance-core-evidence/baseline-long.jsonl new file mode 100644 index 00000000..fe3e2623 --- /dev/null +++ b/docs/plans/purpose-separated-standards-engine/reports/performance-core-evidence/baseline-long.jsonl @@ -0,0 +1,5 @@ +{"event": "start", "test": "test_agent_workflow.AgentWorkflowTest.test_normative_proposal_stops_at_real_pending_work", "at": 1790197663.6984324} +{"event": "observation", "test": "test_agent_workflow.AgentWorkflowTest.test_normative_proposal_stops_at_real_pending_work", "elapsed_s": 28.488586285999986, "stack": [" File \"/mnt/data/pse-performance-work/Coding-Standards/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/measurement-tools/run_timed_suite.py\", line 58, in \n result=unittest.TextTestRunner(verbosity=1,resultclass=Result).run(suite)\n", " File \"/usr/lib/python3.13/unittest/runner.py\", line 240, in run\n test(result)\n", " File \"/usr/lib/python3.13/unittest/suite.py\", line 84, in __call__\n return self.run(*args, **kwds)\n", " File \"/usr/lib/python3.13/unittest/suite.py\", line 122, in run\n test(result)\n", " File \"/usr/lib/python3.13/unittest/case.py\", line 707, in __call__\n return self.run(*args, **kwds)\n", " File \"/usr/lib/python3.13/unittest/case.py\", line 651, in run\n self._callTestMethod(testMethod)\n", " File \"/mnt/data/pse-performance-work/Coding-Standards/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/measurement-tools/run_timed_suite.py\", line 36, in timed\n try:return _fn(self,*args,**kwargs)\n", " File \"/usr/lib/python3.13/unittest/case.py\", line 606, in _callTestMethod\n if method() is not None:\n", " File \"/mnt/data/pse-performance-work/baseline/tools/standards_engine/tests/test_agent_workflow.py\", line 323, in test_normative_proposal_stops_at_real_pending_work\n rejected = self.facade.resolve_workflow(\n", " File \"/mnt/data/pse-performance-work/baseline/tools/standards_engine/standards_engine/tools.py\", line 298, in resolve_workflow\n return self._result(\"resolve_workflow\", self._engine.resolve_workflow(call))\n", " File \"/mnt/data/pse-performance-work/baseline/tools/standards_engine/standards_engine/context_projection.py\", line 62, in invoke\n return function(engine, call)\n", " File \"/mnt/data/pse-performance-work/baseline/tools/standards_engine/standards_engine/engine.py\", line 940, in resolve_workflow\n return advance(self, \"resolve_workflow\", call)\n", " File \"/mnt/data/pse-performance-work/baseline/tools/standards_engine/standards_engine/agent_workflow.py\", line 193, in advance\n current = view(engine, bound)\n", " File \"/mnt/data/pse-performance-work/baseline/tools/standards_engine/standards_engine/agent_workflow.py\", line 123, in view\n outcome = engine._analysis_result(engine._evaluate(bound.analysis))\n", " File \"/mnt/data/pse-performance-work/Coding-Standards/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/measurement-tools/run_timed_suite.py\", line 25, in observe\n try:return original(*args,**kwargs)\n", " File \"/mnt/data/pse-performance-work/baseline/tools/standards_engine/standards_engine/engine.py\", line 1763, in _evaluate\n accepted = self._compiled_snapshot(state.base_snapshot)\n", " File \"/mnt/data/pse-performance-work/Coding-Standards/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/measurement-tools/run_timed_suite.py\", line 25, in observe\n try:return original(*args,**kwargs)\n", " File \"/mnt/data/pse-performance-work/baseline/tools/standards_engine/standards_engine/engine.py\", line 1672, in _compiled_snapshot\n capture = self._snapshots.load_content(snapshot)\n", " File \"/mnt/data/pse-performance-work/Coding-Standards/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/measurement-tools/run_timed_suite.py\", line 25, in observe\n try:return original(*args,**kwargs)\n", " File \"/mnt/data/pse-performance-work/baseline/tools/standards_snapshots/standards_snapshots/module.py\", line 112, in load_content\n if self._content_id(capture) != content_id:\n", " File \"/mnt/data/pse-performance-work/Coding-Standards/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/measurement-tools/run_timed_suite.py\", line 25, in observe\n try:return original(*args,**kwargs)\n", " File \"/mnt/data/pse-performance-work/baseline/tools/standards_snapshots/standards_snapshots/module.py\", line 210, in _content_id\n return hash_identity(\n", " File \"/mnt/data/pse-performance-work/baseline/tools/standards_identity/standards_identity/encoding.py\", line 93, in hash_identity\n encoded = encode_identity_value(value)\n", " File \"/mnt/data/pse-performance-work/baseline/tools/standards_identity/standards_identity/encoding.py\", line 75, in encode_identity_value\n return _encode(value)\n", " File \"/mnt/data/pse-performance-work/baseline/tools/standards_identity/standards_identity/encoding.py\", line 191, in _encode\n return b\"[\" + b\",\".join(_encode(item) for item in value.values) + b\"]\"\n", " File \"/mnt/data/pse-performance-work/baseline/tools/standards_identity/standards_identity/encoding.py\", line 191, in \n return b\"[\" + b\",\".join(_encode(item) for item in value.values) + b\"]\"\n", " File \"/mnt/data/pse-performance-work/baseline/tools/standards_identity/standards_identity/encoding.py\", line 197, in _encode\n return b\"{\" + b\",\".join(encoded_members) + b\"}\"\n", " File \"/mnt/data/pse-performance-work/baseline/tools/standards_identity/standards_identity/encoding.py\", line 194, in \n _encode_string(key) + b\":\" + _encode(member_value)\n", " File \"/mnt/data/pse-performance-work/baseline/tools/standards_identity/standards_identity/encoding.py\", line 191, in _encode\n return b\"[\" + b\",\".join(_encode(item) for item in value.values) + b\"]\"\n", " File \"/mnt/data/pse-performance-work/baseline/tools/standards_identity/standards_identity/encoding.py\", line 191, in \n return b\"[\" + b\",\".join(_encode(item) for item in value.values) + b\"]\"\n", " File \"/mnt/data/pse-performance-work/baseline/tools/standards_identity/standards_identity/encoding.py\", line 187, in _encode\n return _encode_integer(value)\n", " File \"/mnt/data/pse-performance-work/baseline/tools/standards_identity/standards_identity/encoding.py\", line 211, in _encode_integer\n suffix = b\"\".join(\n", " File \"/mnt/data/pse-performance-work/baseline/tools/standards_identity/standards_identity/encoding.py\", line 211, in \n suffix = b\"\".join(\n"]} +{"event": "observation", "test": "test_agent_workflow.AgentWorkflowTest.test_normative_proposal_stops_at_real_pending_work", "elapsed_s": 73.89179600099999, "stack": [" File \"/mnt/data/pse-performance-work/Coding-Standards/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/measurement-tools/run_timed_suite.py\", line 58, in \n result=unittest.TextTestRunner(verbosity=1,resultclass=Result).run(suite)\n", " File \"/usr/lib/python3.13/unittest/runner.py\", line 240, in run\n test(result)\n", " File \"/usr/lib/python3.13/unittest/suite.py\", line 84, in __call__\n return self.run(*args, **kwds)\n", " File \"/usr/lib/python3.13/unittest/suite.py\", line 122, in run\n test(result)\n", " File \"/usr/lib/python3.13/unittest/case.py\", line 707, in __call__\n return self.run(*args, **kwds)\n", " File \"/usr/lib/python3.13/unittest/case.py\", line 651, in run\n self._callTestMethod(testMethod)\n", " File \"/mnt/data/pse-performance-work/Coding-Standards/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/measurement-tools/run_timed_suite.py\", line 36, in timed\n try:return _fn(self,*args,**kwargs)\n", " File \"/usr/lib/python3.13/unittest/case.py\", line 606, in _callTestMethod\n if method() is not None:\n", " File \"/mnt/data/pse-performance-work/baseline/tools/standards_engine/tests/test_agent_workflow.py\", line 328, in test_normative_proposal_stops_at_real_pending_work\n resolved = self.facade.resolve_workflow(\n", " File \"/mnt/data/pse-performance-work/baseline/tools/standards_engine/standards_engine/tools.py\", line 298, in resolve_workflow\n return self._result(\"resolve_workflow\", self._engine.resolve_workflow(call))\n", " File \"/mnt/data/pse-performance-work/baseline/tools/standards_engine/standards_engine/context_projection.py\", line 62, in invoke\n return function(engine, call)\n", " File \"/mnt/data/pse-performance-work/baseline/tools/standards_engine/standards_engine/engine.py\", line 940, in resolve_workflow\n return advance(self, \"resolve_workflow\", call)\n", " File \"/mnt/data/pse-performance-work/baseline/tools/standards_engine/standards_engine/agent_workflow.py\", line 228, in advance\n result = engine.resolve(\n", " File \"/mnt/data/pse-performance-work/Coding-Standards/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/measurement-tools/run_timed_suite.py\", line 25, in observe\n try:return original(*args,**kwargs)\n", " File \"/mnt/data/pse-performance-work/baseline/tools/standards_engine/standards_engine/context_projection.py\", line 62, in invoke\n return function(engine, call)\n", " File \"/mnt/data/pse-performance-work/baseline/tools/standards_engine/standards_engine/engine.py\", line 1621, in resolve\n return self._evaluate_publish_project(successor)\n", " File \"/mnt/data/pse-performance-work/baseline/tools/standards_engine/standards_engine/engine.py\", line 1935, in _evaluate_publish_project\n evaluation = self._evaluate(state) if evaluation is None else evaluation\n", " File \"/mnt/data/pse-performance-work/Coding-Standards/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/measurement-tools/run_timed_suite.py\", line 25, in observe\n try:return original(*args,**kwargs)\n", " File \"/mnt/data/pse-performance-work/baseline/tools/standards_engine/standards_engine/engine.py\", line 1763, in _evaluate\n accepted = self._compiled_snapshot(state.base_snapshot)\n", " File \"/mnt/data/pse-performance-work/Coding-Standards/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/measurement-tools/run_timed_suite.py\", line 25, in observe\n try:return original(*args,**kwargs)\n", " File \"/mnt/data/pse-performance-work/baseline/tools/standards_engine/standards_engine/engine.py\", line 1673, in _compiled_snapshot\n return self._compile(\n", " File \"/mnt/data/pse-performance-work/Coding-Standards/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/measurement-tools/run_timed_suite.py\", line 25, in observe\n try:return original(*args,**kwargs)\n", " File \"/mnt/data/pse-performance-work/baseline/tools/standards_engine/standards_engine/engine.py\", line 1716, in _compile\n corpus, impact, load_coverage_horizon(source, corpus, impact)\n", " File \"/mnt/data/pse-performance-work/baseline/tools/standards_analysis/standards_analysis/coverage.py\", line 548, in load_coverage_horizon\n return _load_coverage_horizon(source, corpus, compiled, path)\n", " File \"/mnt/data/pse-performance-work/baseline/tools/standards_analysis/standards_analysis/coverage.py\", line 475, in _load_coverage_horizon\n dependency = suite_inputs.dependency(suite.id)\n", " File \"/mnt/data/pse-performance-work/baseline/tools/standards_metadata/standards_metadata/suite_inputs.py\", line 255, in dependency\n fingerprint = _identity_digest(\n", " File \"/mnt/data/pse-performance-work/baseline/tools/standards_metadata/standards_metadata/suite_inputs.py\", line 100, in _identity_digest\n return file_digest(encode_identity_value(value))\n", " File \"/mnt/data/pse-performance-work/baseline/tools/standards_identity/standards_identity/encoding.py\", line 75, in encode_identity_value\n return _encode(value)\n", " File \"/mnt/data/pse-performance-work/baseline/tools/standards_identity/standards_identity/encoding.py\", line 197, in _encode\n return b\"{\" + b\",\".join(encoded_members) + b\"}\"\n", " File \"/mnt/data/pse-performance-work/baseline/tools/standards_identity/standards_identity/encoding.py\", line 195, in \n for key, member_value in value.members\n", " File \"/mnt/data/pse-performance-work/baseline/tools/standards_identity/standards_identity/encoding.py\", line 191, in _encode\n return b\"[\" + b\",\".join(_encode(item) for item in value.values) + b\"]\"\n", " File \"/mnt/data/pse-performance-work/baseline/tools/standards_identity/standards_identity/encoding.py\", line 191, in \n return b\"[\" + b\",\".join(_encode(item) for item in value.values) + b\"]\"\n", " File \"/mnt/data/pse-performance-work/baseline/tools/standards_identity/standards_identity/encoding.py\", line 197, in _encode\n return b\"{\" + b\",\".join(encoded_members) + b\"}\"\n", " File \"/mnt/data/pse-performance-work/baseline/tools/standards_identity/standards_identity/encoding.py\", line 195, in \n for key, member_value in value.members\n", " File \"/mnt/data/pse-performance-work/baseline/tools/standards_identity/standards_identity/encoding.py\", line 189, in _encode\n return _encode_string(value)\n", " File \"/mnt/data/pse-performance-work/baseline/tools/standards_identity/standards_identity/encoding.py\", line 231, in _encode_string\n return b\"\".join(chunks)\n"]} +{"event": "end", "test": "test_agent_workflow.AgentWorkflowTest.test_normative_proposal_stops_at_real_pending_work", "wall_s": 116.12014075699994, "cpu_s": 111.695024681, "status": "pass", "spans": {"SnapshotModule._content_id": {"calls": 32, "inclusive_s": 83.12892819400008}, "SnapshotModule.load_content": {"calls": 32, "inclusive_s": 83.49566188699976}, "StandardsEngine._compile": {"calls": 52, "inclusive_s": 17.182591595999952}, "StandardsEngine._proposal_projection": {"calls": 21, "inclusive_s": 81.74535496400006}, "AuthoringModule.read_revision": {"calls": 24, "inclusive_s": 0.990388941000333}, "StandardsEngine._compiled_snapshot": {"calls": 10, "inclusive_s": 29.737081497999952}, "StandardsEngine._validate_projected_inputs": {"calls": 10, "inclusive_s": 38.62729159699995}, "StandardsEngine.analyze_proposal": {"calls": 1, "inclusive_s": 10.510616657000014}, "StandardsEngine.propose": {"calls": 1, "inclusive_s": 17.063485118999893}, "StandardsEngine._evaluate": {"calls": 9, "inclusive_s": 97.97490790899985}, "StandardsEngine.resolve": {"calls": 3, "inclusive_s": 55.28778772700002}}, "setup_s": 1.5819999816812924e-06, "body_s": 116.11994709300006, "teardown_s": 2.0229999790899456e-06} +{"event": "summary", "total_s": 132.651418186, "run": 1, "errors": 0, "failures": 0, "skips": 0} diff --git a/docs/plans/purpose-separated-standards-engine/reports/performance-core-evidence/baseline-long.log b/docs/plans/purpose-separated-standards-engine/reports/performance-core-evidence/baseline-long.log new file mode 100644 index 00000000..b6ca5f24 --- /dev/null +++ b/docs/plans/purpose-separated-standards-engine/reports/performance-core-evidence/baseline-long.log @@ -0,0 +1,7 @@ +START test_agent_workflow.AgentWorkflowTest.test_normative_proposal_stops_at_real_pending_work +.END test_agent_workflow.AgentWorkflowTest.test_normative_proposal_stops_at_real_pending_work 116.12 pass + +---------------------------------------------------------------------- +Ran 1 test in 131.490s + +OK diff --git a/docs/plans/purpose-separated-standards-engine/reports/performance-core-evidence/baseline-operations.jsonl b/docs/plans/purpose-separated-standards-engine/reports/performance-core-evidence/baseline-operations.jsonl new file mode 100644 index 00000000..24c3ab80 --- /dev/null +++ b/docs/plans/purpose-separated-standards-engine/reports/performance-core-evidence/baseline-operations.jsonl @@ -0,0 +1,57 @@ +{"operation": "s0.engine_open_new", "wall_s": 0.002903757999987988, "cpu_s": 0.002902063000000066, "status": "ok", "peak_rss_kib": 138000, "spans": {"sqlite._verify_integrity": {"calls": 1, "wall_s": 0.0001238920000048438, "self_s": 0.0001238920000048438}, "sqlite.__init__": {"calls": 1, "wall_s": 0.002749310999988097, "self_s": 0.0026254189999832533}, "snapshot.maintain": {"calls": 1, "wall_s": 3.94580000033784e-05, "self_s": 3.94580000033784e-05}}, "git_reads": {"count": 0, "unique": 0, "top": []}, "git_objects": {"count": 0, "unique": 0}, "git_commands": {}} +{"operation": "s0.facade_construct", "wall_s": 0.2647916510000101, "cpu_s": 0.264798651, "status": "ok", "peak_rss_kib": 138128, "spans": {"facade.contracts": {"calls": 1, "wall_s": 0.25904541399999914, "self_s": 0.25904541399999914}}, "git_reads": {"count": 0, "unique": 0, "top": []}, "git_objects": {"count": 0, "unique": 0}, "git_commands": {}} +{"operation": "s0.create_snapshot", "wall_s": 16.236980419999995, "cpu_s": 7.705020422, "status": "ok", "peak_rss_kib": 247636, "spans": {"git.command": {"calls": 6135, "wall_s": 12.127858680998415, "self_s": 12.127858680998415}, "git.object": {"calls": 6134, "wall_s": 12.267059934999864, "self_s": 0.1430824830014501}, "git.read_file": {"calls": 1137, "wall_s": 12.647577634000115, "self_s": 0.3805176990002508}, "git.read_bytes": {"calls": 1137, "wall_s": 12.666732793999785, "self_s": 0.01915515999966999}, "compile.load_canonical_standards_corpus": {"calls": 2, "wall_s": 1.081028081999989, "self_s": 0.049484680000020376}, "compile.compile_policy_impact": {"calls": 2, "wall_s": 0.290228115000005, "self_s": 0.057907665000016095}, "compile.load_supporting_content": {"calls": 2, "wall_s": 0.021526116999993405, "self_s": 0.0002985699999840108}, "compile.standards_navigation_registry": {"calls": 2, "wall_s": 0.00774220700002104, "self_s": 0.00774220700002104}, "compile.load_router_projection": {"calls": 2, "wall_s": 0.028994710000006307, "self_s": 0.011620861000011473}, "compile.build_materials": {"calls": 2, "wall_s": 0.7118812579999911, "self_s": 0.0177253899999954}, "compile.load_coverage_horizon": {"calls": 2, "wall_s": 8.755555420000022, "self_s": 0.5043501320001269}, "compile.compile_coverage_definitions": {"calls": 2, "wall_s": 0.08080477499999006, "self_s": 0.08080477499999006}, "compile.load_repository_coverage_decisions": {"calls": 2, "wall_s": 0.1888919130000204, "self_s": 0.04512636300003692}, "compile.load_indexes": {"calls": 2, "wall_s": 2.343896177000005, "self_s": 0.06875533700005576}, "_compile/_GitRevisionSource": {"calls": 1, "wall_s": 13.099673725999992, "self_s": 7.294899994292336e-05}, "_compile/FrozenContentSource": {"calls": 1, "wall_s": 0.41104531199999883, "self_s": 9.731500000498272e-05}, "sqlite.snapshot": {"calls": 1, "wall_s": 0.00012211000000661443, "self_s": 0.00012211000000661443}}, "git_reads": {"count": 1137, "unique": 434, "top": [["topics/contracts.md", 17], ["STANDARDS-ROUTER.md", 15], ["topics/security.md", 14], ["workflows/verification.md", 14], ["topics/dependencies.md", 10], ["profiles/applications/frontend.md", 9], ["topics/architecture.md", 9], ["topics/concurrency.md", 9], ["topics/cross-platform.md", 9], ["workflows/commit.md", 9]]}, "git_objects": {"count": 6134, "unique": 524}, "git_commands": {"rev-parse --verify": 1, "cat-file --batch": 6134}} +{"operation": "s0.query_read_0", "wall_s": 3.108553853000018, "cpu_s": 3.1073362719999995, "status": "ok", "peak_rss_kib": 265592, "spans": {"snapshot.maintain": {"calls": 1, "wall_s": 4.0730000023359025e-05, "self_s": 4.0730000023359025e-05}, "sqlite.snapshot": {"calls": 1, "wall_s": 1.9618999999693187e-05, "self_s": 1.9618999999693187e-05}, "sqlite.load_content": {"calls": 1, "wall_s": 0.010735735999986673, "self_s": 0.01071611699998698}, "snapshot.load_content": {"calls": 1, "wall_s": 2.7848315920000175, "self_s": 2.7740551260000075}, "compile.load_canonical_standards_corpus": {"calls": 1, "wall_s": 0.020176915999996936, "self_s": 0.020176915999996936}, "compile.compile_policy_impact": {"calls": 1, "wall_s": 0.025100379999997813, "self_s": 0.025100379999997813}, "compile.load_supporting_content": {"calls": 1, "wall_s": 8.604600000694518e-05, "self_s": 8.604600000694518e-05}, "compile.standards_navigation_registry": {"calls": 1, "wall_s": 0.003598922000008997, "self_s": 0.003598922000008997}, "compile.load_router_projection": {"calls": 1, "wall_s": 0.004213998000011543, "self_s": 0.004213998000011543}, "compile.build_materials": {"calls": 1, "wall_s": 0.005104770000002645, "self_s": 0.005104770000002645}, "compile.load_coverage_horizon": {"calls": 1, "wall_s": 0.1851047589999837, "self_s": 0.1851047589999837}, "compile.compile_coverage_definitions": {"calls": 1, "wall_s": 0.03703815800000143, "self_s": 0.03703815800000143}, "compile.load_repository_coverage_decisions": {"calls": 1, "wall_s": 0.02059985900001493, "self_s": 0.02059985900001493}, "compile.load_indexes": {"calls": 1, "wall_s": 0.012494649000018399, "self_s": 0.012494649000018399}, "_compile/FrozenContentSource": {"calls": 1, "wall_s": 0.31360583700001143, "self_s": 8.737999996810686e-05}, "engine._compiled_snapshot": {"calls": 1, "wall_s": 3.1008246049999855, "self_s": 0.0023871759999565256}}, "git_reads": {"count": 0, "unique": 0, "top": []}, "git_objects": {"count": 0, "unique": 0}, "git_commands": {}} +{"operation": "s0.query_read_1", "wall_s": 2.9010077629999955, "cpu_s": 2.8950480920000015, "status": "ok", "peak_rss_kib": 267492, "spans": {"snapshot.maintain": {"calls": 1, "wall_s": 9.627200000750236e-05, "self_s": 9.627200000750236e-05}, "sqlite.snapshot": {"calls": 1, "wall_s": 2.6519000016378413e-05, "self_s": 2.6519000016378413e-05}, "sqlite.load_content": {"calls": 1, "wall_s": 0.011508786000007376, "self_s": 0.011482266999990998}, "snapshot.load_content": {"calls": 1, "wall_s": 2.585409298000002, "self_s": 2.573804239999987}, "compile.load_canonical_standards_corpus": {"calls": 1, "wall_s": 0.020666718000001083, "self_s": 0.020666718000001083}, "compile.compile_policy_impact": {"calls": 1, "wall_s": 0.025351120000010496, "self_s": 0.025351120000010496}, "compile.load_supporting_content": {"calls": 1, "wall_s": 9.314800001902768e-05, "self_s": 9.314800001902768e-05}, "compile.standards_navigation_registry": {"calls": 1, "wall_s": 0.003522811000010506, "self_s": 0.003522811000010506}, "compile.load_router_projection": {"calls": 1, "wall_s": 0.004165636999999833, "self_s": 0.004165636999999833}, "compile.build_materials": {"calls": 1, "wall_s": 0.005027406000010615, "self_s": 0.005027406000010615}, "compile.load_coverage_horizon": {"calls": 1, "wall_s": 0.18231821399999149, "self_s": 0.18231821399999149}, "compile.compile_coverage_definitions": {"calls": 1, "wall_s": 0.03419996600001696, "self_s": 0.03419996600001696}, "compile.load_repository_coverage_decisions": {"calls": 1, "wall_s": 0.019399781000004168, "self_s": 0.019399781000004168}, "compile.load_indexes": {"calls": 1, "wall_s": 0.01123696599998425, "self_s": 0.01123696599998425}, "_compile/FrozenContentSource": {"calls": 1, "wall_s": 0.30607792800000766, "self_s": 9.616099995923832e-05}, "engine._compiled_snapshot": {"calls": 1, "wall_s": 2.893900973000001, "self_s": 0.0024137469999914174}}, "git_reads": {"count": 0, "unique": 0, "top": []}, "git_objects": {"count": 0, "unique": 0}, "git_commands": {}} +{"operation": "s0.query_read_2", "wall_s": 3.116204374000006, "cpu_s": 3.113353329999999, "status": "ok", "peak_rss_kib": 267748, "spans": {"snapshot.maintain": {"calls": 1, "wall_s": 9.42489999999907e-05, "self_s": 9.42489999999907e-05}, "sqlite.snapshot": {"calls": 1, "wall_s": 2.6418000004468922e-05, "self_s": 2.6418000004468922e-05}, "sqlite.load_content": {"calls": 1, "wall_s": 0.010564313999992692, "self_s": 0.010537895999988223}, "snapshot.load_content": {"calls": 1, "wall_s": 2.8040415069999938, "self_s": 2.793382944000001}, "compile.load_canonical_standards_corpus": {"calls": 1, "wall_s": 0.020239008000004333, "self_s": 0.020239008000004333}, "compile.compile_policy_impact": {"calls": 1, "wall_s": 0.025634216000014476, "self_s": 0.025634216000014476}, "compile.load_supporting_content": {"calls": 1, "wall_s": 7.260700002120757e-05, "self_s": 7.260700002120757e-05}, "compile.standards_navigation_registry": {"calls": 1, "wall_s": 0.0036172599999986232, "self_s": 0.0036172599999986232}, "compile.load_router_projection": {"calls": 1, "wall_s": 0.0041308459999811475, "self_s": 0.0041308459999811475}, "compile.build_materials": {"calls": 1, "wall_s": 0.005211698000010756, "self_s": 0.005211698000010756}, "compile.load_coverage_horizon": {"calls": 1, "wall_s": 0.17785983999999644, "self_s": 0.17785983999999644}, "compile.compile_coverage_definitions": {"calls": 1, "wall_s": 0.0341870780000022, "self_s": 0.0341870780000022}, "compile.load_repository_coverage_decisions": {"calls": 1, "wall_s": 0.01946786199999906, "self_s": 0.01946786199999906}, "compile.load_indexes": {"calls": 1, "wall_s": 0.011349550999995017, "self_s": 0.011349550999995017}, "_compile/FrozenContentSource": {"calls": 1, "wall_s": 0.30184526700000447, "self_s": 7.530099998120932e-05}, "engine._compiled_snapshot": {"calls": 1, "wall_s": 3.109413951000022, "self_s": 0.0035271770000235847}}, "git_reads": {"count": 0, "unique": 0, "top": []}, "git_objects": {"count": 0, "unique": 0}, "git_commands": {}} +{"operation": "s0.inspect_policy", "wall_s": 3.015771655000009, "cpu_s": 2.996201976000002, "status": "ok", "peak_rss_kib": 268024, "spans": {"snapshot.maintain": {"calls": 1, "wall_s": 0.0012977219999754652, "self_s": 0.0012977219999754652}, "sqlite.snapshot": {"calls": 1, "wall_s": 2.8342000007341994e-05, "self_s": 2.8342000007341994e-05}, "sqlite.load_content": {"calls": 1, "wall_s": 0.01073816100000613, "self_s": 0.010709818999998788}, "snapshot.load_content": {"calls": 1, "wall_s": 2.6958382709999853, "self_s": 2.6838023880000037}, "compile.load_canonical_standards_corpus": {"calls": 1, "wall_s": 0.02291108700001132, "self_s": 0.02291108700001132}, "compile.compile_policy_impact": {"calls": 1, "wall_s": 0.02540215600001261, "self_s": 0.02540215600001261}, "compile.load_supporting_content": {"calls": 1, "wall_s": 7.695299998999872e-05, "self_s": 7.695299998999872e-05}, "compile.standards_navigation_registry": {"calls": 1, "wall_s": 0.0034303230000034546, "self_s": 0.0034303230000034546}, "compile.load_router_projection": {"calls": 1, "wall_s": 0.004132217000005767, "self_s": 0.004132217000005767}, "compile.build_materials": {"calls": 1, "wall_s": 0.005023820000019441, "self_s": 0.005023820000019441}, "compile.load_coverage_horizon": {"calls": 1, "wall_s": 0.18460583500001349, "self_s": 0.18460583500001349}, "compile.compile_coverage_definitions": {"calls": 1, "wall_s": 0.03481759499999271, "self_s": 0.03481759499999271}, "compile.load_repository_coverage_decisions": {"calls": 1, "wall_s": 0.020416132000008247, "self_s": 0.020416132000008247}, "compile.load_indexes": {"calls": 1, "wall_s": 0.0115853540000046, "self_s": 0.0115853540000046}, "_compile/FrozenContentSource": {"calls": 1, "wall_s": 0.31247793399998613, "self_s": 7.64619999245042e-05}, "engine._compiled_snapshot": {"calls": 1, "wall_s": 3.011001460000017, "self_s": 0.002685255000045572}}, "git_reads": {"count": 0, "unique": 0, "top": []}, "git_objects": {"count": 0, "unique": 0}, "git_commands": {}} +{"operation": "s0.route_explicit", "wall_s": 3.1092030869999974, "cpu_s": 3.103626288000001, "status": "ok", "peak_rss_kib": 268024, "spans": {"snapshot.maintain": {"calls": 1, "wall_s": 0.00010523500000658714, "self_s": 0.00010523500000658714}, "sqlite.snapshot": {"calls": 1, "wall_s": 2.8100999998059706e-05, "self_s": 2.8100999998059706e-05}, "sqlite.load_content": {"calls": 1, "wall_s": 0.011129754000023695, "self_s": 0.011101653000025635}, "snapshot.load_content": {"calls": 1, "wall_s": 2.5582360599999845, "self_s": 2.547001070999954}, "compile.load_canonical_standards_corpus": {"calls": 1, "wall_s": 0.021342005999997582, "self_s": 0.021342005999997582}, "compile.compile_policy_impact": {"calls": 1, "wall_s": 0.02632611699999643, "self_s": 0.02632611699999643}, "compile.load_supporting_content": {"calls": 1, "wall_s": 0.00011698200000864745, "self_s": 0.00011698200000864745}, "compile.standards_navigation_registry": {"calls": 1, "wall_s": 0.003653812000010248, "self_s": 0.003653812000010248}, "compile.load_router_projection": {"calls": 1, "wall_s": 0.004962038000002167, "self_s": 0.004962038000002167}, "compile.build_materials": {"calls": 1, "wall_s": 0.005539940000005572, "self_s": 0.005539940000005572}, "compile.load_coverage_horizon": {"calls": 1, "wall_s": 0.18673770399999512, "self_s": 0.18673770399999512}, "compile.compile_coverage_definitions": {"calls": 1, "wall_s": 0.03733650399999533, "self_s": 0.03733650399999533}, "compile.load_repository_coverage_decisions": {"calls": 1, "wall_s": 0.01970524499998305, "self_s": 0.01970524499998305}, "compile.load_indexes": {"calls": 1, "wall_s": 0.01145430200000419, "self_s": 0.01145430200000419}, "_compile/FrozenContentSource": {"calls": 1, "wall_s": 0.31725168599999165, "self_s": 7.703599999331345e-05}, "engine._compiled_snapshot": {"calls": 1, "wall_s": 2.8777368479999836, "self_s": 0.002249102000007497}}, "git_reads": {"count": 0, "unique": 0, "top": []}, "git_objects": {"count": 0, "unique": 0}, "git_commands": {}} +{"operation": "s0.prepare_same_snapshot", "wall_s": 6.242845845000005, "cpu_s": 6.217138642000002, "status": "ok", "peak_rss_kib": 273468, "spans": {"snapshot.maintain": {"calls": 3, "wall_s": 0.0014188900000249305, "self_s": 0.0014188900000249305}, "sqlite.snapshot": {"calls": 3, "wall_s": 8.880199999339311e-05, "self_s": 8.880199999339311e-05}, "sqlite.load_content": {"calls": 2, "wall_s": 0.023317628999990347, "self_s": 0.023253523999983372}, "snapshot.load_content": {"calls": 2, "wall_s": 5.543057457999993, "self_s": 5.518442667999977}, "compile.load_canonical_standards_corpus": {"calls": 2, "wall_s": 0.047282652999996344, "self_s": 0.047282652999996344}, "compile.compile_policy_impact": {"calls": 2, "wall_s": 0.06214068000002726, "self_s": 0.06214068000002726}, "compile.load_supporting_content": {"calls": 2, "wall_s": 0.0002339039999696979, "self_s": 0.0002339039999696979}, "compile.standards_navigation_registry": {"calls": 2, "wall_s": 0.008395945999978949, "self_s": 0.008395945999978949}, "compile.load_router_projection": {"calls": 2, "wall_s": 0.009522390999990193, "self_s": 0.009522390999990193}, "compile.build_materials": {"calls": 2, "wall_s": 0.012039803999982723, "self_s": 0.012039803999982723}, "compile.load_coverage_horizon": {"calls": 2, "wall_s": 0.36401088200003073, "self_s": 0.36401088200003073}, "compile.compile_coverage_definitions": {"calls": 2, "wall_s": 0.07121877199998039, "self_s": 0.07121877199998039}, "compile.load_repository_coverage_decisions": {"calls": 2, "wall_s": 0.0429630739999709, "self_s": 0.0429630739999709}, "compile.load_indexes": {"calls": 2, "wall_s": 0.030979141000017307, "self_s": 0.030979141000017307}, "_compile/FrozenContentSource": {"calls": 2, "wall_s": 0.6490558929999679, "self_s": 0.0002686460000234092}, "engine._compiled_snapshot": {"calls": 2, "wall_s": 6.1976748120000025, "self_s": 0.005561461000041845}, "compile.evaluate_analysis": {"calls": 1, "wall_s": 0.02301830899997981, "self_s": 0.02301830899997981}, "engine._evaluate_compiled": {"calls": 1, "wall_s": 0.023353501999991977, "self_s": 0.00033519300001216834}, "snapshot.publish_aggregate": {"calls": 1, "wall_s": 0.0009304510000163191, "self_s": 0.000784025000029942}}, "git_reads": {"count": 0, "unique": 0, "top": []}, "git_objects": {"count": 0, "unique": 0}, "git_commands": {}} +{"operation": "s0.resolve", "wall_s": 12.623128293999997, "cpu_s": 12.591148965999995, "status": "ok", "peak_rss_kib": 276884, "spans": {"snapshot.maintain": {"calls": 6, "wall_s": 0.00690843600003177, "self_s": 0.00690843600003177}, "sqlite.snapshot": {"calls": 6, "wall_s": 0.00015173499997445106, "self_s": 0.00015173499997445106}, "engine._load_analysis": {"calls": 1, "wall_s": 0.00118131899998275, "self_s": 0.0010705649999920297}, "sqlite.load_content": {"calls": 4, "wall_s": 0.044544359000013856, "self_s": 0.0444367500000169}, "snapshot.load_content": {"calls": 4, "wall_s": 11.099605999000033, "self_s": 11.050052512000008}, "compile.load_canonical_standards_corpus": {"calls": 4, "wall_s": 0.08992121999997948, "self_s": 0.08992121999997948}, "compile.compile_policy_impact": {"calls": 4, "wall_s": 0.10717343000001733, "self_s": 0.10717343000001733}, "compile.load_supporting_content": {"calls": 4, "wall_s": 0.0003397800000470852, "self_s": 0.0003397800000470852}, "compile.standards_navigation_registry": {"calls": 4, "wall_s": 0.013815768999990041, "self_s": 0.013815768999990041}, "compile.load_router_projection": {"calls": 4, "wall_s": 0.017110983999998552, "self_s": 0.017110983999998552}, "compile.build_materials": {"calls": 4, "wall_s": 0.021492649000009578, "self_s": 0.021492649000009578}, "compile.load_coverage_horizon": {"calls": 4, "wall_s": 0.9027138120000018, "self_s": 0.9027138120000018}, "compile.compile_coverage_definitions": {"calls": 4, "wall_s": 0.1435457099999553, "self_s": 0.1435457099999553}, "compile.load_repository_coverage_decisions": {"calls": 4, "wall_s": 0.08151628200002392, "self_s": 0.08151628200002392}, "compile.load_indexes": {"calls": 4, "wall_s": 0.048076526000016884, "self_s": 0.048076526000016884}, "_compile/FrozenContentSource": {"calls": 4, "wall_s": 1.426206260999976, "self_s": 0.0005000989999359717}, "engine._compiled_snapshot": {"calls": 4, "wall_s": 12.538947414999967, "self_s": 0.013135154999957876}, "compile.evaluate_analysis": {"calls": 2, "wall_s": 0.043965480000025536, "self_s": 0.043965480000025536}, "engine._evaluate_compiled": {"calls": 2, "wall_s": 0.04456584299998667, "self_s": 0.0006003629999611348}, "engine._evaluate": {"calls": 2, "wall_s": 12.588638607999997, "self_s": 0.005125350000042772}, "snapshot.publish_aggregate": {"calls": 1, "wall_s": 0.0037547409999945103, "self_s": 0.001922060999987707}}, "git_reads": {"count": 0, "unique": 0, "top": []}, "git_objects": {"count": 0, "unique": 0}, "git_commands": {}} +{"operation": "s0.inspect_analysis", "wall_s": 0.005750731000006226, "cpu_s": 0.005751678000002869, "status": "ok", "peak_rss_kib": 276884, "spans": {"snapshot.maintain": {"calls": 1, "wall_s": 8.947199998488031e-05, "self_s": 8.947199998488031e-05}, "sqlite.snapshot": {"calls": 1, "wall_s": 1.6213000009202005e-05, "self_s": 1.6213000009202005e-05}, "engine._load_analysis": {"calls": 1, "wall_s": 0.002499280999984421, "self_s": 0.002393595999990339}}, "git_reads": {"count": 0, "unique": 0, "top": []}, "git_objects": {"count": 0, "unique": 0}, "git_commands": {}} +{"operation": "s0.inspect_snapshot", "wall_s": 0.0005616469999836227, "cpu_s": 0.0005621759999954179, "status": "ok", "peak_rss_kib": 276884, "spans": {"snapshot.maintain": {"calls": 1, "wall_s": 3.918800001656564e-05, "self_s": 3.918800001656564e-05}, "sqlite.snapshot": {"calls": 1, "wall_s": 2.0491000014999372e-05, "self_s": 2.0491000014999372e-05}}, "git_reads": {"count": 0, "unique": 0, "top": []}, "git_objects": {"count": 0, "unique": 0}, "git_commands": {}} +{"operation": "s0.engine_close", "wall_s": 0.0005821870000204399, "cpu_s": 0.0005797219999976733, "status": "ok", "peak_rss_kib": 277040, "spans": {}, "git_reads": {"count": 0, "unique": 0, "top": []}, "git_objects": {"count": 0, "unique": 0}, "git_commands": {}} +{"operation": "s0.reopen_0", "wall_s": 0.003988014000015028, "cpu_s": 0.003988386999999705, "status": "ok", "peak_rss_kib": 277040, "spans": {"sqlite._verify_integrity": {"calls": 2, "wall_s": 0.0032181699999966895, "self_s": 0.0032181699999966895}, "sqlite.__init__": {"calls": 1, "wall_s": 0.00384050700000671, "self_s": 0.0006223370000100203}, "snapshot.maintain": {"calls": 1, "wall_s": 4.028999998695326e-05, "self_s": 4.028999998695326e-05}}, "git_reads": {"count": 0, "unique": 0, "top": []}, "git_objects": {"count": 0, "unique": 0}, "git_commands": {}} +{"operation": "s0.reopen_facade_0", "wall_s": 0.2752050579999832, "cpu_s": 0.2748510310000043, "status": "ok", "peak_rss_kib": 277040, "spans": {"facade.contracts": {"calls": 1, "wall_s": 0.27258328499999607, "self_s": 0.27258328499999607}}, "git_reads": {"count": 0, "unique": 0, "top": []}, "git_objects": {"count": 0, "unique": 0}, "git_commands": {}} +{"operation": "s0.reopened_query_0", "wall_s": 2.9728714870000204, "cpu_s": 2.967564484999997, "status": "ok", "peak_rss_kib": 277784, "spans": {"snapshot.maintain": {"calls": 1, "wall_s": 9.511999999745058e-05, "self_s": 9.511999999745058e-05}, "sqlite.snapshot": {"calls": 1, "wall_s": 8.032900001353482e-05, "self_s": 8.032900001353482e-05}, "sqlite.load_content": {"calls": 1, "wall_s": 0.011450214999996433, "self_s": 0.011369885999982898}, "snapshot.load_content": {"calls": 1, "wall_s": 2.647326152000005, "self_s": 2.635780817000011}, "compile.load_canonical_standards_corpus": {"calls": 1, "wall_s": 0.02063663599997767, "self_s": 0.02063663599997767}, "compile.compile_policy_impact": {"calls": 1, "wall_s": 0.026112330999978894, "self_s": 0.026112330999978894}, "compile.load_supporting_content": {"calls": 1, "wall_s": 7.06140000090727e-05, "self_s": 7.06140000090727e-05}, "compile.standards_navigation_registry": {"calls": 1, "wall_s": 0.003386508000005506, "self_s": 0.003386508000005506}, "compile.load_router_projection": {"calls": 1, "wall_s": 0.004247886999991124, "self_s": 0.004247886999991124}, "compile.build_materials": {"calls": 1, "wall_s": 0.0050090689999819915, "self_s": 0.0050090689999819915}, "compile.load_coverage_horizon": {"calls": 1, "wall_s": 0.18459516600000825, "self_s": 0.18459516600000825}, "compile.compile_coverage_definitions": {"calls": 1, "wall_s": 0.037531290999993416, "self_s": 0.037531290999993416}, "compile.load_repository_coverage_decisions": {"calls": 1, "wall_s": 0.020341352000002644, "self_s": 0.020341352000002644}, "compile.load_indexes": {"calls": 1, "wall_s": 0.011971602999977904, "self_s": 0.011971602999977904}, "_compile/FrozenContentSource": {"calls": 1, "wall_s": 0.31398703099998215, "self_s": 8.457400005568161e-05}, "engine._compiled_snapshot": {"calls": 1, "wall_s": 2.96522385199998, "self_s": 0.003910668999992595}}, "git_reads": {"count": 0, "unique": 0, "top": []}, "git_objects": {"count": 0, "unique": 0}, "git_commands": {}} +{"operation": "s0.reopen_1", "wall_s": 0.004863894000010305, "cpu_s": 0.004863888999999233, "status": "ok", "peak_rss_kib": 277784, "spans": {"sqlite._verify_integrity": {"calls": 2, "wall_s": 0.0039349959999981365, "self_s": 0.0039349959999981365}, "sqlite.__init__": {"calls": 1, "wall_s": 0.004720102000021598, "self_s": 0.0007851060000234611}, "snapshot.maintain": {"calls": 1, "wall_s": 3.943900000535905e-05, "self_s": 3.943900000535905e-05}}, "git_reads": {"count": 0, "unique": 0, "top": []}, "git_objects": {"count": 0, "unique": 0}, "git_commands": {}} +{"operation": "s0.reopen_facade_1", "wall_s": 0.2602996919999896, "cpu_s": 0.2597045999999992, "status": "ok", "peak_rss_kib": 277784, "spans": {"facade.contracts": {"calls": 1, "wall_s": 0.2569768179999983, "self_s": 0.2569768179999983}}, "git_reads": {"count": 0, "unique": 0, "top": []}, "git_objects": {"count": 0, "unique": 0}, "git_commands": {}} +{"operation": "s0.reopened_query_1", "wall_s": 2.9706288339999958, "cpu_s": 2.9649052469999972, "status": "ok", "peak_rss_kib": 277784, "spans": {"snapshot.maintain": {"calls": 1, "wall_s": 0.00011644200000660021, "self_s": 0.00011644200000660021}, "sqlite.snapshot": {"calls": 1, "wall_s": 6.890199998110802e-05, "self_s": 6.890199998110802e-05}, "sqlite.load_content": {"calls": 1, "wall_s": 0.010715322999999444, "self_s": 0.010646421000018336}, "snapshot.load_content": {"calls": 1, "wall_s": 2.633764747000015, "self_s": 2.622932982000009}, "compile.load_canonical_standards_corpus": {"calls": 1, "wall_s": 0.022191757000001644, "self_s": 0.022191757000001644}, "compile.compile_policy_impact": {"calls": 1, "wall_s": 0.027817242999987002, "self_s": 0.027817242999987002}, "compile.load_supporting_content": {"calls": 1, "wall_s": 8.005800000887575e-05, "self_s": 8.005800000887575e-05}, "compile.standards_navigation_registry": {"calls": 1, "wall_s": 0.0036021349999941776, "self_s": 0.0036021349999941776}, "compile.load_router_projection": {"calls": 1, "wall_s": 0.004218994000012799, "self_s": 0.004218994000012799}, "compile.build_materials": {"calls": 1, "wall_s": 0.005146479999979192, "self_s": 0.005146479999979192}, "compile.load_coverage_horizon": {"calls": 1, "wall_s": 0.1920339419999948, "self_s": 0.1920339419999948}, "compile.compile_coverage_definitions": {"calls": 1, "wall_s": 0.03616486900000382, "self_s": 0.03616486900000382}, "compile.load_repository_coverage_decisions": {"calls": 1, "wall_s": 0.02098071300000015, "self_s": 0.02098071300000015}, "compile.load_indexes": {"calls": 1, "wall_s": 0.012405903000001217, "self_s": 0.012405903000001217}, "_compile/FrozenContentSource": {"calls": 1, "wall_s": 0.32473018499999284, "self_s": 8.80910000091717e-05}, "engine._compiled_snapshot": {"calls": 1, "wall_s": 2.962764901000014, "self_s": 0.004269969000006313}}, "git_reads": {"count": 0, "unique": 0, "top": []}, "git_objects": {"count": 0, "unique": 0}, "git_commands": {}} +{"operation": "s1.engine_open_new", "wall_s": 0.0032945229999938874, "cpu_s": 0.003294115000002762, "status": "ok", "peak_rss_kib": 277784, "spans": {"sqlite._verify_integrity": {"calls": 1, "wall_s": 8.790900000121837e-05, "self_s": 8.790900000121837e-05}, "sqlite.__init__": {"calls": 1, "wall_s": 0.0031262249999883807, "self_s": 0.0030383159999871623}, "snapshot.maintain": {"calls": 1, "wall_s": 3.302799999005401e-05, "self_s": 3.302799999005401e-05}}, "git_reads": {"count": 0, "unique": 0, "top": []}, "git_objects": {"count": 0, "unique": 0}, "git_commands": {}} +{"operation": "s1.facade_construct", "wall_s": 0.2704123180000124, "cpu_s": 0.27041884399999816, "status": "ok", "peak_rss_kib": 277784, "spans": {"facade.contracts": {"calls": 1, "wall_s": 0.26768972799999347, "self_s": 0.26768972799999347}}, "git_reads": {"count": 0, "unique": 0, "top": []}, "git_objects": {"count": 0, "unique": 0}, "git_commands": {}} +{"operation": "s1.create_snapshot", "wall_s": 15.019866425999993, "cpu_s": 7.154173810000003, "status": "ok", "peak_rss_kib": 281904, "spans": {"git.command": {"calls": 6135, "wall_s": 11.08446989199922, "self_s": 11.08446989199922}, "git.object": {"calls": 6134, "wall_s": 11.231404363998024, "self_s": 0.14867828099880853}, "git.read_file": {"calls": 1137, "wall_s": 11.600335264999899, "self_s": 0.36893090100187464}, "git.read_bytes": {"calls": 1137, "wall_s": 11.618487512999451, "self_s": 0.018152247999552173}, "compile.load_canonical_standards_corpus": {"calls": 2, "wall_s": 0.98226260200002, "self_s": 0.05029495099989845}, "compile.compile_policy_impact": {"calls": 2, "wall_s": 0.2639407300000016, "self_s": 0.05654674800007342}, "compile.load_supporting_content": {"calls": 2, "wall_s": 0.017880815000012262, "self_s": 0.00024214700002289646}, "compile.standards_navigation_registry": {"calls": 2, "wall_s": 0.008881932999997844, "self_s": 0.008881932999997844}, "compile.load_router_projection": {"calls": 2, "wall_s": 0.022658954000007725, "self_s": 0.008968738000021403}, "compile.build_materials": {"calls": 2, "wall_s": 0.7048248409999758, "self_s": 0.01919860600003176}, "compile.load_coverage_horizon": {"calls": 2, "wall_s": 7.917672304000007, "self_s": 0.42392173300038394}, "compile.compile_coverage_definitions": {"calls": 2, "wall_s": 0.07462864099997546, "self_s": 0.07462864099997546}, "compile.load_repository_coverage_decisions": {"calls": 2, "wall_s": 0.18768376299999545, "self_s": 0.04681349099993781}, "compile.load_indexes": {"calls": 2, "wall_s": 2.166902618999984, "self_s": 0.03935270100018329}, "_compile/_GitRevisionSource": {"calls": 1, "wall_s": 12.033359620999988, "self_s": 6.765899999550129e-05}, "_compile/FrozenContentSource": {"calls": 1, "wall_s": 0.3141252480000105, "self_s": 8.000800002605502e-05}, "sqlite.snapshot": {"calls": 1, "wall_s": 8.33130000046367e-05, "self_s": 8.33130000046367e-05}}, "git_reads": {"count": 1137, "unique": 434, "top": [["topics/contracts.md", 17], ["STANDARDS-ROUTER.md", 15], ["topics/security.md", 14], ["workflows/verification.md", 14], ["topics/dependencies.md", 10], ["profiles/applications/frontend.md", 9], ["topics/architecture.md", 9], ["topics/concurrency.md", 9], ["topics/cross-platform.md", 9], ["workflows/commit.md", 9]]}, "git_objects": {"count": 6134, "unique": 524}, "git_commands": {"rev-parse --verify": 1, "cat-file --batch": 6134}} +{"operation": "s1.query_read_0", "wall_s": 2.9566667150000114, "cpu_s": 2.9512060449999993, "status": "ok", "peak_rss_kib": 281904, "spans": {"snapshot.maintain": {"calls": 1, "wall_s": 7.94070000154079e-05, "self_s": 7.94070000154079e-05}, "sqlite.snapshot": {"calls": 1, "wall_s": 5.1184999989573043e-05, "self_s": 5.1184999989573043e-05}, "sqlite.load_content": {"calls": 1, "wall_s": 0.011538561999998365, "self_s": 0.011487377000008792}, "snapshot.load_content": {"calls": 1, "wall_s": 2.614489748000011, "self_s": 2.6028717789999973}, "compile.load_canonical_standards_corpus": {"calls": 1, "wall_s": 0.02194389900000715, "self_s": 0.02194389900000715}, "compile.compile_policy_impact": {"calls": 1, "wall_s": 0.028811848000003693, "self_s": 0.028811848000003693}, "compile.load_supporting_content": {"calls": 1, "wall_s": 8.536600000752514e-05, "self_s": 8.536600000752514e-05}, "compile.standards_navigation_registry": {"calls": 1, "wall_s": 0.0037218189999919105, "self_s": 0.0037218189999919105}, "compile.load_router_projection": {"calls": 1, "wall_s": 0.007260497000004307, "self_s": 0.007260497000004307}, "compile.build_materials": {"calls": 1, "wall_s": 0.005137402000002567, "self_s": 0.005137402000002567}, "compile.load_coverage_horizon": {"calls": 1, "wall_s": 0.19159101100001408, "self_s": 0.19159101100001408}, "compile.compile_coverage_definitions": {"calls": 1, "wall_s": 0.03999622099999556, "self_s": 0.03999622099999556}, "compile.load_repository_coverage_decisions": {"calls": 1, "wall_s": 0.022028312000003325, "self_s": 0.022028312000003325}, "compile.load_indexes": {"calls": 1, "wall_s": 0.011815570999999636, "self_s": 0.011815570999999636}, "_compile/FrozenContentSource": {"calls": 1, "wall_s": 0.3324770689999923, "self_s": 8.512299996255024e-05}, "engine._compiled_snapshot": {"calls": 1, "wall_s": 2.9492380199999957, "self_s": 0.0022712029999922834}}, "git_reads": {"count": 0, "unique": 0, "top": []}, "git_objects": {"count": 0, "unique": 0}, "git_commands": {}} +{"operation": "s1.query_read_1", "wall_s": 3.0226590689999853, "cpu_s": 3.022338841, "status": "ok", "peak_rss_kib": 281904, "spans": {"snapshot.maintain": {"calls": 1, "wall_s": 9.432900000660993e-05, "self_s": 9.432900000660993e-05}, "sqlite.snapshot": {"calls": 1, "wall_s": 2.616800000510011e-05, "self_s": 2.616800000510011e-05}, "sqlite.load_content": {"calls": 1, "wall_s": 0.011077624999984437, "self_s": 0.011051456999979337}, "snapshot.load_content": {"calls": 1, "wall_s": 2.687283965000006, "self_s": 2.676112011000015}, "compile.load_canonical_standards_corpus": {"calls": 1, "wall_s": 0.020787767000001622, "self_s": 0.020787767000001622}, "compile.compile_policy_impact": {"calls": 1, "wall_s": 0.02541819300000725, "self_s": 0.02541819300000725}, "compile.load_supporting_content": {"calls": 1, "wall_s": 7.471999998642787e-05, "self_s": 7.471999998642787e-05}, "compile.standards_navigation_registry": {"calls": 1, "wall_s": 0.0034194429999843123, "self_s": 0.0034194429999843123}, "compile.load_router_projection": {"calls": 1, "wall_s": 0.0041713500000071235, "self_s": 0.0041713500000071235}, "compile.build_materials": {"calls": 1, "wall_s": 0.006604451000015388, "self_s": 0.006604451000015388}, "compile.load_coverage_horizon": {"calls": 1, "wall_s": 0.19473891299998058, "self_s": 0.19473891299998058}, "compile.compile_coverage_definitions": {"calls": 1, "wall_s": 0.03586506999999983, "self_s": 0.03586506999999983}, "compile.load_repository_coverage_decisions": {"calls": 1, "wall_s": 0.019725933999978906, "self_s": 0.019725933999978906}, "compile.load_indexes": {"calls": 1, "wall_s": 0.011678971000009142, "self_s": 0.011678971000009142}, "_compile/FrozenContentSource": {"calls": 1, "wall_s": 0.32256222499998444, "self_s": 7.741300001384843e-05}, "engine._compiled_snapshot": {"calls": 1, "wall_s": 3.0126234379999914, "self_s": 0.002777248000001009}}, "git_reads": {"count": 0, "unique": 0, "top": []}, "git_objects": {"count": 0, "unique": 0}, "git_commands": {}} +{"operation": "s1.query_read_2", "wall_s": 3.255451574999995, "cpu_s": 3.255064563999994, "status": "ok", "peak_rss_kib": 281904, "spans": {"snapshot.maintain": {"calls": 1, "wall_s": 9.733300001357748e-05, "self_s": 9.733300001357748e-05}, "sqlite.snapshot": {"calls": 1, "wall_s": 2.599900000177513e-05, "self_s": 2.599900000177513e-05}, "sqlite.load_content": {"calls": 1, "wall_s": 0.011085597000004555, "self_s": 0.01105959800000278}, "snapshot.load_content": {"calls": 1, "wall_s": 2.8629916239999886, "self_s": 2.8518086939999705}, "compile.load_canonical_standards_corpus": {"calls": 1, "wall_s": 0.022354210999992574, "self_s": 0.022354210999992574}, "compile.compile_policy_impact": {"calls": 1, "wall_s": 0.03531499799998983, "self_s": 0.03531499799998983}, "compile.load_supporting_content": {"calls": 1, "wall_s": 0.00010654700000145567, "self_s": 0.00010654700000145567}, "compile.standards_navigation_registry": {"calls": 1, "wall_s": 0.003948005000012245, "self_s": 0.003948005000012245}, "compile.load_router_projection": {"calls": 1, "wall_s": 0.0043100770000137345, "self_s": 0.0043100770000137345}, "compile.build_materials": {"calls": 1, "wall_s": 0.005617282999992312, "self_s": 0.005617282999992312}, "compile.load_coverage_horizon": {"calls": 1, "wall_s": 0.22594642100000328, "self_s": 0.22594642100000328}, "compile.compile_coverage_definitions": {"calls": 1, "wall_s": 0.03964174999998704, "self_s": 0.03964174999998704}, "compile.load_repository_coverage_decisions": {"calls": 1, "wall_s": 0.025159333000004835, "self_s": 0.025159333000004835}, "compile.load_indexes": {"calls": 1, "wall_s": 0.019469004999990602, "self_s": 0.019469004999990602}, "_compile/FrozenContentSource": {"calls": 1, "wall_s": 0.3819563799999912, "self_s": 8.875000000330147e-05}, "engine._compiled_snapshot": {"calls": 1, "wall_s": 3.2481850309999913, "self_s": 0.0032370270000114942}}, "git_reads": {"count": 0, "unique": 0, "top": []}, "git_objects": {"count": 0, "unique": 0}, "git_commands": {}} +{"operation": "s1.inspect_policy", "wall_s": 3.0704643720000036, "cpu_s": 3.0700439990000064, "status": "ok", "peak_rss_kib": 281904, "spans": {"snapshot.maintain": {"calls": 1, "wall_s": 9.649200001149438e-05, "self_s": 9.649200001149438e-05}, "sqlite.snapshot": {"calls": 1, "wall_s": 2.7129999978114938e-05, "self_s": 2.7129999978114938e-05}, "sqlite.load_content": {"calls": 1, "wall_s": 0.012214456999998902, "self_s": 0.012187327000020787}, "snapshot.load_content": {"calls": 1, "wall_s": 2.742675544000008, "self_s": 2.7303645949999975}, "compile.load_canonical_standards_corpus": {"calls": 1, "wall_s": 0.02259472100001858, "self_s": 0.02259472100001858}, "compile.compile_policy_impact": {"calls": 1, "wall_s": 0.02700070800000276, "self_s": 0.02700070800000276}, "compile.load_supporting_content": {"calls": 1, "wall_s": 0.00010149900001010792, "self_s": 0.00010149900001010792}, "compile.standards_navigation_registry": {"calls": 1, "wall_s": 0.003992669000012938, "self_s": 0.003992669000012938}, "compile.load_router_projection": {"calls": 1, "wall_s": 0.0041344779999974435, "self_s": 0.0041344779999974435}, "compile.build_materials": {"calls": 1, "wall_s": 0.005219916000015701, "self_s": 0.005219916000015701}, "compile.load_coverage_horizon": {"calls": 1, "wall_s": 0.18689219899999898, "self_s": 0.18689219899999898}, "compile.compile_coverage_definitions": {"calls": 1, "wall_s": 0.03641597300000399, "self_s": 0.03641597300000399}, "compile.load_repository_coverage_decisions": {"calls": 1, "wall_s": 0.020267554000014343, "self_s": 0.020267554000014343}, "compile.load_indexes": {"calls": 1, "wall_s": 0.012954554999993206, "self_s": 0.012954554999993206}, "_compile/FrozenContentSource": {"calls": 1, "wall_s": 0.31966239300001575, "self_s": 8.812099994770506e-05}, "engine._compiled_snapshot": {"calls": 1, "wall_s": 3.0651040900000055, "self_s": 0.0027661529999818413}}, "git_reads": {"count": 0, "unique": 0, "top": []}, "git_objects": {"count": 0, "unique": 0}, "git_commands": {}} +{"operation": "s1.route_explicit", "wall_s": 3.2566602630000148, "cpu_s": 3.252869587999996, "status": "ok", "peak_rss_kib": 281904, "spans": {"snapshot.maintain": {"calls": 1, "wall_s": 9.432900000660993e-05, "self_s": 9.432900000660993e-05}, "sqlite.snapshot": {"calls": 1, "wall_s": 2.6128000001790497e-05, "self_s": 2.6128000001790497e-05}, "sqlite.load_content": {"calls": 1, "wall_s": 0.011245850000022983, "self_s": 0.011219722000021193}, "snapshot.load_content": {"calls": 1, "wall_s": 2.720369865000009, "self_s": 2.7090296859999796}, "compile.load_canonical_standards_corpus": {"calls": 1, "wall_s": 0.023702872999990632, "self_s": 0.023702872999990632}, "compile.compile_policy_impact": {"calls": 1, "wall_s": 0.026841283999999632, "self_s": 0.026841283999999632}, "compile.load_supporting_content": {"calls": 1, "wall_s": 8.041899999966517e-05, "self_s": 8.041899999966517e-05}, "compile.standards_navigation_registry": {"calls": 1, "wall_s": 0.0034940950000077464, "self_s": 0.0034940950000077464}, "compile.load_router_projection": {"calls": 1, "wall_s": 0.0040588070000069365, "self_s": 0.0040588070000069365}, "compile.build_materials": {"calls": 1, "wall_s": 0.00504183399999647, "self_s": 0.00504183399999647}, "compile.load_coverage_horizon": {"calls": 1, "wall_s": 0.18672741599999654, "self_s": 0.18672741599999654}, "compile.compile_coverage_definitions": {"calls": 1, "wall_s": 0.036928216999996266, "self_s": 0.036928216999996266}, "compile.load_repository_coverage_decisions": {"calls": 1, "wall_s": 0.02027587599999947, "self_s": 0.02027587599999947}, "compile.load_indexes": {"calls": 1, "wall_s": 0.012130721999994876, "self_s": 0.012130721999994876}, "_compile/FrozenContentSource": {"calls": 1, "wall_s": 0.3193663370000195, "self_s": 8.479400003125193e-05}, "engine._compiled_snapshot": {"calls": 1, "wall_s": 3.042715008999977, "self_s": 0.002978806999948347}}, "git_reads": {"count": 0, "unique": 0, "top": []}, "git_objects": {"count": 0, "unique": 0}, "git_commands": {}} +{"operation": "s1.prepare_same_snapshot", "wall_s": 6.278843144000007, "cpu_s": 6.276828018999993, "status": "ok", "peak_rss_kib": 281904, "spans": {"snapshot.maintain": {"calls": 3, "wall_s": 0.0012108230000080766, "self_s": 0.0012108230000080766}, "sqlite.snapshot": {"calls": 3, "wall_s": 8.060899997985871e-05, "self_s": 8.060899997985871e-05}, "sqlite.load_content": {"calls": 2, "wall_s": 0.02193307899997876, "self_s": 0.021874943000000258}, "snapshot.load_content": {"calls": 2, "wall_s": 5.592121687999963, "self_s": 5.569086715999987}, "compile.load_canonical_standards_corpus": {"calls": 2, "wall_s": 0.04276120500000502, "self_s": 0.04276120500000502}, "compile.compile_policy_impact": {"calls": 2, "wall_s": 0.053697932999966724, "self_s": 0.053697932999966724}, "compile.load_supporting_content": {"calls": 2, "wall_s": 0.00015686200001141515, "self_s": 0.00015686200001141515}, "compile.standards_navigation_registry": {"calls": 2, "wall_s": 0.00704004800002167, "self_s": 0.00704004800002167}, "compile.load_router_projection": {"calls": 2, "wall_s": 0.008409154999981183, "self_s": 0.008409154999981183}, "compile.build_materials": {"calls": 2, "wall_s": 0.01072515500001714, "self_s": 0.01072515500001714}, "compile.load_coverage_horizon": {"calls": 2, "wall_s": 0.3710856779999858, "self_s": 0.3710856779999858}, "compile.compile_coverage_definitions": {"calls": 2, "wall_s": 0.07213518600002544, "self_s": 0.07213518600002544}, "compile.load_repository_coverage_decisions": {"calls": 2, "wall_s": 0.04307294599999523, "self_s": 0.04307294599999523}, "compile.load_indexes": {"calls": 2, "wall_s": 0.025505552999987913, "self_s": 0.025505552999987913}, "_compile/FrozenContentSource": {"calls": 2, "wall_s": 0.6347573159999911, "self_s": 0.00016759499999352556}, "engine._compiled_snapshot": {"calls": 2, "wall_s": 6.23181371299998, "self_s": 0.00493470900002535}, "compile.evaluate_analysis": {"calls": 1, "wall_s": 0.022542147999985218, "self_s": 0.022542147999985218}, "engine._evaluate_compiled": {"calls": 1, "wall_s": 0.022871172999998635, "self_s": 0.0003290250000134165}, "snapshot.publish_aggregate": {"calls": 1, "wall_s": 0.0009642100000064602, "self_s": 0.0008328069999947729}}, "git_reads": {"count": 0, "unique": 0, "top": []}, "git_objects": {"count": 0, "unique": 0}, "git_commands": {}} +{"operation": "s1.resolve", "wall_s": 12.357862506999993, "cpu_s": 12.333135325, "status": "ok", "peak_rss_kib": 281904, "spans": {"snapshot.maintain": {"calls": 6, "wall_s": 0.0022254369999927803, "self_s": 0.0022254369999927803}, "sqlite.snapshot": {"calls": 6, "wall_s": 0.00014434100000926264, "self_s": 0.00014434100000926264}, "engine._load_analysis": {"calls": 1, "wall_s": 0.0012072279999983948, "self_s": 0.001077877999989596}, "sqlite.load_content": {"calls": 4, "wall_s": 0.04597438400000442, "self_s": 0.045874037000004364}, "snapshot.load_content": {"calls": 4, "wall_s": 10.96421546099998, "self_s": 10.917885794}, "compile.load_canonical_standards_corpus": {"calls": 4, "wall_s": 0.08810690399997156, "self_s": 0.08810690399997156}, "compile.compile_policy_impact": {"calls": 4, "wall_s": 0.11241123100001005, "self_s": 0.11241123100001005}, "compile.load_supporting_content": {"calls": 4, "wall_s": 0.00039885799998273797, "self_s": 0.00039885799998273797}, "compile.standards_navigation_registry": {"calls": 4, "wall_s": 0.0153693329999669, "self_s": 0.0153693329999669}, "compile.load_router_projection": {"calls": 4, "wall_s": 0.0184329149999769, "self_s": 0.0184329149999769}, "compile.build_materials": {"calls": 4, "wall_s": 0.02214000300000407, "self_s": 0.02214000300000407}, "compile.load_coverage_horizon": {"calls": 4, "wall_s": 0.7645748629999787, "self_s": 0.7645748629999787}, "compile.compile_coverage_definitions": {"calls": 4, "wall_s": 0.14448699199999737, "self_s": 0.14448699199999737}, "compile.load_repository_coverage_decisions": {"calls": 4, "wall_s": 0.0820216650000134, "self_s": 0.0820216650000134}, "compile.load_indexes": {"calls": 4, "wall_s": 0.04804228500000818, "self_s": 0.04804228500000818}, "_compile/FrozenContentSource": {"calls": 4, "wall_s": 1.2963926319999644, "self_s": 0.0004075830000545011}, "engine._compiled_snapshot": {"calls": 4, "wall_s": 12.271458929000033, "self_s": 0.010850836000088293}, "compile.evaluate_analysis": {"calls": 2, "wall_s": 0.04568687799999793, "self_s": 0.04568687799999793}, "engine._evaluate_compiled": {"calls": 2, "wall_s": 0.046258078999983354, "self_s": 0.0005712009999854217}, "engine._evaluate": {"calls": 2, "wall_s": 12.32451494999998, "self_s": 0.006797941999963086}, "snapshot.publish_aggregate": {"calls": 1, "wall_s": 0.0030006489999720998, "self_s": 0.001215850999955137}}, "git_reads": {"count": 0, "unique": 0, "top": []}, "git_objects": {"count": 0, "unique": 0}, "git_commands": {}} +{"operation": "s1.inspect_analysis", "wall_s": 0.00585966900001722, "cpu_s": 0.005860690000005775, "status": "ok", "peak_rss_kib": 281904, "spans": {"snapshot.maintain": {"calls": 1, "wall_s": 8.22209999853385e-05, "self_s": 8.22209999853385e-05}, "sqlite.snapshot": {"calls": 1, "wall_s": 1.4872000008381292e-05, "self_s": 1.4872000008381292e-05}, "engine._load_analysis": {"calls": 1, "wall_s": 0.0024960860000078355, "self_s": 0.0023989930000141158}}, "git_reads": {"count": 0, "unique": 0, "top": []}, "git_objects": {"count": 0, "unique": 0}, "git_commands": {}} +{"operation": "s1.inspect_snapshot", "wall_s": 0.0005781019999915316, "cpu_s": 0.0005784500000061144, "status": "ok", "peak_rss_kib": 281904, "spans": {"snapshot.maintain": {"calls": 1, "wall_s": 6.232100000147511e-05, "self_s": 6.232100000147511e-05}, "sqlite.snapshot": {"calls": 1, "wall_s": 1.8948000018781386e-05, "self_s": 1.8948000018781386e-05}}, "git_reads": {"count": 0, "unique": 0, "top": []}, "git_objects": {"count": 0, "unique": 0}, "git_commands": {}} +{"operation": "s1.engine_close", "wall_s": 0.0003906459999996059, "cpu_s": 0.0003880569999950012, "status": "ok", "peak_rss_kib": 281904, "spans": {}, "git_reads": {"count": 0, "unique": 0, "top": []}, "git_objects": {"count": 0, "unique": 0}, "git_commands": {}} +{"operation": "s1.reopen_0", "wall_s": 0.004595587000011392, "cpu_s": 0.004596491000000924, "status": "ok", "peak_rss_kib": 281904, "spans": {"sqlite._verify_integrity": {"calls": 2, "wall_s": 0.0037986430000103155, "self_s": 0.0037986430000103155}, "sqlite.__init__": {"calls": 1, "wall_s": 0.0044575940000015635, "self_s": 0.000658950999991248}, "snapshot.maintain": {"calls": 1, "wall_s": 4.083100000684681e-05, "self_s": 4.083100000684681e-05}}, "git_reads": {"count": 0, "unique": 0, "top": []}, "git_objects": {"count": 0, "unique": 0}, "git_commands": {}} +{"operation": "s1.reopen_facade_0", "wall_s": 0.26458752100000993, "cpu_s": 0.26459501899999793, "status": "ok", "peak_rss_kib": 281904, "spans": {"facade.contracts": {"calls": 1, "wall_s": 0.26171342999998615, "self_s": 0.26171342999998615}}, "git_reads": {"count": 0, "unique": 0, "top": []}, "git_objects": {"count": 0, "unique": 0}, "git_commands": {}} +{"operation": "s1.reopened_query_0", "wall_s": 2.9933388599999944, "cpu_s": 2.992866120000002, "status": "ok", "peak_rss_kib": 281904, "spans": {"snapshot.maintain": {"calls": 1, "wall_s": 9.25570000163134e-05, "self_s": 9.25570000163134e-05}, "sqlite.snapshot": {"calls": 1, "wall_s": 7.394899998303117e-05, "self_s": 7.394899998303117e-05}, "sqlite.load_content": {"calls": 1, "wall_s": 0.011621593000000985, "self_s": 0.011547644000017954}, "snapshot.load_content": {"calls": 1, "wall_s": 2.661294947000016, "self_s": 2.6495807969999987}, "compile.load_canonical_standards_corpus": {"calls": 1, "wall_s": 0.022378822999996828, "self_s": 0.022378822999996828}, "compile.compile_policy_impact": {"calls": 1, "wall_s": 0.028545114000024796, "self_s": 0.028545114000024796}, "compile.load_supporting_content": {"calls": 1, "wall_s": 0.00014572399999224217, "self_s": 0.00014572399999224217}, "compile.standards_navigation_registry": {"calls": 1, "wall_s": 0.003575474999991002, "self_s": 0.003575474999991002}, "compile.load_router_projection": {"calls": 1, "wall_s": 0.004265269999990551, "self_s": 0.004265269999990551}, "compile.build_materials": {"calls": 1, "wall_s": 0.0056572899999878246, "self_s": 0.0056572899999878246}, "compile.load_coverage_horizon": {"calls": 1, "wall_s": 0.18950525100001414, "self_s": 0.18950525100001414}, "compile.compile_coverage_definitions": {"calls": 1, "wall_s": 0.03605839799999444, "self_s": 0.03605839799999444}, "compile.load_repository_coverage_decisions": {"calls": 1, "wall_s": 0.02003873799998246, "self_s": 0.02003873799998246}, "compile.load_indexes": {"calls": 1, "wall_s": 0.011697373999993488, "self_s": 0.011697373999993488}, "_compile/FrozenContentSource": {"calls": 1, "wall_s": 0.32194999999998686, "self_s": 8.254300001908632e-05}, "engine._compiled_snapshot": {"calls": 1, "wall_s": 2.985791707000004, "self_s": 0.0025467600000013135}}, "git_reads": {"count": 0, "unique": 0, "top": []}, "git_objects": {"count": 0, "unique": 0}, "git_commands": {}} +{"operation": "s1.reopen_1", "wall_s": 0.004505964999992784, "cpu_s": 0.004506216999999424, "status": "ok", "peak_rss_kib": 281904, "spans": {"sqlite._verify_integrity": {"calls": 2, "wall_s": 0.0036906249999901775, "self_s": 0.0036906249999901775}, "sqlite.__init__": {"calls": 1, "wall_s": 0.004364716999987195, "self_s": 0.0006740919999970174}, "snapshot.maintain": {"calls": 1, "wall_s": 4.184200000167948e-05, "self_s": 4.184200000167948e-05}}, "git_reads": {"count": 0, "unique": 0, "top": []}, "git_objects": {"count": 0, "unique": 0}, "git_commands": {}} +{"operation": "s1.reopen_facade_1", "wall_s": 0.2670430979999878, "cpu_s": 0.26686551299999905, "status": "ok", "peak_rss_kib": 281904, "spans": {"facade.contracts": {"calls": 1, "wall_s": 0.26421531400001186, "self_s": 0.26421531400001186}}, "git_reads": {"count": 0, "unique": 0, "top": []}, "git_objects": {"count": 0, "unique": 0}, "git_commands": {}} +{"operation": "s1.reopened_query_1", "wall_s": 2.9825027409999905, "cpu_s": 2.9806472439999965, "status": "ok", "peak_rss_kib": 281904, "spans": {"snapshot.maintain": {"calls": 1, "wall_s": 9.714300000496223e-05, "self_s": 9.714300000496223e-05}, "sqlite.snapshot": {"calls": 1, "wall_s": 8.013799998707327e-05, "self_s": 8.013799998707327e-05}, "sqlite.load_content": {"calls": 1, "wall_s": 0.01302338700000405, "self_s": 0.012943249000016976}, "snapshot.load_content": {"calls": 1, "wall_s": 2.6422410430000127, "self_s": 2.6291205130000037}, "compile.load_canonical_standards_corpus": {"calls": 1, "wall_s": 0.02190190999999686, "self_s": 0.02190190999999686}, "compile.compile_policy_impact": {"calls": 1, "wall_s": 0.026781804999984615, "self_s": 0.026781804999984615}, "compile.load_supporting_content": {"calls": 1, "wall_s": 8.571600000095714e-05, "self_s": 8.571600000095714e-05}, "compile.standards_navigation_registry": {"calls": 1, "wall_s": 0.004675064000025486, "self_s": 0.004675064000025486}, "compile.load_router_projection": {"calls": 1, "wall_s": 0.004140798000008772, "self_s": 0.004140798000008772}, "compile.build_materials": {"calls": 1, "wall_s": 0.005312612000011541, "self_s": 0.005312612000011541}, "compile.load_coverage_horizon": {"calls": 1, "wall_s": 0.18851576000000136, "self_s": 0.18851576000000136}, "compile.compile_coverage_definitions": {"calls": 1, "wall_s": 0.03781868600000848, "self_s": 0.03781868600000848}, "compile.load_repository_coverage_decisions": {"calls": 1, "wall_s": 0.028257017000015594, "self_s": 0.028257017000015594}, "compile.load_indexes": {"calls": 1, "wall_s": 0.012334261999995988, "self_s": 0.012334261999995988}, "_compile/FrozenContentSource": {"calls": 1, "wall_s": 0.32992591900000434, "self_s": 0.00010228899995468055}, "engine._compiled_snapshot": {"calls": 1, "wall_s": 2.9745983619999947, "self_s": 0.002431399999977657}}, "git_reads": {"count": 0, "unique": 0, "top": []}, "git_objects": {"count": 0, "unique": 0}, "git_commands": {}} +{"operation": "s2.engine_open_new", "wall_s": 0.00167283299998644, "cpu_s": 0.0016734470000017154, "status": "ok", "peak_rss_kib": 281904, "spans": {"sqlite._verify_integrity": {"calls": 1, "wall_s": 0.00012714799999002935, "self_s": 0.00012714799999002935}, "sqlite.__init__": {"calls": 1, "wall_s": 0.001512507000001051, "self_s": 0.0013853590000110216}, "snapshot.maintain": {"calls": 1, "wall_s": 3.432099998690319e-05, "self_s": 3.432099998690319e-05}}, "git_reads": {"count": 0, "unique": 0, "top": []}, "git_objects": {"count": 0, "unique": 0}, "git_commands": {}} +{"operation": "s2.facade_construct", "wall_s": 0.3005000759999916, "cpu_s": 0.30044895899999347, "status": "ok", "peak_rss_kib": 281904, "spans": {"facade.contracts": {"calls": 1, "wall_s": 0.2979178840000145, "self_s": 0.2979178840000145}}, "git_reads": {"count": 0, "unique": 0, "top": []}, "git_objects": {"count": 0, "unique": 0}, "git_commands": {}} +{"operation": "s2.create_snapshot", "wall_s": 14.890632722999982, "cpu_s": 7.082247096000003, "status": "ok", "peak_rss_kib": 282760, "spans": {"git.command": {"calls": 6135, "wall_s": 11.006822982001324, "self_s": 11.006822982001324}, "git.object": {"calls": 6134, "wall_s": 11.138721875999465, "self_s": 0.13380499099812937}, "git.read_file": {"calls": 1137, "wall_s": 11.504834029000307, "self_s": 0.36611215300084154}, "git.read_bytes": {"calls": 1137, "wall_s": 11.52324316900021, "self_s": 0.018409139999903346}, "compile.load_canonical_standards_corpus": {"calls": 2, "wall_s": 1.0869539669999995, "self_s": 0.0531322700000203}, "compile.compile_policy_impact": {"calls": 2, "wall_s": 0.27079200000000014, "self_s": 0.057028795999940485}, "compile.load_supporting_content": {"calls": 2, "wall_s": 0.02248702199997865, "self_s": 0.00037349099997641133}, "compile.standards_navigation_registry": {"calls": 2, "wall_s": 0.007235754000021188, "self_s": 0.007235754000021188}, "compile.load_router_projection": {"calls": 2, "wall_s": 0.02303984499999956, "self_s": 0.009070866999991267}, "compile.build_materials": {"calls": 2, "wall_s": 0.6588593179999975, "self_s": 0.015037313000021868}, "compile.load_coverage_horizon": {"calls": 2, "wall_s": 7.7440347910000185, "self_s": 0.40177910699986796}, "compile.compile_coverage_definitions": {"calls": 2, "wall_s": 0.07248669899999527, "self_s": 0.07248669899999527}, "compile.load_repository_coverage_decisions": {"calls": 2, "wall_s": 0.17805291999997053, "self_s": 0.04267532099993332}, "compile.load_indexes": {"calls": 2, "wall_s": 2.15481330099999, "self_s": 0.03669282999999268}, "_compile/_GitRevisionSource": {"calls": 1, "wall_s": 11.912543839000023, "self_s": 7.072500005733673e-05}, "_compile/FrozenContentSource": {"calls": 1, "wall_s": 0.30635740400001055, "self_s": 7.490100000495659e-05}, "sqlite.snapshot": {"calls": 1, "wall_s": 6.79499999591826e-05, "self_s": 6.79499999591826e-05}}, "git_reads": {"count": 1137, "unique": 434, "top": [["topics/contracts.md", 17], ["STANDARDS-ROUTER.md", 15], ["topics/security.md", 14], ["workflows/verification.md", 14], ["topics/dependencies.md", 10], ["profiles/applications/frontend.md", 9], ["topics/architecture.md", 9], ["topics/concurrency.md", 9], ["topics/cross-platform.md", 9], ["workflows/commit.md", 9]]}, "git_objects": {"count": 6134, "unique": 524}, "git_commands": {"rev-parse --verify": 1, "cat-file --batch": 6134}} +{"operation": "s2.query_read_0", "wall_s": 3.0722840189999943, "cpu_s": 3.0719671559999995, "status": "ok", "peak_rss_kib": 284568, "spans": {"snapshot.maintain": {"calls": 1, "wall_s": 3.2798000006550865e-05, "self_s": 3.2798000006550865e-05}, "sqlite.snapshot": {"calls": 1, "wall_s": 1.6774000016539503e-05, "self_s": 1.6774000016539503e-05}, "sqlite.load_content": {"calls": 1, "wall_s": 0.010739805000014258, "self_s": 0.010723030999997718}, "snapshot.load_content": {"calls": 1, "wall_s": 2.617382376000023, "self_s": 2.6066097730000024}, "compile.load_canonical_standards_corpus": {"calls": 1, "wall_s": 0.021729958000037186, "self_s": 0.021729958000037186}, "compile.compile_policy_impact": {"calls": 1, "wall_s": 0.026750601999992796, "self_s": 0.026750601999992796}, "compile.load_supporting_content": {"calls": 1, "wall_s": 8.726800001568336e-05, "self_s": 8.726800001568336e-05}, "compile.standards_navigation_registry": {"calls": 1, "wall_s": 0.12719249700001, "self_s": 0.12719249700001}, "compile.load_router_projection": {"calls": 1, "wall_s": 0.00445910600001298, "self_s": 0.00445910600001298}, "compile.build_materials": {"calls": 1, "wall_s": 0.00559277600001451, "self_s": 0.00559277600001451}, "compile.load_coverage_horizon": {"calls": 1, "wall_s": 0.19232402599999432, "self_s": 0.19232402599999432}, "compile.compile_coverage_definitions": {"calls": 1, "wall_s": 0.03488743300005126, "self_s": 0.03488743300005126}, "compile.load_repository_coverage_decisions": {"calls": 1, "wall_s": 0.01962076199998819, "self_s": 0.01962076199998819}, "compile.load_indexes": {"calls": 1, "wall_s": 0.012006138999993254, "self_s": 0.012006138999993254}, "_compile/FrozenContentSource": {"calls": 1, "wall_s": 0.4447274820000189, "self_s": 7.691499990869488e-05}, "engine._compiled_snapshot": {"calls": 1, "wall_s": 3.064706000000001, "self_s": 0.0025961419999589452}}, "git_reads": {"count": 0, "unique": 0, "top": []}, "git_objects": {"count": 0, "unique": 0}, "git_commands": {}} +{"operation": "s2.query_read_1", "wall_s": 3.0588333129999796, "cpu_s": 3.0577786409999987, "status": "ok", "peak_rss_kib": 284568, "spans": {"snapshot.maintain": {"calls": 1, "wall_s": 9.327800000846764e-05, "self_s": 9.327800000846764e-05}, "sqlite.snapshot": {"calls": 1, "wall_s": 2.4355999983072252e-05, "self_s": 2.4355999983072252e-05}, "sqlite.load_content": {"calls": 1, "wall_s": 0.010759463999988839, "self_s": 0.010735108000005766}, "snapshot.load_content": {"calls": 1, "wall_s": 2.724220238999976, "self_s": 2.713367496999979}, "compile.load_canonical_standards_corpus": {"calls": 1, "wall_s": 0.02262292300002855, "self_s": 0.02262292300002855}, "compile.compile_policy_impact": {"calls": 1, "wall_s": 0.027505782999980966, "self_s": 0.027505782999980966}, "compile.load_supporting_content": {"calls": 1, "wall_s": 7.395900001938571e-05, "self_s": 7.395900001938571e-05}, "compile.standards_navigation_registry": {"calls": 1, "wall_s": 0.003456048999964878, "self_s": 0.003456048999964878}, "compile.load_router_projection": {"calls": 1, "wall_s": 0.0045381529999986014, "self_s": 0.0045381529999986014}, "compile.build_materials": {"calls": 1, "wall_s": 0.005910113000027195, "self_s": 0.005910113000027195}, "compile.load_coverage_horizon": {"calls": 1, "wall_s": 0.18874081999996406, "self_s": 0.18874081999996406}, "compile.compile_coverage_definitions": {"calls": 1, "wall_s": 0.037252656000021034, "self_s": 0.037252656000021034}, "compile.load_repository_coverage_decisions": {"calls": 1, "wall_s": 0.021565406999968673, "self_s": 0.021565406999968673}, "compile.load_indexes": {"calls": 1, "wall_s": 0.012210181000000375, "self_s": 0.012210181000000375}, "_compile/FrozenContentSource": {"calls": 1, "wall_s": 0.32399559899999986, "self_s": 0.00011955500002613917}, "engine._compiled_snapshot": {"calls": 1, "wall_s": 3.0512934989999962, "self_s": 0.003077661000020271}}, "git_reads": {"count": 0, "unique": 0, "top": []}, "git_objects": {"count": 0, "unique": 0}, "git_commands": {}} +{"operation": "s2.query_read_2", "wall_s": 2.956934019000016, "cpu_s": 2.956530100000009, "status": "ok", "peak_rss_kib": 284568, "spans": {"snapshot.maintain": {"calls": 1, "wall_s": 0.0015047559999743498, "self_s": 0.0015047559999743498}, "sqlite.snapshot": {"calls": 1, "wall_s": 2.9905000019425643e-05, "self_s": 2.9905000019425643e-05}, "sqlite.load_content": {"calls": 1, "wall_s": 0.011388820000036048, "self_s": 0.011358915000016623}, "snapshot.load_content": {"calls": 1, "wall_s": 2.637909083000011, "self_s": 2.6250155070000005}, "compile.load_canonical_standards_corpus": {"calls": 1, "wall_s": 0.021003499000016745, "self_s": 0.021003499000016745}, "compile.compile_policy_impact": {"calls": 1, "wall_s": 0.026498519999961445, "self_s": 0.026498519999961445}, "compile.load_supporting_content": {"calls": 1, "wall_s": 0.00013536899996324792, "self_s": 0.00013536899996324792}, "compile.standards_navigation_registry": {"calls": 1, "wall_s": 0.003524620000007417, "self_s": 0.003524620000007417}, "compile.load_router_projection": {"calls": 1, "wall_s": 0.00414731699999038, "self_s": 0.00414731699999038}, "compile.build_materials": {"calls": 1, "wall_s": 0.005031057999985933, "self_s": 0.005031057999985933}, "compile.load_coverage_horizon": {"calls": 1, "wall_s": 0.1815085179999869, "self_s": 0.1815085179999869}, "compile.compile_coverage_definitions": {"calls": 1, "wall_s": 0.03514516199999207, "self_s": 0.03514516199999207}, "compile.load_repository_coverage_decisions": {"calls": 1, "wall_s": 0.020817484000019704, "self_s": 0.020817484000019704}, "compile.load_indexes": {"calls": 1, "wall_s": 0.011753197000018645, "self_s": 0.011753197000018645}, "_compile/FrozenContentSource": {"calls": 1, "wall_s": 0.3096390940000333, "self_s": 7.435000009081705e-05}, "engine._compiled_snapshot": {"calls": 1, "wall_s": 2.9498698859999877, "self_s": 0.0023217089999434393}}, "git_reads": {"count": 0, "unique": 0, "top": []}, "git_objects": {"count": 0, "unique": 0}, "git_commands": {}} +{"operation": "s2.inspect_policy", "wall_s": 2.9135304149999683, "cpu_s": 2.9120100210000004, "status": "ok", "peak_rss_kib": 284568, "spans": {"snapshot.maintain": {"calls": 1, "wall_s": 9.398899999268906e-05, "self_s": 9.398899999268906e-05}, "sqlite.snapshot": {"calls": 1, "wall_s": 5.109500000344269e-05, "self_s": 5.109500000344269e-05}, "sqlite.load_content": {"calls": 1, "wall_s": 0.010988742000051843, "self_s": 0.0109376470000484}, "snapshot.load_content": {"calls": 1, "wall_s": 2.578667478, "self_s": 2.5675847469999553}, "compile.load_canonical_standards_corpus": {"calls": 1, "wall_s": 0.02052498400001923, "self_s": 0.02052498400001923}, "compile.compile_policy_impact": {"calls": 1, "wall_s": 0.02571399499998961, "self_s": 0.02571399499998961}, "compile.load_supporting_content": {"calls": 1, "wall_s": 7.46299999718758e-05, "self_s": 7.46299999718758e-05}, "compile.standards_navigation_registry": {"calls": 1, "wall_s": 0.0035056020000183707, "self_s": 0.0035056020000183707}, "compile.load_router_projection": {"calls": 1, "wall_s": 0.004067179000003307, "self_s": 0.004067179000003307}, "compile.build_materials": {"calls": 1, "wall_s": 0.0051140799999984665, "self_s": 0.0051140799999984665}, "compile.load_coverage_horizon": {"calls": 1, "wall_s": 0.18616594500002748, "self_s": 0.18616594500002748}, "compile.compile_coverage_definitions": {"calls": 1, "wall_s": 0.04291896900002712, "self_s": 0.04291896900002712}, "compile.load_repository_coverage_decisions": {"calls": 1, "wall_s": 0.02485989699999891, "self_s": 0.02485989699999891}, "compile.load_indexes": {"calls": 1, "wall_s": 0.013987547999988692, "self_s": 0.013987547999988692}, "_compile/FrozenContentSource": {"calls": 1, "wall_s": 0.3270157619999736, "self_s": 8.29329999305628e-05}, "engine._compiled_snapshot": {"calls": 1, "wall_s": 2.9080983270000047, "self_s": 0.0024150870000312352}}, "git_reads": {"count": 0, "unique": 0, "top": []}, "git_objects": {"count": 0, "unique": 0}, "git_commands": {}} +{"operation": "s2.route_explicit", "wall_s": 3.1109436350000124, "cpu_s": 3.110521226000003, "status": "ok", "peak_rss_kib": 284568, "spans": {"snapshot.maintain": {"calls": 1, "wall_s": 9.82540000222798e-05, "self_s": 9.82540000222798e-05}, "sqlite.snapshot": {"calls": 1, "wall_s": 2.6469000033557677e-05, "self_s": 2.6469000033557677e-05}, "sqlite.load_content": {"calls": 1, "wall_s": 0.01365623899999946, "self_s": 0.013629769999965902}, "snapshot.load_content": {"calls": 1, "wall_s": 2.606531005000022, "self_s": 2.5927765120000004}, "compile.load_canonical_standards_corpus": {"calls": 1, "wall_s": 0.020419906999961768, "self_s": 0.020419906999961768}, "compile.compile_policy_impact": {"calls": 1, "wall_s": 0.025442753999982415, "self_s": 0.025442753999982415}, "compile.load_supporting_content": {"calls": 1, "wall_s": 9.743399999706526e-05, "self_s": 9.743399999706526e-05}, "compile.standards_navigation_registry": {"calls": 1, "wall_s": 0.0034175220000065565, "self_s": 0.0034175220000065565}, "compile.load_router_projection": {"calls": 1, "wall_s": 0.004098004000013589, "self_s": 0.004098004000013589}, "compile.build_materials": {"calls": 1, "wall_s": 0.005124706000003698, "self_s": 0.005124706000003698}, "compile.load_coverage_horizon": {"calls": 1, "wall_s": 0.17803979699999672, "self_s": 0.17803979699999672}, "compile.compile_coverage_definitions": {"calls": 1, "wall_s": 0.03484998600004019, "self_s": 0.03484998600004019}, "compile.load_repository_coverage_decisions": {"calls": 1, "wall_s": 0.019610956999997597, "self_s": 0.019610956999997597}, "compile.load_indexes": {"calls": 1, "wall_s": 0.011398272999997516, "self_s": 0.011398272999997516}, "_compile/FrozenContentSource": {"calls": 1, "wall_s": 0.30257016399997383, "self_s": 7.082399997671018e-05}, "engine._compiled_snapshot": {"calls": 1, "wall_s": 2.911452230000009, "self_s": 0.0023510610000130328}}, "git_reads": {"count": 0, "unique": 0, "top": []}, "git_objects": {"count": 0, "unique": 0}, "git_commands": {}} +{"operation": "s2.prepare_same_snapshot", "wall_s": 5.909685318000015, "cpu_s": 5.902436414999997, "status": "ok", "peak_rss_kib": 284568, "spans": {"snapshot.maintain": {"calls": 3, "wall_s": 0.0003555829999868365, "self_s": 0.0003555829999868365}, "sqlite.snapshot": {"calls": 3, "wall_s": 7.808499992734141e-05, "self_s": 7.808499992734141e-05}, "sqlite.load_content": {"calls": 2, "wall_s": 0.021997129000055793, "self_s": 0.021940896000103294}, "snapshot.load_content": {"calls": 2, "wall_s": 5.222628866999969, "self_s": 5.200386136999953}, "compile.load_canonical_standards_corpus": {"calls": 2, "wall_s": 0.04354533899999069, "self_s": 0.04354533899999069}, "compile.compile_policy_impact": {"calls": 2, "wall_s": 0.05518603100000519, "self_s": 0.05518603100000519}, "compile.load_supporting_content": {"calls": 2, "wall_s": 0.00015484800002241172, "self_s": 0.00015484800002241172}, "compile.standards_navigation_registry": {"calls": 2, "wall_s": 0.007501515000001291, "self_s": 0.007501515000001291}, "compile.load_router_projection": {"calls": 2, "wall_s": 0.011206535000042095, "self_s": 0.011206535000042095}, "compile.build_materials": {"calls": 2, "wall_s": 0.010595792000003712, "self_s": 0.010595792000003712}, "compile.load_coverage_horizon": {"calls": 2, "wall_s": 0.374446928999987, "self_s": 0.374446928999987}, "compile.compile_coverage_definitions": {"calls": 2, "wall_s": 0.06998692299998766, "self_s": 0.06998692299998766}, "compile.load_repository_coverage_decisions": {"calls": 2, "wall_s": 0.03999337900006594, "self_s": 0.03999337900006594}, "compile.load_indexes": {"calls": 2, "wall_s": 0.0246538320000127, "self_s": 0.0246538320000127}, "_compile/FrozenContentSource": {"calls": 2, "wall_s": 0.6374373780000155, "self_s": 0.00016625499989686432}, "engine._compiled_snapshot": {"calls": 2, "wall_s": 5.8652807240000016, "self_s": 0.005214479000017036}, "compile.evaluate_analysis": {"calls": 1, "wall_s": 0.022427021999988028, "self_s": 0.022427021999988028}, "engine._evaluate_compiled": {"calls": 1, "wall_s": 0.022685603000013543, "self_s": 0.0002585810000255151}, "snapshot.publish_aggregate": {"calls": 1, "wall_s": 0.0005761680000091474, "self_s": 0.0004443340000079843}}, "git_reads": {"count": 0, "unique": 0, "top": []}, "git_objects": {"count": 0, "unique": 0}, "git_commands": {}} +{"operation": "s2.resolve", "wall_s": 12.072353682000028, "cpu_s": 12.071093694000012, "status": "ok", "peak_rss_kib": 284568, "spans": {"snapshot.maintain": {"calls": 6, "wall_s": 0.0005381009999609887, "self_s": 0.0005381009999609887}, "sqlite.snapshot": {"calls": 6, "wall_s": 0.00013378900001725924, "self_s": 0.00013378900001725924}, "engine._load_analysis": {"calls": 1, "wall_s": 0.0010320600000000013, "self_s": 0.0009412059999931444}, "sqlite.load_content": {"calls": 4, "wall_s": 0.043347253999968416, "self_s": 0.04325134199996228}, "snapshot.load_content": {"calls": 4, "wall_s": 10.732039512000085, "self_s": 10.688343075000148}, "compile.load_canonical_standards_corpus": {"calls": 4, "wall_s": 0.08992123699994181, "self_s": 0.08992123699994181}, "compile.compile_policy_impact": {"calls": 4, "wall_s": 0.10703767899997274, "self_s": 0.10703767899997274}, "compile.load_supporting_content": {"calls": 4, "wall_s": 0.0003179589999717791, "self_s": 0.0003179589999717791}, "compile.standards_navigation_registry": {"calls": 4, "wall_s": 0.013942268999926455, "self_s": 0.013942268999926455}, "compile.load_router_projection": {"calls": 4, "wall_s": 0.017068850999976348, "self_s": 0.017068850999976348}, "compile.build_materials": {"calls": 4, "wall_s": 0.021453046999965864, "self_s": 0.021453046999965864}, "compile.load_coverage_horizon": {"calls": 4, "wall_s": 0.7311950690000231, "self_s": 0.7311950690000231}, "compile.compile_coverage_definitions": {"calls": 4, "wall_s": 0.13923189199999797, "self_s": 0.13923189199999797}, "compile.load_repository_coverage_decisions": {"calls": 4, "wall_s": 0.08130864600008181, "self_s": 0.08130864600008181}, "compile.load_indexes": {"calls": 4, "wall_s": 0.04689734200002249, "self_s": 0.04689734200002249}, "_compile/FrozenContentSource": {"calls": 4, "wall_s": 1.2487101930000222, "self_s": 0.00033620200014183865}, "engine._compiled_snapshot": {"calls": 4, "wall_s": 11.990384381999945, "self_s": 0.009634676999837666}, "compile.evaluate_analysis": {"calls": 2, "wall_s": 0.04604148300001043, "self_s": 0.04604148300001043}, "engine._evaluate_compiled": {"calls": 2, "wall_s": 0.04660048599998845, "self_s": 0.0005590029999780199}, "engine._evaluate": {"calls": 2, "wall_s": 12.042553155999997, "self_s": 0.0055682880000631485}, "snapshot.publish_aggregate": {"calls": 1, "wall_s": 0.000605010000015227, "self_s": 0.0004690690000188624}}, "git_reads": {"count": 0, "unique": 0, "top": []}, "git_objects": {"count": 0, "unique": 0}, "git_commands": {}} +{"operation": "s2.inspect_analysis", "wall_s": 0.005673854000008305, "cpu_s": 0.005674793000025602, "status": "ok", "peak_rss_kib": 284568, "spans": {"snapshot.maintain": {"calls": 1, "wall_s": 8.896100001720697e-05, "self_s": 8.896100001720697e-05}, "sqlite.snapshot": {"calls": 1, "wall_s": 1.428100000566701e-05, "self_s": 1.428100000566701e-05}, "engine._load_analysis": {"calls": 1, "wall_s": 0.0025467899999966903, "self_s": 0.0024435479999738163}}, "git_reads": {"count": 0, "unique": 0, "top": []}, "git_objects": {"count": 0, "unique": 0}, "git_commands": {}} +{"operation": "s2.inspect_snapshot", "wall_s": 0.0006722400000285234, "cpu_s": 0.0006727600000147049, "status": "ok", "peak_rss_kib": 284568, "spans": {"snapshot.maintain": {"calls": 1, "wall_s": 6.26019999572236e-05, "self_s": 6.26019999572236e-05}, "sqlite.snapshot": {"calls": 1, "wall_s": 1.6814000048270827e-05, "self_s": 1.6814000048270827e-05}}, "git_reads": {"count": 0, "unique": 0, "top": []}, "git_objects": {"count": 0, "unique": 0}, "git_commands": {}} +{"operation": "s2.engine_close", "wall_s": 0.00038896300003443685, "cpu_s": 0.0003868750000037835, "status": "ok", "peak_rss_kib": 284568, "spans": {}, "git_reads": {"count": 0, "unique": 0, "top": []}, "git_objects": {"count": 0, "unique": 0}, "git_commands": {}} +{"operation": "s2.reopen_0", "wall_s": 0.0038804929999969318, "cpu_s": 0.003881708999983857, "status": "ok", "peak_rss_kib": 284568, "spans": {"sqlite._verify_integrity": {"calls": 2, "wall_s": 0.0031721309999852565, "self_s": 0.0031721309999852565}, "sqlite.__init__": {"calls": 1, "wall_s": 0.003733417000034933, "self_s": 0.0005612860000496767}, "snapshot.maintain": {"calls": 1, "wall_s": 3.9818999994167825e-05, "self_s": 3.9818999994167825e-05}}, "git_reads": {"count": 0, "unique": 0, "top": []}, "git_objects": {"count": 0, "unique": 0}, "git_commands": {}} +{"operation": "s2.reopen_facade_0", "wall_s": 0.25227502000001323, "cpu_s": 0.2521864980000146, "status": "ok", "peak_rss_kib": 284568, "spans": {"facade.contracts": {"calls": 1, "wall_s": 0.24961565499995686, "self_s": 0.24961565499995686}}, "git_reads": {"count": 0, "unique": 0, "top": []}, "git_objects": {"count": 0, "unique": 0}, "git_commands": {}} +{"operation": "s2.reopened_query_0", "wall_s": 3.0800298209999823, "cpu_s": 3.0796041810000077, "status": "ok", "peak_rss_kib": 284568, "spans": {"snapshot.maintain": {"calls": 1, "wall_s": 9.40379999860852e-05, "self_s": 9.40379999860852e-05}, "sqlite.snapshot": {"calls": 1, "wall_s": 7.154500002570785e-05, "self_s": 7.154500002570785e-05}, "sqlite.load_content": {"calls": 1, "wall_s": 0.010904575000040495, "self_s": 0.010833030000014787}, "snapshot.load_content": {"calls": 1, "wall_s": 2.616969245000007, "self_s": 2.6059706319999805}, "compile.load_canonical_standards_corpus": {"calls": 1, "wall_s": 0.021266818999947645, "self_s": 0.021266818999947645}, "compile.compile_policy_impact": {"calls": 1, "wall_s": 0.027488905999973667, "self_s": 0.027488905999973667}, "compile.load_supporting_content": {"calls": 1, "wall_s": 7.787399999870104e-05, "self_s": 7.787399999870104e-05}, "compile.standards_navigation_registry": {"calls": 1, "wall_s": 0.0039654259999792885, "self_s": 0.0039654259999792885}, "compile.load_router_projection": {"calls": 1, "wall_s": 0.004157027999951879, "self_s": 0.004157027999951879}, "compile.build_materials": {"calls": 1, "wall_s": 0.00514496099998496, "self_s": 0.00514496099998496}, "compile.load_coverage_horizon": {"calls": 1, "wall_s": 0.32520089500002314, "self_s": 0.32520089500002314}, "compile.compile_coverage_definitions": {"calls": 1, "wall_s": 0.035176379000006364, "self_s": 0.035176379000006364}, "compile.load_repository_coverage_decisions": {"calls": 1, "wall_s": 0.019707153000013022, "self_s": 0.019707153000013022}, "compile.load_indexes": {"calls": 1, "wall_s": 0.011326799000016763, "self_s": 0.011326799000016763}, "_compile/FrozenContentSource": {"calls": 1, "wall_s": 0.4535928189999936, "self_s": 8.057900009816876e-05}, "engine._compiled_snapshot": {"calls": 1, "wall_s": 3.07292763800001, "self_s": 0.002365574000009474}}, "git_reads": {"count": 0, "unique": 0, "top": []}, "git_objects": {"count": 0, "unique": 0}, "git_commands": {}} +{"operation": "s2.reopen_1", "wall_s": 0.004858368999975937, "cpu_s": 0.004859090999985938, "status": "ok", "peak_rss_kib": 284568, "spans": {"sqlite._verify_integrity": {"calls": 2, "wall_s": 0.004102267000007487, "self_s": 0.004102267000007487}, "sqlite.__init__": {"calls": 1, "wall_s": 0.004718403999959264, "self_s": 0.0006161369999517774}, "snapshot.maintain": {"calls": 1, "wall_s": 4.33329999509624e-05, "self_s": 4.33329999509624e-05}}, "git_reads": {"count": 0, "unique": 0, "top": []}, "git_objects": {"count": 0, "unique": 0}, "git_commands": {}} +{"operation": "s2.reopen_facade_1", "wall_s": 0.2549388709999789, "cpu_s": 0.25493493300001546, "status": "ok", "peak_rss_kib": 284568, "spans": {"facade.contracts": {"calls": 1, "wall_s": 0.25240168700003096, "self_s": 0.25240168700003096}}, "git_reads": {"count": 0, "unique": 0, "top": []}, "git_objects": {"count": 0, "unique": 0}, "git_commands": {}} +{"operation": "s2.reopened_query_1", "wall_s": 2.859205139999972, "cpu_s": 2.858608677999996, "status": "ok", "peak_rss_kib": 284568, "spans": {"snapshot.maintain": {"calls": 1, "wall_s": 9.286599998858946e-05, "self_s": 9.286599998858946e-05}, "sqlite.snapshot": {"calls": 1, "wall_s": 6.933200000958095e-05, "self_s": 6.933200000958095e-05}, "sqlite.load_content": {"calls": 1, "wall_s": 0.010734798999976647, "self_s": 0.010665466999967066}, "snapshot.load_content": {"calls": 1, "wall_s": 2.544708969999988, "self_s": 2.5338813050000226}, "compile.load_canonical_standards_corpus": {"calls": 1, "wall_s": 0.020146009000029608, "self_s": 0.020146009000029608}, "compile.compile_policy_impact": {"calls": 1, "wall_s": 0.02583379899999727, "self_s": 0.02583379899999727}, "compile.load_supporting_content": {"calls": 1, "wall_s": 7.594200002358775e-05, "self_s": 7.594200002358775e-05}, "compile.standards_navigation_registry": {"calls": 1, "wall_s": 0.003408216000025277, "self_s": 0.003408216000025277}, "compile.load_router_projection": {"calls": 1, "wall_s": 0.0041672030000086124, "self_s": 0.0041672030000086124}, "compile.build_materials": {"calls": 1, "wall_s": 0.004992638000032912, "self_s": 0.004992638000032912}, "compile.load_coverage_horizon": {"calls": 1, "wall_s": 0.18040472000001273, "self_s": 0.18040472000001273}, "compile.compile_coverage_definitions": {"calls": 1, "wall_s": 0.034886981999989075, "self_s": 0.034886981999989075}, "compile.load_repository_coverage_decisions": {"calls": 1, "wall_s": 0.019910922999997638, "self_s": 0.019910922999997638}, "compile.load_indexes": {"calls": 1, "wall_s": 0.01123285100004523, "self_s": 0.01123285100004523}, "_compile/FrozenContentSource": {"calls": 1, "wall_s": 0.30513545399998065, "self_s": 7.617099981871434e-05}, "engine._compiled_snapshot": {"calls": 1, "wall_s": 2.852145230000019, "self_s": 0.0023008060000506703}}, "git_reads": {"count": 0, "unique": 0, "top": []}, "git_objects": {"count": 0, "unique": 0}, "git_commands": {}} diff --git a/docs/plans/purpose-separated-standards-engine/reports/performance-core-evidence/baseline-primitives.json b/docs/plans/purpose-separated-standards-engine/reports/performance-core-evidence/baseline-primitives.json new file mode 100644 index 00000000..bd82404b --- /dev/null +++ b/docs/plans/purpose-separated-standards-engine/reports/performance-core-evidence/baseline-primitives.json @@ -0,0 +1,84 @@ +{ + "measurements": [ + { + "operation": "frame", + "wall_s": 0.3542716259998997, + "cpu_s": 0.3542401350000002 + }, + { + "operation": "encode", + "wall_s": 2.2585284789997786, + "cpu_s": 2.2583101139999995 + }, + { + "operation": "complete_identity", + "wall_s": 2.5700200419998964, + "cpu_s": 2.5697220819999993 + }, + { + "operation": "frame", + "wall_s": 0.34647268599997005, + "cpu_s": 0.34647334300000043 + }, + { + "operation": "encode", + "wall_s": 2.1951994189998913, + "cpu_s": 2.1947111340000003 + }, + { + "operation": "complete_identity", + "wall_s": 2.5718008080000345, + "cpu_s": 2.5712051739999993 + }, + { + "operation": "frame", + "wall_s": 0.3486741819999679, + "cpu_s": 0.3486636479999987 + }, + { + "operation": "encode", + "wall_s": 2.17477081800007, + "cpu_s": 2.174548075999999 + }, + { + "operation": "complete_identity", + "wall_s": 2.499481810999896, + "cpu_s": 2.498770166 + }, + { + "operation": "frame", + "wall_s": 0.3381363930000134, + "cpu_s": 0.33814517600000116 + }, + { + "operation": "encode", + "wall_s": 2.2139923720001207, + "cpu_s": 2.213663727 + }, + { + "operation": "complete_identity", + "wall_s": 2.6015323480000916, + "cpu_s": 2.601077283000002 + }, + { + "operation": "frame", + "wall_s": 0.34871706800004176, + "cpu_s": 0.34854363999999904 + }, + { + "operation": "encode", + "wall_s": 2.2807073979997767, + "cpu_s": 2.2802547639999986 + }, + { + "operation": "complete_identity", + "wall_s": 2.6848036970000067, + "cpu_s": 2.684090725000001 + } + ], + "source_files": 434, + "raw_bytes": 3708262, + "content_identity": "snapshot-content:sha256:e95df9fd7e1c346706c40733ef93b39f87a6a29e50fad8fcb993a99fc1f10582", + "encoded_sha256": "73cbb95660b04a89dd8fd5f11adb8cadd99f4651ec6836fbd75720bdc8084bc0", + "encoded_bytes": 13031223 +} diff --git a/docs/plans/purpose-separated-standards-engine/reports/performance-core-evidence/baseline-transport.json b/docs/plans/purpose-separated-standards-engine/reports/performance-core-evidence/baseline-transport.json new file mode 100644 index 00000000..d8c0cdb0 --- /dev/null +++ b/docs/plans/purpose-separated-standards-engine/reports/performance-core-evidence/baseline-transport.json @@ -0,0 +1,60 @@ +[ + { + "operation": "cold_cli_read", + "wall_s": 5.102453261999926, + "result_digest": "e6905877934b6c0561f0e01fa77112d1bea5a5410683062b6a1f3922795d2a44" + }, + { + "operation": "cold_cli_read", + "wall_s": 5.534491392999826, + "result_digest": "e6905877934b6c0561f0e01fa77112d1bea5a5410683062b6a1f3922795d2a44" + }, + { + "operation": "cold_cli_read", + "wall_s": 5.178166210999734, + "result_digest": "e6905877934b6c0561f0e01fa77112d1bea5a5410683062b6a1f3922795d2a44" + }, + { + "operation": "cold_mcp_initialize", + "wall_s": 1.5788436440002442 + }, + { + "operation": "mcp_explicit_read", + "wall_s": 3.2943918289997782, + "result_digest": "8233ab4ba7f8f1ee6855c0eab5be453ff99f3ac763fb0a1a34316bae541afddc" + }, + { + "operation": "mcp_explicit_read", + "wall_s": 3.162767408000036, + "result_digest": "8233ab4ba7f8f1ee6855c0eab5be453ff99f3ac763fb0a1a34316bae541afddc" + }, + { + "operation": "mcp_explicit_read", + "wall_s": 3.2888262430001305, + "result_digest": "8233ab4ba7f8f1ee6855c0eab5be453ff99f3ac763fb0a1a34316bae541afddc" + }, + { + "operation": "mcp_implicit_capture_read", + "wall_s": 18.180010175000007, + "result_digest": "685c7331a56a547f11b3a8fefca29de6e4956b12a82ab6418ac407f4d4779cec" + }, + { + "operation": "cold_mcp_initialize", + "wall_s": 1.62225820499998 + }, + { + "operation": "mcp_explicit_read", + "wall_s": 3.2619172400000025, + "result_digest": "8233ab4ba7f8f1ee6855c0eab5be453ff99f3ac763fb0a1a34316bae541afddc" + }, + { + "operation": "mcp_explicit_read", + "wall_s": 3.245190103999903, + "result_digest": "8233ab4ba7f8f1ee6855c0eab5be453ff99f3ac763fb0a1a34316bae541afddc" + }, + { + "operation": "mcp_explicit_read", + "wall_s": 3.298129840999991, + "result_digest": "8233ab4ba7f8f1ee6855c0eab5be453ff99f3ac763fb0a1a34316bae541afddc" + } +] diff --git a/docs/plans/purpose-separated-standards-engine/reports/performance-core-evidence/candidate-capture-size-0.json b/docs/plans/purpose-separated-standards-engine/reports/performance-core-evidence/candidate-capture-size-0.json new file mode 100644 index 00000000..b605d5d1 --- /dev/null +++ b/docs/plans/purpose-separated-standards-engine/reports/performance-core-evidence/candidate-capture-size-0.json @@ -0,0 +1 @@ +{"store_bytes": 4558848, "files": 434, "content_bytes": 3708262} \ No newline at end of file diff --git a/docs/plans/purpose-separated-standards-engine/reports/performance-core-evidence/candidate-capture-size-1.json b/docs/plans/purpose-separated-standards-engine/reports/performance-core-evidence/candidate-capture-size-1.json new file mode 100644 index 00000000..b605d5d1 --- /dev/null +++ b/docs/plans/purpose-separated-standards-engine/reports/performance-core-evidence/candidate-capture-size-1.json @@ -0,0 +1 @@ +{"store_bytes": 4558848, "files": 434, "content_bytes": 3708262} \ No newline at end of file diff --git a/docs/plans/purpose-separated-standards-engine/reports/performance-core-evidence/candidate-capture-size-2.json b/docs/plans/purpose-separated-standards-engine/reports/performance-core-evidence/candidate-capture-size-2.json new file mode 100644 index 00000000..b605d5d1 --- /dev/null +++ b/docs/plans/purpose-separated-standards-engine/reports/performance-core-evidence/candidate-capture-size-2.json @@ -0,0 +1 @@ +{"store_bytes": 4558848, "files": 434, "content_bytes": 3708262} \ No newline at end of file diff --git a/docs/plans/purpose-separated-standards-engine/reports/performance-core-evidence/candidate-operations.jsonl b/docs/plans/purpose-separated-standards-engine/reports/performance-core-evidence/candidate-operations.jsonl new file mode 100644 index 00000000..497e5871 --- /dev/null +++ b/docs/plans/purpose-separated-standards-engine/reports/performance-core-evidence/candidate-operations.jsonl @@ -0,0 +1,57 @@ +{"operation": "s0.engine_open_new", "wall_s": 0.0025369929999214946, "cpu_s": 0.002535297000000103, "status": "ok", "peak_rss_kib": 131888, "spans": {"sqlite._verify_integrity": {"calls": 1, "wall_s": 0.00010316199995941133, "self_s": 0.00010316199995941133}, "sqlite.__init__": {"calls": 1, "wall_s": 0.002374773999918034, "self_s": 0.0022716119999586226}, "snapshot.maintain": {"calls": 1, "wall_s": 6.942199979675934e-05, "self_s": 6.942199979675934e-05}}, "git_reads": {"count": 0, "unique": 0, "top": []}, "git_objects": {"count": 0, "unique": 0}, "git_commands": {}} +{"operation": "s0.facade_construct", "wall_s": 0.28156137500013756, "cpu_s": 0.2815268019999999, "status": "ok", "peak_rss_kib": 133680, "spans": {"facade.contracts": {"calls": 1, "wall_s": 0.2788982570000371, "self_s": 0.2788982570000371}}, "git_reads": {"count": 0, "unique": 0, "top": []}, "git_objects": {"count": 0, "unique": 0}, "git_commands": {}} +{"operation": "s0.create_snapshot", "wall_s": 2.287575577000098, "cpu_s": 1.609850286, "status": "ok", "peak_rss_kib": 225808, "spans": {"git.command": {"calls": 525, "wall_s": 0.9490139069998804, "self_s": 0.9490139069998804}, "git.object": {"calls": 524, "wall_s": 0.9601428240018777, "self_s": 0.012839514001825592}, "git.read_bytes": {"calls": 1137, "wall_s": 1.2362903050002387, "self_s": 0.27614748099836106}, "compile.load_canonical_standards_corpus": {"calls": 2, "wall_s": 0.25278491900007793, "self_s": 0.03998861499985651}, "compile.compile_policy_impact": {"calls": 2, "wall_s": 0.10941386900003636, "self_s": 0.05624911599988991}, "compile.load_supporting_content": {"calls": 2, "wall_s": 0.004215652000084447, "self_s": 0.00022287799993137014}, "compile.standards_navigation_registry": {"calls": 2, "wall_s": 0.00769933800029321, "self_s": 0.00769933800029321}, "compile.load_router_projection": {"calls": 2, "wall_s": 0.01183131699963269, "self_s": 0.009598861999620567}, "compile.build_materials": {"calls": 2, "wall_s": 0.03300946600006682, "self_s": 0.012364043998786656}, "compile.load_coverage_horizon": {"calls": 2, "wall_s": 1.0526763290001782, "self_s": 0.20506168999986585}, "compile.compile_coverage_definitions": {"calls": 2, "wall_s": 0.02631500600000436, "self_s": 0.02631500600000436}, "compile.load_repository_coverage_decisions": {"calls": 2, "wall_s": 0.039049000999966665, "self_s": 0.012765694000563599}, "compile.load_indexes": {"calls": 2, "wall_s": 0.09795287500014638, "self_s": 0.02839222400143626}, "_compile/_GitRevisionSource": {"calls": 1, "wall_s": 1.4469194809998953, "self_s": 6.774999951630889e-05}, "_compile/FrozenContentSource": {"calls": 1, "wall_s": 0.18817707199991673, "self_s": 8.103099980871775e-05}, "sqlite.snapshot": {"calls": 1, "wall_s": 6.454499998653773e-05, "self_s": 6.454499998653773e-05}}, "git_reads": {"count": 1137, "unique": 434, "top": [["topics/contracts.md", 17], ["STANDARDS-ROUTER.md", 15], ["topics/security.md", 14], ["workflows/verification.md", 14], ["topics/dependencies.md", 10], ["profiles/applications/frontend.md", 9], ["topics/architecture.md", 9], ["topics/concurrency.md", 9], ["topics/cross-platform.md", 9], ["workflows/commit.md", 9]]}, "git_objects": {"count": 524, "unique": 524}, "git_commands": {"rev-parse --verify": 1, "cat-file --batch": 524}} +{"operation": "s0.query_read_0", "wall_s": 0.8067629849999776, "cpu_s": 0.8067410810000002, "status": "ok", "peak_rss_kib": 241748, "spans": {"snapshot.maintain": {"calls": 1, "wall_s": 4.177100004199019e-05, "self_s": 4.177100004199019e-05}, "sqlite.snapshot": {"calls": 1, "wall_s": 2.120199997079908e-05, "self_s": 2.120199997079908e-05}, "sqlite.load_content": {"calls": 1, "wall_s": 0.01086168999995607, "self_s": 0.010840487999985271}, "snapshot.load_content": {"calls": 1, "wall_s": 0.6126195249999, "self_s": 0.601716063999902}, "compile.load_canonical_standards_corpus": {"calls": 1, "wall_s": 0.016665377999970588, "self_s": 0.016665377999970588}, "compile.compile_policy_impact": {"calls": 1, "wall_s": 0.025771425999892017, "self_s": 0.025771425999892017}, "compile.load_supporting_content": {"calls": 1, "wall_s": 7.245599999805563e-05, "self_s": 7.245599999805563e-05}, "compile.standards_navigation_registry": {"calls": 1, "wall_s": 0.0034142529998462123, "self_s": 0.0034142529998462123}, "compile.load_router_projection": {"calls": 1, "wall_s": 0.0041483139998490515, "self_s": 0.0041483139998490515}, "compile.build_materials": {"calls": 1, "wall_s": 0.0055904450000525685, "self_s": 0.0055904450000525685}, "compile.load_coverage_horizon": {"calls": 1, "wall_s": 0.09458718999985649, "self_s": 0.09458718999985649}, "compile.compile_coverage_definitions": {"calls": 1, "wall_s": 0.014187692999939827, "self_s": 0.014187692999939827}, "compile.load_repository_coverage_decisions": {"calls": 1, "wall_s": 0.006902485999944474, "self_s": 0.006902485999944474}, "compile.load_indexes": {"calls": 1, "wall_s": 0.011840260000099079, "self_s": 0.011840260000099079}, "_compile/FrozenContentSource": {"calls": 1, "wall_s": 0.18325609200019244, "self_s": 7.61910007440747e-05}, "engine._compiled_snapshot": {"calls": 1, "wall_s": 0.7983033789998899, "self_s": 0.00242776199979744}}, "git_reads": {"count": 0, "unique": 0, "top": []}, "git_objects": {"count": 0, "unique": 0}, "git_commands": {}} +{"operation": "s0.query_read_1", "wall_s": 0.8104013640001995, "cpu_s": 0.8103722630000005, "status": "ok", "peak_rss_kib": 247836, "spans": {"snapshot.maintain": {"calls": 1, "wall_s": 9.917600004882843e-05, "self_s": 9.917600004882843e-05}, "sqlite.snapshot": {"calls": 1, "wall_s": 2.6198999876214657e-05, "self_s": 2.6198999876214657e-05}, "sqlite.load_content": {"calls": 1, "wall_s": 0.011386612000023888, "self_s": 0.011360413000147673}, "snapshot.load_content": {"calls": 1, "wall_s": 0.6123870740000257, "self_s": 0.600901285999953}, "compile.load_canonical_standards_corpus": {"calls": 1, "wall_s": 0.016568116000144073, "self_s": 0.016568116000144073}, "compile.compile_policy_impact": {"calls": 1, "wall_s": 0.02511104400014119, "self_s": 0.02511104400014119}, "compile.load_supporting_content": {"calls": 1, "wall_s": 7.246699988172622e-05, "self_s": 7.246699988172622e-05}, "compile.standards_navigation_registry": {"calls": 1, "wall_s": 0.0035911130000840785, "self_s": 0.0035911130000840785}, "compile.load_router_projection": {"calls": 1, "wall_s": 0.004175403000090228, "self_s": 0.004175403000090228}, "compile.build_materials": {"calls": 1, "wall_s": 0.0056440240000483755, "self_s": 0.0056440240000483755}, "compile.load_coverage_horizon": {"calls": 1, "wall_s": 0.10097673499990378, "self_s": 0.10097673499990378}, "compile.compile_coverage_definitions": {"calls": 1, "wall_s": 0.014536816999907387, "self_s": 0.014536816999907387}, "compile.load_repository_coverage_decisions": {"calls": 1, "wall_s": 0.005983253000067634, "self_s": 0.005983253000067634}, "compile.load_indexes": {"calls": 1, "wall_s": 0.012022527999988597, "self_s": 0.012022527999988597}, "_compile/FrozenContentSource": {"calls": 1, "wall_s": 0.18875538900010724, "self_s": 7.388899985016906e-05}, "engine._compiled_snapshot": {"calls": 1, "wall_s": 0.8035338499998943, "self_s": 0.00239138699976138}}, "git_reads": {"count": 0, "unique": 0, "top": []}, "git_objects": {"count": 0, "unique": 0}, "git_commands": {}} +{"operation": "s0.query_read_2", "wall_s": 0.8333075579998876, "cpu_s": 0.8333107369999997, "status": "ok", "peak_rss_kib": 247836, "spans": {"snapshot.maintain": {"calls": 1, "wall_s": 9.741300004861841e-05, "self_s": 9.741300004861841e-05}, "sqlite.snapshot": {"calls": 1, "wall_s": 2.673900007721386e-05, "self_s": 2.673900007721386e-05}, "sqlite.load_content": {"calls": 1, "wall_s": 0.011590722000164533, "self_s": 0.011563983000087319}, "snapshot.load_content": {"calls": 1, "wall_s": 0.6397320339999624, "self_s": 0.6280438989997492}, "compile.load_canonical_standards_corpus": {"calls": 1, "wall_s": 0.01763556600008087, "self_s": 0.01763556600008087}, "compile.compile_policy_impact": {"calls": 1, "wall_s": 0.026832056000102966, "self_s": 0.026832056000102966}, "compile.load_supporting_content": {"calls": 1, "wall_s": 8.426399995187239e-05, "self_s": 8.426399995187239e-05}, "compile.standards_navigation_registry": {"calls": 1, "wall_s": 0.0037719189999734226, "self_s": 0.0037719189999734226}, "compile.load_router_projection": {"calls": 1, "wall_s": 0.004205237000178386, "self_s": 0.004205237000178386}, "compile.build_materials": {"calls": 1, "wall_s": 0.005229644000110056, "self_s": 0.005229644000110056}, "compile.load_coverage_horizon": {"calls": 1, "wall_s": 0.09468890900006954, "self_s": 0.09468890900006954}, "compile.compile_coverage_definitions": {"calls": 1, "wall_s": 0.013951405999932831, "self_s": 0.013951405999932831}, "compile.load_repository_coverage_decisions": {"calls": 1, "wall_s": 0.005569013000013001, "self_s": 0.005569013000013001}, "compile.load_indexes": {"calls": 1, "wall_s": 0.011739671999976053, "self_s": 0.011739671999976053}, "_compile/FrozenContentSource": {"calls": 1, "wall_s": 0.183785971999896, "self_s": 7.828599950698845e-05}, "engine._compiled_snapshot": {"calls": 1, "wall_s": 0.8260133159999441, "self_s": 0.0024953100000857376}}, "git_reads": {"count": 0, "unique": 0, "top": []}, "git_objects": {"count": 0, "unique": 0}, "git_commands": {}} +{"operation": "s0.inspect_policy", "wall_s": 0.800512198999968, "cpu_s": 0.8005017089999997, "status": "ok", "peak_rss_kib": 247884, "spans": {"snapshot.maintain": {"calls": 1, "wall_s": 9.671199995864299e-05, "self_s": 9.671199995864299e-05}, "sqlite.snapshot": {"calls": 1, "wall_s": 2.6929000114250812e-05, "self_s": 2.6929000114250812e-05}, "sqlite.load_content": {"calls": 1, "wall_s": 0.011091448999877684, "self_s": 0.011064519999763434}, "snapshot.load_content": {"calls": 1, "wall_s": 0.6030144450000989, "self_s": 0.5918262840002626}, "compile.load_canonical_standards_corpus": {"calls": 1, "wall_s": 0.016966551999985313, "self_s": 0.016966551999985313}, "compile.compile_policy_impact": {"calls": 1, "wall_s": 0.03262199400001009, "self_s": 0.03262199400001009}, "compile.load_supporting_content": {"calls": 1, "wall_s": 0.0001633209999454266, "self_s": 0.0001633209999454266}, "compile.standards_navigation_registry": {"calls": 1, "wall_s": 0.0036479269999745156, "self_s": 0.0036479269999745156}, "compile.load_router_projection": {"calls": 1, "wall_s": 0.004121533999978055, "self_s": 0.004121533999978055}, "compile.build_materials": {"calls": 1, "wall_s": 0.005237155000031635, "self_s": 0.005237155000031635}, "compile.load_coverage_horizon": {"calls": 1, "wall_s": 0.09840652899993074, "self_s": 0.09840652899993074}, "compile.compile_coverage_definitions": {"calls": 1, "wall_s": 0.013802045999909751, "self_s": 0.013802045999909751}, "compile.load_repository_coverage_decisions": {"calls": 1, "wall_s": 0.00561332899997069, "self_s": 0.00561332899997069}, "compile.load_indexes": {"calls": 1, "wall_s": 0.01167388499993649, "self_s": 0.01167388499993649}, "_compile/FrozenContentSource": {"calls": 1, "wall_s": 0.19232895000004646, "self_s": 7.467800037375127e-05}, "engine._compiled_snapshot": {"calls": 1, "wall_s": 0.7977409820000503, "self_s": 0.002397586999904888}}, "git_reads": {"count": 0, "unique": 0, "top": []}, "git_objects": {"count": 0, "unique": 0}, "git_commands": {}} +{"operation": "s0.route_explicit", "wall_s": 0.9836640379999153, "cpu_s": 0.9836314179999999, "status": "ok", "peak_rss_kib": 247884, "spans": {"snapshot.maintain": {"calls": 1, "wall_s": 9.98069999695872e-05, "self_s": 9.98069999695872e-05}, "sqlite.snapshot": {"calls": 1, "wall_s": 2.7439999939815607e-05, "self_s": 2.7439999939815607e-05}, "sqlite.load_content": {"calls": 1, "wall_s": 0.01134044500008713, "self_s": 0.011313005000147314}, "snapshot.load_content": {"calls": 1, "wall_s": 0.5968365050000557, "self_s": 0.585396252999999}, "compile.load_canonical_standards_corpus": {"calls": 1, "wall_s": 0.016832113999953435, "self_s": 0.016832113999953435}, "compile.compile_policy_impact": {"calls": 1, "wall_s": 0.02559350399997129, "self_s": 0.02559350399997129}, "compile.load_supporting_content": {"calls": 1, "wall_s": 0.00011463900000308058, "self_s": 0.00011463900000308058}, "compile.standards_navigation_registry": {"calls": 1, "wall_s": 0.0035085419999631995, "self_s": 0.0035085419999631995}, "compile.load_router_projection": {"calls": 1, "wall_s": 0.004327356999965559, "self_s": 0.004327356999965559}, "compile.build_materials": {"calls": 1, "wall_s": 0.0054949249999936, "self_s": 0.0054949249999936}, "compile.load_coverage_horizon": {"calls": 1, "wall_s": 0.09504317999994782, "self_s": 0.09504317999994782}, "compile.compile_coverage_definitions": {"calls": 1, "wall_s": 0.013888012000052186, "self_s": 0.013888012000052186}, "compile.load_repository_coverage_decisions": {"calls": 1, "wall_s": 0.005518910000091637, "self_s": 0.005518910000091637}, "compile.load_indexes": {"calls": 1, "wall_s": 0.011596772000075362, "self_s": 0.011596772000075362}, "_compile/FrozenContentSource": {"calls": 1, "wall_s": 0.18199561799997355, "self_s": 7.766299995637382e-05}, "engine._compiled_snapshot": {"calls": 1, "wall_s": 0.7812151189998531, "self_s": 0.0023829959998238337}}, "git_reads": {"count": 0, "unique": 0, "top": []}, "git_objects": {"count": 0, "unique": 0}, "git_commands": {}} +{"operation": "s0.prepare_same_snapshot", "wall_s": 0.823704090000092, "cpu_s": 0.8236573510000014, "status": "ok", "peak_rss_kib": 249020, "spans": {"snapshot.maintain": {"calls": 3, "wall_s": 0.00029954999990877695, "self_s": 0.00029954999990877695}, "sqlite.snapshot": {"calls": 3, "wall_s": 7.906599967100192e-05, "self_s": 7.906599967100192e-05}, "sqlite.load_content": {"calls": 1, "wall_s": 0.011476463999997577, "self_s": 0.011448092000136967}, "snapshot.load_content": {"calls": 1, "wall_s": 0.6073168240000086, "self_s": 0.5957383700001628}, "compile.load_canonical_standards_corpus": {"calls": 1, "wall_s": 0.01658218600005057, "self_s": 0.01658218600005057}, "compile.compile_policy_impact": {"calls": 1, "wall_s": 0.026086869999971896, "self_s": 0.026086869999971896}, "compile.load_supporting_content": {"calls": 1, "wall_s": 8.29319999411382e-05, "self_s": 8.29319999411382e-05}, "compile.standards_navigation_registry": {"calls": 1, "wall_s": 0.003336287999900378, "self_s": 0.003336287999900378}, "compile.load_router_projection": {"calls": 1, "wall_s": 0.004418690999955288, "self_s": 0.004418690999955288}, "compile.build_materials": {"calls": 1, "wall_s": 0.005050210000035804, "self_s": 0.005050210000035804}, "compile.load_coverage_horizon": {"calls": 1, "wall_s": 0.0938446269999531, "self_s": 0.0938446269999531}, "compile.compile_coverage_definitions": {"calls": 1, "wall_s": 0.014417731000094136, "self_s": 0.014417731000094136}, "compile.load_repository_coverage_decisions": {"calls": 1, "wall_s": 0.0057076180000876775, "self_s": 0.0057076180000876775}, "compile.load_indexes": {"calls": 1, "wall_s": 0.011646174999896175, "self_s": 0.011646174999896175}, "_compile/FrozenContentSource": {"calls": 1, "wall_s": 0.18126753700016707, "self_s": 9.420900028089818e-05}, "engine._compiled_snapshot": {"calls": 1, "wall_s": 0.790958934000173, "self_s": 0.0023745729999973264}, "compile.evaluate_analysis": {"calls": 1, "wall_s": 0.014857187999950838, "self_s": 0.014857187999950838}, "engine._evaluate_compiled": {"calls": 1, "wall_s": 0.015110219999996843, "self_s": 0.0002530320000460051}, "engine._evaluate": {"calls": 1, "wall_s": 0.015269565000153307, "self_s": 1.7407000314051402e-05}, "snapshot.publish_aggregate": {"calls": 1, "wall_s": 0.000572381999973004, "self_s": 0.00046606599994447606}}, "git_reads": {"count": 0, "unique": 0, "top": []}, "git_objects": {"count": 0, "unique": 0}, "git_commands": {}} +{"operation": "s0.resolve", "wall_s": 0.8416580640000575, "cpu_s": 0.8415330060000006, "status": "ok", "peak_rss_kib": 249020, "spans": {"snapshot.maintain": {"calls": 5, "wall_s": 0.0003956729999572417, "self_s": 0.0003956729999572417}, "sqlite.snapshot": {"calls": 5, "wall_s": 0.00010582599998087971, "self_s": 0.00010582599998087971}, "engine._load_analysis": {"calls": 1, "wall_s": 0.0007850649999454618, "self_s": 0.0006878919998598576}, "sqlite.load_content": {"calls": 1, "wall_s": 0.011538084999983766, "self_s": 0.011524434999955702}, "snapshot.load_content": {"calls": 1, "wall_s": 0.5940456680000352, "self_s": 0.5824845189999905}, "compile.load_canonical_standards_corpus": {"calls": 1, "wall_s": 0.023664045000032274, "self_s": 0.023664045000032274}, "compile.compile_policy_impact": {"calls": 1, "wall_s": 0.026583190000110335, "self_s": 0.026583190000110335}, "compile.load_supporting_content": {"calls": 1, "wall_s": 8.518499998899642e-05, "self_s": 8.518499998899642e-05}, "compile.standards_navigation_registry": {"calls": 1, "wall_s": 0.0034312389998376602, "self_s": 0.0034312389998376602}, "compile.load_router_projection": {"calls": 1, "wall_s": 0.005419002999815348, "self_s": 0.005419002999815348}, "compile.build_materials": {"calls": 1, "wall_s": 0.005209604999890871, "self_s": 0.005209604999890871}, "compile.load_coverage_horizon": {"calls": 1, "wall_s": 0.09695267000006424, "self_s": 0.09695267000006424}, "compile.compile_coverage_definitions": {"calls": 1, "wall_s": 0.013699334999955681, "self_s": 0.013699334999955681}, "compile.load_repository_coverage_decisions": {"calls": 1, "wall_s": 0.0056381550000423886, "self_s": 0.0056381550000423886}, "compile.load_indexes": {"calls": 1, "wall_s": 0.011333473999911803, "self_s": 0.011333473999911803}, "_compile/FrozenContentSource": {"calls": 1, "wall_s": 0.19209853199981808, "self_s": 8.263100016847602e-05}, "engine._compiled_snapshot": {"calls": 1, "wall_s": 0.7884411299999101, "self_s": 0.0022969300000568182}, "compile.evaluate_analysis": {"calls": 2, "wall_s": 0.030640449000202352, "self_s": 0.030640449000202352}, "engine._evaluate_compiled": {"calls": 2, "wall_s": 0.031179672000007486, "self_s": 0.0005392229998051334}, "engine._evaluate": {"calls": 2, "wall_s": 0.03147416499996325, "self_s": 3.146500012007891e-05}, "snapshot.publish_aggregate": {"calls": 1, "wall_s": 0.00046423300000242307, "self_s": 0.0003596490000745689}}, "git_reads": {"count": 0, "unique": 0, "top": []}, "git_objects": {"count": 0, "unique": 0}, "git_commands": {}} +{"operation": "s0.inspect_analysis", "wall_s": 0.0038911849999294645, "cpu_s": 0.003892134999999186, "status": "ok", "peak_rss_kib": 249020, "spans": {"snapshot.maintain": {"calls": 1, "wall_s": 7.403899985547469e-05, "self_s": 7.403899985547469e-05}, "sqlite.snapshot": {"calls": 1, "wall_s": 1.4039999996384722e-05, "self_s": 1.4039999996384722e-05}, "engine._load_analysis": {"calls": 1, "wall_s": 0.0013515189998543065, "self_s": 0.001263440000002447}}, "git_reads": {"count": 0, "unique": 0, "top": []}, "git_objects": {"count": 0, "unique": 0}, "git_commands": {}} +{"operation": "s0.inspect_snapshot", "wall_s": 0.0005321630001162703, "cpu_s": 0.0005326019999998266, "status": "ok", "peak_rss_kib": 249020, "spans": {"snapshot.maintain": {"calls": 1, "wall_s": 3.305799987174396e-05, "self_s": 3.305799987174396e-05}, "sqlite.snapshot": {"calls": 1, "wall_s": 1.691500006018032e-05, "self_s": 1.691500006018032e-05}}, "git_reads": {"count": 0, "unique": 0, "top": []}, "git_objects": {"count": 0, "unique": 0}, "git_commands": {}} +{"operation": "s0.engine_close", "wall_s": 0.0004593459998432081, "cpu_s": 0.00045660899999866444, "status": "ok", "peak_rss_kib": 250064, "spans": {}, "git_reads": {"count": 0, "unique": 0, "top": []}, "git_objects": {"count": 0, "unique": 0}, "git_commands": {}} +{"operation": "s0.reopen_0", "wall_s": 0.0049094430000877765, "cpu_s": 0.004910508000000036, "status": "ok", "peak_rss_kib": 250064, "spans": {"sqlite._verify_integrity": {"calls": 2, "wall_s": 0.004156376000082673, "self_s": 0.004156376000082673}, "sqlite.__init__": {"calls": 1, "wall_s": 0.004747274999999718, "self_s": 0.0005908989999170444}, "snapshot.maintain": {"calls": 1, "wall_s": 4.1812000063146115e-05, "self_s": 4.1812000063146115e-05}}, "git_reads": {"count": 0, "unique": 0, "top": []}, "git_objects": {"count": 0, "unique": 0}, "git_commands": {}} +{"operation": "s0.reopen_facade_0", "wall_s": 0.25875143799999023, "cpu_s": 0.2587597370000001, "status": "ok", "peak_rss_kib": 250064, "spans": {"facade.contracts": {"calls": 1, "wall_s": 0.2561449330000869, "self_s": 0.2561449330000869}}, "git_reads": {"count": 0, "unique": 0, "top": []}, "git_objects": {"count": 0, "unique": 0}, "git_commands": {}} +{"operation": "s0.reopened_query_0", "wall_s": 0.9240226990000338, "cpu_s": 0.923891115, "status": "ok", "peak_rss_kib": 250356, "spans": {"snapshot.maintain": {"calls": 1, "wall_s": 9.838500000114436e-05, "self_s": 9.838500000114436e-05}, "sqlite.snapshot": {"calls": 1, "wall_s": 7.336799990298459e-05, "self_s": 7.336799990298459e-05}, "sqlite.load_content": {"calls": 1, "wall_s": 0.011585335000063424, "self_s": 0.011511967000160439}, "snapshot.load_content": {"calls": 1, "wall_s": 0.7303788799999893, "self_s": 0.7186951599999247}, "compile.load_canonical_standards_corpus": {"calls": 1, "wall_s": 0.017012597000075402, "self_s": 0.017012597000075402}, "compile.compile_policy_impact": {"calls": 1, "wall_s": 0.027177760999848033, "self_s": 0.027177760999848033}, "compile.load_supporting_content": {"calls": 1, "wall_s": 0.00013278500000524218, "self_s": 0.00013278500000524218}, "compile.standards_navigation_registry": {"calls": 1, "wall_s": 0.003741794999996273, "self_s": 0.003741794999996273}, "compile.load_router_projection": {"calls": 1, "wall_s": 0.004711892000159423, "self_s": 0.004711892000159423}, "compile.build_materials": {"calls": 1, "wall_s": 0.005648098999927242, "self_s": 0.005648098999927242}, "compile.load_coverage_horizon": {"calls": 1, "wall_s": 0.09503589700011617, "self_s": 0.09503589700011617}, "compile.compile_coverage_definitions": {"calls": 1, "wall_s": 0.013416076999874349, "self_s": 0.013416076999874349}, "compile.load_repository_coverage_decisions": {"calls": 1, "wall_s": 0.005555973999889829, "self_s": 0.005555973999889829}, "compile.load_indexes": {"calls": 1, "wall_s": 0.01161574799994014, "self_s": 0.01161574799994014}, "_compile/FrozenContentSource": {"calls": 1, "wall_s": 0.1841472790001717, "self_s": 9.865400033959304e-05}, "engine._compiled_snapshot": {"calls": 1, "wall_s": 0.9168288660000599, "self_s": 0.0023027069998988736}}, "git_reads": {"count": 0, "unique": 0, "top": []}, "git_objects": {"count": 0, "unique": 0}, "git_commands": {}} +{"operation": "s0.reopen_1", "wall_s": 0.004418138999881194, "cpu_s": 0.004419437999999332, "status": "ok", "peak_rss_kib": 250356, "spans": {"sqlite._verify_integrity": {"calls": 2, "wall_s": 0.003601117000243903, "self_s": 0.003601117000243903}, "sqlite.__init__": {"calls": 1, "wall_s": 0.004278374000023177, "self_s": 0.0006772569997792743}, "snapshot.maintain": {"calls": 1, "wall_s": 4.00490000629361e-05, "self_s": 4.00490000629361e-05}}, "git_reads": {"count": 0, "unique": 0, "top": []}, "git_objects": {"count": 0, "unique": 0}, "git_commands": {}} +{"operation": "s0.reopen_facade_1", "wall_s": 0.2726364449999892, "cpu_s": 0.27263316500000023, "status": "ok", "peak_rss_kib": 250356, "spans": {"facade.contracts": {"calls": 1, "wall_s": 0.2699051160000181, "self_s": 0.2699051160000181}}, "git_reads": {"count": 0, "unique": 0, "top": []}, "git_objects": {"count": 0, "unique": 0}, "git_commands": {}} +{"operation": "s0.reopened_query_1", "wall_s": 0.8297342959999696, "cpu_s": 0.820753946, "status": "ok", "peak_rss_kib": 252968, "spans": {"snapshot.maintain": {"calls": 1, "wall_s": 9.597100006430992e-05, "self_s": 9.597100006430992e-05}, "sqlite.snapshot": {"calls": 1, "wall_s": 9.244600005331449e-05, "self_s": 9.244600005331449e-05}, "sqlite.load_content": {"calls": 1, "wall_s": 0.011152555999842662, "self_s": 0.011060109999789347}, "snapshot.load_content": {"calls": 1, "wall_s": 0.6393411440001273, "self_s": 0.6280926170002203}, "compile.load_canonical_standards_corpus": {"calls": 1, "wall_s": 0.017511100000092483, "self_s": 0.017511100000092483}, "compile.compile_policy_impact": {"calls": 1, "wall_s": 0.02648036100003992, "self_s": 0.02648036100003992}, "compile.load_supporting_content": {"calls": 1, "wall_s": 0.00015121299998099857, "self_s": 0.00015121299998099857}, "compile.standards_navigation_registry": {"calls": 1, "wall_s": 0.0038300840001284087, "self_s": 0.0038300840001284087}, "compile.load_router_projection": {"calls": 1, "wall_s": 0.004177656000138086, "self_s": 0.004177656000138086}, "compile.build_materials": {"calls": 1, "wall_s": 0.005039914000008139, "self_s": 0.005039914000008139}, "compile.load_coverage_horizon": {"calls": 1, "wall_s": 0.09338112299997192, "self_s": 0.09338112299997192}, "compile.compile_coverage_definitions": {"calls": 1, "wall_s": 0.013311652000083996, "self_s": 0.013311652000083996}, "compile.load_repository_coverage_decisions": {"calls": 1, "wall_s": 0.006009651000113081, "self_s": 0.006009651000113081}, "compile.load_indexes": {"calls": 1, "wall_s": 0.011186917000031826, "self_s": 0.011186917000031826}, "_compile/FrozenContentSource": {"calls": 1, "wall_s": 0.181159647999948, "self_s": 7.99769993591326e-05}, "engine._compiled_snapshot": {"calls": 1, "wall_s": 0.8228717500001039, "self_s": 0.0023709580000286223}}, "git_reads": {"count": 0, "unique": 0, "top": []}, "git_objects": {"count": 0, "unique": 0}, "git_commands": {}} +{"operation": "s1.engine_open_new", "wall_s": 0.001459156000009898, "cpu_s": 0.0014596000000004494, "status": "ok", "peak_rss_kib": 252968, "spans": {"sqlite._verify_integrity": {"calls": 1, "wall_s": 0.00010997200001838792, "self_s": 0.00010997200001838792}, "sqlite.__init__": {"calls": 1, "wall_s": 0.0012943340000219905, "self_s": 0.0011843620000036026}, "snapshot.maintain": {"calls": 1, "wall_s": 3.4631000062290695e-05, "self_s": 3.4631000062290695e-05}}, "git_reads": {"count": 0, "unique": 0, "top": []}, "git_objects": {"count": 0, "unique": 0}, "git_commands": {}} +{"operation": "s1.facade_construct", "wall_s": 0.26274454300005345, "cpu_s": 0.26248466199999854, "status": "ok", "peak_rss_kib": 252968, "spans": {"facade.contracts": {"calls": 1, "wall_s": 0.26017091600010644, "self_s": 0.26017091600010644}}, "git_reads": {"count": 0, "unique": 0, "top": []}, "git_objects": {"count": 0, "unique": 0}, "git_commands": {}} +{"operation": "s1.create_snapshot", "wall_s": 2.572690020000209, "cpu_s": 1.6633557339999996, "status": "ok", "peak_rss_kib": 259388, "spans": {"git.command": {"calls": 525, "wall_s": 1.1884650370006966, "self_s": 1.1884650370006966}, "git.object": {"calls": 524, "wall_s": 1.198393544997316, "self_s": 0.013745372996709193}, "git.read_bytes": {"calls": 1137, "wall_s": 1.4905633469984423, "self_s": 0.2921698020011263}, "compile.load_canonical_standards_corpus": {"calls": 2, "wall_s": 0.43954580000013266, "self_s": 0.10082736400136127}, "compile.compile_policy_impact": {"calls": 2, "wall_s": 0.12873795600012272, "self_s": 0.058237253999550376}, "compile.load_supporting_content": {"calls": 2, "wall_s": 0.006810838999854241, "self_s": 0.00022768499979974877}, "compile.standards_navigation_registry": {"calls": 2, "wall_s": 0.007858200999862675, "self_s": 0.007858200999862675}, "compile.load_router_projection": {"calls": 2, "wall_s": 0.011192574999768112, "self_s": 0.00861767699984739}, "compile.build_materials": {"calls": 2, "wall_s": 0.03541759299992009, "self_s": 0.011555300000054558}, "compile.load_coverage_horizon": {"calls": 2, "wall_s": 1.1678654400000141, "self_s": 0.21421085900033177}, "compile.compile_coverage_definitions": {"calls": 2, "wall_s": 0.028143342000248595, "self_s": 0.028143342000248595}, "compile.load_repository_coverage_decisions": {"calls": 2, "wall_s": 0.032404840000026525, "self_s": 0.012210723000180224}, "compile.load_indexes": {"calls": 2, "wall_s": 0.10167144899992309, "self_s": 0.027196283000193944}, "_compile/_GitRevisionSource": {"calls": 1, "wall_s": 1.7734137260001717, "self_s": 6.635600016124954e-05}, "_compile/FrozenContentSource": {"calls": 1, "wall_s": 0.18637957300006747, "self_s": 7.890800020504685e-05}, "sqlite.snapshot": {"calls": 1, "wall_s": 6.635799991272506e-05, "self_s": 6.635799991272506e-05}}, "git_reads": {"count": 1137, "unique": 434, "top": [["topics/contracts.md", 17], ["STANDARDS-ROUTER.md", 15], ["topics/security.md", 14], ["workflows/verification.md", 14], ["topics/dependencies.md", 10], ["profiles/applications/frontend.md", 9], ["topics/architecture.md", 9], ["topics/concurrency.md", 9], ["topics/cross-platform.md", 9], ["workflows/commit.md", 9]]}, "git_objects": {"count": 524, "unique": 524}, "git_commands": {"rev-parse --verify": 1, "cat-file --batch": 524}} +{"operation": "s1.query_read_0", "wall_s": 0.7987339559999782, "cpu_s": 0.7987194400000011, "status": "ok", "peak_rss_kib": 259388, "spans": {"snapshot.maintain": {"calls": 1, "wall_s": 3.472100001999934e-05, "self_s": 3.472100001999934e-05}, "sqlite.snapshot": {"calls": 1, "wall_s": 1.906800002871023e-05, "self_s": 1.906800002871023e-05}, "sqlite.load_content": {"calls": 1, "wall_s": 0.011811535000106232, "self_s": 0.011792467000077522}, "snapshot.load_content": {"calls": 1, "wall_s": 0.6055664980001438, "self_s": 0.5937202420000176}, "compile.load_canonical_standards_corpus": {"calls": 1, "wall_s": 0.016926690999980565, "self_s": 0.016926690999980565}, "compile.compile_policy_impact": {"calls": 1, "wall_s": 0.026996144000122513, "self_s": 0.026996144000122513}, "compile.load_supporting_content": {"calls": 1, "wall_s": 0.00014503399984278076, "self_s": 0.00014503399984278076}, "compile.standards_navigation_registry": {"calls": 1, "wall_s": 0.003719651999972484, "self_s": 0.003719651999972484}, "compile.load_router_projection": {"calls": 1, "wall_s": 0.004259525999941616, "self_s": 0.004259525999941616}, "compile.build_materials": {"calls": 1, "wall_s": 0.005106582000053095, "self_s": 0.005106582000053095}, "compile.load_coverage_horizon": {"calls": 1, "wall_s": 0.09565248699982476, "self_s": 0.09565248699982476}, "compile.compile_coverage_definitions": {"calls": 1, "wall_s": 0.013349730999834719, "self_s": 0.013349730999834719}, "compile.load_repository_coverage_decisions": {"calls": 1, "wall_s": 0.005574801999955525, "self_s": 0.005574801999955525}, "compile.load_indexes": {"calls": 1, "wall_s": 0.011746953000056237, "self_s": 0.011746953000056237}, "_compile/FrozenContentSource": {"calls": 1, "wall_s": 0.18355321400008506, "self_s": 7.561200050076877e-05}, "engine._compiled_snapshot": {"calls": 1, "wall_s": 0.7913830410000173, "self_s": 0.0022633289997884276}}, "git_reads": {"count": 0, "unique": 0, "top": []}, "git_objects": {"count": 0, "unique": 0}, "git_commands": {}} +{"operation": "s1.query_read_1", "wall_s": 0.8148914400001104, "cpu_s": 0.8148298609999998, "status": "ok", "peak_rss_kib": 259508, "spans": {"snapshot.maintain": {"calls": 1, "wall_s": 0.00010228099995401863, "self_s": 0.00010228099995401863}, "sqlite.snapshot": {"calls": 1, "wall_s": 6.730899985996075e-05, "self_s": 6.730899985996075e-05}, "sqlite.load_content": {"calls": 1, "wall_s": 0.011176814000009472, "self_s": 0.011109505000149511}, "snapshot.load_content": {"calls": 1, "wall_s": 0.6130661960000907, "self_s": 0.6017871010001272}, "compile.load_canonical_standards_corpus": {"calls": 1, "wall_s": 0.017354373999978634, "self_s": 0.017354373999978634}, "compile.compile_policy_impact": {"calls": 1, "wall_s": 0.026646393999953943, "self_s": 0.026646393999953943}, "compile.load_supporting_content": {"calls": 1, "wall_s": 9.214600004270324e-05, "self_s": 9.214600004270324e-05}, "compile.standards_navigation_registry": {"calls": 1, "wall_s": 0.00461011199990935, "self_s": 0.00461011199990935}, "compile.load_router_projection": {"calls": 1, "wall_s": 0.004300266999962332, "self_s": 0.004300266999962332}, "compile.build_materials": {"calls": 1, "wall_s": 0.005196575999889319, "self_s": 0.005196575999889319}, "compile.load_coverage_horizon": {"calls": 1, "wall_s": 0.09931662300004973, "self_s": 0.09931662300004973}, "compile.compile_coverage_definitions": {"calls": 1, "wall_s": 0.015499685000122554, "self_s": 0.015499685000122554}, "compile.load_repository_coverage_decisions": {"calls": 1, "wall_s": 0.006834655999909955, "self_s": 0.006834655999909955}, "compile.load_indexes": {"calls": 1, "wall_s": 0.011885636999977578, "self_s": 0.011885636999977578}, "_compile/FrozenContentSource": {"calls": 1, "wall_s": 0.19181845000002795, "self_s": 8.198000023185159e-05}, "engine._compiled_snapshot": {"calls": 1, "wall_s": 0.807239299999992, "self_s": 0.002354653999873335}}, "git_reads": {"count": 0, "unique": 0, "top": []}, "git_objects": {"count": 0, "unique": 0}, "git_commands": {}} +{"operation": "s1.query_read_2", "wall_s": 0.8385935620001419, "cpu_s": 0.8384994290000023, "status": "ok", "peak_rss_kib": 259508, "spans": {"snapshot.maintain": {"calls": 1, "wall_s": 0.00010038699997494405, "self_s": 0.00010038699997494405}, "sqlite.snapshot": {"calls": 1, "wall_s": 2.9683000093427836e-05, "self_s": 2.9683000093427836e-05}, "sqlite.load_content": {"calls": 1, "wall_s": 0.011326363999842215, "self_s": 0.011296680999748787}, "snapshot.load_content": {"calls": 1, "wall_s": 0.6419817989999501, "self_s": 0.630555048000133}, "compile.load_canonical_standards_corpus": {"calls": 1, "wall_s": 0.01992827000003672, "self_s": 0.01992827000003672}, "compile.compile_policy_impact": {"calls": 1, "wall_s": 0.029566861000148492, "self_s": 0.029566861000148492}, "compile.load_supporting_content": {"calls": 1, "wall_s": 0.00012125900002502021, "self_s": 0.00012125900002502021}, "compile.standards_navigation_registry": {"calls": 1, "wall_s": 0.00364374100013265, "self_s": 0.00364374100013265}, "compile.load_router_projection": {"calls": 1, "wall_s": 0.0041626940001151524, "self_s": 0.0041626940001151524}, "compile.build_materials": {"calls": 1, "wall_s": 0.005387186000007205, "self_s": 0.005387186000007205}, "compile.load_coverage_horizon": {"calls": 1, "wall_s": 0.09378978200015808, "self_s": 0.09378978200015808}, "compile.compile_coverage_definitions": {"calls": 1, "wall_s": 0.01385826899991116, "self_s": 0.01385826899991116}, "compile.load_repository_coverage_decisions": {"calls": 1, "wall_s": 0.005519760999959544, "self_s": 0.005519760999959544}, "compile.load_indexes": {"calls": 1, "wall_s": 0.0114151939999374, "self_s": 0.0114151939999374}, "_compile/FrozenContentSource": {"calls": 1, "wall_s": 0.18747032299984312, "self_s": 7.730599941169203e-05}, "engine._compiled_snapshot": {"calls": 1, "wall_s": 0.8317878779998864, "self_s": 0.00233575600009317}}, "git_reads": {"count": 0, "unique": 0, "top": []}, "git_objects": {"count": 0, "unique": 0}, "git_commands": {}} +{"operation": "s1.inspect_policy", "wall_s": 0.9034836680000353, "cpu_s": 0.9033421859999997, "status": "ok", "peak_rss_kib": 259576, "spans": {"snapshot.maintain": {"calls": 1, "wall_s": 9.80939998953545e-05, "self_s": 9.80939998953545e-05}, "sqlite.snapshot": {"calls": 1, "wall_s": 2.6479000098333927e-05, "self_s": 2.6479000098333927e-05}, "sqlite.load_content": {"calls": 1, "wall_s": 0.010734241999898586, "self_s": 0.010707762999800252}, "snapshot.load_content": {"calls": 1, "wall_s": 0.7083562350001102, "self_s": 0.6975238990003163}, "compile.load_canonical_standards_corpus": {"calls": 1, "wall_s": 0.0203114739999819, "self_s": 0.0203114739999819}, "compile.compile_policy_impact": {"calls": 1, "wall_s": 0.029378374000089025, "self_s": 0.029378374000089025}, "compile.load_supporting_content": {"calls": 1, "wall_s": 0.00013195400015320047, "self_s": 0.00013195400015320047}, "compile.standards_navigation_registry": {"calls": 1, "wall_s": 0.004339344000072742, "self_s": 0.004339344000072742}, "compile.load_router_projection": {"calls": 1, "wall_s": 0.004049637999969491, "self_s": 0.004049637999969491}, "compile.build_materials": {"calls": 1, "wall_s": 0.005133944000135671, "self_s": 0.005133944000135671}, "compile.load_coverage_horizon": {"calls": 1, "wall_s": 0.09428261399989424, "self_s": 0.09428261399989424}, "compile.compile_coverage_definitions": {"calls": 1, "wall_s": 0.013958905999970739, "self_s": 0.013958905999970739}, "compile.load_repository_coverage_decisions": {"calls": 1, "wall_s": 0.005964434000134133, "self_s": 0.005964434000134133}, "compile.load_indexes": {"calls": 1, "wall_s": 0.011889961999941079, "self_s": 0.011889961999941079}, "_compile/FrozenContentSource": {"calls": 1, "wall_s": 0.18952619200013032, "self_s": 8.554799978810479e-05}, "engine._compiled_snapshot": {"calls": 1, "wall_s": 0.9002068869999675, "self_s": 0.002324459999726969}}, "git_reads": {"count": 0, "unique": 0, "top": []}, "git_objects": {"count": 0, "unique": 0}, "git_commands": {}} +{"operation": "s1.route_explicit", "wall_s": 0.9913638049999918, "cpu_s": 0.9911251840000013, "status": "ok", "peak_rss_kib": 259576, "spans": {"snapshot.maintain": {"calls": 1, "wall_s": 9.945600004357402e-05, "self_s": 9.945600004357402e-05}, "sqlite.snapshot": {"calls": 1, "wall_s": 2.8411999892341555e-05, "self_s": 2.8411999892341555e-05}, "sqlite.load_content": {"calls": 1, "wall_s": 0.011228417999973317, "self_s": 0.011200006000080975}, "snapshot.load_content": {"calls": 1, "wall_s": 0.5965017720000105, "self_s": 0.5851738979999936}, "compile.load_canonical_standards_corpus": {"calls": 1, "wall_s": 0.017386328000156936, "self_s": 0.017386328000156936}, "compile.compile_policy_impact": {"calls": 1, "wall_s": 0.025596117000077356, "self_s": 0.025596117000077356}, "compile.load_supporting_content": {"calls": 1, "wall_s": 8.484500017402752e-05, "self_s": 8.484500017402752e-05}, "compile.standards_navigation_registry": {"calls": 1, "wall_s": 0.003429555999900913, "self_s": 0.003429555999900913}, "compile.load_router_projection": {"calls": 1, "wall_s": 0.007406906999904095, "self_s": 0.007406906999904095}, "compile.build_materials": {"calls": 1, "wall_s": 0.005262541999854875, "self_s": 0.005262541999854875}, "compile.load_coverage_horizon": {"calls": 1, "wall_s": 0.0961925159999737, "self_s": 0.0961925159999737}, "compile.compile_coverage_definitions": {"calls": 1, "wall_s": 0.014019114999882731, "self_s": 0.014019114999882731}, "compile.load_repository_coverage_decisions": {"calls": 1, "wall_s": 0.005555153000159407, "self_s": 0.005555153000159407}, "compile.load_indexes": {"calls": 1, "wall_s": 0.011674065000079281, "self_s": 0.011674065000079281}, "_compile/FrozenContentSource": {"calls": 1, "wall_s": 0.18669023500001458, "self_s": 8.309099985126522e-05}, "engine._compiled_snapshot": {"calls": 1, "wall_s": 0.7858342940000966, "self_s": 0.0026422870000715193}}, "git_reads": {"count": 0, "unique": 0, "top": []}, "git_objects": {"count": 0, "unique": 0}, "git_commands": {}} +{"operation": "s1.prepare_same_snapshot", "wall_s": 0.8283077700000376, "cpu_s": 0.8280633200000018, "status": "ok", "peak_rss_kib": 259576, "spans": {"snapshot.maintain": {"calls": 3, "wall_s": 0.0002789400000438036, "self_s": 0.0002789400000438036}, "sqlite.snapshot": {"calls": 3, "wall_s": 7.645299979230913e-05, "self_s": 7.645299979230913e-05}, "sqlite.load_content": {"calls": 1, "wall_s": 0.011917221999965477, "self_s": 0.011887107000120523}, "snapshot.load_content": {"calls": 1, "wall_s": 0.6088676649999343, "self_s": 0.5968478319998667}, "compile.load_canonical_standards_corpus": {"calls": 1, "wall_s": 0.01682752699980483, "self_s": 0.01682752699980483}, "compile.compile_policy_impact": {"calls": 1, "wall_s": 0.026561076000007233, "self_s": 0.026561076000007233}, "compile.load_supporting_content": {"calls": 1, "wall_s": 9.168499991574208e-05, "self_s": 9.168499991574208e-05}, "compile.standards_navigation_registry": {"calls": 1, "wall_s": 0.0036488980001649907, "self_s": 0.0036488980001649907}, "compile.load_router_projection": {"calls": 1, "wall_s": 0.004205366999940452, "self_s": 0.004205366999940452}, "compile.build_materials": {"calls": 1, "wall_s": 0.005245736999995643, "self_s": 0.005245736999995643}, "compile.load_coverage_horizon": {"calls": 1, "wall_s": 0.09861626199995044, "self_s": 0.09861626199995044}, "compile.compile_coverage_definitions": {"calls": 1, "wall_s": 0.013672154000005321, "self_s": 0.013672154000005321}, "compile.load_repository_coverage_decisions": {"calls": 1, "wall_s": 0.005528662999950029, "self_s": 0.005528662999950029}, "compile.load_indexes": {"calls": 1, "wall_s": 0.0111616110000341, "self_s": 0.0111616110000341}, "_compile/FrozenContentSource": {"calls": 1, "wall_s": 0.18565035500000704, "self_s": 9.137500023825851e-05}, "engine._compiled_snapshot": {"calls": 1, "wall_s": 0.7968491599999652, "self_s": 0.002331140000023879}, "compile.evaluate_analysis": {"calls": 1, "wall_s": 0.014799952999965171, "self_s": 0.014799952999965171}, "engine._evaluate_compiled": {"calls": 1, "wall_s": 0.015042549999861876, "self_s": 0.0002425969998967048}, "engine._evaluate": {"calls": 1, "wall_s": 0.015191659000038271, "self_s": 1.281900017602311e-05}, "snapshot.publish_aggregate": {"calls": 1, "wall_s": 0.0005099600000448845, "self_s": 0.00042358300015621353}}, "git_reads": {"count": 0, "unique": 0, "top": []}, "git_objects": {"count": 0, "unique": 0}, "git_commands": {}} +{"operation": "s1.resolve", "wall_s": 0.8505200090000926, "cpu_s": 0.8496945270000005, "status": "ok", "peak_rss_kib": 259576, "spans": {"snapshot.maintain": {"calls": 5, "wall_s": 0.00038689900020472123, "self_s": 0.00038689900020472123}, "sqlite.snapshot": {"calls": 5, "wall_s": 0.0001250230000096053, "self_s": 0.0001250230000096053}, "engine._load_analysis": {"calls": 1, "wall_s": 0.000869860000193512, "self_s": 0.0007498150002902548}, "sqlite.load_content": {"calls": 1, "wall_s": 0.011944302999836509, "self_s": 0.01193122399990898}, "snapshot.load_content": {"calls": 1, "wall_s": 0.6089777069998945, "self_s": 0.5970098099999177}, "compile.load_canonical_standards_corpus": {"calls": 1, "wall_s": 0.017211340000130804, "self_s": 0.017211340000130804}, "compile.compile_policy_impact": {"calls": 1, "wall_s": 0.028134340999940832, "self_s": 0.028134340999940832}, "compile.load_supporting_content": {"calls": 1, "wall_s": 0.00011066299998674367, "self_s": 0.00011066299998674367}, "compile.standards_navigation_registry": {"calls": 1, "wall_s": 0.003982618999998522, "self_s": 0.003982618999998522}, "compile.load_router_projection": {"calls": 1, "wall_s": 0.004245535999871208, "self_s": 0.004245535999871208}, "compile.build_materials": {"calls": 1, "wall_s": 0.005238878000000113, "self_s": 0.005238878000000113}, "compile.load_coverage_horizon": {"calls": 1, "wall_s": 0.0956396730000506, "self_s": 0.0956396730000506}, "compile.compile_coverage_definitions": {"calls": 1, "wall_s": 0.013932547999957023, "self_s": 0.013932547999957023}, "compile.load_repository_coverage_decisions": {"calls": 1, "wall_s": 0.005998094000005949, "self_s": 0.005998094000005949}, "compile.load_indexes": {"calls": 1, "wall_s": 0.01192932000003566, "self_s": 0.01192932000003566}, "_compile/FrozenContentSource": {"calls": 1, "wall_s": 0.18650453100008235, "self_s": 8.151900010489044e-05}, "engine._compiled_snapshot": {"calls": 1, "wall_s": 0.7980070020000767, "self_s": 0.0025247640000998217}, "compile.evaluate_analysis": {"calls": 2, "wall_s": 0.030421194999917134, "self_s": 0.030421194999917134}, "engine._evaluate_compiled": {"calls": 2, "wall_s": 0.03090133099999548, "self_s": 0.0004801360000783461}, "engine._evaluate": {"calls": 2, "wall_s": 0.03117231000010179, "self_s": 2.7990000035060802e-05}, "snapshot.publish_aggregate": {"calls": 1, "wall_s": 0.00046564499984924623, "self_s": 0.0003534299996772461}}, "git_reads": {"count": 0, "unique": 0, "top": []}, "git_objects": {"count": 0, "unique": 0}, "git_commands": {}} +{"operation": "s1.inspect_analysis", "wall_s": 0.00401732099999208, "cpu_s": 0.004018392000002535, "status": "ok", "peak_rss_kib": 259576, "spans": {"snapshot.maintain": {"calls": 1, "wall_s": 8.648700008961896e-05, "self_s": 8.648700008961896e-05}, "sqlite.snapshot": {"calls": 1, "wall_s": 1.5583000049446127e-05, "self_s": 1.5583000049446127e-05}, "engine._load_analysis": {"calls": 1, "wall_s": 0.0013052799999968556, "self_s": 0.0012032099998577905}}, "git_reads": {"count": 0, "unique": 0, "top": []}, "git_objects": {"count": 0, "unique": 0}, "git_commands": {}} +{"operation": "s1.inspect_snapshot", "wall_s": 0.0005352769999262819, "cpu_s": 0.0005357769999996265, "status": "ok", "peak_rss_kib": 259576, "spans": {"snapshot.maintain": {"calls": 1, "wall_s": 3.4279999908903847e-05, "self_s": 3.4279999908903847e-05}, "sqlite.snapshot": {"calls": 1, "wall_s": 1.6383999991376186e-05, "self_s": 1.6383999991376186e-05}}, "git_reads": {"count": 0, "unique": 0, "top": []}, "git_objects": {"count": 0, "unique": 0}, "git_commands": {}} +{"operation": "s1.engine_close", "wall_s": 0.00040510600001653074, "cpu_s": 0.00040214699999907566, "status": "ok", "peak_rss_kib": 259576, "spans": {}, "git_reads": {"count": 0, "unique": 0, "top": []}, "git_objects": {"count": 0, "unique": 0}, "git_commands": {}} +{"operation": "s1.reopen_0", "wall_s": 0.004492748999837204, "cpu_s": 0.0044941690000008805, "status": "ok", "peak_rss_kib": 259576, "spans": {"sqlite._verify_integrity": {"calls": 2, "wall_s": 0.0037207430000307795, "self_s": 0.0037207430000307795}, "sqlite.__init__": {"calls": 1, "wall_s": 0.004343058999893401, "self_s": 0.0006223159998626215}, "snapshot.maintain": {"calls": 1, "wall_s": 4.158100000495324e-05, "self_s": 4.158100000495324e-05}}, "git_reads": {"count": 0, "unique": 0, "top": []}, "git_objects": {"count": 0, "unique": 0}, "git_commands": {}} +{"operation": "s1.reopen_facade_0", "wall_s": 0.25819164700010333, "cpu_s": 0.25798616699999855, "status": "ok", "peak_rss_kib": 259576, "spans": {"facade.contracts": {"calls": 1, "wall_s": 0.2555753780000032, "self_s": 0.2555753780000032}}, "git_reads": {"count": 0, "unique": 0, "top": []}, "git_objects": {"count": 0, "unique": 0}, "git_commands": {}} +{"operation": "s1.reopened_query_0", "wall_s": 0.7955287659999613, "cpu_s": 0.7955164400000001, "status": "ok", "peak_rss_kib": 259576, "spans": {"snapshot.maintain": {"calls": 1, "wall_s": 9.702300008029852e-05, "self_s": 9.702300008029852e-05}, "sqlite.snapshot": {"calls": 1, "wall_s": 7.383899992419174e-05, "self_s": 7.383899992419174e-05}, "sqlite.load_content": {"calls": 1, "wall_s": 0.01147545200001332, "self_s": 0.011401613000089128}, "snapshot.load_content": {"calls": 1, "wall_s": 0.5999567950000255, "self_s": 0.5883843199999319}, "compile.load_canonical_standards_corpus": {"calls": 1, "wall_s": 0.01789101000008486, "self_s": 0.01789101000008486}, "compile.compile_policy_impact": {"calls": 1, "wall_s": 0.025786998000057793, "self_s": 0.025786998000057793}, "compile.load_supporting_content": {"calls": 1, "wall_s": 7.832500000404252e-05, "self_s": 7.832500000404252e-05}, "compile.standards_navigation_registry": {"calls": 1, "wall_s": 0.0034760139999434614, "self_s": 0.0034760139999434614}, "compile.load_router_projection": {"calls": 1, "wall_s": 0.004138008000154514, "self_s": 0.004138008000154514}, "compile.build_materials": {"calls": 1, "wall_s": 0.00521404000005532, "self_s": 0.00521404000005532}, "compile.load_coverage_horizon": {"calls": 1, "wall_s": 0.09873270399998546, "self_s": 0.09873270399998546}, "compile.compile_coverage_definitions": {"calls": 1, "wall_s": 0.013710621000200263, "self_s": 0.013710621000200263}, "compile.load_repository_coverage_decisions": {"calls": 1, "wall_s": 0.005641930000138018, "self_s": 0.005641930000138018}, "compile.load_indexes": {"calls": 1, "wall_s": 0.011345640999934403, "self_s": 0.011345640999934403}, "_compile/FrozenContentSource": {"calls": 1, "wall_s": 0.1860948589999225, "self_s": 7.956799936437164e-05}, "engine._compiled_snapshot": {"calls": 1, "wall_s": 0.7884288520001519, "self_s": 0.0023771980002038617}}, "git_reads": {"count": 0, "unique": 0, "top": []}, "git_objects": {"count": 0, "unique": 0}, "git_commands": {}} +{"operation": "s1.reopen_1", "wall_s": 0.005030520999980581, "cpu_s": 0.005030956999998892, "status": "ok", "peak_rss_kib": 259576, "spans": {"sqlite._verify_integrity": {"calls": 2, "wall_s": 0.004271814999810886, "self_s": 0.004271814999810886}, "sqlite.__init__": {"calls": 1, "wall_s": 0.0048632650000399735, "self_s": 0.0005914500002290879}, "snapshot.maintain": {"calls": 1, "wall_s": 4.358399996817752e-05, "self_s": 4.358399996817752e-05}}, "git_reads": {"count": 0, "unique": 0, "top": []}, "git_objects": {"count": 0, "unique": 0}, "git_commands": {}} +{"operation": "s1.reopen_facade_1", "wall_s": 0.2583693670001139, "cpu_s": 0.2581750980000024, "status": "ok", "peak_rss_kib": 259576, "spans": {"facade.contracts": {"calls": 1, "wall_s": 0.25530698300008225, "self_s": 0.25530698300008225}}, "git_reads": {"count": 0, "unique": 0, "top": []}, "git_objects": {"count": 0, "unique": 0}, "git_commands": {}} +{"operation": "s1.reopened_query_1", "wall_s": 0.9398860119999881, "cpu_s": 0.9396694930000002, "status": "ok", "peak_rss_kib": 260092, "spans": {"snapshot.maintain": {"calls": 1, "wall_s": 0.0001006879999749799, "self_s": 0.0001006879999749799}, "sqlite.snapshot": {"calls": 1, "wall_s": 7.609199997204996e-05, "self_s": 7.609199997204996e-05}, "sqlite.load_content": {"calls": 1, "wall_s": 0.017746647999956622, "self_s": 0.017670555999984572}, "snapshot.load_content": {"calls": 1, "wall_s": 0.6060726430000614, "self_s": 0.5882253070001298}, "compile.load_canonical_standards_corpus": {"calls": 1, "wall_s": 0.01645680199999333, "self_s": 0.01645680199999333}, "compile.compile_policy_impact": {"calls": 1, "wall_s": 0.025405645999853732, "self_s": 0.025405645999853732}, "compile.load_supporting_content": {"calls": 1, "wall_s": 7.81749999987369e-05, "self_s": 7.81749999987369e-05}, "compile.standards_navigation_registry": {"calls": 1, "wall_s": 0.0033615149998240668, "self_s": 0.0033615149998240668}, "compile.load_router_projection": {"calls": 1, "wall_s": 0.004190013999959774, "self_s": 0.004190013999959774}, "compile.build_materials": {"calls": 1, "wall_s": 0.005065652999974191, "self_s": 0.005065652999974191}, "compile.load_coverage_horizon": {"calls": 1, "wall_s": 0.2382487569998375, "self_s": 0.2382487569998375}, "compile.compile_coverage_definitions": {"calls": 1, "wall_s": 0.014197587000126077, "self_s": 0.014197587000126077}, "compile.load_repository_coverage_decisions": {"calls": 1, "wall_s": 0.006039976000010938, "self_s": 0.006039976000010938}, "compile.load_indexes": {"calls": 1, "wall_s": 0.01112838200015176, "self_s": 0.01112838200015176}, "_compile/FrozenContentSource": {"calls": 1, "wall_s": 0.3242464260001725, "self_s": 7.391900044240174e-05}, "engine._compiled_snapshot": {"calls": 1, "wall_s": 0.9328711529999509, "self_s": 0.0025520839997170697}}, "git_reads": {"count": 0, "unique": 0, "top": []}, "git_objects": {"count": 0, "unique": 0}, "git_commands": {}} +{"operation": "s2.engine_open_new", "wall_s": 0.0015486180000152672, "cpu_s": 0.001549141999998227, "status": "ok", "peak_rss_kib": 260092, "spans": {"sqlite._verify_integrity": {"calls": 1, "wall_s": 8.636699999442499e-05, "self_s": 8.636699999442499e-05}, "sqlite.__init__": {"calls": 1, "wall_s": 0.0013849070001015207, "self_s": 0.0012985400001070957}, "snapshot.maintain": {"calls": 1, "wall_s": 3.3740000162651995e-05, "self_s": 3.3740000162651995e-05}}, "git_reads": {"count": 0, "unique": 0, "top": []}, "git_objects": {"count": 0, "unique": 0}, "git_commands": {}} +{"operation": "s2.facade_construct", "wall_s": 0.2688848279999547, "cpu_s": 0.26889417800000004, "status": "ok", "peak_rss_kib": 260092, "spans": {"facade.contracts": {"calls": 1, "wall_s": 0.2662342080000144, "self_s": 0.2662342080000144}}, "git_reads": {"count": 0, "unique": 0, "top": []}, "git_objects": {"count": 0, "unique": 0}, "git_commands": {}} +{"operation": "s2.create_snapshot", "wall_s": 2.528961834000029, "cpu_s": 1.6932405280000005, "status": "ok", "peak_rss_kib": 260172, "spans": {"git.command": {"calls": 525, "wall_s": 1.1422472890021709, "self_s": 1.1422472890021709}, "git.object": {"calls": 524, "wall_s": 1.1552075800018429, "self_s": 0.014844261999769515}, "git.read_bytes": {"calls": 1137, "wall_s": 1.447475000001532, "self_s": 0.2922674199996891}, "compile.load_canonical_standards_corpus": {"calls": 2, "wall_s": 0.25550653799996326, "self_s": 0.04184719199997744}, "compile.compile_policy_impact": {"calls": 2, "wall_s": 0.14213530900019578, "self_s": 0.06361334200028068}, "compile.load_supporting_content": {"calls": 2, "wall_s": 0.006911307999871497, "self_s": 0.0002663619995928457}, "compile.standards_navigation_registry": {"calls": 2, "wall_s": 0.007283505000032164, "self_s": 0.007283505000032164}, "compile.load_router_projection": {"calls": 2, "wall_s": 0.012034196000058728, "self_s": 0.009790737000230365}, "compile.build_materials": {"calls": 2, "wall_s": 0.03682248499990237, "self_s": 0.013085465999438384}, "compile.load_coverage_horizon": {"calls": 2, "wall_s": 1.2412666400002763, "self_s": 0.21815238999715802}, "compile.compile_coverage_definitions": {"calls": 2, "wall_s": 0.03353611100010312, "self_s": 0.03353611100010312}, "compile.load_repository_coverage_decisions": {"calls": 2, "wall_s": 0.0381092790000821, "self_s": 0.01293192600041948}, "compile.load_indexes": {"calls": 2, "wall_s": 0.10524861099997906, "self_s": 0.030871951001699927}, "_compile/_GitRevisionSource": {"calls": 1, "wall_s": 1.6783213809999324, "self_s": 6.789799954276532e-05}, "_compile/FrozenContentSource": {"calls": 1, "wall_s": 0.20068617399988398, "self_s": 8.567499980927096e-05}, "sqlite.snapshot": {"calls": 1, "wall_s": 6.956200013519265e-05, "self_s": 6.956200013519265e-05}}, "git_reads": {"count": 1137, "unique": 434, "top": [["topics/contracts.md", 17], ["STANDARDS-ROUTER.md", 15], ["topics/security.md", 14], ["workflows/verification.md", 14], ["topics/dependencies.md", 10], ["profiles/applications/frontend.md", 9], ["topics/architecture.md", 9], ["topics/concurrency.md", 9], ["topics/cross-platform.md", 9], ["workflows/commit.md", 9]]}, "git_objects": {"count": 524, "unique": 524}, "git_commands": {"rev-parse --verify": 1, "cat-file --batch": 524}} +{"operation": "s2.query_read_0", "wall_s": 0.811968190000016, "cpu_s": 0.8119694779999982, "status": "ok", "peak_rss_kib": 260172, "spans": {"snapshot.maintain": {"calls": 1, "wall_s": 3.773599996748089e-05, "self_s": 3.773599996748089e-05}, "sqlite.snapshot": {"calls": 1, "wall_s": 1.931900010276877e-05, "self_s": 1.931900010276877e-05}, "sqlite.load_content": {"calls": 1, "wall_s": 0.011447953000015332, "self_s": 0.011428633999912563}, "snapshot.load_content": {"calls": 1, "wall_s": 0.6110863159999553, "self_s": 0.5996006269999725}, "compile.load_canonical_standards_corpus": {"calls": 1, "wall_s": 0.016908327000010104, "self_s": 0.016908327000010104}, "compile.compile_policy_impact": {"calls": 1, "wall_s": 0.029982080000081623, "self_s": 0.029982080000081623}, "compile.load_supporting_content": {"calls": 1, "wall_s": 7.669299998269707e-05, "self_s": 7.669299998269707e-05}, "compile.standards_navigation_registry": {"calls": 1, "wall_s": 0.003961088000096424, "self_s": 0.003961088000096424}, "compile.load_router_projection": {"calls": 1, "wall_s": 0.004463197000177388, "self_s": 0.004463197000177388}, "compile.build_materials": {"calls": 1, "wall_s": 0.005758652999929836, "self_s": 0.005758652999929836}, "compile.load_coverage_horizon": {"calls": 1, "wall_s": 0.09763380200001848, "self_s": 0.09763380200001848}, "compile.compile_coverage_definitions": {"calls": 1, "wall_s": 0.01474934999987454, "self_s": 0.01474934999987454}, "compile.load_repository_coverage_decisions": {"calls": 1, "wall_s": 0.005896935000009762, "self_s": 0.005896935000009762}, "compile.load_indexes": {"calls": 1, "wall_s": 0.011470415000076173, "self_s": 0.011470415000076173}, "_compile/FrozenContentSource": {"calls": 1, "wall_s": 0.19098552399987057, "self_s": 8.498399961354153e-05}, "engine._compiled_snapshot": {"calls": 1, "wall_s": 0.8044414460000553, "self_s": 0.002369606000229396}}, "git_reads": {"count": 0, "unique": 0, "top": []}, "git_objects": {"count": 0, "unique": 0}, "git_commands": {}} +{"operation": "s2.query_read_1", "wall_s": 0.8158976349998284, "cpu_s": 0.8158898670000028, "status": "ok", "peak_rss_kib": 260172, "spans": {"snapshot.maintain": {"calls": 1, "wall_s": 9.911600000123144e-05, "self_s": 9.911600000123144e-05}, "sqlite.snapshot": {"calls": 1, "wall_s": 2.7541000008568517e-05, "self_s": 2.7541000008568517e-05}, "sqlite.load_content": {"calls": 1, "wall_s": 0.01137477400015996, "self_s": 0.011347233000151391}, "snapshot.load_content": {"calls": 1, "wall_s": 0.610512645999961, "self_s": 0.5990387559997998}, "compile.load_canonical_standards_corpus": {"calls": 1, "wall_s": 0.020351642000150605, "self_s": 0.020351642000150605}, "compile.compile_policy_impact": {"calls": 1, "wall_s": 0.029583094000145138, "self_s": 0.029583094000145138}, "compile.load_supporting_content": {"calls": 1, "wall_s": 0.00011644200003502192, "self_s": 0.00011644200003502192}, "compile.standards_navigation_registry": {"calls": 1, "wall_s": 0.003682248000131949, "self_s": 0.003682248000131949}, "compile.load_router_projection": {"calls": 1, "wall_s": 0.00427806400011832, "self_s": 0.00427806400011832}, "compile.build_materials": {"calls": 1, "wall_s": 0.005479020999928252, "self_s": 0.005479020999928252}, "compile.load_coverage_horizon": {"calls": 1, "wall_s": 0.099153638999951, "self_s": 0.099153638999951}, "compile.compile_coverage_definitions": {"calls": 1, "wall_s": 0.014782968999952573, "self_s": 0.014782968999952573}, "compile.load_repository_coverage_decisions": {"calls": 1, "wall_s": 0.00582957599999645, "self_s": 0.00582957599999645}, "compile.load_indexes": {"calls": 1, "wall_s": 0.011916982999991887, "self_s": 0.011916982999991887}, "_compile/FrozenContentSource": {"calls": 1, "wall_s": 0.19525706800004627, "self_s": 8.33899996450782e-05}, "engine._compiled_snapshot": {"calls": 1, "wall_s": 0.8084768070000337, "self_s": 0.0027070930000263616}}, "git_reads": {"count": 0, "unique": 0, "top": []}, "git_objects": {"count": 0, "unique": 0}, "git_commands": {}} +{"operation": "s2.query_read_2", "wall_s": 0.8218494709999504, "cpu_s": 0.8217435669999986, "status": "ok", "peak_rss_kib": 260172, "spans": {"snapshot.maintain": {"calls": 1, "wall_s": 9.909500022331486e-05, "self_s": 9.909500022331486e-05}, "sqlite.snapshot": {"calls": 1, "wall_s": 2.762999997685256e-05, "self_s": 2.762999997685256e-05}, "sqlite.load_content": {"calls": 1, "wall_s": 0.011638932999858298, "self_s": 0.011611302999881445}, "snapshot.load_content": {"calls": 1, "wall_s": 0.62158472599981, "self_s": 0.6098466979997283}, "compile.load_canonical_standards_corpus": {"calls": 1, "wall_s": 0.019389796000041315, "self_s": 0.019389796000041315}, "compile.compile_policy_impact": {"calls": 1, "wall_s": 0.02590651400009847, "self_s": 0.02590651400009847}, "compile.load_supporting_content": {"calls": 1, "wall_s": 8.455499983028858e-05, "self_s": 8.455499983028858e-05}, "compile.standards_navigation_registry": {"calls": 1, "wall_s": 0.003560178000043379, "self_s": 0.003560178000043379}, "compile.load_router_projection": {"calls": 1, "wall_s": 0.004420092000145814, "self_s": 0.004420092000145814}, "compile.build_materials": {"calls": 1, "wall_s": 0.005593779000037102, "self_s": 0.005593779000037102}, "compile.load_coverage_horizon": {"calls": 1, "wall_s": 0.09990759700008311, "self_s": 0.09990759700008311}, "compile.compile_coverage_definitions": {"calls": 1, "wall_s": 0.013516064999976152, "self_s": 0.013516064999976152}, "compile.load_repository_coverage_decisions": {"calls": 1, "wall_s": 0.005912328000022171, "self_s": 0.005912328000022171}, "compile.load_indexes": {"calls": 1, "wall_s": 0.012045531000012488, "self_s": 0.012045531000012488}, "_compile/FrozenContentSource": {"calls": 1, "wall_s": 0.19043914000008044, "self_s": 0.00010270499979014858}, "engine._compiled_snapshot": {"calls": 1, "wall_s": 0.8146580710001672, "self_s": 0.002634205000276779}}, "git_reads": {"count": 0, "unique": 0, "top": []}, "git_objects": {"count": 0, "unique": 0}, "git_commands": {}} +{"operation": "s2.inspect_policy", "wall_s": 0.8076424690000295, "cpu_s": 0.8075037939999987, "status": "ok", "peak_rss_kib": 260172, "spans": {"snapshot.maintain": {"calls": 1, "wall_s": 9.96870001017669e-05, "self_s": 9.96870001017669e-05}, "sqlite.snapshot": {"calls": 1, "wall_s": 2.6939999997921404e-05, "self_s": 2.6939999997921404e-05}, "sqlite.load_content": {"calls": 1, "wall_s": 0.011429356000007829, "self_s": 0.011402416000009907}, "snapshot.load_content": {"calls": 1, "wall_s": 0.6145323289999851, "self_s": 0.6030032859998755}, "compile.load_canonical_standards_corpus": {"calls": 1, "wall_s": 0.01733826899999258, "self_s": 0.01733826899999258}, "compile.compile_policy_impact": {"calls": 1, "wall_s": 0.029837747999863495, "self_s": 0.029837747999863495}, "compile.load_supporting_content": {"calls": 1, "wall_s": 8.881000007932016e-05, "self_s": 8.881000007932016e-05}, "compile.standards_navigation_registry": {"calls": 1, "wall_s": 0.003612384000007296, "self_s": 0.003612384000007296}, "compile.load_router_projection": {"calls": 1, "wall_s": 0.004370029000028808, "self_s": 0.004370029000028808}, "compile.build_materials": {"calls": 1, "wall_s": 0.005190336999930878, "self_s": 0.005190336999930878}, "compile.load_coverage_horizon": {"calls": 1, "wall_s": 0.09727272999998604, "self_s": 0.09727272999998604}, "compile.compile_coverage_definitions": {"calls": 1, "wall_s": 0.013496346000010817, "self_s": 0.013496346000010817}, "compile.load_repository_coverage_decisions": {"calls": 1, "wall_s": 0.005563814999959504, "self_s": 0.005563814999959504}, "compile.load_indexes": {"calls": 1, "wall_s": 0.011327084999948056, "self_s": 0.011327084999948056}, "_compile/FrozenContentSource": {"calls": 1, "wall_s": 0.1881731169999057, "self_s": 7.55640000988933e-05}, "engine._compiled_snapshot": {"calls": 1, "wall_s": 0.8049837779999507, "self_s": 0.0022783320000598906}}, "git_reads": {"count": 0, "unique": 0, "top": []}, "git_objects": {"count": 0, "unique": 0}, "git_commands": {}} +{"operation": "s2.route_explicit", "wall_s": 0.9995798140000716, "cpu_s": 0.9994070930000021, "status": "ok", "peak_rss_kib": 260172, "spans": {"snapshot.maintain": {"calls": 1, "wall_s": 9.867599987956055e-05, "self_s": 9.867599987956055e-05}, "sqlite.snapshot": {"calls": 1, "wall_s": 2.790100006677676e-05, "self_s": 2.790100006677676e-05}, "sqlite.load_content": {"calls": 1, "wall_s": 0.011001836000104959, "self_s": 0.010973935000038182}, "snapshot.load_content": {"calls": 1, "wall_s": 0.6090177159999257, "self_s": 0.5979172039999412}, "compile.load_canonical_standards_corpus": {"calls": 1, "wall_s": 0.0161958770002002, "self_s": 0.0161958770002002}, "compile.compile_policy_impact": {"calls": 1, "wall_s": 0.025992160999976477, "self_s": 0.025992160999976477}, "compile.load_supporting_content": {"calls": 1, "wall_s": 8.9181000021199e-05, "self_s": 8.9181000021199e-05}, "compile.standards_navigation_registry": {"calls": 1, "wall_s": 0.0034455990000878955, "self_s": 0.0034455990000878955}, "compile.load_router_projection": {"calls": 1, "wall_s": 0.004090888000064297, "self_s": 0.004090888000064297}, "compile.build_materials": {"calls": 1, "wall_s": 0.0050386230000185606, "self_s": 0.0050386230000185606}, "compile.load_coverage_horizon": {"calls": 1, "wall_s": 0.09691901099995448, "self_s": 0.09691901099995448}, "compile.compile_coverage_definitions": {"calls": 1, "wall_s": 0.013921030999881623, "self_s": 0.013921030999881623}, "compile.load_repository_coverage_decisions": {"calls": 1, "wall_s": 0.006046766000054049, "self_s": 0.006046766000054049}, "compile.load_indexes": {"calls": 1, "wall_s": 0.011649528999896575, "self_s": 0.011649528999896575}, "_compile/FrozenContentSource": {"calls": 1, "wall_s": 0.1834675929999321, "self_s": 7.892699977674056e-05}, "engine._compiled_snapshot": {"calls": 1, "wall_s": 0.7948423670000011, "self_s": 0.0023570580001432972}}, "git_reads": {"count": 0, "unique": 0, "top": []}, "git_objects": {"count": 0, "unique": 0}, "git_commands": {}} +{"operation": "s2.prepare_same_snapshot", "wall_s": 0.8580551289999221, "cpu_s": 0.8580595080000002, "status": "ok", "peak_rss_kib": 260172, "spans": {"snapshot.maintain": {"calls": 3, "wall_s": 0.00026730299987320905, "self_s": 0.00026730299987320905}, "sqlite.snapshot": {"calls": 3, "wall_s": 7.146599978113954e-05, "self_s": 7.146599978113954e-05}, "sqlite.load_content": {"calls": 1, "wall_s": 0.011932785999988482, "self_s": 0.011904124000011507}, "snapshot.load_content": {"calls": 1, "wall_s": 0.609928286000013, "self_s": 0.5978927990001921}, "compile.load_canonical_standards_corpus": {"calls": 1, "wall_s": 0.016245820999984062, "self_s": 0.016245820999984062}, "compile.compile_policy_impact": {"calls": 1, "wall_s": 0.02721164499985207, "self_s": 0.02721164499985207}, "compile.load_supporting_content": {"calls": 1, "wall_s": 0.00014368200004355458, "self_s": 0.00014368200004355458}, "compile.standards_navigation_registry": {"calls": 1, "wall_s": 0.0034908360000827088, "self_s": 0.0034908360000827088}, "compile.load_router_projection": {"calls": 1, "wall_s": 0.004142184999864185, "self_s": 0.004142184999864185}, "compile.build_materials": {"calls": 1, "wall_s": 0.005022159000191095, "self_s": 0.005022159000191095}, "compile.load_coverage_horizon": {"calls": 1, "wall_s": 0.1076863719999892, "self_s": 0.1076863719999892}, "compile.compile_coverage_definitions": {"calls": 1, "wall_s": 0.030067836999933206, "self_s": 0.030067836999933206}, "compile.load_repository_coverage_decisions": {"calls": 1, "wall_s": 0.006429618999845843, "self_s": 0.006429618999845843}, "compile.load_indexes": {"calls": 1, "wall_s": 0.012880088999963846, "self_s": 0.012880088999963846}, "_compile/FrozenContentSource": {"calls": 1, "wall_s": 0.213400460999992, "self_s": 8.021600024221698e-05}, "engine._compiled_snapshot": {"calls": 1, "wall_s": 0.8257180230000358, "self_s": 0.0023892760000308044}, "compile.evaluate_analysis": {"calls": 1, "wall_s": 0.01531356999998934, "self_s": 0.01531356999998934}, "engine._evaluate_compiled": {"calls": 1, "wall_s": 0.015566232000082891, "self_s": 0.0002526620000935509}, "engine._evaluate": {"calls": 1, "wall_s": 0.015723001999958797, "self_s": 1.6313000060108607e-05}, "snapshot.publish_aggregate": {"calls": 1, "wall_s": 0.0004724649998024688, "self_s": 0.00040551599977334263}}, "git_reads": {"count": 0, "unique": 0, "top": []}, "git_objects": {"count": 0, "unique": 0}, "git_commands": {}} +{"operation": "s2.resolve", "wall_s": 0.882719305000137, "cpu_s": 0.8827247639999989, "status": "ok", "peak_rss_kib": 260172, "spans": {"snapshot.maintain": {"calls": 5, "wall_s": 0.00045451899995896383, "self_s": 0.00045451899995896383}, "sqlite.snapshot": {"calls": 5, "wall_s": 0.00010808999991240853, "self_s": 0.00010808999991240853}, "engine._load_analysis": {"calls": 1, "wall_s": 0.0009101690000079543, "self_s": 0.0007881089998136304}, "sqlite.load_content": {"calls": 1, "wall_s": 0.011612394999929165, "self_s": 0.011598584000012124}, "snapshot.load_content": {"calls": 1, "wall_s": 0.6227418869998473, "self_s": 0.6111050659999364}, "compile.load_canonical_standards_corpus": {"calls": 1, "wall_s": 0.01737829800003965, "self_s": 0.01737829800003965}, "compile.compile_policy_impact": {"calls": 1, "wall_s": 0.030500944000095842, "self_s": 0.030500944000095842}, "compile.load_supporting_content": {"calls": 1, "wall_s": 8.845100001053652e-05, "self_s": 8.845100001053652e-05}, "compile.standards_navigation_registry": {"calls": 1, "wall_s": 0.00418532799994864, "self_s": 0.00418532799994864}, "compile.load_router_projection": {"calls": 1, "wall_s": 0.004223033000016585, "self_s": 0.004223033000016585}, "compile.build_materials": {"calls": 1, "wall_s": 0.0054799419999653765, "self_s": 0.0054799419999653765}, "compile.load_coverage_horizon": {"calls": 1, "wall_s": 0.10174456899994766, "self_s": 0.10174456899994766}, "compile.compile_coverage_definitions": {"calls": 1, "wall_s": 0.016731977000063125, "self_s": 0.016731977000063125}, "compile.load_repository_coverage_decisions": {"calls": 1, "wall_s": 0.006278787999917768, "self_s": 0.006278787999917768}, "compile.load_indexes": {"calls": 1, "wall_s": 0.012612354999873787, "self_s": 0.012612354999873787}, "_compile/FrozenContentSource": {"calls": 1, "wall_s": 0.1993060150000474, "self_s": 8.233000016844016e-05}, "engine._compiled_snapshot": {"calls": 1, "wall_s": 0.8245220229998722, "self_s": 0.0024741209999774583}, "compile.evaluate_analysis": {"calls": 2, "wall_s": 0.03375506099996528, "self_s": 0.03375506099996528}, "engine._evaluate_compiled": {"calls": 2, "wall_s": 0.034468732000050295, "self_s": 0.0007136710000850144}, "engine._evaluate": {"calls": 2, "wall_s": 0.03479723400005241, "self_s": 2.858100015146192e-05}, "snapshot.publish_aggregate": {"calls": 1, "wall_s": 0.0005148380000719044, "self_s": 0.00041244700014431146}}, "git_reads": {"count": 0, "unique": 0, "top": []}, "git_objects": {"count": 0, "unique": 0}, "git_commands": {}} +{"operation": "s2.inspect_analysis", "wall_s": 0.003876292999848374, "cpu_s": 0.0038771319999995058, "status": "ok", "peak_rss_kib": 260172, "spans": {"snapshot.maintain": {"calls": 1, "wall_s": 6.008800005474768e-05, "self_s": 6.008800005474768e-05}, "sqlite.snapshot": {"calls": 1, "wall_s": 1.4750999980606139e-05, "self_s": 1.4750999980606139e-05}, "engine._load_analysis": {"calls": 1, "wall_s": 0.00123375499993017, "self_s": 0.0011589159998948162}}, "git_reads": {"count": 0, "unique": 0, "top": []}, "git_objects": {"count": 0, "unique": 0}, "git_commands": {}} +{"operation": "s2.inspect_snapshot", "wall_s": 0.0006506869999611808, "cpu_s": 0.0006514790000018422, "status": "ok", "peak_rss_kib": 260172, "spans": {"snapshot.maintain": {"calls": 1, "wall_s": 4.083999988324649e-05, "self_s": 4.083999988324649e-05}, "sqlite.snapshot": {"calls": 1, "wall_s": 2.267299987579463e-05, "self_s": 2.267299987579463e-05}}, "git_reads": {"count": 0, "unique": 0, "top": []}, "git_objects": {"count": 0, "unique": 0}, "git_commands": {}} +{"operation": "s2.engine_close", "wall_s": 0.00046950099999776285, "cpu_s": 0.000466582999997911, "status": "ok", "peak_rss_kib": 260172, "spans": {}, "git_reads": {"count": 0, "unique": 0, "top": []}, "git_objects": {"count": 0, "unique": 0}, "git_commands": {}} +{"operation": "s2.reopen_0", "wall_s": 0.004255169999851205, "cpu_s": 0.00425619499999641, "status": "ok", "peak_rss_kib": 260172, "spans": {"sqlite._verify_integrity": {"calls": 2, "wall_s": 0.0035168629997315293, "self_s": 0.0035168629997315293}, "sqlite.__init__": {"calls": 1, "wall_s": 0.00411177899991344, "self_s": 0.0005949160001819109}, "snapshot.maintain": {"calls": 1, "wall_s": 3.75659999463096e-05, "self_s": 3.75659999463096e-05}}, "git_reads": {"count": 0, "unique": 0, "top": []}, "git_objects": {"count": 0, "unique": 0}, "git_commands": {}} +{"operation": "s2.reopen_facade_0", "wall_s": 0.2712007200000244, "cpu_s": 0.27120869800000236, "status": "ok", "peak_rss_kib": 260172, "spans": {"facade.contracts": {"calls": 1, "wall_s": 0.26838353499988443, "self_s": 0.26838353499988443}}, "git_reads": {"count": 0, "unique": 0, "top": []}, "git_objects": {"count": 0, "unique": 0}, "git_commands": {}} +{"operation": "s2.reopened_query_0", "wall_s": 0.9297687619998669, "cpu_s": 0.9287012639999972, "status": "ok", "peak_rss_kib": 260172, "spans": {"snapshot.maintain": {"calls": 1, "wall_s": 0.0001552989999709098, "self_s": 0.0001552989999709098}, "sqlite.snapshot": {"calls": 1, "wall_s": 6.994199998189288e-05, "self_s": 6.994199998189288e-05}, "sqlite.load_content": {"calls": 1, "wall_s": 0.011105109000027369, "self_s": 0.011035167000045476}, "snapshot.load_content": {"calls": 1, "wall_s": 0.5949522229998365, "self_s": 0.5836918149998382}, "compile.load_canonical_standards_corpus": {"calls": 1, "wall_s": 0.01709171599986803, "self_s": 0.01709171599986803}, "compile.compile_policy_impact": {"calls": 1, "wall_s": 0.025884122000206844, "self_s": 0.025884122000206844}, "compile.load_supporting_content": {"calls": 1, "wall_s": 7.922700001472549e-05, "self_s": 7.922700001472549e-05}, "compile.standards_navigation_registry": {"calls": 1, "wall_s": 0.0033572190000086266, "self_s": 0.0033572190000086266}, "compile.load_router_projection": {"calls": 1, "wall_s": 0.0041681619998144015, "self_s": 0.0041681619998144015}, "compile.build_materials": {"calls": 1, "wall_s": 0.005018543999995018, "self_s": 0.005018543999995018}, "compile.load_coverage_horizon": {"calls": 1, "wall_s": 0.2352588050000577, "self_s": 0.2352588050000577}, "compile.compile_coverage_definitions": {"calls": 1, "wall_s": 0.01548807700010002, "self_s": 0.01548807700010002}, "compile.load_repository_coverage_decisions": {"calls": 1, "wall_s": 0.0059029440001268085, "self_s": 0.0059029440001268085}, "compile.load_indexes": {"calls": 1, "wall_s": 0.011812940000027083, "self_s": 0.011812940000027083}, "_compile/FrozenContentSource": {"calls": 1, "wall_s": 0.32414006200019685, "self_s": 7.830599997760146e-05}, "engine._compiled_snapshot": {"calls": 1, "wall_s": 0.9214549999999235, "self_s": 0.0023627149998901587}}, "git_reads": {"count": 0, "unique": 0, "top": []}, "git_objects": {"count": 0, "unique": 0}, "git_commands": {}} +{"operation": "s2.reopen_1", "wall_s": 0.00466417199982061, "cpu_s": 0.0046648630000021285, "status": "ok", "peak_rss_kib": 260172, "spans": {"sqlite._verify_integrity": {"calls": 2, "wall_s": 0.0039034129999890865, "self_s": 0.0039034129999890865}, "sqlite.__init__": {"calls": 1, "wall_s": 0.004501062000144884, "self_s": 0.0005976490001557977}, "snapshot.maintain": {"calls": 1, "wall_s": 4.4014999957653345e-05, "self_s": 4.4014999957653345e-05}}, "git_reads": {"count": 0, "unique": 0, "top": []}, "git_objects": {"count": 0, "unique": 0}, "git_commands": {}} +{"operation": "s2.reopen_facade_1", "wall_s": 0.2817145740000342, "cpu_s": 0.28158021099999786, "status": "ok", "peak_rss_kib": 260172, "spans": {"facade.contracts": {"calls": 1, "wall_s": 0.27898766199996317, "self_s": 0.27898766199996317}}, "git_reads": {"count": 0, "unique": 0, "top": []}, "git_objects": {"count": 0, "unique": 0}, "git_commands": {}} +{"operation": "s2.reopened_query_1", "wall_s": 0.7958644730001652, "cpu_s": 0.7957469320000001, "status": "ok", "peak_rss_kib": 260188, "spans": {"snapshot.maintain": {"calls": 1, "wall_s": 9.674300008555292e-05, "self_s": 9.674300008555292e-05}, "sqlite.snapshot": {"calls": 1, "wall_s": 9.690199999567994e-05, "self_s": 9.690199999567994e-05}, "sqlite.load_content": {"calls": 1, "wall_s": 0.01356820199998765, "self_s": 0.01347129999999197}, "snapshot.load_content": {"calls": 1, "wall_s": 0.5978918940002131, "self_s": 0.5842269490001399}, "compile.load_canonical_standards_corpus": {"calls": 1, "wall_s": 0.01670179300003838, "self_s": 0.01670179300003838}, "compile.compile_policy_impact": {"calls": 1, "wall_s": 0.029360826999891287, "self_s": 0.029360826999891287}, "compile.load_supporting_content": {"calls": 1, "wall_s": 0.0001398059998791723, "self_s": 0.0001398059998791723}, "compile.standards_navigation_registry": {"calls": 1, "wall_s": 0.003783006000048772, "self_s": 0.003783006000048772}, "compile.load_router_projection": {"calls": 1, "wall_s": 0.004388806999941153, "self_s": 0.004388806999941153}, "compile.build_materials": {"calls": 1, "wall_s": 0.005045934000008856, "self_s": 0.005045934000008856}, "compile.load_coverage_horizon": {"calls": 1, "wall_s": 0.09819352799991066, "self_s": 0.09819352799991066}, "compile.compile_coverage_definitions": {"calls": 1, "wall_s": 0.01370702600002005, "self_s": 0.01370702600002005}, "compile.load_repository_coverage_decisions": {"calls": 1, "wall_s": 0.0060108840000339114, "self_s": 0.0060108840000339114}, "compile.load_indexes": {"calls": 1, "wall_s": 0.011130355999966923, "self_s": 0.011130355999966923}, "_compile/FrozenContentSource": {"calls": 1, "wall_s": 0.18855064700005641, "self_s": 8.868000031725387e-05}, "engine._compiled_snapshot": {"calls": 1, "wall_s": 0.7888953990000118, "self_s": 0.002452857999742264}}, "git_reads": {"count": 0, "unique": 0, "top": []}, "git_objects": {"count": 0, "unique": 0}, "git_commands": {}} diff --git a/docs/plans/purpose-separated-standards-engine/reports/performance-core-evidence/candidate-primitives.json b/docs/plans/purpose-separated-standards-engine/reports/performance-core-evidence/candidate-primitives.json new file mode 100644 index 00000000..fb0b1049 --- /dev/null +++ b/docs/plans/purpose-separated-standards-engine/reports/performance-core-evidence/candidate-primitives.json @@ -0,0 +1,96 @@ +{ + "measurements": [ + { + "operation": "frame", + "wall_s": 0.1994810910000524, + "cpu_s": 0.1994869180000003 + }, + { + "operation": "encode", + "wall_s": 0.42273718300020846, + "cpu_s": 0.422749171 + }, + { + "operation": "complete_identity", + "wall_s": 0.5919642209996709, + "cpu_s": 0.591757613 + }, + { + "operation": "frame", + "wall_s": 0.18341417200008436, + "cpu_s": 0.183422003 + }, + { + "operation": "encode", + "wall_s": 0.4075860009997996, + "cpu_s": 0.4072926400000001 + }, + { + "operation": "complete_identity", + "wall_s": 0.5964110240001901, + "cpu_s": 0.5964053699999994 + }, + { + "operation": "frame", + "wall_s": 0.17937737700003709, + "cpu_s": 0.1793687350000006 + }, + { + "operation": "encode", + "wall_s": 0.4019117510001706, + "cpu_s": 0.401691005 + }, + { + "operation": "complete_identity", + "wall_s": 0.6149578619997556, + "cpu_s": 0.6098709759999998 + }, + { + "operation": "frame", + "wall_s": 0.18078102699973897, + "cpu_s": 0.18070006800000016 + }, + { + "operation": "encode", + "wall_s": 0.4220759199997701, + "cpu_s": 0.42206962100000034 + }, + { + "operation": "complete_identity", + "wall_s": 0.5853740640000069, + "cpu_s": 0.5851583759999999 + }, + { + "operation": "frame", + "wall_s": 0.17432523899969965, + "cpu_s": 0.17433270499999942 + }, + { + "operation": "encode", + "wall_s": 0.39285754999991696, + "cpu_s": 0.3926363290000001 + }, + { + "operation": "complete_identity", + "wall_s": 0.5806856019999032, + "cpu_s": 0.5806952420000009 + } + ], + "source_files": 434, + "raw_bytes": 3708262, + "content_identity": "snapshot-content:sha256:e95df9fd7e1c346706c40733ef93b39f87a6a29e50fad8fcb993a99fc1f10582", + "encoded_sha256": "73cbb95660b04a89dd8fd5f11adb8cadd99f4651ec6836fbd75720bdc8084bc0", + "encoded_bytes": 13031223, + "capture_retention": { + "requests": 6134, + "peak_payload_bytes": 3744707, + "peak_entries": 524, + "closed_payload_bytes": [ + 0 + ], + "closed_entries": [ + 0 + ], + "independent_compiles": 2 + } +} diff --git a/docs/plans/purpose-separated-standards-engine/reports/performance-core-evidence/candidate-transport.json b/docs/plans/purpose-separated-standards-engine/reports/performance-core-evidence/candidate-transport.json new file mode 100644 index 00000000..f1ebdd09 --- /dev/null +++ b/docs/plans/purpose-separated-standards-engine/reports/performance-core-evidence/candidate-transport.json @@ -0,0 +1,60 @@ +[ + { + "operation": "cold_cli_read", + "wall_s": 3.1260424110000713, + "result_digest": "e6905877934b6c0561f0e01fa77112d1bea5a5410683062b6a1f3922795d2a44" + }, + { + "operation": "cold_cli_read", + "wall_s": 3.1217743049996898, + "result_digest": "e6905877934b6c0561f0e01fa77112d1bea5a5410683062b6a1f3922795d2a44" + }, + { + "operation": "cold_cli_read", + "wall_s": 2.9425037829996654, + "result_digest": "e6905877934b6c0561f0e01fa77112d1bea5a5410683062b6a1f3922795d2a44" + }, + { + "operation": "cold_mcp_initialize", + "wall_s": 1.5906490779998421 + }, + { + "operation": "mcp_explicit_read", + "wall_s": 1.1748629969997637, + "result_digest": "8233ab4ba7f8f1ee6855c0eab5be453ff99f3ac763fb0a1a34316bae541afddc" + }, + { + "operation": "mcp_explicit_read", + "wall_s": 1.1031474000001253, + "result_digest": "8233ab4ba7f8f1ee6855c0eab5be453ff99f3ac763fb0a1a34316bae541afddc" + }, + { + "operation": "mcp_explicit_read", + "wall_s": 1.0703443699999298, + "result_digest": "8233ab4ba7f8f1ee6855c0eab5be453ff99f3ac763fb0a1a34316bae541afddc" + }, + { + "operation": "mcp_implicit_capture_read", + "wall_s": 3.581735518000187, + "result_digest": "4acd8f78eb25f888f9585d5d770c37d5debb236396a3f04ea725cd9ea0939bd8" + }, + { + "operation": "cold_mcp_initialize", + "wall_s": 1.5426248620001388 + }, + { + "operation": "mcp_explicit_read", + "wall_s": 1.0866472839998096, + "result_digest": "8233ab4ba7f8f1ee6855c0eab5be453ff99f3ac763fb0a1a34316bae541afddc" + }, + { + "operation": "mcp_explicit_read", + "wall_s": 1.1234406539997508, + "result_digest": "8233ab4ba7f8f1ee6855c0eab5be453ff99f3ac763fb0a1a34316bae541afddc" + }, + { + "operation": "mcp_explicit_read", + "wall_s": 1.0668430349996925, + "result_digest": "8233ab4ba7f8f1ee6855c0eab5be453ff99f3ac763fb0a1a34316bae541afddc" + } +] diff --git a/docs/plans/purpose-separated-standards-engine/reports/performance-core-evidence/comparison.csv b/docs/plans/purpose-separated-standards-engine/reports/performance-core-evidence/comparison.csv new file mode 100644 index 00000000..0d6829d2 --- /dev/null +++ b/docs/plans/purpose-separated-standards-engine/reports/performance-core-evidence/comparison.csv @@ -0,0 +1,16 @@ +operation,baseline_samples,candidate_samples,baseline_median_s,candidate_median_s,baseline_min_s,baseline_max_s,candidate_min_s,candidate_max_s,speedup,latency_reduction_percent +snapshot_capture,3,3,15.019866425999993,2.528961834000029,14.890632722999982,16.236980419999995,2.287575577000098,2.572690020000209,5.939143178860572,83.16255443109472 +explicit_policy_read,9,9,3.0588333129999796,0.8148914400001104,2.9010077629999955,3.255451574999995,0.7987339559999782,0.8385935620001419,3.7536697072183816,73.35940351712405 +policy_inspection,3,3,3.015771655000009,0.8076424690000295,2.9135304149999683,3.0704643720000036,0.800512198999968,0.9034836680000353,3.734042934535057,73.21937595437653 +explicit_route,3,3,3.1109436350000124,0.9913638049999918,3.1092030869999974,3.2566602630000148,0.9836640379999153,0.9995798140000716,3.1380443983427844,68.133019388505 +prepare_same_snapshot,3,3,6.242845845000005,0.8283077700000376,5.909685318000015,6.278843144000007,0.823704090000092,0.8580551289999221,7.536867419461394,86.7318881393901 +resolve_same_snapshot,3,3,12.357862506999993,0.8505200090000926,12.072353682000028,12.623128293999997,0.8416580640000575,0.882719305000137,14.529772816901064,93.11757993327467 +reopened_policy_read,6,6,2.9776871140000054,0.8768784975000017,2.859205139999972,3.0800298209999823,0.7955287659999613,0.9398860119999881,3.3957807409914276,70.55169116401663 +open_existing_store,6,6,0.004550776000002088,0.004578460499828907,0.0038804929999969318,0.004863894000010305,0.004255169999851205,0.005030520999980581,0.9939533168784893,-0.60834679243289 +identity_frame,5,5,0.3486741819999679,0.18078102699973897,0.3381363930000134,0.3542716259998997,0.17432523899969965,0.1994810910000524,1.9287100410181395,48.15187463471109 +identity_encode,5,5,2.2139923720001207,0.4075860009997996,2.17477081800007,2.2807073979997767,0.39285754999991696,0.42273718300020846,5.431963724390057,81.59045143269458 +identity_complete_identity,5,5,2.5718008080000345,0.5919642209996709,2.499481810999896,2.6848036970000067,0.5806856019999032,0.6149578619997556,4.3445206935935134,76.98250116578768 +cold_cli_read,3,3,5.178166210999734,3.1217743049996898,5.102453261999926,5.534491392999826,2.9425037829996654,3.1260424110000713,1.6587253609931447,39.7127442844872 +cold_mcp_initialize,2,2,1.6005509245001122,1.5666369699999905,1.5788436440002442,1.62225820499998,1.5426248620001388,1.5906490779998421,1.0216476153375353,2.118892562616448 +mcp_explicit_read,6,6,3.2753717415000665,1.0948973419999675,3.162767408000036,3.298129840999991,1.0668430349996925,1.1748629969997637,2.9914875265996983,66.5718144866658 +mcp_implicit_capture_read,1,1,18.180010175000007,3.581735518000187,18.180010175000007,18.180010175000007,3.581735518000187,3.581735518000187,5.075754500474833,80.29849552600602 diff --git a/docs/plans/purpose-separated-standards-engine/reports/performance-core-evidence/environment.json b/docs/plans/purpose-separated-standards-engine/reports/performance-core-evidence/environment.json new file mode 100644 index 00000000..250aaa79 --- /dev/null +++ b/docs/plans/purpose-separated-standards-engine/reports/performance-core-evidence/environment.json @@ -0,0 +1,20 @@ +{ + "python": "3.13.5 (main, Jul 15 2026, 20:25:40) [GCC 14.2.0]", + "platform": "Linux-6.18.44-x86_64-with-glibc2.41", + "sqlite": "3.46.1", + "git": "git version 2.47.3", + "packages": { + "attrs": "26.1.0", + "jsonschema": "4.26.0", + "jsonschema-specifications": "2025.9.1", + "referencing": "0.37.0", + "rpds-py": "2026.5.1", + "typing-extensions": "4.16.0" + }, + "base": "90a3c8f13f517ad1dc32342fa10a4f1af181ed81", + "branch": "implementation/purpose-separated-standards-engine", + "accepted_main": "366c1d90a24bbfb50973f62b155a5f3396c0f107", + "qualification": "Supporting local run; Python 3.13 and rpds-py differ from the supported pinned environment.", + "cpu_quota": "400000 100000", + "memory_limit": "4294967296" +} diff --git a/docs/plans/purpose-separated-standards-engine/reports/performance-core-evidence/final-checks-complete.json b/docs/plans/purpose-separated-standards-engine/reports/performance-core-evidence/final-checks-complete.json new file mode 100644 index 00000000..29ca9ae4 --- /dev/null +++ b/docs/plans/purpose-separated-standards-engine/reports/performance-core-evidence/final-checks-complete.json @@ -0,0 +1 @@ +{"status": "completed", "packages": ["standards_identity", "repository_git", "standards_snapshots", "standards_metadata", "standards_policy_impact", "standards_graph", "standards_applicability", "graph_engine", "standards_contracts", "standards_analysis", "standards_verifier"]} diff --git a/docs/plans/purpose-separated-standards-engine/reports/performance-core-evidence/final-test-candidate.txt b/docs/plans/purpose-separated-standards-engine/reports/performance-core-evidence/final-test-candidate.txt new file mode 100644 index 00000000..8bae2f27 --- /dev/null +++ b/docs/plans/purpose-separated-standards-engine/reports/performance-core-evidence/final-test-candidate.txt @@ -0,0 +1 @@ +cc79e352daf60e2a8c3c1e88d16c7945a7b9c9fc diff --git a/docs/plans/purpose-separated-standards-engine/reports/performance-core-evidence/fixture-reruns.log b/docs/plans/purpose-separated-standards-engine/reports/performance-core-evidence/fixture-reruns.log new file mode 100644 index 00000000..933676f6 --- /dev/null +++ b/docs/plans/purpose-separated-standards-engine/reports/performance-core-evidence/fixture-reruns.log @@ -0,0 +1,9 @@ +test_apply_create_and_retire_owns_topology_and_commit (tools.standards_engine.tests.test_analysis.AnalysisWorkflowTest.test_apply_create_and_retire_owns_topology_and_commit) ... ok +test_apply_proposal_composes_real_verification_and_cold_readback (tools.standards_engine.tests.test_analysis.AnalysisWorkflowTest.test_apply_proposal_composes_real_verification_and_cold_readback) ... ok +test_review_verify_apply_recover_and_read_without_original_database (tools.standards_engine.tests.test_coverage_publication.EngineAuditPublicationTest.test_review_verify_apply_recover_and_read_without_original_database) ... ok +test_live_worktree_mutation_cannot_change_snapshot_reads (tools.standards_engine.tests.test_navigation.NavigationTest.test_live_worktree_mutation_cannot_change_snapshot_reads) ... ok + +---------------------------------------------------------------------- +Ran 4 tests in 308.839s + +OK diff --git a/docs/plans/purpose-separated-standards-engine/reports/performance-core-evidence/full-engine.jsonl b/docs/plans/purpose-separated-standards-engine/reports/performance-core-evidence/full-engine.jsonl new file mode 100644 index 00000000..9868a92c --- /dev/null +++ b/docs/plans/purpose-separated-standards-engine/reports/performance-core-evidence/full-engine.jsonl @@ -0,0 +1,353 @@ +{"event": "start", "test": "test_agent_navigation.AgentNavigationTest.test_boolean_nullable_set_facts_aliases_and_multiple_causes", "at": 1790197916.750329} +{"event": "end", "test": "test_agent_navigation.AgentNavigationTest.test_boolean_nullable_set_facts_aliases_and_multiple_causes", "wall_s": 0.8374316270000008, "cpu_s": 0.8373938469999995, "status": "pass", "spans": {"SnapshotModule._content_id": {"calls": 1, "inclusive_s": 0.6079087209999443}, "SnapshotModule.load_content": {"calls": 1, "inclusive_s": 0.6189153230000102}, "StandardsEngine._compile": {"calls": 1, "inclusive_s": 0.18492256500007898}, "StandardsEngine._compiled_snapshot": {"calls": 1, "inclusive_s": 0.8062447280000242}}, "setup_s": 2.3139999711929704e-06, "body_s": 0.8371085409999068, "teardown_s": 1.7529999922771822e-06} +{"event": "start", "test": "test_agent_navigation.AgentNavigationTest.test_capture_rejection_never_advances_to_query", "at": 1790197917.5878453} +{"event": "end", "test": "test_agent_navigation.AgentNavigationTest.test_capture_rejection_never_advances_to_query", "wall_s": 0.0004963899999665955, "cpu_s": 0.0004967480000006574, "status": "pass", "spans": {}, "setup_s": 9.220000265486306e-07, "body_s": 0.0004505029999108956, "teardown_s": 5.809999947814504e-07} +{"event": "start", "test": "test_agent_navigation.AgentNavigationTest.test_compact_read_preserves_text_authority_and_full_detail", "at": 1790197917.5883958} +{"event": "end", "test": "test_agent_navigation.AgentNavigationTest.test_compact_read_preserves_text_authority_and_full_detail", "wall_s": 1.938903286000027, "cpu_s": 1.9387917450000005, "status": "pass", "spans": {"SnapshotModule._content_id": {"calls": 2, "inclusive_s": 1.2384562959999812}, "SnapshotModule.load_content": {"calls": 2, "inclusive_s": 1.2611637380000502}, "StandardsEngine._compile": {"calls": 2, "inclusive_s": 0.37914283799989335}, "StandardsEngine._compiled_snapshot": {"calls": 2, "inclusive_s": 1.6452327440000545}, "tools.standards_engine.standards_engine.tools._contracts": {"calls": 1, "inclusive_s": 0.26942334199998186}}, "setup_s": 4.4099999740865314e-07, "body_s": 1.9388106500000504, "teardown_s": 1.8529999579186551e-06} +{"event": "start", "test": "test_agent_navigation.AgentNavigationTest.test_complete_explicit_facts_select_reviewed_modules", "at": 1790197919.52741} +{"event": "end", "test": "test_agent_navigation.AgentNavigationTest.test_complete_explicit_facts_select_reviewed_modules", "wall_s": 1.6206403980000914, "cpu_s": 1.6205382069999992, "status": "pass", "spans": {"SnapshotModule._content_id": {"calls": 2, "inclusive_s": 1.1984808280000152}, "SnapshotModule.load_content": {"calls": 2, "inclusive_s": 1.2203506299999844}, "StandardsEngine._compile": {"calls": 2, "inclusive_s": 0.36680955500003165}, "StandardsEngine._compiled_snapshot": {"calls": 2, "inclusive_s": 1.5919305529999974}}, "setup_s": 8.109999498628895e-07, "body_s": 1.6205532889999859, "teardown_s": 1.2819999710700358e-06} +{"event": "start", "test": "test_agent_navigation.AgentNavigationTest.test_focused_read_continuations_are_callable_against_exact_snapshot", "at": 1790197921.1481345} +{"event": "end", "test": "test_agent_navigation.AgentNavigationTest.test_focused_read_continuations_are_callable_against_exact_snapshot", "wall_s": 2.5552656720000186, "cpu_s": 2.554565415999999, "status": "pass", "spans": {"SnapshotModule._content_id": {"calls": 3, "inclusive_s": 1.7909165570000596}, "SnapshotModule.load_content": {"calls": 3, "inclusive_s": 1.824972594999963}, "StandardsEngine._compile": {"calls": 3, "inclusive_s": 0.6891157520001343}, "StandardsEngine._compiled_snapshot": {"calls": 3, "inclusive_s": 2.5212245449999955}}, "setup_s": 6.81000074109761e-07, "body_s": 2.555148509999981, "teardown_s": 1.4329999658002635e-06} +{"event": "start", "test": "test_agent_navigation.AgentNavigationTest.test_invalid_inputs_cannot_create_snapshot", "at": 1790197923.703484} +{"event": "end", "test": "test_agent_navigation.AgentNavigationTest.test_invalid_inputs_cannot_create_snapshot", "wall_s": 0.00038675899997997476, "cpu_s": 0.00038708500000161905, "status": "pass", "spans": {}, "setup_s": 8.309999657285516e-07, "body_s": 0.0003466099999513972, "teardown_s": 5.609999789157882e-07} +{"event": "start", "test": "test_agent_navigation.AgentNavigationTest.test_invalid_routing_values_do_not_become_negative_facts", "at": 1790197923.703913} +{"event": "end", "test": "test_agent_navigation.AgentNavigationTest.test_invalid_routing_values_do_not_become_negative_facts", "wall_s": 1.656523421000088, "cpu_s": 1.6563999750000011, "status": "pass", "spans": {"SnapshotModule._content_id": {"calls": 2, "inclusive_s": 1.2015907539999944}, "SnapshotModule.load_content": {"calls": 2, "inclusive_s": 1.2245215750000398}, "StandardsEngine._compile": {"calls": 2, "inclusive_s": 0.42182998399994176}, "StandardsEngine._compiled_snapshot": {"calls": 2, "inclusive_s": 1.6510547380000844}}, "setup_s": 3.609999339460046e-07, "body_s": 1.6564259080000738, "teardown_s": 1.5819999816812924e-06} +{"event": "start", "test": "test_agent_navigation.AgentNavigationTest.test_optional_capture_matches_explicit_route_and_preserves_unresolved", "at": 1790197925.360519} +{"event": "end", "test": "test_agent_navigation.AgentNavigationTest.test_optional_capture_matches_explicit_route_and_preserves_unresolved", "wall_s": 4.1506553330000315, "cpu_s": 3.4018342720000003, "status": "pass", "spans": {"StandardsEngine._compile": {"calls": 4, "inclusive_s": 2.1091360819999636}, "SnapshotModule._content_id": {"calls": 3, "inclusive_s": 1.758524211000008}, "SnapshotModule.load_content": {"calls": 2, "inclusive_s": 1.2021073239999396}, "StandardsEngine._compiled_snapshot": {"calls": 2, "inclusive_s": 1.5895458060000465}}, "setup_s": 1.000999986899842e-06, "body_s": 4.150559743000031, "teardown_s": 1.4519999922413263e-06} +{"event": "start", "test": "test_agent_navigation.AgentNavigationTest.test_related_matches_native_permissions_and_projection", "at": 1790197929.5112643} +{"event": "end", "test": "test_agent_navigation.AgentNavigationTest.test_related_matches_native_permissions_and_projection", "wall_s": 3.364521964000005, "cpu_s": 3.3642329269999998, "status": "pass", "spans": {"SnapshotModule._content_id": {"calls": 4, "inclusive_s": 2.413270144999956}, "SnapshotModule.load_content": {"calls": 4, "inclusive_s": 2.4576848190000646}, "StandardsEngine._compile": {"calls": 4, "inclusive_s": 0.8827505380000957}, "StandardsEngine._compiled_snapshot": {"calls": 4, "inclusive_s": 3.3499144339999702}}, "setup_s": 9.919999683916103e-07, "body_s": 3.3644309909999492, "teardown_s": 1.2819999710700358e-06} +{"event": "start", "test": "test_agent_navigation.AgentNavigationTest.test_supplied_snapshot_never_captures_ambient_authority", "at": 1790197932.8758621} +{"event": "end", "test": "test_agent_navigation.AgentNavigationTest.test_supplied_snapshot_never_captures_ambient_authority", "wall_s": 1.5971001110000316, "cpu_s": 1.596953537000001, "status": "pass", "spans": {"SnapshotModule._content_id": {"calls": 2, "inclusive_s": 1.1779343450000397}, "SnapshotModule.load_content": {"calls": 2, "inclusive_s": 1.1996686109999928}, "StandardsEngine._compile": {"calls": 2, "inclusive_s": 0.3714777459999823}, "StandardsEngine._compiled_snapshot": {"calls": 2, "inclusive_s": 1.5758693750001385}}, "setup_s": 9.819999604587792e-07, "body_s": 1.597012963000111, "teardown_s": 1.503000021330081e-06} +{"event": "start", "test": "test_agent_navigation.AgentNavigationTest.test_vocabulary_matches_router_and_questions_are_typed", "at": 1790197934.473041} +{"event": "end", "test": "test_agent_navigation.AgentNavigationTest.test_vocabulary_matches_router_and_questions_are_typed", "wall_s": 2.7376943400000755, "cpu_s": 2.7371441759999975, "status": "pass", "spans": {"SnapshotModule._content_id": {"calls": 3, "inclusive_s": 1.7757816370000228}, "SnapshotModule.load_content": {"calls": 3, "inclusive_s": 1.8084708400001546}, "StandardsEngine._compile": {"calls": 3, "inclusive_s": 0.5448037910000494}, "StandardsEngine._compiled_snapshot": {"calls": 3, "inclusive_s": 2.3603002470000547}}, "setup_s": 7.710000318184029e-07, "body_s": 2.73760322499993, "teardown_s": 1.7219999790540896e-06} +{"event": "start", "test": "test_agent_workflow.AgentWorkflowTest.test_analysis_rejection_retains_the_created_revision", "at": 1790197940.0868216} +{"event": "end", "test": "test_agent_workflow.AgentWorkflowTest.test_analysis_rejection_retains_the_created_revision", "wall_s": 2.346051282000076, "cpu_s": 2.106473404999999, "status": "pass", "spans": {"SnapshotModule._content_id": {"calls": 2, "inclusive_s": 1.2095814339999151}, "SnapshotModule.load_content": {"calls": 2, "inclusive_s": 1.2326276509999161}, "StandardsEngine._compile": {"calls": 2, "inclusive_s": 0.3589070369999945}, "StandardsEngine._compiled_snapshot": {"calls": 1, "inclusive_s": 0.8018837619999886}, "StandardsEngine._proposal_projection": {"calls": 1, "inclusive_s": 1.6253678460000174}, "AuthoringModule.read_revision": {"calls": 3, "inclusive_s": 0.04298780599992824}, "StandardsEngine.propose": {"calls": 1, "inclusive_s": 2.295906596000009}}, "setup_s": 1.623000002837216e-06, "body_s": 2.3458901849999165, "teardown_s": 2.093000034619763e-06} +{"event": "start", "test": "test_agent_workflow.AgentWorkflowTest.test_context_is_immutable_existing_identity_and_foreign_records_reject", "at": 1790197942.4329584} +{"event": "end", "test": "test_agent_workflow.AgentWorkflowTest.test_context_is_immutable_existing_identity_and_foreign_records_reject", "wall_s": 4.556730729000037, "cpu_s": 4.080610099999998, "status": "pass", "spans": {"SnapshotModule._content_id": {"calls": 3, "inclusive_s": 1.7987453600001118}, "SnapshotModule.load_content": {"calls": 3, "inclusive_s": 1.832212768999966}, "StandardsEngine._compile": {"calls": 4, "inclusive_s": 0.8784067280000727}, "StandardsEngine._compiled_snapshot": {"calls": 2, "inclusive_s": 1.7244196059999695}, "StandardsEngine._proposal_projection": {"calls": 2, "inclusive_s": 2.7026879990000907}, "AuthoringModule.read_revision": {"calls": 4, "inclusive_s": 0.05649490800010426}, "StandardsEngine._validate_projected_inputs": {"calls": 1, "inclusive_s": 0.0012647409999999581}, "StandardsEngine._evaluate": {"calls": 1, "inclusive_s": 0.03163451199998235}, "StandardsEngine.analyze_proposal": {"calls": 1, "inclusive_s": 1.7693532060000052}, "StandardsEngine.propose": {"calls": 1, "inclusive_s": 4.280179234000002}, "tools.standards_engine.standards_engine.tools._contracts": {"calls": 1, "inclusive_s": 0.26872688299999936}}, "setup_s": 1.2220000371598871e-06, "body_s": 4.556649220000054, "teardown_s": 2.5529999447826413e-06} +{"event": "start", "test": "test_agent_workflow.AgentWorkflowTest.test_normative_proposal_stops_at_real_pending_work", "at": 1790197946.9897854} +{"event": "observation", "test": "test_agent_workflow.AgentWorkflowTest.test_normative_proposal_stops_at_real_pending_work", "elapsed_s": 10.755898804000026, "stack": [" File \"/mnt/data/pse-performance-work/Coding-Standards/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/measurement-tools/run_timed_suite.py\", line 58, in \n result=unittest.TextTestRunner(verbosity=1,resultclass=Result).run(suite)\n", " File \"/usr/lib/python3.13/unittest/runner.py\", line 240, in run\n test(result)\n", " File \"/usr/lib/python3.13/unittest/suite.py\", line 84, in __call__\n return self.run(*args, **kwds)\n", " File \"/usr/lib/python3.13/unittest/suite.py\", line 122, in run\n test(result)\n", " File \"/usr/lib/python3.13/unittest/case.py\", line 707, in __call__\n return self.run(*args, **kwds)\n", " File \"/usr/lib/python3.13/unittest/case.py\", line 651, in run\n self._callTestMethod(testMethod)\n", " File \"/mnt/data/pse-performance-work/Coding-Standards/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/measurement-tools/run_timed_suite.py\", line 36, in timed\n try:return _fn(self,*args,**kwargs)\n", " File \"/usr/lib/python3.13/unittest/case.py\", line 606, in _callTestMethod\n if method() is not None:\n", " File \"/mnt/data/pse-performance-work/candidate-tests/tools/standards_engine/tests/test_agent_workflow.py\", line 328, in test_normative_proposal_stops_at_real_pending_work\n resolved = self.facade.resolve_workflow(\n", " File \"/mnt/data/pse-performance-work/candidate-tests/tools/standards_engine/standards_engine/tools.py\", line 298, in resolve_workflow\n return self._result(\"resolve_workflow\", self._engine.resolve_workflow(call))\n", " File \"/mnt/data/pse-performance-work/candidate-tests/tools/standards_engine/standards_engine/context_projection.py\", line 62, in invoke\n return function(engine, call)\n", " File \"/mnt/data/pse-performance-work/candidate-tests/tools/standards_engine/standards_engine/engine.py\", line 952, in resolve_workflow\n return advance(self, \"resolve_workflow\", call)\n", " File \"/mnt/data/pse-performance-work/candidate-tests/tools/standards_engine/standards_engine/agent_workflow.py\", line 193, in advance\n current = view(engine, bound)\n", " File \"/mnt/data/pse-performance-work/candidate-tests/tools/standards_engine/standards_engine/agent_workflow.py\", line 123, in view\n outcome = engine._analysis_result(engine._evaluate(bound.analysis))\n", " File \"/mnt/data/pse-performance-work/Coding-Standards/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/measurement-tools/run_timed_suite.py\", line 25, in observe\n try:return original(*args,**kwargs)\n", " File \"/mnt/data/pse-performance-work/candidate-tests/tools/standards_engine/standards_engine/engine.py\", line 1818, in _evaluate\n materials = self._evaluation_materials(state)\n", " File \"/mnt/data/pse-performance-work/candidate-tests/tools/standards_engine/standards_engine/engine.py\", line 1806, in _evaluation_materials\n projection = self._proposal_projection(revision, accepted)\n", " File \"/mnt/data/pse-performance-work/Coding-Standards/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/measurement-tools/run_timed_suite.py\", line 25, in observe\n try:return original(*args,**kwargs)\n", " File \"/mnt/data/pse-performance-work/candidate-tests/tools/standards_engine/standards_engine/engine.py\", line 1710, in _proposal_projection\n return self._logical_authoring.compile(\n", " File \"/mnt/data/pse-performance-work/candidate-tests/tools/standards_engine/standards_engine/logical_authoring.py\", line 994, in compile\n repository_paths = _refresh_suite_input_projection(\n", " File \"/mnt/data/pse-performance-work/candidate-tests/tools/standards_engine/standards_engine/logical_authoring.py\", line 2447, in _refresh_suite_input_projection\n destination.touch()\n", " File \"/usr/lib/python3.13/pathlib/_local.py\", line 716, in touch\n fd = os.open(self, flags, mode)\n"]} +{"event": "end", "test": "test_agent_workflow.AgentWorkflowTest.test_normative_proposal_stops_at_real_pending_work", "wall_s": 17.71921971100005, "cpu_s": 15.425082137, "status": "pass", "spans": {"SnapshotModule._content_id": {"calls": 10, "inclusive_s": 6.29358951800009}, "SnapshotModule.load_content": {"calls": 10, "inclusive_s": 6.408471041999746}, "StandardsEngine._compile": {"calls": 18, "inclusive_s": 3.6430113229997687}, "StandardsEngine._compiled_snapshot": {"calls": 9, "inclusive_s": 7.530938570999979}, "StandardsEngine._proposal_projection": {"calls": 9, "inclusive_s": 9.454514738000057}, "AuthoringModule.read_revision": {"calls": 32, "inclusive_s": 0.4791970239998591}, "StandardsEngine._validate_projected_inputs": {"calls": 10, "inclusive_s": 0.004746603000057803}, "StandardsEngine._evaluate": {"calls": 10, "inclusive_s": 7.453256146000172}, "StandardsEngine.analyze_proposal": {"calls": 1, "inclusive_s": 1.7627421380000214}, "StandardsEngine.propose": {"calls": 1, "inclusive_s": 4.231707226000026}, "StandardsEngine.resolve": {"calls": 3, "inclusive_s": 5.8797169249999115}}, "setup_s": 1.3519999129130156e-06, "body_s": 17.719123879999984, "teardown_s": 2.432999963275506e-06} +{"event": "start", "test": "test_agent_workflow.AgentWorkflowTest.test_reference_proposal_composes_analysis_without_review_or_application", "at": 1790197964.70911} +{"event": "end", "test": "test_agent_workflow.AgentWorkflowTest.test_reference_proposal_composes_analysis_without_review_or_application", "wall_s": 8.105361828000014, "cpu_s": 7.071739223999998, "status": "pass", "spans": {"SnapshotModule._content_id": {"calls": 5, "inclusive_s": 3.071256240000025}, "SnapshotModule.load_content": {"calls": 5, "inclusive_s": 3.1394423620001817}, "StandardsEngine._compile": {"calls": 8, "inclusive_s": 1.5468593149998924}, "StandardsEngine._compiled_snapshot": {"calls": 4, "inclusive_s": 3.2690416830000686}, "StandardsEngine._proposal_projection": {"calls": 4, "inclusive_s": 4.632685150999919}, "AuthoringModule.read_revision": {"calls": 12, "inclusive_s": 0.18900041899996722}, "StandardsEngine._validate_projected_inputs": {"calls": 3, "inclusive_s": 0.0013276629999836587}, "StandardsEngine._evaluate": {"calls": 3, "inclusive_s": 3.6944283240000004}, "StandardsEngine.analyze_proposal": {"calls": 1, "inclusive_s": 1.7899333059999663}, "StandardsEngine.propose": {"calls": 1, "inclusive_s": 4.309523624999997}}, "setup_s": 1.2719999631372048e-06, "body_s": 8.105269211000063, "teardown_s": 1.6529999129488715e-06} +{"event": "start", "test": "test_agent_workflow.AgentWorkflowTest.test_review_is_explicit_and_current_authorization_is_required", "at": 1790197972.8145807} +{"event": "end", "test": "test_agent_workflow.AgentWorkflowTest.test_review_is_explicit_and_current_authorization_is_required", "wall_s": 12.365775857000017, "cpu_s": 10.819821723999993, "status": "pass", "spans": {"SnapshotModule._content_id": {"calls": 7, "inclusive_s": 4.310902060000103}, "SnapshotModule.load_content": {"calls": 7, "inclusive_s": 4.3949132830001645}, "StandardsEngine._compile": {"calls": 12, "inclusive_s": 2.4946309409999685}, "StandardsEngine._compiled_snapshot": {"calls": 6, "inclusive_s": 5.063587019000238}, "StandardsEngine._proposal_projection": {"calls": 6, "inclusive_s": 6.471622392999848}, "AuthoringModule.read_revision": {"calls": 29, "inclusive_s": 0.43341040000029807}, "StandardsEngine._validate_projected_inputs": {"calls": 5, "inclusive_s": 0.002103613000031146}, "StandardsEngine._evaluate": {"calls": 5, "inclusive_s": 7.221647331999975}, "StandardsEngine.analyze_proposal": {"calls": 1, "inclusive_s": 2.0092818640000587}, "StandardsEngine.propose": {"calls": 1, "inclusive_s": 4.494439690000036}, "tools.standards_engine.standards_engine.tools._contracts": {"calls": 1, "inclusive_s": 0.26401342700000896}, "StandardsEngine.review_proposal": {"calls": 2, "inclusive_s": 3.6779618410000694}}, "setup_s": 1.2719999631372048e-06, "body_s": 12.365684641999906, "teardown_s": 2.072999905067263e-06} +{"event": "start", "test": "test_agent_workflow.AgentWorkflowTest.test_revision_advancement_does_not_retarget_old_context", "at": 1790197985.180478} +{"event": "observation", "test": "test_agent_workflow.AgentWorkflowTest.test_revision_advancement_does_not_retarget_old_context", "elapsed_s": 17.57257175699999, "stack": [" File \"/mnt/data/pse-performance-work/Coding-Standards/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/measurement-tools/run_timed_suite.py\", line 58, in \n result=unittest.TextTestRunner(verbosity=1,resultclass=Result).run(suite)\n", " File \"/usr/lib/python3.13/unittest/runner.py\", line 240, in run\n test(result)\n", " File \"/usr/lib/python3.13/unittest/suite.py\", line 84, in __call__\n return self.run(*args, **kwds)\n", " File \"/usr/lib/python3.13/unittest/suite.py\", line 122, in run\n test(result)\n", " File \"/usr/lib/python3.13/unittest/case.py\", line 707, in __call__\n return self.run(*args, **kwds)\n", " File \"/usr/lib/python3.13/unittest/case.py\", line 651, in run\n self._callTestMethod(testMethod)\n", " File \"/mnt/data/pse-performance-work/Coding-Standards/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/measurement-tools/run_timed_suite.py\", line 36, in timed\n try:return _fn(self,*args,**kwargs)\n", " File \"/usr/lib/python3.13/unittest/case.py\", line 606, in _callTestMethod\n if method() is not None:\n", " File \"/mnt/data/pse-performance-work/candidate-tests/tools/standards_engine/tests/test_agent_workflow.py\", line 178, in test_revision_advancement_does_not_retarget_old_context\n analyzed = self.facade.analyze({\"context\": resumed[\"context\"]})\n", " File \"/mnt/data/pse-performance-work/candidate-tests/tools/standards_engine/standards_engine/tools.py\", line 292, in analyze\n return self._result(\"analyze\", self._engine.analyze(call))\n", " File \"/mnt/data/pse-performance-work/candidate-tests/tools/standards_engine/standards_engine/context_projection.py\", line 62, in invoke\n return function(engine, call)\n", " File \"/mnt/data/pse-performance-work/candidate-tests/tools/standards_engine/standards_engine/engine.py\", line 946, in analyze\n return advance(self, \"analyze\", call)\n", " File \"/mnt/data/pse-performance-work/candidate-tests/tools/standards_engine/standards_engine/agent_workflow.py\", line 226, in advance\n return analyze_revision(engine, revision)\n", " File \"/mnt/data/pse-performance-work/candidate-tests/tools/standards_engine/standards_engine/agent_workflow.py\", line 152, in analyze_revision\n result = engine.analyze_proposal(c.AnalyzeProposalCall(revision))\n", " File \"/mnt/data/pse-performance-work/Coding-Standards/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/measurement-tools/run_timed_suite.py\", line 25, in observe\n try:return original(*args,**kwargs)\n", " File \"/mnt/data/pse-performance-work/candidate-tests/tools/standards_engine/standards_engine/context_projection.py\", line 62, in invoke\n return function(engine, call)\n", " File \"/mnt/data/pse-performance-work/candidate-tests/tools/standards_engine/standards_engine/engine.py\", line 1077, in analyze_proposal\n accepted = self._compiled_snapshot(revision.base_snapshot)\n", " File \"/mnt/data/pse-performance-work/Coding-Standards/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/measurement-tools/run_timed_suite.py\", line 25, in observe\n try:return original(*args,**kwargs)\n", " File \"/mnt/data/pse-performance-work/candidate-tests/tools/standards_engine/standards_engine/engine.py\", line 1691, in _compiled_snapshot\n capture = self._snapshots.load_content(snapshot)\n", " File \"/mnt/data/pse-performance-work/Coding-Standards/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/measurement-tools/run_timed_suite.py\", line 25, in observe\n try:return original(*args,**kwargs)\n", " File \"/mnt/data/pse-performance-work/candidate-tests/tools/standards_snapshots/standards_snapshots/module.py\", line 112, in load_content\n if self._content_id(capture) != content_id:\n", " File \"/mnt/data/pse-performance-work/Coding-Standards/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/measurement-tools/run_timed_suite.py\", line 25, in observe\n try:return original(*args,**kwargs)\n", " File \"/mnt/data/pse-performance-work/candidate-tests/tools/standards_snapshots/standards_snapshots/module.py\", line 210, in _content_id\n return hash_identity(\n", " File \"/mnt/data/pse-performance-work/candidate-tests/tools/standards_identity/standards_identity/encoding.py\", line 120, in hash_identity\n return f\"{id_prefix}:sha256:{hashlib.sha256(frame).hexdigest()}\"\n"]} +{"event": "end", "test": "test_agent_workflow.AgentWorkflowTest.test_revision_advancement_does_not_retarget_old_context", "wall_s": 19.588788710000017, "cpu_s": 16.595141053999996, "status": "pass", "spans": {"SnapshotModule._content_id": {"calls": 10, "inclusive_s": 6.202652937000039}, "SnapshotModule.load_content": {"calls": 10, "inclusive_s": 6.315129939000144}, "StandardsEngine._compile": {"calls": 18, "inclusive_s": 3.5957185630002186}, "StandardsEngine._compiled_snapshot": {"calls": 9, "inclusive_s": 7.6393409929997915}, "StandardsEngine._proposal_projection": {"calls": 9, "inclusive_s": 12.170563046000325}, "AuthoringModule.read_revision": {"calls": 34, "inclusive_s": 0.4869898889999149}, "StandardsEngine._validate_projected_inputs": {"calls": 7, "inclusive_s": 0.003530726000008144}, "StandardsEngine._evaluate": {"calls": 7, "inclusive_s": 7.330725093000069}, "StandardsEngine.analyze_proposal": {"calls": 3, "inclusive_s": 6.930739709999898}, "StandardsEngine.propose": {"calls": 1, "inclusive_s": 4.289591780000023}, "StandardsEngine.revise": {"calls": 1, "inclusive_s": 6.859655923000105}}, "setup_s": 1.421999968442833e-06, "body_s": 19.588699439000038, "teardown_s": 1.962999931492959e-06} +{"event": "start", "test": "test_analysis.AnalysisWorkflowTest.test_apply_create_and_retire_owns_topology_and_commit", "at": 1790198007.1609533} +{"event": "end", "test": "test_analysis.AnalysisWorkflowTest.test_apply_create_and_retire_owns_topology_and_commit", "wall_s": 0.6427231130001019, "cpu_s": 0.44118922900000257, "status": "error", "spans": {"tools.standards_engine.standards_engine.tools._contracts": {"calls": 1, "inclusive_s": 0.2745840909999515}}, "setup_s": 1.612999994904385e-06, "body_s": 0.64124740200009, "teardown_s": 2.1430000742839184e-06} +{"event": "start", "test": "test_analysis.AnalysisWorkflowTest.test_apply_proposal_composes_real_verification_and_cold_readback", "at": 1790198007.803961} +{"event": "end", "test": "test_analysis.AnalysisWorkflowTest.test_apply_proposal_composes_real_verification_and_cold_readback", "wall_s": 0.6510440649999509, "cpu_s": 0.468053814000001, "status": "error", "spans": {"tools.standards_engine.standards_engine.tools._contracts": {"calls": 1, "inclusive_s": 0.29869470300002376}}, "setup_s": 1.1710000080711325e-06, "body_s": 0.6502181090000931, "teardown_s": 1.7319999869869207e-06} +{"event": "start", "test": "test_analysis.AnalysisWorkflowTest.test_capture_compiles_live_and_frozen_sources_independently", "at": 1790198008.4550815} +{"event": "end", "test": "test_analysis.AnalysisWorkflowTest.test_capture_compiles_live_and_frozen_sources_independently", "wall_s": 2.46063453499994, "cpu_s": 1.7566354070000045, "status": "pass", "spans": {"StandardsEngine._compile": {"calls": 2, "inclusive_s": 1.8381412349999664}, "SnapshotModule._content_id": {"calls": 1, "inclusive_s": 0.5941868639999939}}, "setup_s": 1.202000021294225e-06, "body_s": 2.4605467760001147, "teardown_s": 2.373999905103119e-06} +{"event": "start", "test": "test_analysis.AnalysisWorkflowTest.test_cold_load_rejects_obsolete_domain_contracts", "at": 1790198010.9158049} +{"event": "end", "test": "test_analysis.AnalysisWorkflowTest.test_cold_load_rejects_obsolete_domain_contracts", "wall_s": 0.013399433000131467, "cpu_s": 0.01340128600000412, "status": "pass", "spans": {}, "setup_s": 1.202000021294225e-06, "body_s": 0.013319315999979153, "teardown_s": 1.5919999896141235e-06} +{"event": "start", "test": "test_analysis.AnalysisWorkflowTest.test_coverage_exclusions_require_exact_evidence_before_resolution", "at": 1790198010.9292774} +{"event": "end", "test": "test_analysis.AnalysisWorkflowTest.test_coverage_exclusions_require_exact_evidence_before_resolution", "wall_s": 2.5536305880000327, "cpu_s": 2.550540042999998, "status": "pass", "spans": {"SnapshotModule._content_id": {"calls": 3, "inclusive_s": 1.8275289609998708}, "SnapshotModule.load_content": {"calls": 3, "inclusive_s": 1.8645056520001617}, "StandardsEngine._compile": {"calls": 3, "inclusive_s": 0.5748224069996013}, "StandardsEngine._compiled_snapshot": {"calls": 3, "inclusive_s": 2.4469527270000526}, "StandardsEngine._evaluate": {"calls": 4, "inclusive_s": 0.06409737199965093}, "StandardsEngine.prepare": {"calls": 1, "inclusive_s": 0.8586889409998548}, "StandardsEngine.resolve": {"calls": 2, "inclusive_s": 1.6907355480000206}}, "setup_s": 8.409999736613827e-07, "body_s": 2.553538681999953, "teardown_s": 2.2029998945072293e-06} +{"event": "start", "test": "test_analysis.AnalysisWorkflowTest.test_current_authorization_is_not_reused_with_material", "at": 1790198013.483009} +{"event": "end", "test": "test_analysis.AnalysisWorkflowTest.test_current_authorization_is_not_reused_with_material", "wall_s": 2.549788031999924, "cpu_s": 2.5466222630000033, "status": "pass", "spans": {"SnapshotModule._content_id": {"calls": 3, "inclusive_s": 1.819336843999963}, "SnapshotModule.load_content": {"calls": 3, "inclusive_s": 1.854260814999634}, "StandardsEngine._compile": {"calls": 3, "inclusive_s": 0.5702171850000468}, "StandardsEngine._compiled_snapshot": {"calls": 3, "inclusive_s": 2.433594872000185}, "StandardsEngine._evaluate": {"calls": 4, "inclusive_s": 0.0670844290000332}, "StandardsEngine.prepare": {"calls": 1, "inclusive_s": 0.8368319310000061}, "StandardsEngine.resolve": {"calls": 2, "inclusive_s": 1.7107918280000831}}, "setup_s": 9.509999472356867e-07, "body_s": 2.549697629000093, "teardown_s": 1.5619998521287926e-06} +{"event": "start", "test": "test_analysis.AnalysisWorkflowTest.test_distinct_snapshot_roots_retain_distinct_material_and_lifecycle", "at": 1790198016.0329823} +{"event": "end", "test": "test_analysis.AnalysisWorkflowTest.test_distinct_snapshot_roots_retain_distinct_material_and_lifecycle", "wall_s": 4.61391589699997, "cpu_s": 4.605874708999991, "status": "pass", "spans": {"SnapshotModule._content_id": {"calls": 6, "inclusive_s": 3.7076777580000453}, "SnapshotModule.load_content": {"calls": 6, "inclusive_s": 3.1475993709996146}, "StandardsEngine._compile": {"calls": 4, "inclusive_s": 0.7570582060000106}, "StandardsEngine._compiled_snapshot": {"calls": 5, "inclusive_s": 3.286457359999986}, "StandardsEngine._evaluate": {"calls": 2, "inclusive_s": 0.034421963000113465}, "StandardsEngine.prepare": {"calls": 3, "inclusive_s": 3.357118772000149}}, "setup_s": 1.4319998626888264e-06, "body_s": 4.613770863000127, "teardown_s": 1.9130000055156415e-06} +{"event": "start", "test": "test_analysis.AnalysisWorkflowTest.test_equal_transition_is_idempotent_and_different_evidence_branches", "at": 1790198020.646986} +{"event": "end", "test": "test_analysis.AnalysisWorkflowTest.test_equal_transition_is_idempotent_and_different_evidence_branches", "wall_s": 3.5120162980001624, "cpu_s": 3.506771834999995, "status": "pass", "spans": {"SnapshotModule._content_id": {"calls": 4, "inclusive_s": 2.4538141780001297}, "SnapshotModule.load_content": {"calls": 4, "inclusive_s": 2.499519532000022}, "StandardsEngine._compile": {"calls": 4, "inclusive_s": 0.7988164650000726}, "StandardsEngine._compiled_snapshot": {"calls": 4, "inclusive_s": 3.308711590999792}, "StandardsEngine._evaluate": {"calls": 7, "inclusive_s": 0.12017377899996973}, "StandardsEngine.prepare": {"calls": 1, "inclusive_s": 0.8542465660000289}, "StandardsEngine.resolve": {"calls": 3, "inclusive_s": 2.6540522120003516}}, "setup_s": 1.4320000900625018e-06, "body_s": 3.5119232909999027, "teardown_s": 1.8020000425167382e-06} +{"event": "start", "test": "test_analysis.AnalysisWorkflowTest.test_lifecycle_change_during_authorization_blocks_post_submission_evaluation", "at": 1790198024.15911} +{"event": "end", "test": "test_analysis.AnalysisWorkflowTest.test_lifecycle_change_during_authorization_blocks_post_submission_evaluation", "wall_s": 2.8972310050000942, "cpu_s": 2.8932954220000084, "status": "pass", "spans": {"SnapshotModule._content_id": {"calls": 3, "inclusive_s": 1.9739871209999365}, "SnapshotModule.load_content": {"calls": 3, "inclusive_s": 2.0115157599998383}, "StandardsEngine._compile": {"calls": 3, "inclusive_s": 0.7595812989998194}, "StandardsEngine._compiled_snapshot": {"calls": 3, "inclusive_s": 2.7816614520002076}, "StandardsEngine._evaluate": {"calls": 5, "inclusive_s": 0.0696537490002811}, "StandardsEngine.prepare": {"calls": 1, "inclusive_s": 0.8919554869999047}, "StandardsEngine.resolve": {"calls": 2, "inclusive_s": 2.0027615999999853}}, "setup_s": 1.3419999049801845e-06, "body_s": 2.8971290449999287, "teardown_s": 1.9720000636880286e-06} +{"event": "start", "test": "test_analysis.AnalysisWorkflowTest.test_policy_free_standard_creation_enters_public_analysis", "at": 1790198027.0564618} +{"event": "end", "test": "test_analysis.AnalysisWorkflowTest.test_policy_free_standard_creation_enters_public_analysis", "wall_s": 4.212555537000071, "cpu_s": 3.952720056000004, "status": "pass", "spans": {"tools.standards_engine.standards_engine.tools._contracts": {"calls": 1, "inclusive_s": 0.2959167219999017}, "SnapshotModule._content_id": {"calls": 3, "inclusive_s": 1.9031544429999485}, "SnapshotModule.load_content": {"calls": 3, "inclusive_s": 1.942155128000195}, "StandardsEngine._compile": {"calls": 4, "inclusive_s": 0.7894660760002807}, "StandardsEngine._compiled_snapshot": {"calls": 2, "inclusive_s": 1.684275623000076}, "StandardsEngine._proposal_projection": {"calls": 2, "inclusive_s": 2.3136323459998493}, "AuthoringModule.read_revision": {"calls": 2, "inclusive_s": 0.030029410999986794}, "StandardsEngine._validate_projected_inputs": {"calls": 1, "inclusive_s": 0.00043403800009400584}, "StandardsEngine._evaluate": {"calls": 1, "inclusive_s": 0.029861873999834643}, "StandardsEngine.analyze_proposal": {"calls": 1, "inclusive_s": 1.6201534520000678}}, "setup_s": 1.621999899725779e-06, "body_s": 4.212454699000091, "teardown_s": 2.052999889201601e-06} +{"event": "start", "test": "test_analysis.AnalysisWorkflowTest.test_prepare_persists_parent_bound_public_work", "at": 1790198031.2691321} +{"event": "end", "test": "test_analysis.AnalysisWorkflowTest.test_prepare_persists_parent_bound_public_work", "wall_s": 0.8536476829999629, "cpu_s": 0.85151986999999, "status": "pass", "spans": {"SnapshotModule._content_id": {"calls": 1, "inclusive_s": 0.6093949549999707}, "SnapshotModule.load_content": {"calls": 1, "inclusive_s": 0.6219767160000629}, "StandardsEngine._compile": {"calls": 1, "inclusive_s": 0.18883994100019663}, "StandardsEngine._compiled_snapshot": {"calls": 1, "inclusive_s": 0.8134877370000595}, "StandardsEngine._evaluate": {"calls": 1, "inclusive_s": 0.018800710000050458}, "StandardsEngine.prepare": {"calls": 1, "inclusive_s": 0.848119830000087}}, "setup_s": 1.3020001006225357e-06, "body_s": 0.8535623770001166, "teardown_s": 1.4820000160398195e-06} +{"event": "start", "test": "test_analysis.AnalysisWorkflowTest.test_prior_analysis_reuses_the_same_valid_decision", "at": 1790198032.1228669} +{"event": "end", "test": "test_analysis.AnalysisWorkflowTest.test_prior_analysis_reuses_the_same_valid_decision", "wall_s": 2.5657630400000926, "cpu_s": 2.5628652719999963, "status": "pass", "spans": {"SnapshotModule._content_id": {"calls": 3, "inclusive_s": 1.8160709930000394}, "SnapshotModule.load_content": {"calls": 3, "inclusive_s": 1.8508612889997949}, "StandardsEngine._compile": {"calls": 3, "inclusive_s": 0.5653071910001017}, "StandardsEngine._compiled_snapshot": {"calls": 3, "inclusive_s": 2.4255358300001717}, "StandardsEngine._evaluate": {"calls": 5, "inclusive_s": 0.08071077500017054}, "StandardsEngine.prepare": {"calls": 2, "inclusive_s": 1.691896349999979}, "StandardsEngine.resolve": {"calls": 1, "inclusive_s": 0.8715071980000175}}, "setup_s": 1.0520000159885967e-06, "body_s": 2.5656344209999133, "teardown_s": 2.0730001324409386e-06} +{"event": "start", "test": "test_analysis.AnalysisWorkflowTest.test_prior_decisions_reuse_material_but_recheck_each_decision", "at": 1790198034.6887505} +{"event": "end", "test": "test_analysis.AnalysisWorkflowTest.test_prior_decisions_reuse_material_but_recheck_each_decision", "wall_s": 2.731527830999994, "cpu_s": 2.7300540860000098, "status": "pass", "spans": {"SnapshotModule._content_id": {"calls": 3, "inclusive_s": 1.811620873000038}, "SnapshotModule.load_content": {"calls": 3, "inclusive_s": 1.845103273000177}, "StandardsEngine._compile": {"calls": 3, "inclusive_s": 0.7348479780000616}, "StandardsEngine._compiled_snapshot": {"calls": 3, "inclusive_s": 2.5876047719998496}, "StandardsEngine._evaluate": {"calls": 5, "inclusive_s": 0.08494103099974382}, "StandardsEngine.prepare": {"calls": 2, "inclusive_s": 1.6950568540003133}, "StandardsEngine.resolve": {"calls": 1, "inclusive_s": 1.0339680939998743}}, "setup_s": 1.3819999367115088e-06, "body_s": 2.7314338619999035, "teardown_s": 1.4020001799508464e-06} +{"event": "start", "test": "test_analysis.AnalysisWorkflowTest.test_proposal_analysis_derives_inputs_and_replays_exact_revision", "at": 1790198037.4203875} +{"event": "observation", "test": "test_analysis.AnalysisWorkflowTest.test_proposal_analysis_derives_inputs_and_replays_exact_revision", "elapsed_s": 10.399598087999948, "stack": [" File \"/mnt/data/pse-performance-work/Coding-Standards/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/measurement-tools/run_timed_suite.py\", line 58, in \n result=unittest.TextTestRunner(verbosity=1,resultclass=Result).run(suite)\n", " File \"/usr/lib/python3.13/unittest/runner.py\", line 240, in run\n test(result)\n", " File \"/usr/lib/python3.13/unittest/suite.py\", line 84, in __call__\n return self.run(*args, **kwds)\n", " File \"/usr/lib/python3.13/unittest/suite.py\", line 122, in run\n test(result)\n", " File \"/usr/lib/python3.13/unittest/case.py\", line 707, in __call__\n return self.run(*args, **kwds)\n", " File \"/usr/lib/python3.13/unittest/case.py\", line 651, in run\n self._callTestMethod(testMethod)\n", " File \"/mnt/data/pse-performance-work/Coding-Standards/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/measurement-tools/run_timed_suite.py\", line 36, in timed\n try:return _fn(self,*args,**kwargs)\n", " File \"/usr/lib/python3.13/unittest/case.py\", line 606, in _callTestMethod\n if method() is not None:\n", " File \"/mnt/data/pse-performance-work/candidate-tests/tools/standards_engine/tests/test_analysis.py\", line 948, in test_proposal_analysis_derives_inputs_and_replays_exact_revision\n replayed = reopened._evaluate(reopened._load_analysis(initial.handle))\n", " File \"/mnt/data/pse-performance-work/Coding-Standards/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/measurement-tools/run_timed_suite.py\", line 25, in observe\n try:return original(*args,**kwargs)\n", " File \"/mnt/data/pse-performance-work/candidate-tests/tools/standards_engine/standards_engine/engine.py\", line 1818, in _evaluate\n materials = self._evaluation_materials(state)\n", " File \"/mnt/data/pse-performance-work/candidate-tests/tools/standards_engine/standards_engine/engine.py\", line 1806, in _evaluation_materials\n projection = self._proposal_projection(revision, accepted)\n", " File \"/mnt/data/pse-performance-work/Coding-Standards/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/measurement-tools/run_timed_suite.py\", line 25, in observe\n try:return original(*args,**kwargs)\n", " File \"/mnt/data/pse-performance-work/candidate-tests/tools/standards_engine/standards_engine/engine.py\", line 1710, in _proposal_projection\n return self._logical_authoring.compile(\n", " File \"/mnt/data/pse-performance-work/candidate-tests/tools/standards_engine/standards_engine/logical_authoring.py\", line 994, in compile\n repository_paths = _refresh_suite_input_projection(\n", " File \"/mnt/data/pse-performance-work/candidate-tests/tools/standards_engine/standards_engine/logical_authoring.py\", line 2439, in _refresh_suite_input_projection\n with tempfile.TemporaryDirectory(\n", " File \"/usr/lib/python3.13/tempfile.py\", line 1141, in __exit__\n self.cleanup()\n", " File \"/usr/lib/python3.13/tempfile.py\", line 1145, in cleanup\n self._rmtree(self.name, ignore_errors=self._ignore_cleanup_errors)\n", " File \"/usr/lib/python3.13/tempfile.py\", line 1125, in _rmtree\n _rmtree(name, onexc=onexc)\n", " File \"/usr/lib/python3.13/shutil.py\", line 763, in rmtree\n _rmtree_safe_fd(stack, onexc)\n", " File \"/usr/lib/python3.13/shutil.py\", line 684, in _rmtree_safe_fd\n for entry in entries:\n"]} +{"event": "end", "test": "test_analysis.AnalysisWorkflowTest.test_proposal_analysis_derives_inputs_and_replays_exact_revision", "wall_s": 12.256338472999914, "cpu_s": 11.254537685000003, "status": "pass", "spans": {"SnapshotModule._content_id": {"calls": 8, "inclusive_s": 4.857267823999564}, "SnapshotModule.load_content": {"calls": 8, "inclusive_s": 4.949905457999876}, "StandardsEngine._compile": {"calls": 12, "inclusive_s": 2.486533641999813}, "StandardsEngine._compiled_snapshot": {"calls": 6, "inclusive_s": 4.910634095000432}, "StandardsEngine._proposal_projection": {"calls": 6, "inclusive_s": 7.069517160999794}, "tools.standards_engine.standards_engine.tools._contracts": {"calls": 1, "inclusive_s": 0.2751899790000607}, "AuthoringModule.read_revision": {"calls": 10, "inclusive_s": 0.1470433019999291}, "StandardsEngine._validate_projected_inputs": {"calls": 5, "inclusive_s": 0.002242288999923403}, "StandardsEngine._evaluate": {"calls": 5, "inclusive_s": 1.7746168450000823}, "StandardsEngine.analyze_proposal": {"calls": 2, "inclusive_s": 3.9080568340000355}, "StandardsEngine.resolve": {"calls": 1, "inclusive_s": 1.6129863590001605}}, "setup_s": 9.809998573473422e-07, "body_s": 12.2561633050002, "teardown_s": 8.50349999836908e-05} +{"event": "start", "test": "test_analysis.AnalysisWorkflowTest.test_proposal_analysis_uses_one_projection_and_one_verified_base", "at": 1790198049.6768274} +{"event": "end", "test": "test_analysis.AnalysisWorkflowTest.test_proposal_analysis_uses_one_projection_and_one_verified_base", "wall_s": 4.42507883799999, "cpu_s": 4.172281686000005, "status": "pass", "spans": {"SnapshotModule._content_id": {"calls": 4, "inclusive_s": 2.4841598099999374}, "SnapshotModule.load_content": {"calls": 4, "inclusive_s": 2.53305484800012}, "StandardsEngine._compile": {"calls": 4, "inclusive_s": 0.765174725000179}, "StandardsEngine._compiled_snapshot": {"calls": 2, "inclusive_s": 1.659257271999877}, "StandardsEngine._proposal_projection": {"calls": 2, "inclusive_s": 2.225335399999949}, "AuthoringModule.read_revision": {"calls": 2, "inclusive_s": 0.03009242599978279}, "StandardsEngine._validate_projected_inputs": {"calls": 1, "inclusive_s": 0.0003681119999328075}, "StandardsEngine._evaluate": {"calls": 1, "inclusive_s": 0.032195079000075566}, "StandardsEngine.analyze_proposal": {"calls": 1, "inclusive_s": 1.610942514000044}}, "setup_s": 1.6319997939717723e-06, "body_s": 4.424993113000028, "teardown_s": 2.072999905067263e-06} +{"event": "start", "test": "test_analysis.AnalysisWorkflowTest.test_relationship_only_proposals_enter_a1c_and_replay_cold", "at": 1790198054.1020453} +{"event": "end", "test": "test_analysis.AnalysisWorkflowTest.test_relationship_only_proposals_enter_a1c_and_replay_cold", "wall_s": 21.634839305000014, "cpu_s": 20.006502029000018, "status": "pass", "spans": {"SnapshotModule._content_id": {"calls": 15, "inclusive_s": 9.258677892999913}, "SnapshotModule.load_content": {"calls": 15, "inclusive_s": 9.435751716999448}, "StandardsEngine._compile": {"calls": 24, "inclusive_s": 5.133842091000133}, "StandardsEngine._compiled_snapshot": {"calls": 11, "inclusive_s": 9.387924970999848}, "StandardsEngine._proposal_projection": {"calls": 10, "inclusive_s": 11.69594159899998}, "AuthoringModule.read_revision": {"calls": 14, "inclusive_s": 0.20871330700060753}, "StandardsEngine._validate_projected_inputs": {"calls": 7, "inclusive_s": 0.0033541039999818167}, "StandardsEngine._evaluate": {"calls": 7, "inclusive_s": 7.169506429000194}, "StandardsEngine.analyze_proposal": {"calls": 3, "inclusive_s": 5.659403343999884}}, "setup_s": 1.2919999790028669e-06, "body_s": 21.634739038000134, "teardown_s": 2.072999905067263e-06} +{"event": "start", "test": "test_analysis.AnalysisWorkflowTest.test_resolved_parent_work_is_not_applicable_to_child", "at": 1790198075.7369995} +{"event": "end", "test": "test_analysis.AnalysisWorkflowTest.test_resolved_parent_work_is_not_applicable_to_child", "wall_s": 2.4726617460000853, "cpu_s": 2.4707099320000054, "status": "pass", "spans": {"SnapshotModule._content_id": {"calls": 3, "inclusive_s": 1.7828917109998201}, "SnapshotModule.load_content": {"calls": 3, "inclusive_s": 1.8172528299999158}, "StandardsEngine._compile": {"calls": 3, "inclusive_s": 0.546574352000107}, "StandardsEngine._compiled_snapshot": {"calls": 3, "inclusive_s": 2.371093254999778}, "StandardsEngine._evaluate": {"calls": 4, "inclusive_s": 0.061021317999802704}, "StandardsEngine.prepare": {"calls": 1, "inclusive_s": 0.840299904999938}, "StandardsEngine.resolve": {"calls": 2, "inclusive_s": 1.6291780660001223}}, "setup_s": 1.6629999208817026e-06, "body_s": 2.472563451000042, "teardown_s": 1.6320000213454477e-06} +{"event": "start", "test": "test_analysis.AnalysisWorkflowTest.test_review_composition_publishes_readiness_for_complete_analysis", "at": 1790198078.2098098} +{"event": "observation", "test": "test_analysis.AnalysisWorkflowTest.test_review_composition_publishes_readiness_for_complete_analysis", "elapsed_s": 14.620338654999841, "stack": [" File \"/mnt/data/pse-performance-work/Coding-Standards/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/measurement-tools/run_timed_suite.py\", line 58, in \n result=unittest.TextTestRunner(verbosity=1,resultclass=Result).run(suite)\n", " File \"/usr/lib/python3.13/unittest/runner.py\", line 240, in run\n test(result)\n", " File \"/usr/lib/python3.13/unittest/suite.py\", line 84, in __call__\n return self.run(*args, **kwds)\n", " File \"/usr/lib/python3.13/unittest/suite.py\", line 122, in run\n test(result)\n", " File \"/usr/lib/python3.13/unittest/case.py\", line 707, in __call__\n return self.run(*args, **kwds)\n", " File \"/usr/lib/python3.13/unittest/case.py\", line 651, in run\n self._callTestMethod(testMethod)\n", " File \"/mnt/data/pse-performance-work/Coding-Standards/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/measurement-tools/run_timed_suite.py\", line 36, in timed\n try:return _fn(self,*args,**kwargs)\n", " File \"/usr/lib/python3.13/unittest/case.py\", line 606, in _callTestMethod\n if method() is not None:\n", " File \"/mnt/data/pse-performance-work/candidate-tests/tools/standards_engine/tests/test_analysis.py\", line 1425, in test_review_composition_publishes_readiness_for_complete_analysis\n verification_failed = facade.apply_proposal(\n", " File \"/mnt/data/pse-performance-work/candidate-tests/tools/standards_engine/standards_engine/tools.py\", line 250, in apply_proposal\n return self._result(\"apply_proposal\", self._engine.apply_proposal(call))\n", " File \"/mnt/data/pse-performance-work/Coding-Standards/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/measurement-tools/run_timed_suite.py\", line 25, in observe\n try:return original(*args,**kwargs)\n", " File \"/mnt/data/pse-performance-work/candidate-tests/tools/standards_engine/standards_engine/context_projection.py\", line 62, in invoke\n return function(engine, call)\n", " File \"/mnt/data/pse-performance-work/candidate-tests/tools/standards_engine/standards_engine/engine.py\", line 1243, in apply_proposal\n projection = self._proposal_projection(revision)\n", " File \"/mnt/data/pse-performance-work/Coding-Standards/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/measurement-tools/run_timed_suite.py\", line 25, in observe\n try:return original(*args,**kwargs)\n", " File \"/mnt/data/pse-performance-work/candidate-tests/tools/standards_engine/standards_engine/engine.py\", line 1710, in _proposal_projection\n return self._logical_authoring.compile(\n", " File \"/mnt/data/pse-performance-work/candidate-tests/tools/standards_engine/standards_engine/logical_authoring.py\", line 1000, in compile\n compiled = self._compile_authorities(source)\n", " File \"/mnt/data/pse-performance-work/Coding-Standards/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/measurement-tools/run_timed_suite.py\", line 25, in observe\n try:return original(*args,**kwargs)\n", " File \"/mnt/data/pse-performance-work/candidate-tests/tools/standards_engine/standards_engine/engine.py\", line 1740, in _compile\n corpus, impact, load_coverage_horizon(source, corpus, impact)\n", " File \"/mnt/data/pse-performance-work/candidate-tests/tools/standards_analysis/standards_analysis/coverage.py\", line 548, in load_coverage_horizon\n return _load_coverage_horizon(source, corpus, compiled, path)\n", " File \"/mnt/data/pse-performance-work/candidate-tests/tools/standards_analysis/standards_analysis/coverage.py\", line 475, in _load_coverage_horizon\n dependency = suite_inputs.dependency(suite.id)\n", " File \"/mnt/data/pse-performance-work/candidate-tests/tools/standards_metadata/standards_metadata/suite_inputs.py\", line 255, in dependency\n fingerprint = _identity_digest(\n", " File \"/mnt/data/pse-performance-work/candidate-tests/tools/standards_metadata/standards_metadata/suite_inputs.py\", line 100, in _identity_digest\n return file_digest(encode_identity_value(value))\n", " File \"/mnt/data/pse-performance-work/candidate-tests/tools/standards_metadata/standards_metadata/suite_inputs.py\", line 23, in file_digest\n return \"sha256:\" + hashlib.sha256(content).hexdigest()\n"]} +{"event": "end", "test": "test_analysis.AnalysisWorkflowTest.test_review_composition_publishes_readiness_for_complete_analysis", "wall_s": 24.669981077999864, "cpu_s": 23.280348348000018, "status": "pass", "spans": {"SnapshotModule._content_id": {"calls": 20, "inclusive_s": 12.18301825699973}, "SnapshotModule.load_content": {"calls": 20, "inclusive_s": 12.41307341400011}, "StandardsEngine._compile": {"calls": 23, "inclusive_s": 4.538681814000256}, "StandardsEngine._compiled_snapshot": {"calls": 12, "inclusive_s": 10.068850101999942}, "StandardsEngine._proposal_projection": {"calls": 11, "inclusive_s": 13.564436278999665}, "tools.standards_engine.standards_engine.tools._contracts": {"calls": 1, "inclusive_s": 0.2797182689998863}, "AuthoringModule.read_revision": {"calls": 98, "inclusive_s": 1.3985673100000895}, "StandardsEngine._validate_projected_inputs": {"calls": 5, "inclusive_s": 0.0021802789999583183}, "StandardsEngine._evaluate": {"calls": 5, "inclusive_s": 3.4145102220002173}, "StandardsEngine.analyze_proposal": {"calls": 1, "inclusive_s": 1.595809055000018}, "StandardsEngine.review_proposal": {"calls": 5, "inclusive_s": 3.46093331100019}, "StandardsEngine.resolve": {"calls": 1, "inclusive_s": 1.668784319999986}, "StandardsEngine.apply_proposal": {"calls": 9, "inclusive_s": 11.851477489999752}}, "setup_s": 1.1409999842726393e-06, "body_s": 24.66989262700008, "teardown_s": 1.9219999103370355e-06} +{"event": "start", "test": "test_analysis.AnalysisWorkflowTest.test_same_snapshot_material_is_loaded_once_per_decision_operation", "at": 1790198102.8798914} +{"event": "end", "test": "test_analysis.AnalysisWorkflowTest.test_same_snapshot_material_is_loaded_once_per_decision_operation", "wall_s": 2.6850981219999994, "cpu_s": 2.684912809999986, "status": "pass", "spans": {"SnapshotModule._content_id": {"calls": 3, "inclusive_s": 1.768189854999946}, "SnapshotModule.load_content": {"calls": 3, "inclusive_s": 1.8013466089998929}, "StandardsEngine._compile": {"calls": 3, "inclusive_s": 0.7348554929997135}, "StandardsEngine._compiled_snapshot": {"calls": 3, "inclusive_s": 2.543438613000035}, "StandardsEngine._evaluate": {"calls": 5, "inclusive_s": 0.08377903500013417}, "StandardsEngine.prepare": {"calls": 1, "inclusive_s": 0.8216107320001811}, "StandardsEngine.resolve": {"calls": 2, "inclusive_s": 1.859945216999904}}, "setup_s": 1.3219998891145224e-06, "body_s": 2.6850041740001416, "teardown_s": 1.6230001165240537e-06} +{"event": "start", "test": "test_analysis.AnalysisWorkflowTest.test_snapshot_creation_rejects_changed_replay_path_closure", "at": 1790198105.5650795} +{"event": "end", "test": "test_analysis.AnalysisWorkflowTest.test_snapshot_creation_rejects_changed_replay_path_closure", "wall_s": 0.012781743999994433, "cpu_s": 0.0069195469999954184, "status": "pass", "spans": {}, "setup_s": 1.1109998467873083e-06, "body_s": 0.012716918000023725, "teardown_s": 1.562000079502468e-06} +{"event": "start", "test": "test_analysis.AnalysisWorkflowTest.test_state_and_children_are_inspectable_in_a_fresh_process", "at": 1790198105.5779207} +{"event": "end", "test": "test_analysis.AnalysisWorkflowTest.test_state_and_children_are_inspectable_in_a_fresh_process", "wall_s": 3.5037326449999, "cpu_s": 1.6510760139999832, "status": "pass", "spans": {"SnapshotModule._content_id": {"calls": 2, "inclusive_s": 1.1811221840000599}, "SnapshotModule.load_content": {"calls": 2, "inclusive_s": 1.2041862630001106}, "StandardsEngine._compile": {"calls": 2, "inclusive_s": 0.35659972100029336}, "StandardsEngine._compiled_snapshot": {"calls": 2, "inclusive_s": 1.5655779460003032}, "StandardsEngine._evaluate": {"calls": 3, "inclusive_s": 0.047661593000157154}, "StandardsEngine.prepare": {"calls": 1, "inclusive_s": 0.8202529539998977}, "StandardsEngine.resolve": {"calls": 1, "inclusive_s": 0.8281990049999877}}, "setup_s": 1.0710000424296595e-06, "body_s": 3.5036395480001374, "teardown_s": 2.64400000560272e-06} +{"event": "start", "test": "test_applicability_contract.ApplicabilityContractTest.test_former_applicability_implementations_are_not_fallbacks", "at": 1790198109.0830996} +{"event": "end", "test": "test_applicability_contract.ApplicabilityContractTest.test_former_applicability_implementations_are_not_fallbacks", "wall_s": 0.00030302900017886714, "cpu_s": 0.00030269999999177344, "status": "pass", "spans": {}, "setup_s": 1.252000174645218e-06, "body_s": 0.0002191940000102477, "teardown_s": 7.710000318184029e-07} +{"event": "start", "test": "test_applicability_contract.ApplicabilityContractTest.test_runtime_domains_cover_the_public_serialized_applicability_shapes", "at": 1790198109.0834315} +{"event": "end", "test": "test_applicability_contract.ApplicabilityContractTest.test_runtime_domains_cover_the_public_serialized_applicability_shapes", "wall_s": 0.0014179289998992317, "cpu_s": 0.0014130399999885412, "status": "pass", "spans": {}, "setup_s": 4.209998678561533e-07, "body_s": 0.0013795419999951264, "teardown_s": 6.509999366244301e-07} +{"event": "start", "test": "test_authoring.AuthoringTests.test_application_intent_is_current_head_guarded_and_records_applied", "at": 1790198109.0848927} +{"event": "end", "test": "test_authoring.AuthoringTests.test_application_intent_is_current_head_guarded_and_records_applied", "wall_s": 0.037209057000154644, "cpu_s": 0.037189320000010184, "status": "pass", "spans": {"SnapshotModule._content_id": {"calls": 2, "inclusive_s": 0.0001260770000044431}, "SnapshotModule.load_content": {"calls": 1, "inclusive_s": 0.00016802899995127518}, "AuthoringModule.read_revision": {"calls": 16, "inclusive_s": 0.006594732999928965}}, "setup_s": 9.610000688553555e-07, "body_s": 0.0371379819998765, "teardown_s": 2.1830001060152426e-06} +{"event": "start", "test": "test_authoring.AuthoringTests.test_create_and_find_are_durable_through_the_public_facade", "at": 1790198109.1221788} +{"event": "end", "test": "test_authoring.AuthoringTests.test_create_and_find_are_durable_through_the_public_facade", "wall_s": 2.378662125999881, "cpu_s": 0.26601395800000205, "status": "pass", "spans": {"SnapshotModule._content_id": {"calls": 2, "inclusive_s": 0.00011875599989252805}, "tools.standards_engine.standards_engine.tools._contracts": {"calls": 1, "inclusive_s": 0.2545471410001028}, "SnapshotModule.load_content": {"calls": 1, "inclusive_s": 0.0003860920000988699}}, "setup_s": 1.5129999155760743e-06, "body_s": 2.378575066999929, "teardown_s": 3.05499997921288e-06} +{"event": "start", "test": "test_authoring.AuthoringTests.test_create_rejects_duplicate_facets_and_validator_failure_is_atomic", "at": 1790198111.5009313} +{"event": "end", "test": "test_authoring.AuthoringTests.test_create_rejects_duplicate_facets_and_validator_failure_is_atomic", "wall_s": 0.0032442629999422934, "cpu_s": 0.0032448629999919376, "status": "pass", "spans": {"SnapshotModule._content_id": {"calls": 2, "inclusive_s": 0.0001280799999676674}, "SnapshotModule.load_content": {"calls": 1, "inclusive_s": 0.00014780900005462172}}, "setup_s": 1.2319999314058805e-06, "body_s": 0.0031826219999402383, "teardown_s": 8.710001111467136e-07} +{"event": "start", "test": "test_authoring.AuthoringTests.test_create_translates_invalid_change_set_unicode_to_a_typed_rejection", "at": 1790198111.5042205} +{"event": "end", "test": "test_authoring.AuthoringTests.test_create_translates_invalid_change_set_unicode_to_a_typed_rejection", "wall_s": 0.2933159379999779, "cpu_s": 0.29328307400001563, "status": "pass", "spans": {"SnapshotModule._content_id": {"calls": 1, "inclusive_s": 4.7320000021500164e-05}, "tools.standards_engine.standards_engine.tools._contracts": {"calls": 1, "inclusive_s": 0.28662831600013305}}, "setup_s": 4.910000370728085e-07, "body_s": 0.2932349370000793, "teardown_s": 2.0730001324409386e-06} +{"event": "start", "test": "test_authoring.AuthoringTests.test_discovery_rejects_a_revision_without_content_bound_authority", "at": 1790198111.7976177} +{"event": "end", "test": "test_authoring.AuthoringTests.test_discovery_rejects_a_revision_without_content_bound_authority", "wall_s": 0.0035239979999914794, "cpu_s": 0.0035246189999895705, "status": "pass", "spans": {"SnapshotModule._content_id": {"calls": 1, "inclusive_s": 0.00015033200020297954}}, "setup_s": 9.919999683916103e-07, "body_s": 0.0034713590000592376, "teardown_s": 9.409998256160179e-07} +{"event": "start", "test": "test_authoring.AuthoringTests.test_discovery_rejects_the_old_revision_contract_as_unsupported", "at": 1790198111.8011847} +{"event": "end", "test": "test_authoring.AuthoringTests.test_discovery_rejects_the_old_revision_contract_as_unsupported", "wall_s": 0.285431373999927, "cpu_s": 0.28539660300000946, "status": "pass", "spans": {"SnapshotModule._content_id": {"calls": 1, "inclusive_s": 4.945299997416441e-05}, "tools.standards_engine.standards_engine.tools._contracts": {"calls": 1, "inclusive_s": 0.2779727219999586}}, "setup_s": 5.309998414304573e-07, "body_s": 0.2853527470001609, "teardown_s": 2.113000164172263e-06} +{"event": "start", "test": "test_authoring.AuthoringTests.test_proposal_discovery_uses_opaque_keyset_continuations", "at": 1790198112.0866995} +{"event": "end", "test": "test_authoring.AuthoringTests.test_proposal_discovery_uses_opaque_keyset_continuations", "wall_s": 0.008022848000109661, "cpu_s": 0.008024564999999484, "status": "pass", "spans": {"SnapshotModule._content_id": {"calls": 3, "inclusive_s": 0.0001761320002060529}, "SnapshotModule.load_content": {"calls": 2, "inclusive_s": 0.0002943060001143749}}, "setup_s": 1.320999899689923e-06, "body_s": 0.007739237999885518, "teardown_s": 1.311999994868529e-06} +{"event": "start", "test": "test_authoring.AuthoringTests.test_proposals_follow_snapshot_quarantine_and_purge_lifecycle", "at": 1790198112.0947855} +{"event": "end", "test": "test_authoring.AuthoringTests.test_proposals_follow_snapshot_quarantine_and_purge_lifecycle", "wall_s": 0.005388748000086707, "cpu_s": 0.005390190000014172, "status": "pass", "spans": {"SnapshotModule._content_id": {"calls": 4, "inclusive_s": 0.00016500299966537568}, "SnapshotModule.load_content": {"calls": 2, "inclusive_s": 0.0002469460000611434}}, "setup_s": 1.3020001006225357e-06, "body_s": 0.0053319029998419865, "teardown_s": 1.092000047719921e-06} +{"event": "start", "test": "test_authoring.AuthoringTests.test_readiness_is_content_bound_durable_and_current_head_guarded", "at": 1790198112.1002283} +{"event": "end", "test": "test_authoring.AuthoringTests.test_readiness_is_content_bound_durable_and_current_head_guarded", "wall_s": 0.022556464999979653, "cpu_s": 0.022551164999981665, "status": "pass", "spans": {"SnapshotModule._content_id": {"calls": 2, "inclusive_s": 8.194100018954487e-05}, "SnapshotModule.load_content": {"calls": 1, "inclusive_s": 0.00012914100011585106}, "AuthoringModule.read_revision": {"calls": 8, "inclusive_s": 0.0038475850001304934}}, "setup_s": 9.020000106829684e-07, "body_s": 0.02249418299993522, "teardown_s": 1.8130001535610063e-06} +{"event": "start", "test": "test_authoring.AuthoringTests.test_readiness_rejects_incomplete_decisions_without_persistence", "at": 1790198112.1228478} +{"event": "end", "test": "test_authoring.AuthoringTests.test_readiness_rejects_incomplete_decisions_without_persistence", "wall_s": 0.0037537670000347134, "cpu_s": 0.003755020999989256, "status": "pass", "spans": {"SnapshotModule._content_id": {"calls": 2, "inclusive_s": 9.020399988912686e-05}, "SnapshotModule.load_content": {"calls": 1, "inclusive_s": 0.00013558000000557513}}, "setup_s": 8.81000005392707e-07, "body_s": 0.0037003080001341004, "teardown_s": 1.2820000847568735e-06} +{"event": "start", "test": "test_authoring.AuthoringTests.test_readiness_rejects_invalid_proposal_commit_material", "at": 1790198112.1266541} +{"event": "end", "test": "test_authoring.AuthoringTests.test_readiness_rejects_invalid_proposal_commit_material", "wall_s": 0.003876059000049281, "cpu_s": 0.003876950999995188, "status": "pass", "spans": {"SnapshotModule._content_id": {"calls": 2, "inclusive_s": 8.821000005809765e-05}, "SnapshotModule.load_content": {"calls": 1, "inclusive_s": 0.00016976100005194894}, "AuthoringModule.read_revision": {"calls": 1, "inclusive_s": 0.0004727190000721748}}, "setup_s": 7.40999894333072e-07, "body_s": 0.0038303399999222165, "teardown_s": 1.0609999208099907e-06} +{"event": "start", "test": "test_authoring.AuthoringTests.test_revise_is_durable_and_stale_writes_leave_no_partial_record", "at": 1790198112.1305766} +{"event": "end", "test": "test_authoring.AuthoringTests.test_revise_is_durable_and_stale_writes_leave_no_partial_record", "wall_s": 0.6170374470000297, "cpu_s": 0.6170195100000058, "status": "pass", "spans": {"SnapshotModule._content_id": {"calls": 2, "inclusive_s": 0.00011322800014568202}, "tools.standards_engine.standards_engine.tools._contracts": {"calls": 2, "inclusive_s": 0.593020948000003}, "SnapshotModule.load_content": {"calls": 1, "inclusive_s": 0.00037755599987576716}, "AuthoringModule.read_revision": {"calls": 5, "inclusive_s": 0.002805874999921798}}, "setup_s": 6.210000265127746e-07, "body_s": 0.6169687159999739, "teardown_s": 1.8230000478069996e-06} +{"event": "start", "test": "test_authoring.AuthoringTests.test_stale_readiness_cannot_publish_application_intent", "at": 1790198112.7476916} +{"event": "end", "test": "test_authoring.AuthoringTests.test_stale_readiness_cannot_publish_application_intent", "wall_s": 0.010567605999995067, "cpu_s": 0.010569106999980704, "status": "pass", "spans": {"SnapshotModule._content_id": {"calls": 2, "inclusive_s": 0.00021991399967191683}, "SnapshotModule.load_content": {"calls": 1, "inclusive_s": 0.0003483039999991888}, "AuthoringModule.read_revision": {"calls": 4, "inclusive_s": 0.0021795109998947737}}, "setup_s": 1.171999883808894e-06, "body_s": 0.010496270999965418, "teardown_s": 1.8929999896499794e-06} +{"event": "start", "test": "test_coverage_publication.EngineAuditPublicationTest.test_review_verify_apply_recover_and_read_without_original_database", "at": 1790198112.7583447} +{"event": "observation", "test": "test_coverage_publication.EngineAuditPublicationTest.test_review_verify_apply_recover_and_read_without_original_database", "elapsed_s": 25.076091427000165, "stack": [" File \"/mnt/data/pse-performance-work/Coding-Standards/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/measurement-tools/run_timed_suite.py\", line 58, in \n result=unittest.TextTestRunner(verbosity=1,resultclass=Result).run(suite)\n", " File \"/usr/lib/python3.13/unittest/runner.py\", line 240, in run\n test(result)\n", " File \"/usr/lib/python3.13/unittest/suite.py\", line 84, in __call__\n return self.run(*args, **kwds)\n", " File \"/usr/lib/python3.13/unittest/suite.py\", line 122, in run\n test(result)\n", " File \"/usr/lib/python3.13/unittest/case.py\", line 707, in __call__\n return self.run(*args, **kwds)\n", " File \"/usr/lib/python3.13/unittest/case.py\", line 651, in run\n self._callTestMethod(testMethod)\n", " File \"/mnt/data/pse-performance-work/Coding-Standards/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/measurement-tools/run_timed_suite.py\", line 36, in timed\n try:return _fn(self,*args,**kwargs)\n", " File \"/usr/lib/python3.13/unittest/case.py\", line 606, in _callTestMethod\n if method() is not None:\n", " File \"/mnt/data/pse-performance-work/candidate-tests/tools/standards_engine/tests/test_coverage_publication.py\", line 34, in test_review_verify_apply_recover_and_read_without_original_database\n initial = facade.verify_repository(\n", " File \"/mnt/data/pse-performance-work/candidate-tests/tools/standards_engine/standards_engine/tools.py\", line 224, in verify_repository\n return self._result(\"verify_repository\", self._engine.verify_repository(call))\n", " File \"/mnt/data/pse-performance-work/candidate-tests/tools/standards_engine/standards_engine/context_projection.py\", line 62, in invoke\n return function(engine, call)\n", " File \"/mnt/data/pse-performance-work/candidate-tests/tools/standards_engine/standards_engine/engine.py\", line 708, in verify_repository\n self._application_verifier(self._repository.root)\n", " File \"/mnt/data/pse-performance-work/candidate-tests/tools/standards_verifier/standards_verifier/cli.py\", line 76, in run_complete_verification\n results = tuple(Verifier(repo_root, registry).run(None))\n", " File \"/mnt/data/pse-performance-work/candidate-tests/tools/standards_verifier/standards_verifier/engine.py\", line 66, in run\n result = self._run_suite(catalog.suite(suite_id), catalog)\n", " File \"/mnt/data/pse-performance-work/candidate-tests/tools/standards_verifier/standards_verifier/engine.py\", line 100, in _run_suite\n diagnostics.extend(check.run(context))\n", " File \"/mnt/data/pse-performance-work/candidate-tests/tools/standards_verifier/standards_verifier/checks/python_package_contract.py\", line 70, in run\n for finding in execute_python_package_contract(context.repo_root)\n", " File \"/mnt/data/pse-performance-work/candidate-tests/tools/standards_verifier/standards_verifier/python_packages.py\", line 1312, in execute_python_package_contract\n completed = _execute_entrypoint(\n", " File \"/mnt/data/pse-performance-work/candidate-tests/tools/standards_verifier/standards_verifier/python_packages.py\", line 1403, in _execute_entrypoint\n return subprocess.run(\n", " File \"/usr/lib/python3.13/subprocess.py\", line 556, in run\n stdout, stderr = process.communicate(input, timeout=timeout)\n", " File \"/usr/lib/python3.13/subprocess.py\", line 1222, in communicate\n stdout, stderr = self._communicate(input, endtime, timeout)\n", " File \"/usr/lib/python3.13/subprocess.py\", line 2128, in _communicate\n ready = selector.select(timeout)\n", " File \"/usr/lib/python3.13/selectors.py\", line 398, in select\n fd_event_list = self._selector.poll(timeout)\n"]} +{"event": "end", "test": "test_coverage_publication.EngineAuditPublicationTest.test_review_verify_apply_recover_and_read_without_original_database", "wall_s": 29.544787694999968, "cpu_s": 2.924864298999978, "status": "failure", "spans": {"tools.standards_engine.standards_engine.tools._contracts": {"calls": 1, "inclusive_s": 0.2848387310000362}}, "setup_s": 1.202000021294225e-06, "body_s": 29.544183975000124, "teardown_s": 1.8330001694266684e-06} +{"event": "start", "test": "test_evidence_maintenance.EvidenceMaintenanceInterfaceTest.test_preview_and_overlap_preserve_working_tree_then_apply_retires", "at": 1790198142.3032317} +{"event": "observation", "test": "test_evidence_maintenance.EvidenceMaintenanceInterfaceTest.test_preview_and_overlap_preserve_working_tree_then_apply_retires", "elapsed_s": 40.53385940699991, "stack": [" File \"/mnt/data/pse-performance-work/Coding-Standards/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/measurement-tools/run_timed_suite.py\", line 58, in \n result=unittest.TextTestRunner(verbosity=1,resultclass=Result).run(suite)\n", " File \"/usr/lib/python3.13/unittest/runner.py\", line 240, in run\n test(result)\n", " File \"/usr/lib/python3.13/unittest/suite.py\", line 84, in __call__\n return self.run(*args, **kwds)\n", " File \"/usr/lib/python3.13/unittest/suite.py\", line 122, in run\n test(result)\n", " File \"/usr/lib/python3.13/unittest/case.py\", line 707, in __call__\n return self.run(*args, **kwds)\n", " File \"/usr/lib/python3.13/unittest/case.py\", line 651, in run\n self._callTestMethod(testMethod)\n", " File \"/mnt/data/pse-performance-work/Coding-Standards/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/measurement-tools/run_timed_suite.py\", line 36, in timed\n try:return _fn(self,*args,**kwargs)\n", " File \"/usr/lib/python3.13/unittest/case.py\", line 606, in _callTestMethod\n if method() is not None:\n", " File \"/mnt/data/pse-performance-work/candidate-tests/tools/standards_engine/tests/test_evidence_maintenance.py\", line 318, in test_preview_and_overlap_preserve_working_tree_then_apply_retires\n preview = facade.maintain_evidence(request)\n", " File \"/mnt/data/pse-performance-work/candidate-tests/tools/standards_engine/standards_engine/tools.py\", line 216, in maintain_evidence\n return self._result(\"maintain_evidence\", self._engine.maintain_evidence(call))\n", " File \"/mnt/data/pse-performance-work/candidate-tests/tools/standards_engine/standards_engine/context_projection.py\", line 62, in invoke\n return function(engine, call)\n", " File \"/mnt/data/pse-performance-work/candidate-tests/tools/standards_engine/standards_engine/engine.py\", line 625, in maintain_evidence\n self._application_verifier(candidate.root)\n", " File \"/mnt/data/pse-performance-work/candidate-tests/tools/standards_verifier/standards_verifier/cli.py\", line 76, in run_complete_verification\n results = tuple(Verifier(repo_root, registry).run(None))\n", " File \"/mnt/data/pse-performance-work/candidate-tests/tools/standards_verifier/standards_verifier/engine.py\", line 66, in run\n result = self._run_suite(catalog.suite(suite_id), catalog)\n", " File \"/mnt/data/pse-performance-work/candidate-tests/tools/standards_verifier/standards_verifier/engine.py\", line 100, in _run_suite\n diagnostics.extend(check.run(context))\n", " File \"/mnt/data/pse-performance-work/candidate-tests/tools/standards_verifier/standards_verifier/checks/python_package_contract.py\", line 70, in run\n for finding in execute_python_package_contract(context.repo_root)\n", " File \"/mnt/data/pse-performance-work/candidate-tests/tools/standards_verifier/standards_verifier/python_packages.py\", line 1312, in execute_python_package_contract\n completed = _execute_entrypoint(\n", " File \"/mnt/data/pse-performance-work/candidate-tests/tools/standards_verifier/standards_verifier/python_packages.py\", line 1403, in _execute_entrypoint\n return subprocess.run(\n", " File \"/usr/lib/python3.13/subprocess.py\", line 556, in run\n stdout, stderr = process.communicate(input, timeout=timeout)\n", " File \"/usr/lib/python3.13/subprocess.py\", line 1222, in communicate\n stdout, stderr = self._communicate(input, endtime, timeout)\n", " File \"/usr/lib/python3.13/subprocess.py\", line 2128, in _communicate\n ready = selector.select(timeout)\n", " File \"/usr/lib/python3.13/selectors.py\", line 398, in select\n fd_event_list = self._selector.poll(timeout)\n"]} +{"event": "observation", "test": "test_evidence_maintenance.EvidenceMaintenanceInterfaceTest.test_preview_and_overlap_preserve_working_tree_then_apply_retires", "elapsed_s": 85.54559682800004, "stack": [" File \"/mnt/data/pse-performance-work/Coding-Standards/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/measurement-tools/run_timed_suite.py\", line 58, in \n result=unittest.TextTestRunner(verbosity=1,resultclass=Result).run(suite)\n", " File \"/usr/lib/python3.13/unittest/runner.py\", line 240, in run\n test(result)\n", " File \"/usr/lib/python3.13/unittest/suite.py\", line 84, in __call__\n return self.run(*args, **kwds)\n", " File \"/usr/lib/python3.13/unittest/suite.py\", line 122, in run\n test(result)\n", " File \"/usr/lib/python3.13/unittest/case.py\", line 707, in __call__\n return self.run(*args, **kwds)\n", " File \"/usr/lib/python3.13/unittest/case.py\", line 651, in run\n self._callTestMethod(testMethod)\n", " File \"/mnt/data/pse-performance-work/Coding-Standards/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/measurement-tools/run_timed_suite.py\", line 36, in timed\n try:return _fn(self,*args,**kwargs)\n", " File \"/usr/lib/python3.13/unittest/case.py\", line 606, in _callTestMethod\n if method() is not None:\n", " File \"/mnt/data/pse-performance-work/candidate-tests/tools/standards_engine/tests/test_evidence_maintenance.py\", line 328, in test_preview_and_overlap_preserve_working_tree_then_apply_retires\n report = original_verifier(repository)\n", " File \"/mnt/data/pse-performance-work/candidate-tests/tools/standards_verifier/standards_verifier/cli.py\", line 76, in run_complete_verification\n results = tuple(Verifier(repo_root, registry).run(None))\n", " File \"/mnt/data/pse-performance-work/candidate-tests/tools/standards_verifier/standards_verifier/engine.py\", line 66, in run\n result = self._run_suite(catalog.suite(suite_id), catalog)\n", " File \"/mnt/data/pse-performance-work/candidate-tests/tools/standards_verifier/standards_verifier/engine.py\", line 100, in _run_suite\n diagnostics.extend(check.run(context))\n", " File \"/mnt/data/pse-performance-work/candidate-tests/tools/standards_verifier/standards_verifier/checks/python_package_contract.py\", line 70, in run\n for finding in execute_python_package_contract(context.repo_root)\n", " File \"/mnt/data/pse-performance-work/candidate-tests/tools/standards_verifier/standards_verifier/python_packages.py\", line 1294, in execute_python_package_contract\n completed = subprocess.run(\n", " File \"/usr/lib/python3.13/subprocess.py\", line 556, in run\n stdout, stderr = process.communicate(input, timeout=timeout)\n", " File \"/usr/lib/python3.13/subprocess.py\", line 1222, in communicate\n stdout, stderr = self._communicate(input, endtime, timeout)\n", " File \"/usr/lib/python3.13/subprocess.py\", line 2128, in _communicate\n ready = selector.select(timeout)\n", " File \"/usr/lib/python3.13/selectors.py\", line 398, in select\n fd_event_list = self._selector.poll(timeout)\n"]} +{"event": "end", "test": "test_evidence_maintenance.EvidenceMaintenanceInterfaceTest.test_preview_and_overlap_preserve_working_tree_then_apply_retires", "wall_s": 107.767203505, "cpu_s": 16.006484976999985, "status": "pass", "spans": {"tools.standards_engine.standards_engine.tools._contracts": {"calls": 1, "inclusive_s": 0.28664997900000344}, "StandardsEngine._compile": {"calls": 9, "inclusive_s": 2.023676056000113}}, "setup_s": 1.2709999737126054e-06, "body_s": 107.76708060300007, "teardown_s": 3.3549999898241367e-06} +{"event": "start", "test": "test_evidence_maintenance.EvidenceMaintenanceTest.test_consumer_registration_enters_existing_policy_owner", "at": 1790198250.0706973} +{"event": "end", "test": "test_evidence_maintenance.EvidenceMaintenanceTest.test_consumer_registration_enters_existing_policy_owner", "wall_s": 0.0006521709999560699, "cpu_s": 0.0006524899999931222, "status": "pass", "spans": {}, "setup_s": 1.24100006360095e-06, "body_s": 0.0006002140000873624, "teardown_s": 7.910000476840651e-07} +{"event": "start", "test": "test_evidence_maintenance.EvidenceMaintenanceTest.test_pruning_preserves_current_claims_and_removes_stale_receipts", "at": 1790198250.0713983} +{"event": "end", "test": "test_evidence_maintenance.EvidenceMaintenanceTest.test_pruning_preserves_current_claims_and_removes_stale_receipts", "wall_s": 0.0005143769999449432, "cpu_s": 0.0005148059999839916, "status": "pass", "spans": {}, "setup_s": 4.510000053414842e-07, "body_s": 0.0004713539999556815, "teardown_s": 6.30999920758768e-07} +{"event": "start", "test": "test_evidence_maintenance.EvidenceMaintenanceTest.test_registered_checker_retirement_removes_its_graph_edges", "at": 1790198250.0719426} +{"event": "end", "test": "test_evidence_maintenance.EvidenceMaintenanceTest.test_registered_checker_retirement_removes_its_graph_edges", "wall_s": 0.0005909899998641777, "cpu_s": 0.0005913489999898047, "status": "pass", "spans": {}, "setup_s": 4.309999894758221e-07, "body_s": 0.0005593639998551225, "teardown_s": 5.709998731617816e-07} +{"event": "start", "test": "test_evidence_maintenance.EvidenceMaintenanceTest.test_retirement_preserves_real_dependencies_and_normative_consumers", "at": 1790198250.0725584} +{"event": "end", "test": "test_evidence_maintenance.EvidenceMaintenanceTest.test_retirement_preserves_real_dependencies_and_normative_consumers", "wall_s": 0.00042121000001316133, "cpu_s": 0.000421476000013854, "status": "pass", "spans": {}, "setup_s": 3.610000476328423e-07, "body_s": 0.0003939099999570317, "teardown_s": 4.4100011109549087e-07} +{"event": "start", "test": "test_evidence_maintenance.EvidenceMaintenanceTest.test_subject_unregistration_preserves_guidance_and_retained_units", "at": 1790198250.0730076} +{"event": "end", "test": "test_evidence_maintenance.EvidenceMaintenanceTest.test_subject_unregistration_preserves_guidance_and_retained_units", "wall_s": 0.0004505639999479172, "cpu_s": 0.0004508000000100765, "status": "pass", "spans": {}, "setup_s": 3.209997885278426e-07, "body_s": 0.00042224200001328427, "teardown_s": 4.209998678561533e-07} +{"event": "start", "test": "test_evidence_maintenance.EvidenceMaintenanceTest.test_unknown_retirement_does_not_mutate_authority", "at": 1790198250.0734818} +{"event": "end", "test": "test_evidence_maintenance.EvidenceMaintenanceTest.test_unknown_retirement_does_not_mutate_authority", "wall_s": 0.0001516439999704744, "cpu_s": 0.0001517460000002302, "status": "pass", "spans": {}, "setup_s": 3.8999996831989847e-07, "body_s": 0.00012660699985644897, "teardown_s": 3.300001480965875e-07} +{"event": "start", "test": "test_generated_contract.GeneratedContractTest.test_agent_tools_are_the_exact_compiler_projection", "at": 1790198250.073666} +{"event": "end", "test": "test_generated_contract.GeneratedContractTest.test_agent_tools_are_the_exact_compiler_projection", "wall_s": 0.2728950210000676, "cpu_s": 0.2728947150000067, "status": "pass", "spans": {}, "setup_s": 6.200000370881753e-07, "body_s": 0.27281529300012153, "teardown_s": 2.233999794043484e-06} +{"event": "start", "test": "test_generated_contract.GeneratedContractTest.test_authored_examples_satisfy_the_public_contract", "at": 1790198250.3466315} +{"event": "end", "test": "test_generated_contract.GeneratedContractTest.test_authored_examples_satisfy_the_public_contract", "wall_s": 0.2573290369998631, "cpu_s": 0.2573346990000118, "status": "pass", "spans": {}, "setup_s": 1.3019998732488602e-06, "body_s": 0.25725359600005504, "teardown_s": 1.4119998468231643e-06} +{"event": "start", "test": "test_generated_contract.GeneratedContractTest.test_compiler_owns_the_complete_public_definition_closure", "at": 1790198250.6040356} +{"event": "end", "test": "test_generated_contract.GeneratedContractTest.test_compiler_owns_the_complete_public_definition_closure", "wall_s": 0.5303712130000804, "cpu_s": 0.5303633719999823, "status": "pass", "spans": {}, "setup_s": 8.709998837730382e-07, "body_s": 0.5302756529999897, "teardown_s": 1.8130001535610063e-06} +{"event": "start", "test": "test_generated_contract.GeneratedContractTest.test_coverage_read_is_scoped_optional_and_uses_repository_authority", "at": 1790198251.1344786} +{"event": "end", "test": "test_generated_contract.GeneratedContractTest.test_coverage_read_is_scoped_optional_and_uses_repository_authority", "wall_s": 3.5617112630000065, "cpu_s": 2.805645204000001, "status": "pass", "spans": {"tools.standards_engine.standards_engine.tools._contracts": {"calls": 1, "inclusive_s": 0.25539220499990734}, "StandardsEngine._compile": {"calls": 3, "inclusive_s": 1.9671565700000428}, "SnapshotModule._content_id": {"calls": 2, "inclusive_s": 1.2594250380000176}, "SnapshotModule.load_content": {"calls": 1, "inclusive_s": 0.6449478890001501}, "StandardsEngine._compiled_snapshot": {"calls": 1, "inclusive_s": 0.8337359489999017}}, "setup_s": 6.509999366244301e-07, "body_s": 3.5616261369998483, "teardown_s": 1.9329997940076282e-06} +{"event": "start", "test": "test_generated_contract.GeneratedContractTest.test_generated_contract_projections_are_current", "at": 1790198254.6962829} +{"event": "end", "test": "test_generated_contract.GeneratedContractTest.test_generated_contract_projections_are_current", "wall_s": 1.7192598419999285, "cpu_s": 0.0007477120000203286, "status": "pass", "spans": {}, "setup_s": 1.0409999049443286e-06, "body_s": 1.7191649020001023, "teardown_s": 2.2540000372828217e-06} +{"event": "start", "test": "test_generated_contract.GeneratedContractTest.test_generated_native_models_decode_complete_v20_values", "at": 1790198256.4156394} +{"event": "end", "test": "test_generated_contract.GeneratedContractTest.test_generated_native_models_decode_complete_v20_values", "wall_s": 0.000813258000107453, "cpu_s": 0.0008136589999878652, "status": "pass", "spans": {}, "setup_s": 1.1610000001383014e-06, "body_s": 0.0007683119999910559, "teardown_s": 5.809999947814504e-07} +{"event": "start", "test": "test_generated_contract.GeneratedContractTest.test_identity_fixtures_use_valid_public_handle_versions", "at": 1790198256.4164855} +{"event": "end", "test": "test_generated_contract.GeneratedContractTest.test_identity_fixtures_use_valid_public_handle_versions", "wall_s": 0.26847314399992683, "cpu_s": 0.26778505999999425, "status": "pass", "spans": {}, "setup_s": 3.2100001590151805e-07, "body_s": 0.2684065359999295, "teardown_s": 1.6229998891503783e-06} +{"event": "start", "test": "test_generated_contract.GeneratedContractTest.test_interface_operations_bind_generated_calls_results_and_facade", "at": 1790198256.6850421} +{"event": "end", "test": "test_generated_contract.GeneratedContractTest.test_interface_operations_bind_generated_calls_results_and_facade", "wall_s": 0.26638536000018576, "cpu_s": 0.2646182629999885, "status": "pass", "spans": {}, "setup_s": 9.410000529896934e-07, "body_s": 0.26628113599986136, "teardown_s": 1.2820000847568735e-06} +{"event": "start", "test": "test_generated_contract.GeneratedContractTest.test_local_evidence_rejects_missing_files_and_wrong_digests", "at": 1790198256.9515066} +{"event": "end", "test": "test_generated_contract.GeneratedContractTest.test_local_evidence_rejects_missing_files_and_wrong_digests", "wall_s": 0.0004440840000370372, "cpu_s": 0.0004442999999980657, "status": "pass", "spans": {}, "setup_s": 7.310000000870787e-07, "body_s": 0.00040516700005355233, "teardown_s": 5.609999789157882e-07} +{"event": "start", "test": "test_generated_contract.GeneratedContractTest.test_local_facade_binds_always_allow_authorization", "at": 1790198256.9519787} +{"event": "end", "test": "test_generated_contract.GeneratedContractTest.test_local_facade_binds_always_allow_authorization", "wall_s": 0.2696082560000832, "cpu_s": 0.2692251610000085, "status": "pass", "spans": {"tools.standards_engine.standards_engine.tools._contracts": {"calls": 1, "inclusive_s": 0.2656141039999511}}, "setup_s": 3.100001322309254e-07, "body_s": 0.2695331360000637, "teardown_s": 1.6820001746964408e-06} +{"event": "start", "test": "test_generated_contract.GeneratedContractTest.test_missing_verification_input_returns_a_typed_rejection", "at": 1790198257.2216704} +{"event": "end", "test": "test_generated_contract.GeneratedContractTest.test_missing_verification_input_returns_a_typed_rejection", "wall_s": 0.26429220699992584, "cpu_s": 0.2635926300000051, "status": "pass", "spans": {"tools.standards_engine.standards_engine.tools._contracts": {"calls": 1, "inclusive_s": 0.2579022669999631}}, "setup_s": 9.320001481682993e-07, "body_s": 0.2642139810000117, "teardown_s": 2.103000042552594e-06} +{"event": "start", "test": "test_generated_contract.GeneratedContractTest.test_prepare_facade_passes_the_complete_generated_call", "at": 1790198257.4860399} +{"event": "end", "test": "test_generated_contract.GeneratedContractTest.test_prepare_facade_passes_the_complete_generated_call", "wall_s": 0.28884328799995274, "cpu_s": 0.28811875399998144, "status": "pass", "spans": {}, "setup_s": 9.810000847210176e-07, "body_s": 0.28875778300016464, "teardown_s": 1.7419999949197518e-06} +{"event": "start", "test": "test_generated_contract.GeneratedContractTest.test_review_call_requires_exactly_three_decisions", "at": 1790198257.7749598} +{"event": "end", "test": "test_generated_contract.GeneratedContractTest.test_review_call_requires_exactly_three_decisions", "wall_s": 0.0007507660000101168, "cpu_s": 0.0007511969999995927, "status": "pass", "spans": {}, "setup_s": 7.819999154889956e-07, "body_s": 0.0007091739998941193, "teardown_s": 5.609999789157882e-07} +{"event": "start", "test": "test_generated_contract.GeneratedContractTest.test_router_read_exposes_editable_definitions_only_when_requested", "at": 1790198257.7757514} +{"event": "end", "test": "test_generated_contract.GeneratedContractTest.test_router_read_exposes_editable_definitions_only_when_requested", "wall_s": 8.889241313999946, "cpu_s": 7.894049039000009, "status": "pass", "spans": {"tools.standards_engine.standards_engine.tools._contracts": {"calls": 2, "inclusive_s": 0.5780996070000128}, "StandardsEngine._compile": {"calls": 8, "inclusive_s": 3.092409018000126}, "SnapshotModule._content_id": {"calls": 6, "inclusive_s": 3.5866786330000195}, "SnapshotModule.load_content": {"calls": 5, "inclusive_s": 3.0450398420002784}, "StandardsEngine._compiled_snapshot": {"calls": 4, "inclusive_s": 3.2054694339999514}, "StandardsEngine._proposal_projection": {"calls": 2, "inclusive_s": 3.081979584000237}, "AuthoringModule.read_revision": {"calls": 1, "inclusive_s": 0.015578805000131979}, "StandardsEngine.query_proposal": {"calls": 1, "inclusive_s": 1.7167167069999323}}, "setup_s": 3.0999990485724993e-07, "body_s": 8.88834854899983, "teardown_s": 2.282999957969878e-06} +{"event": "start", "test": "test_generated_contract.GeneratedContractTest.test_verification_is_exposed_without_publication_and_refresh_is_explicit", "at": 1790198266.6651664} +{"event": "end", "test": "test_generated_contract.GeneratedContractTest.test_verification_is_exposed_without_publication_and_refresh_is_explicit", "wall_s": 0.2786341060000268, "cpu_s": 0.27707879000001867, "status": "pass", "spans": {"tools.standards_engine.standards_engine.tools._contracts": {"calls": 1, "inclusive_s": 0.2713732719998916}}, "setup_s": 1.1619999895629007e-06, "body_s": 0.2785490009998739, "teardown_s": 1.672000053076772e-06} +{"event": "start", "test": "test_logical_authoring.LogicalAuthoringTests.test_change_set_is_immutable_and_normalized_before_compilation", "at": 1790198267.4304912} +{"event": "end", "test": "test_logical_authoring.LogicalAuthoringTests.test_change_set_is_immutable_and_normalized_before_compilation", "wall_s": 0.0003581680000479537, "cpu_s": 0.0003571210000075098, "status": "pass", "spans": {}, "setup_s": 1.4319998626888264e-06, "body_s": 0.00025419399980819435, "teardown_s": 1.0710000424296595e-06} +{"event": "start", "test": "test_logical_authoring.LogicalAuthoringTests.test_compiler_projects_module_relationships_through_current_owners", "at": 1790198267.430877} +{"event": "end", "test": "test_logical_authoring.LogicalAuthoringTests.test_compiler_projects_module_relationships_through_current_owners", "wall_s": 0.9131950850000976, "cpu_s": 0.786505673999983, "status": "pass", "spans": {"StandardsEngine._compile": {"calls": 2, "inclusive_s": 0.380051063999872}}, "setup_s": 3.4000004234258085e-07, "body_s": 0.9131085179999445, "teardown_s": 1.8020000425167382e-06} +{"event": "start", "test": "test_logical_authoring.LogicalAuthoringTests.test_compiler_revises_one_registered_policy_and_derives_analysis_input", "at": 1790198268.3441448} +{"event": "end", "test": "test_logical_authoring.LogicalAuthoringTests.test_compiler_revises_one_registered_policy_and_derives_analysis_input", "wall_s": 0.8735137060000397, "cpu_s": 0.751121272000006, "status": "pass", "spans": {"StandardsEngine._compile": {"calls": 2, "inclusive_s": 0.38238149699986934}}, "setup_s": 1.0320000001229346e-06, "body_s": 0.873418724999965, "teardown_s": 2.643000016178121e-06} +{"event": "start", "test": "test_logical_authoring.LogicalAuthoringTests.test_create_nested_standard_and_route_atomically", "at": 1790198269.217732} +{"event": "end", "test": "test_logical_authoring.LogicalAuthoringTests.test_create_nested_standard_and_route_atomically", "wall_s": 1.4324417949999315, "cpu_s": 1.214476096999988, "status": "pass", "spans": {"StandardsEngine._compile": {"calls": 2, "inclusive_s": 0.561106896000183}}, "setup_s": 9.919999683916103e-07, "body_s": 1.4323481169999468, "teardown_s": 2.7139999474457e-06} +{"event": "start", "test": "test_logical_authoring.LogicalAuthoringTests.test_create_standard_hides_all_required_repository_projections", "at": 1790198270.650267} +{"event": "end", "test": "test_logical_authoring.LogicalAuthoringTests.test_create_standard_hides_all_required_repository_projections", "wall_s": 1.9631332840001505, "cpu_s": 1.6073735489999876, "status": "pass", "spans": {"StandardsEngine._compile": {"calls": 3, "inclusive_s": 0.5765840940000544}}, "setup_s": 1.0819999261002522e-06, "body_s": 1.963011804999951, "teardown_s": 2.353999889237457e-06} +{"event": "start", "test": "test_logical_authoring.LogicalAuthoringTests.test_created_standard_can_be_retired_with_complete_explicit_closure", "at": 1790198272.6134777} +{"event": "observation", "test": "test_logical_authoring.LogicalAuthoringTests.test_created_standard_can_be_retired_with_complete_explicit_closure", "elapsed_s": 0.23737957200000892, "stack": [" File \"/mnt/data/pse-performance-work/Coding-Standards/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/measurement-tools/run_timed_suite.py\", line 58, in \n result=unittest.TextTestRunner(verbosity=1,resultclass=Result).run(suite)\n", " File \"/usr/lib/python3.13/unittest/runner.py\", line 240, in run\n test(result)\n", " File \"/usr/lib/python3.13/unittest/suite.py\", line 84, in __call__\n return self.run(*args, **kwds)\n", " File \"/usr/lib/python3.13/unittest/suite.py\", line 122, in run\n test(result)\n", " File \"/usr/lib/python3.13/unittest/case.py\", line 707, in __call__\n return self.run(*args, **kwds)\n", " File \"/usr/lib/python3.13/unittest/case.py\", line 651, in run\n self._callTestMethod(testMethod)\n", " File \"/mnt/data/pse-performance-work/Coding-Standards/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/measurement-tools/run_timed_suite.py\", line 36, in timed\n try:return _fn(self,*args,**kwargs)\n", " File \"/usr/lib/python3.13/unittest/case.py\", line 606, in _callTestMethod\n if method() is not None:\n", " File \"/mnt/data/pse-performance-work/candidate-tests/tools/standards_engine/tests/test_logical_authoring.py\", line 748, in test_created_standard_can_be_retired_with_complete_explicit_closure\n projection = LogicalAuthoringCompiler(StandardsEngine._compile).compile(\n", " File \"/mnt/data/pse-performance-work/candidate-tests/tools/standards_engine/standards_engine/logical_authoring.py\", line 978, in compile\n self._apply_edit(\n", " File \"/mnt/data/pse-performance-work/candidate-tests/tools/standards_engine/standards_engine/logical_authoring.py\", line 1071, in _apply_edit\n self._put_policy_relationship(\n", " File \"/mnt/data/pse-performance-work/candidate-tests/tools/standards_engine/standards_engine/logical_authoring.py\", line 1362, in _put_policy_relationship\n compiled = compile_current(files)\n", " File \"/mnt/data/pse-performance-work/candidate-tests/tools/standards_engine/standards_engine/logical_authoring.py\", line 939, in compile_current\n _refresh_suite_input_projection(\n", " File \"/mnt/data/pse-performance-work/candidate-tests/tools/standards_engine/standards_engine/logical_authoring.py\", line 2446, in _refresh_suite_input_projection\n destination.parent.mkdir(parents=True, exist_ok=True)\n", " File \"/usr/lib/python3.13/pathlib/_local.py\", line 724, in mkdir\n os.mkdir(self, mode)\n"]} +{"event": "end", "test": "test_logical_authoring.LogicalAuthoringTests.test_created_standard_can_be_retired_with_complete_explicit_closure", "wall_s": 4.121309773999883, "cpu_s": 3.3466461099999947, "status": "pass", "spans": {"StandardsEngine._compile": {"calls": 5, "inclusive_s": 1.1986062980001861}}, "setup_s": 1.1819997780548874e-06, "body_s": 4.1212117790000775, "teardown_s": 2.7139999474457e-06} +{"event": "start", "test": "test_logical_authoring.LogicalAuthoringTests.test_duplicate_route_target_rejected", "at": 1790198276.734885} +{"event": "end", "test": "test_logical_authoring.LogicalAuthoringTests.test_duplicate_route_target_rejected", "wall_s": 0.2060134470000321, "cpu_s": 0.20446340399999485, "status": "pass", "spans": {"StandardsEngine._compile": {"calls": 1, "inclusive_s": 0.1907306409998455}}, "setup_s": 1.1119998362119077e-06, "body_s": 0.2059193289999257, "teardown_s": 2.223999899797491e-06} +{"event": "start", "test": "test_logical_authoring.LogicalAuthoringTests.test_fact_presentation_and_value_order_preserve_semantic_revision", "at": 1790198276.940997} +{"event": "end", "test": "test_logical_authoring.LogicalAuthoringTests.test_fact_presentation_and_value_order_preserve_semantic_revision", "wall_s": 0.8692442120000123, "cpu_s": 0.7448578750000081, "status": "pass", "spans": {"StandardsEngine._compile": {"calls": 2, "inclusive_s": 0.3822406509998473}}, "setup_s": 1.3720000424655154e-06, "body_s": 0.8691454770000746, "teardown_s": 2.1129999367985874e-06} +{"event": "start", "test": "test_logical_authoring.LogicalAuthoringTests.test_fact_revision_and_referenced_removal_are_validated", "at": 1790198277.8103135} +{"event": "end", "test": "test_logical_authoring.LogicalAuthoringTests.test_fact_revision_and_referenced_removal_are_validated", "wall_s": 1.7725244869998278, "cpu_s": 1.5272113900000193, "status": "pass", "spans": {"StandardsEngine._compile": {"calls": 5, "inclusive_s": 0.7905977519999396}}, "setup_s": 8.109998361760518e-07, "body_s": 1.7724325720000706, "teardown_s": 2.2640001589024905e-06} +{"event": "start", "test": "test_logical_authoring.LogicalAuthoringTests.test_move_preserves_identity_and_relocates_relationship_authority", "at": 1790198279.5829074} +{"event": "end", "test": "test_logical_authoring.LogicalAuthoringTests.test_move_preserves_identity_and_relocates_relationship_authority", "wall_s": 1.4331184969998958, "cpu_s": 1.186482448999982, "status": "pass", "spans": {"StandardsEngine._compile": {"calls": 3, "inclusive_s": 0.5545012620002581}}, "setup_s": 6.910001957294298e-07, "body_s": 1.4330166170000211, "teardown_s": 2.223000137746567e-06} +{"event": "start", "test": "test_logical_authoring.LogicalAuthoringTests.test_new_fact_and_rule_compile_together_and_unused_fact_can_be_removed", "at": 1790198281.0160975} +{"event": "end", "test": "test_logical_authoring.LogicalAuthoringTests.test_new_fact_and_rule_compile_together_and_unused_fact_can_be_removed", "wall_s": 2.0248914670000886, "cpu_s": 1.7635386579999874, "status": "pass", "spans": {"StandardsEngine._compile": {"calls": 4, "inclusive_s": 0.8964221280000402}}, "setup_s": 9.6099984148168e-07, "body_s": 2.024721607000174, "teardown_s": 3.053999989788281e-06} +{"event": "start", "test": "test_logical_authoring.LogicalAuthoringTests.test_noop_and_cyclic_relationship_changes_are_typed", "at": 1790198283.0411594} +{"event": "end", "test": "test_logical_authoring.LogicalAuthoringTests.test_noop_and_cyclic_relationship_changes_are_typed", "wall_s": 0.7691954590000023, "cpu_s": 0.6452785700000163, "status": "pass", "spans": {"StandardsEngine._compile": {"calls": 2, "inclusive_s": 0.3988438460000907}}, "setup_s": 1.1509998785186326e-06, "body_s": 0.7691055669999969, "teardown_s": 2.1329999526642496e-06} +{"event": "start", "test": "test_logical_authoring.LogicalAuthoringTests.test_null_applicability_is_unsupported_by_toml_authority", "at": 1790198283.8104792} +{"event": "end", "test": "test_logical_authoring.LogicalAuthoringTests.test_null_applicability_is_unsupported_by_toml_authority", "wall_s": 0.00012941099998897698, "cpu_s": 0.00012936200002400255, "status": "pass", "spans": {}, "setup_s": 1.2719999631372048e-06, "body_s": 9.110399992096063e-05, "teardown_s": 4.209998678561533e-07} +{"event": "start", "test": "test_logical_authoring.LogicalAuthoringTests.test_opaque_consumer_handle_is_snapshot_bound", "at": 1790198283.8106306} +{"event": "end", "test": "test_logical_authoring.LogicalAuthoringTests.test_opaque_consumer_handle_is_snapshot_bound", "wall_s": 0.9197795380000571, "cpu_s": 0.7960967699999912, "status": "pass", "spans": {"StandardsEngine._compile": {"calls": 2, "inclusive_s": 0.39844098000003214}}, "setup_s": 3.60000058208243e-07, "body_s": 0.9196805919998496, "teardown_s": 2.0429999949556077e-06} +{"event": "start", "test": "test_logical_authoring.LogicalAuthoringTests.test_policy_relationship_put_and_remove_replay_cumulatively", "at": 1790198284.730487} +{"event": "end", "test": "test_logical_authoring.LogicalAuthoringTests.test_policy_relationship_put_and_remove_replay_cumulatively", "wall_s": 4.39874384399991, "cpu_s": 3.591967691999997, "status": "pass", "spans": {"StandardsEngine._compile": {"calls": 7, "inclusive_s": 1.5688439969997034}}, "setup_s": 1.3320000107341912e-06, "body_s": 4.3986046899999565, "teardown_s": 2.9650000215042382e-06} +{"event": "start", "test": "test_logical_authoring.LogicalAuthoringTests.test_retired_standard_successor_must_survive_the_final_program", "at": 1790198289.129315} +{"event": "end", "test": "test_logical_authoring.LogicalAuthoringTests.test_retired_standard_successor_must_survive_the_final_program", "wall_s": 3.4574913049998486, "cpu_s": 2.8323055529999976, "status": "pass", "spans": {"StandardsEngine._compile": {"calls": 5, "inclusive_s": 1.011166785999876}}, "setup_s": 1.0720000318542589e-06, "body_s": 3.457384518000026, "teardown_s": 2.384000026722788e-06} +{"event": "start", "test": "test_logical_authoring.LogicalAuthoringTests.test_retirement_requires_and_applies_complete_relationship_dispositions", "at": 1790198292.5869124} +{"event": "end", "test": "test_logical_authoring.LogicalAuthoringTests.test_retirement_requires_and_applies_complete_relationship_dispositions", "wall_s": 2.5303860960000293, "cpu_s": 2.1620006389999844, "status": "pass", "spans": {"StandardsEngine._compile": {"calls": 5, "inclusive_s": 1.135657024999773}}, "setup_s": 9.709999631013488e-07, "body_s": 2.5302285440000105, "teardown_s": 2.4640000901854364e-06} +{"event": "start", "test": "test_logical_authoring.LogicalAuthoringTests.test_route_targets_can_be_swapped_in_one_atomic_change", "at": 1790198295.117402} +{"event": "end", "test": "test_logical_authoring.LogicalAuthoringTests.test_route_targets_can_be_swapped_in_one_atomic_change", "wall_s": 0.9206845290000274, "cpu_s": 0.7989258919999997, "status": "pass", "spans": {"StandardsEngine._compile": {"calls": 2, "inclusive_s": 0.38807145700002366}}, "setup_s": 1.2010000318696257e-06, "body_s": 0.9205772210000305, "teardown_s": 2.3329998839471955e-06} +{"event": "start", "test": "test_logical_authoring.LogicalAuthoringTests.test_rule_update_and_removal_keep_readable_and_executable_routes_in_sync", "at": 1790198296.0381618} +{"event": "end", "test": "test_logical_authoring.LogicalAuthoringTests.test_rule_update_and_removal_keep_readable_and_executable_routes_in_sync", "wall_s": 1.8309306200001174, "cpu_s": 1.583350022000019, "status": "pass", "spans": {"StandardsEngine._compile": {"calls": 4, "inclusive_s": 0.7598092700002326}}, "setup_s": 1.0219998785032658e-06, "body_s": 1.8308211679998294, "teardown_s": 2.764000100796693e-06} +{"event": "start", "test": "test_logical_authoring.LogicalAuthoringTests.test_supporting_records_and_withdrawal_use_the_final_candidate", "at": 1790198297.8691728} +{"event": "end", "test": "test_logical_authoring.LogicalAuthoringTests.test_supporting_records_and_withdrawal_use_the_final_candidate", "wall_s": 4.355350497000018, "cpu_s": 3.562666113000006, "status": "pass", "spans": {"StandardsEngine._compile": {"calls": 7, "inclusive_s": 1.5359542729997884}}, "setup_s": 1.401999952577171e-06, "body_s": 4.355244680999931, "teardown_s": 2.623999989737058e-06} +{"event": "start", "test": "test_logical_authoring.LogicalAuthoringTests.test_unknown_route_fact_is_rejected_without_changing_base", "at": 1790198302.2246027} +{"event": "end", "test": "test_logical_authoring.LogicalAuthoringTests.test_unknown_route_fact_is_rejected_without_changing_base", "wall_s": 0.7853784080000423, "cpu_s": 0.6571561570000028, "status": "pass", "spans": {"StandardsEngine._compile": {"calls": 2, "inclusive_s": 0.23992602099997384}}, "setup_s": 1.2219998097862117e-06, "body_s": 0.7852603639998961, "teardown_s": 2.012000095419353e-06} +{"event": "start", "test": "test_logical_authoring.LogicalAuthoringTests.test_verified_compiled_base_is_reused_but_candidate_compiles", "at": 1790198303.0100524} +{"event": "end", "test": "test_logical_authoring.LogicalAuthoringTests.test_verified_compiled_base_is_reused_but_candidate_compiles", "wall_s": 1.5961022310000317, "cpu_s": 1.3491143829999999, "status": "pass", "spans": {"StandardsEngine._compile": {"calls": 3, "inclusive_s": 0.5734211240001059}}, "setup_s": 9.220000265486306e-07, "body_s": 1.595972730000085, "teardown_s": 2.2629999421042157e-06} +{"event": "start", "test": "test_logical_authoring.LogicalAuthoringTests.test_whole_module_rescope_preserves_identity_and_explicit_meaning", "at": 1790198304.6062357} +{"event": "end", "test": "test_logical_authoring.LogicalAuthoringTests.test_whole_module_rescope_preserves_identity_and_explicit_meaning", "wall_s": 1.0868945980000717, "cpu_s": 0.9604015539999864, "status": "pass", "spans": {"StandardsEngine._compile": {"calls": 3, "inclusive_s": 0.5864569989998927}}, "setup_s": 7.809999260643963e-07, "body_s": 1.0867929180001283, "teardown_s": 2.7140001748193754e-06} +{"event": "start", "test": "test_logical_authoring.LogicalAuthoringTests.test_whole_standard_revision_requires_companion_policy_semantics", "at": 1790198305.6932125} +{"event": "end", "test": "test_logical_authoring.LogicalAuthoringTests.test_whole_standard_revision_requires_companion_policy_semantics", "wall_s": 1.8562809770000968, "cpu_s": 1.6107017749999955, "status": "pass", "spans": {"StandardsEngine._compile": {"calls": 4, "inclusive_s": 0.7575700769998548}}, "setup_s": 1.0320000001229346e-06, "body_s": 1.8561832420000428, "teardown_s": 2.5540000478940783e-06} +{"event": "start", "test": "test_mcp.MCPTest.test_application_failure_diagnostic_omits_private_exception", "at": 1790198307.5495837} +{"event": "end", "test": "test_mcp.MCPTest.test_application_failure_diagnostic_omits_private_exception", "wall_s": 0.0020127640000282554, "cpu_s": 0.0020138829999893915, "status": "pass", "spans": {}, "setup_s": 1.4319998626888264e-06, "body_s": 0.0019559909999316005, "teardown_s": 1.151000105892308e-06} +{"event": "start", "test": "test_mcp.MCPTest.test_authoring_description_carries_exact_contract_without_type_rendering", "at": 1790198307.5516357} +{"event": "end", "test": "test_mcp.MCPTest.test_authoring_description_carries_exact_contract_without_type_rendering", "wall_s": 0.13113863300009143, "cpu_s": 0.13114342400001533, "status": "pass", "spans": {}, "setup_s": 7.910000476840651e-07, "body_s": 0.13103826499991555, "teardown_s": 2.06300001082127e-06} +{"event": "start", "test": "test_mcp.MCPTest.test_authoring_inputs_expose_structure_and_preserve_recursive_validation", "at": 1790198307.6828601} +{"event": "end", "test": "test_mcp.MCPTest.test_authoring_inputs_expose_structure_and_preserve_recursive_validation", "wall_s": 0.017841503999989072, "cpu_s": 0.01781163199999014, "status": "pass", "spans": {}, "setup_s": 1.2419998256518738e-06, "body_s": 0.01776422900002217, "teardown_s": 1.9029998838959727e-06} +{"event": "start", "test": "test_mcp.MCPTest.test_catalog_schemas_validate_authored_examples_and_resolve_refs", "at": 1790198307.7007606} +{"event": "end", "test": "test_mcp.MCPTest.test_catalog_schemas_validate_authored_examples_and_resolve_refs", "wall_s": 1.7847841620000509, "cpu_s": 1.7847744110000008, "status": "pass", "spans": {}, "setup_s": 7.710000318184029e-07, "body_s": 1.784679438000012, "teardown_s": 1.8519999684940558e-06} +{"event": "start", "test": "test_mcp.MCPTest.test_default_catalog_focuses_navigation_and_workflows", "at": 1790198309.4856317} +{"event": "end", "test": "test_mcp.MCPTest.test_default_catalog_focuses_navigation_and_workflows", "wall_s": 0.012622260999933133, "cpu_s": 0.01262389100000405, "status": "pass", "spans": {}, "setup_s": 1.1720001111825695e-06, "body_s": 0.012550213999929838, "teardown_s": 1.452000105928164e-06} +{"event": "start", "test": "test_mcp.MCPTest.test_default_guidance_uses_available_recovery_tools", "at": 1790198309.4983046} +{"event": "end", "test": "test_mcp.MCPTest.test_default_guidance_uses_available_recovery_tools", "wall_s": 0.00837898400004633, "cpu_s": 0.00838035399999626, "status": "pass", "spans": {}, "setup_s": 9.6099984148168e-07, "body_s": 0.008321348999970724, "teardown_s": 1.4820000160398195e-06} +{"event": "start", "test": "test_mcp.MCPTest.test_input_projection_preserves_reference_siblings", "at": 1790198309.5067627} +{"event": "end", "test": "test_mcp.MCPTest.test_input_projection_preserves_reference_siblings", "wall_s": 0.0002456419999816717, "cpu_s": 0.00024583500001540415, "status": "pass", "spans": {}, "setup_s": 7.720000212430023e-07, "body_s": 0.0002059640000879881, "teardown_s": 5.509998572961194e-07} +{"event": "start", "test": "test_mcp.MCPTest.test_internal_failure_is_tool_error_without_retry", "at": 1790198309.5070379} +{"event": "end", "test": "test_mcp.MCPTest.test_internal_failure_is_tool_error_without_retry", "wall_s": 0.020836793000171383, "cpu_s": 0.020839660000007143, "status": "pass", "spans": {}, "setup_s": 4.309999894758221e-07, "body_s": 0.020772768999904656, "teardown_s": 1.4020001799508464e-06} +{"event": "start", "test": "test_mcp.MCPTest.test_lifecycle_and_protocol_errors_never_open_engine", "at": 1790198309.5279324} +{"event": "end", "test": "test_mcp.MCPTest.test_lifecycle_and_protocol_errors_never_open_engine", "wall_s": 0.009848476999877676, "cpu_s": 0.009849778000017295, "status": "pass", "spans": {}, "setup_s": 7.40999894333072e-07, "body_s": 0.009785754999938945, "teardown_s": 1.3019998732488602e-06} +{"event": "start", "test": "test_mcp.MCPTest.test_module_stdio_launch_from_unrelated_working_directory", "at": 1790198309.5378332} +{"event": "end", "test": "test_mcp.MCPTest.test_module_stdio_launch_from_unrelated_working_directory", "wall_s": 1.973889214999872, "cpu_s": 0.0077935619999891514, "status": "pass", "spans": {}, "setup_s": 6.809998467360856e-07, "body_s": 1.9737875160001295, "teardown_s": 2.5839999580057338e-06} +{"event": "start", "test": "test_mcp.MCPTest.test_parse_errors_and_notifications_keep_stream_synchronized", "at": 1790198311.5118115} +{"event": "end", "test": "test_mcp.MCPTest.test_parse_errors_and_notifications_keep_stream_synchronized", "wall_s": 0.009688772999879802, "cpu_s": 0.009690661000007594, "status": "pass", "spans": {}, "setup_s": 1.2719999631372048e-06, "body_s": 0.009605129999954443, "teardown_s": 1.2719999631372048e-06} +{"event": "start", "test": "test_mcp.MCPTest.test_preserves_typed_outcomes_and_never_retries", "at": 1790198311.521562} +{"event": "end", "test": "test_mcp.MCPTest.test_preserves_typed_outcomes_and_never_retries", "wall_s": 0.01318392700000004, "cpu_s": 0.01318630700001222, "status": "pass", "spans": {}, "setup_s": 1.0010001005866798e-06, "body_s": 0.013096889000053125, "teardown_s": 1.8529999579186551e-06} +{"event": "start", "test": "test_mcp.MCPTest.test_real_snapshot_read_and_validation_through_server", "at": 1790198311.5348108} +{"event": "end", "test": "test_mcp.MCPTest.test_real_snapshot_read_and_validation_through_server", "wall_s": 3.7557615820001047, "cpu_s": 3.0198504119999825, "status": "pass", "spans": {"tools.standards_engine.standards_engine.tools._contracts": {"calls": 1, "inclusive_s": 0.2727647720000732}, "StandardsEngine._compile": {"calls": 3, "inclusive_s": 1.8876851039999565}, "SnapshotModule._content_id": {"calls": 2, "inclusive_s": 1.2104400989999249}, "SnapshotModule.load_content": {"calls": 1, "inclusive_s": 0.6154590819999157}, "StandardsEngine._compiled_snapshot": {"calls": 1, "inclusive_s": 0.8003699490000145}}, "setup_s": 1.1110000741609838e-06, "body_s": 3.755654313999912, "teardown_s": 2.142999846910243e-06} +{"event": "start", "test": "test_navigation.NavigationTest.test_development_proportionality_routes_directly_and_before_planning", "at": 1790198317.6449246} +{"event": "observation", "test": "test_navigation.NavigationTest.test_development_proportionality_routes_directly_and_before_planning", "elapsed_s": 0.21661008299997775, "stack": [" File \"/mnt/data/pse-performance-work/Coding-Standards/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/measurement-tools/run_timed_suite.py\", line 58, in \n result=unittest.TextTestRunner(verbosity=1,resultclass=Result).run(suite)\n", " File \"/usr/lib/python3.13/unittest/runner.py\", line 240, in run\n test(result)\n", " File \"/usr/lib/python3.13/unittest/suite.py\", line 84, in __call__\n return self.run(*args, **kwds)\n", " File \"/usr/lib/python3.13/unittest/suite.py\", line 122, in run\n test(result)\n", " File \"/usr/lib/python3.13/unittest/case.py\", line 707, in __call__\n return self.run(*args, **kwds)\n", " File \"/usr/lib/python3.13/unittest/case.py\", line 651, in run\n self._callTestMethod(testMethod)\n", " File \"/mnt/data/pse-performance-work/Coding-Standards/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/measurement-tools/run_timed_suite.py\", line 36, in timed\n try:return _fn(self,*args,**kwargs)\n", " File \"/usr/lib/python3.13/unittest/case.py\", line 606, in _callTestMethod\n if method() is not None:\n", " File \"/mnt/data/pse-performance-work/candidate-tests/tools/standards_engine/tests/test_navigation.py\", line 203, in test_development_proportionality_routes_directly_and_before_planning\n direct = self.engine.query(\n", " File \"/mnt/data/pse-performance-work/candidate-tests/tools/standards_engine/standards_engine/context_projection.py\", line 62, in invoke\n return function(engine, call)\n", " File \"/mnt/data/pse-performance-work/candidate-tests/tools/standards_engine/standards_engine/engine.py\", line 1011, in query\n compiled = self._compiled_snapshot(self._snapshot_id(call.snapshot))\n", " File \"/mnt/data/pse-performance-work/Coding-Standards/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/measurement-tools/run_timed_suite.py\", line 25, in observe\n try:return original(*args,**kwargs)\n", " File \"/mnt/data/pse-performance-work/candidate-tests/tools/standards_engine/standards_engine/engine.py\", line 1691, in _compiled_snapshot\n capture = self._snapshots.load_content(snapshot)\n", " File \"/mnt/data/pse-performance-work/Coding-Standards/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/measurement-tools/run_timed_suite.py\", line 25, in observe\n try:return original(*args,**kwargs)\n", " File \"/mnt/data/pse-performance-work/candidate-tests/tools/standards_snapshots/standards_snapshots/module.py\", line 112, in load_content\n if self._content_id(capture) != content_id:\n", " File \"/mnt/data/pse-performance-work/Coding-Standards/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/measurement-tools/run_timed_suite.py\", line 25, in observe\n try:return original(*args,**kwargs)\n", " File \"/mnt/data/pse-performance-work/candidate-tests/tools/standards_snapshots/standards_snapshots/module.py\", line 210, in _content_id\n return hash_identity(\n", " File \"/mnt/data/pse-performance-work/candidate-tests/tools/standards_identity/standards_identity/encoding.py\", line 103, in hash_identity\n encoded = encode_identity_value(value)\n", " File \"/mnt/data/pse-performance-work/candidate-tests/tools/standards_identity/standards_identity/encoding.py\", line 85, in encode_identity_value\n return _encode(value)\n", " File \"/mnt/data/pse-performance-work/candidate-tests/tools/standards_identity/standards_identity/encoding.py\", line 198, in _encode\n return b\"[\" + b\",\".join(_encode(item) for item in value.values) + b\"]\"\n", " File \"/mnt/data/pse-performance-work/candidate-tests/tools/standards_identity/standards_identity/encoding.py\", line 198, in \n return b\"[\" + b\",\".join(_encode(item) for item in value.values) + b\"]\"\n", " File \"/mnt/data/pse-performance-work/candidate-tests/tools/standards_identity/standards_identity/encoding.py\", line 204, in _encode\n return b\"{\" + b\",\".join(encoded_members) + b\"}\"\n", " File \"/mnt/data/pse-performance-work/candidate-tests/tools/standards_identity/standards_identity/encoding.py\", line 202, in \n for key, member_value in value.members\n", " File \"/mnt/data/pse-performance-work/candidate-tests/tools/standards_identity/standards_identity/encoding.py\", line 198, in _encode\n return b\"[\" + b\",\".join(_encode(item) for item in value.values) + b\"]\"\n"]} +{"event": "end", "test": "test_navigation.NavigationTest.test_development_proportionality_routes_directly_and_before_planning", "wall_s": 1.6367227620000904, "cpu_s": 1.637243073999997, "status": "pass", "spans": {"SnapshotModule._content_id": {"calls": 2, "inclusive_s": 1.1995718359999046}, "SnapshotModule.load_content": {"calls": 2, "inclusive_s": 1.2232750660002694}, "StandardsEngine._compile": {"calls": 2, "inclusive_s": 0.3829326489999403}, "StandardsEngine._compiled_snapshot": {"calls": 2, "inclusive_s": 1.611008385000332}}, "setup_s": 1.6429999050160404e-06, "body_s": 1.63654603100008, "teardown_s": 2.392999931544182e-06} +{"event": "start", "test": "test_navigation.NavigationTest.test_live_worktree_mutation_cannot_change_snapshot_reads", "at": 1790198319.2817333} +{"event": "end", "test": "test_navigation.NavigationTest.test_live_worktree_mutation_cannot_change_snapshot_reads", "wall_s": 0.16070887699993364, "cpu_s": 0.020727884999985235, "status": "error", "spans": {}, "setup_s": 1.24100006360095e-06, "body_s": 0.15988824999999451, "teardown_s": 2.4229998416558374e-06} +{"event": "start", "test": "test_navigation.NavigationTest.test_proposal_creation_returns_typed_failure_for_invalid_projected_content", "at": 1790198319.4425142} +{"event": "end", "test": "test_navigation.NavigationTest.test_proposal_creation_returns_typed_failure_for_invalid_projected_content", "wall_s": 2.4775117540000338, "cpu_s": 2.352073118999982, "status": "pass", "spans": {"SnapshotModule._content_id": {"calls": 3, "inclusive_s": 1.8032749779999904}, "SnapshotModule.load_content": {"calls": 3, "inclusive_s": 1.8380162310002106}, "StandardsEngine._compile": {"calls": 1, "inclusive_s": 0.20049809100009952}, "StandardsEngine._compiled_snapshot": {"calls": 1, "inclusive_s": 0.8152117700001327}, "StandardsEngine._proposal_projection": {"calls": 1, "inclusive_s": 1.2201478619999762}}, "setup_s": 1.0710000424296595e-06, "body_s": 2.4774254869998913, "teardown_s": 2.103000042552594e-06} +{"event": "start", "test": "test_navigation.NavigationTest.test_proposal_query_projects_every_request_from_an_exact_revision", "at": 1790198321.9201112} +{"event": "end", "test": "test_navigation.NavigationTest.test_proposal_query_projects_every_request_from_an_exact_revision", "wall_s": 13.958943899000133, "cpu_s": 12.847966106000001, "status": "pass", "spans": {"SnapshotModule._content_id": {"calls": 9, "inclusive_s": 5.617365738000444}, "SnapshotModule.load_content": {"calls": 9, "inclusive_s": 5.722013773999606}, "StandardsEngine._compile": {"calls": 15, "inclusive_s": 2.857344948000218}, "StandardsEngine._compiled_snapshot": {"calls": 8, "inclusive_s": 6.639269492000267}, "StandardsEngine._proposal_projection": {"calls": 7, "inclusive_s": 12.043683768999927}, "AuthoringModule.read_revision": {"calls": 6, "inclusive_s": 0.08658467900022515}, "StandardsEngine.query_proposal": {"calls": 5, "inclusive_s": 8.422481657999697}, "tools.standards_engine.standards_engine.tools._contracts": {"calls": 1, "inclusive_s": 0.26091382699996757}}, "setup_s": 1.0609999208099907e-06, "body_s": 13.958855858999868, "teardown_s": 1.8929999896499794e-06} +{"event": "start", "test": "test_navigation.NavigationTest.test_read_related_and_inspect_share_the_snapshot_root", "at": 1790198335.8791418} +{"event": "end", "test": "test_navigation.NavigationTest.test_read_related_and_inspect_share_the_snapshot_root", "wall_s": 3.2695243929999833, "cpu_s": 3.2618771679999554, "status": "pass", "spans": {"SnapshotModule._content_id": {"calls": 4, "inclusive_s": 2.42385297099986}, "SnapshotModule.load_content": {"calls": 4, "inclusive_s": 2.469846086999951}, "StandardsEngine._compile": {"calls": 4, "inclusive_s": 0.7698705650002466}, "StandardsEngine._compiled_snapshot": {"calls": 4, "inclusive_s": 3.2495464150003954}}, "setup_s": 1.252000174645218e-06, "body_s": 3.2693922789999306, "teardown_s": 1.9330000213813037e-06} +{"event": "start", "test": "test_navigation.NavigationTest.test_route_selects_direct_modules_and_required_closure", "at": 1790198339.148745} +{"event": "end", "test": "test_navigation.NavigationTest.test_route_selects_direct_modules_and_required_closure", "wall_s": 0.8237572030000138, "cpu_s": 0.8197377710000069, "status": "pass", "spans": {"SnapshotModule._content_id": {"calls": 1, "inclusive_s": 0.5947972649998974}, "SnapshotModule.load_content": {"calls": 1, "inclusive_s": 0.6060332560000461}, "StandardsEngine._compile": {"calls": 1, "inclusive_s": 0.19849762499984536}, "StandardsEngine._compiled_snapshot": {"calls": 1, "inclusive_s": 0.8070616350000819}}, "setup_s": 1.3020001006225357e-06, "body_s": 0.8236349329999939, "teardown_s": 2.3830000372981885e-06} +{"event": "start", "test": "test_navigation.NavigationTest.test_unknown_and_invalid_route_facts_have_typed_results", "at": 1790198339.9726384} +{"event": "end", "test": "test_navigation.NavigationTest.test_unknown_and_invalid_route_facts_have_typed_results", "wall_s": 1.6132154839999657, "cpu_s": 1.608316421999973, "status": "pass", "spans": {"SnapshotModule._content_id": {"calls": 2, "inclusive_s": 1.1969382800000403}, "SnapshotModule.load_content": {"calls": 2, "inclusive_s": 1.22353041700012}, "StandardsEngine._compile": {"calls": 2, "inclusive_s": 0.36716545700005554}, "StandardsEngine._compiled_snapshot": {"calls": 2, "inclusive_s": 1.5955915969998387}}, "setup_s": 1.5820000953681301e-06, "body_s": 1.6130693390000488, "teardown_s": 1.6319997939717723e-06} +{"event": "start", "test": "test_navigation_indexes.NavigationIndexAuthorityTest.test_absent_catalog_exposes_no_authoring_capability", "at": 1790198341.5872326} +{"event": "end", "test": "test_navigation_indexes.NavigationIndexAuthorityTest.test_absent_catalog_exposes_no_authoring_capability", "wall_s": 0.00010575600003903673, "cpu_s": 0.00010449500001641354, "status": "pass", "spans": {}, "setup_s": 1.3820001640851842e-06, "body_s": 4.472599994187476e-05, "teardown_s": 5.409999630501261e-07} +{"event": "start", "test": "test_navigation_indexes.NavigationIndexAuthorityTest.test_bad_catalog_and_non_utf8_content_are_typed_rejections", "at": 1790198341.5873885} +{"event": "end", "test": "test_navigation_indexes.NavigationIndexAuthorityTest.test_bad_catalog_and_non_utf8_content_are_typed_rejections", "wall_s": 0.000275795999868933, "cpu_s": 0.0002762700000289442, "status": "pass", "spans": {}, "setup_s": 5.510000846697949e-07, "body_s": 0.00021021999987169693, "teardown_s": 4.7100002120714635e-07} +{"event": "start", "test": "test_navigation_indexes.NavigationIndexAuthorityTest.test_declared_routes_bind_their_owner_content_and_exact_declarations", "at": 1790198341.5876627} +{"event": "end", "test": "test_navigation_indexes.NavigationIndexAuthorityTest.test_declared_routes_bind_their_owner_content_and_exact_declarations", "wall_s": 0.00043056499998783693, "cpu_s": 0.0004310099999997874, "status": "pass", "spans": {}, "setup_s": 4.809999154531397e-07, "body_s": 0.000401591000127155, "teardown_s": 4.7100002120714635e-07} +{"event": "start", "test": "test_navigation_indexes.NavigationIndexAuthorityTest.test_old_captured_index_without_route_inventory_remains_readable", "at": 1790198341.5881178} +{"event": "end", "test": "test_navigation_indexes.NavigationIndexAuthorityTest.test_old_captured_index_without_route_inventory_remains_readable", "wall_s": 0.00012019699988741195, "cpu_s": 0.00012035899999318644, "status": "pass", "spans": {}, "setup_s": 3.410000317671802e-07, "body_s": 9.64319999638974e-05, "teardown_s": 3.51000153386849e-07} +{"event": "start", "test": "test_navigation_indexes.NavigationIndexAuthorityTest.test_registration_cannot_make_a_normative_standard_writable", "at": 1790198341.5882566} +{"event": "end", "test": "test_navigation_indexes.NavigationIndexAuthorityTest.test_registration_cannot_make_a_normative_standard_writable", "wall_s": 7.846600010452676e-05, "cpu_s": 7.851700001992867e-05, "status": "pass", "spans": {}, "setup_s": 2.599999788799323e-07, "body_s": 5.653399989569152e-05, "teardown_s": 3.2999992072291207e-07} +{"event": "start", "test": "test_navigation_indexes.NavigationIndexAuthorityTest.test_review_fingerprint_binds_destination_authority_without_inventing_policy_changes", "at": 1790198341.588384} +{"event": "end", "test": "test_navigation_indexes.NavigationIndexAuthorityTest.test_review_fingerprint_binds_destination_authority_without_inventing_policy_changes", "wall_s": 0.00023453499989045667, "cpu_s": 0.00023479899999756526, "status": "pass", "spans": {}, "setup_s": 3.799998467002297e-07, "body_s": 0.0001827290000164794, "teardown_s": 3.7099994187883567e-07} +{"event": "observation", "test": "between-test/fixture", "elapsed_s": 21.332786041999952, "stack": [" File \"/mnt/data/pse-performance-work/Coding-Standards/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/measurement-tools/run_timed_suite.py\", line 58, in \n result=unittest.TextTestRunner(verbosity=1,resultclass=Result).run(suite)\n", " File \"/usr/lib/python3.13/unittest/runner.py\", line 240, in run\n test(result)\n", " File \"/usr/lib/python3.13/unittest/suite.py\", line 84, in __call__\n return self.run(*args, **kwds)\n", " File \"/usr/lib/python3.13/unittest/suite.py\", line 114, in run\n self._handleClassSetUp(test, result)\n", " File \"/usr/lib/python3.13/unittest/suite.py\", line 166, in _handleClassSetUp\n setUpClass()\n", " File \"/mnt/data/pse-performance-work/candidate-tests/tools/standards_engine/tests/test_navigation_indexes.py\", line 147, in setUpClass\n refreshed = fixture_facade.verify_repository(\n", " File \"/mnt/data/pse-performance-work/candidate-tests/tools/standards_engine/standards_engine/tools.py\", line 224, in verify_repository\n return self._result(\"verify_repository\", self._engine.verify_repository(call))\n", " File \"/mnt/data/pse-performance-work/candidate-tests/tools/standards_engine/standards_engine/context_projection.py\", line 62, in invoke\n return function(engine, call)\n", " File \"/mnt/data/pse-performance-work/candidate-tests/tools/standards_engine/standards_engine/engine.py\", line 708, in verify_repository\n self._application_verifier(self._repository.root)\n", " File \"/mnt/data/pse-performance-work/candidate-tests/tools/standards_verifier/standards_verifier/cli.py\", line 76, in run_complete_verification\n results = tuple(Verifier(repo_root, registry).run(None))\n", " File \"/mnt/data/pse-performance-work/candidate-tests/tools/standards_verifier/standards_verifier/engine.py\", line 66, in run\n result = self._run_suite(catalog.suite(suite_id), catalog)\n", " File \"/mnt/data/pse-performance-work/candidate-tests/tools/standards_verifier/standards_verifier/engine.py\", line 100, in _run_suite\n diagnostics.extend(check.run(context))\n", " File \"/mnt/data/pse-performance-work/candidate-tests/tools/standards_verifier/standards_verifier/checks/python_package_contract.py\", line 70, in run\n for finding in execute_python_package_contract(context.repo_root)\n", " File \"/mnt/data/pse-performance-work/candidate-tests/tools/standards_verifier/standards_verifier/python_packages.py\", line 1294, in execute_python_package_contract\n completed = subprocess.run(\n", " File \"/usr/lib/python3.13/subprocess.py\", line 556, in run\n stdout, stderr = process.communicate(input, timeout=timeout)\n", " File \"/usr/lib/python3.13/subprocess.py\", line 1222, in communicate\n stdout, stderr = self._communicate(input, endtime, timeout)\n", " File \"/usr/lib/python3.13/subprocess.py\", line 2128, in _communicate\n ready = selector.select(timeout)\n", " File \"/usr/lib/python3.13/selectors.py\", line 398, in select\n fd_event_list = self._selector.poll(timeout)\n"]} +{"event": "start", "test": "test_navigation_indexes.NavigationIndexWorkflowTest.test_cross_snapshot_handle_is_not_an_authorization_to_retarget", "at": 1790198373.650721} +{"event": "end", "test": "test_navigation_indexes.NavigationIndexWorkflowTest.test_cross_snapshot_handle_is_not_an_authorization_to_retarget", "wall_s": 5.617682994000006, "cpu_s": 4.632625813999994, "status": "pass", "spans": {"StandardsEngine._compile": {"calls": 5, "inclusive_s": 2.332963028000222}, "SnapshotModule._content_id": {"calls": 4, "inclusive_s": 2.4925270489998184}, "SnapshotModule.load_content": {"calls": 3, "inclusive_s": 1.9156309310001234}, "StandardsEngine._compiled_snapshot": {"calls": 2, "inclusive_s": 1.6720371339999929}, "StandardsEngine._proposal_projection": {"calls": 1, "inclusive_s": 1.6876727829999254}, "StandardsEngine.propose": {"calls": 1, "inclusive_s": 2.354582298999958}}, "setup_s": 1.5020000319054816e-06, "body_s": 5.617498362000106, "teardown_s": 1.9030001112696482e-06} +{"event": "start", "test": "test_navigation_indexes.NavigationIndexWorkflowTest.test_discovery_captures_exact_content_without_claiming_policy_authority", "at": 1790198379.2684999} +{"event": "end", "test": "test_navigation_indexes.NavigationIndexWorkflowTest.test_discovery_captures_exact_content_without_claiming_policy_authority", "wall_s": 1.7305331009999918, "cpu_s": 1.7304843329999926, "status": "pass", "spans": {"SnapshotModule._content_id": {"calls": 2, "inclusive_s": 1.1826562870000998}, "SnapshotModule.load_content": {"calls": 2, "inclusive_s": 1.2055003699999816}, "StandardsEngine._compile": {"calls": 2, "inclusive_s": 0.5132606200002101}, "StandardsEngine._compiled_snapshot": {"calls": 2, "inclusive_s": 1.7239390730001105}}, "setup_s": 1.2420000530255493e-06, "body_s": 1.730458351000152, "teardown_s": 1.762000010785414e-06} +{"event": "start", "test": "test_navigation_indexes.NavigationIndexWorkflowTest.test_fresh_mcp_process_exposes_snapshot_bound_navigation", "at": 1790198380.999114} +{"event": "end", "test": "test_navigation_indexes.NavigationIndexWorkflowTest.test_fresh_mcp_process_exposes_snapshot_bound_navigation", "wall_s": 3.0310449259998222, "cpu_s": 0.0016829020000272976, "status": "pass", "spans": {}, "setup_s": 1.582999857419054e-06, "body_s": 3.0309446279998156, "teardown_s": 2.4529999791411683e-06} +{"event": "start", "test": "test_navigation_indexes.NavigationIndexWorkflowTest.test_invalid_selections_do_not_create_an_applicable_candidate", "at": 1790198384.0302439} +{"event": "end", "test": "test_navigation_indexes.NavigationIndexWorkflowTest.test_invalid_selections_do_not_create_an_applicable_candidate", "wall_s": 4.92051156499997, "cpu_s": 4.4448320579999745, "status": "pass", "spans": {"StandardsEngine.propose": {"calls": 3, "inclusive_s": 4.906091746999891}, "SnapshotModule._content_id": {"calls": 4, "inclusive_s": 2.514245259000063}, "SnapshotModule.load_content": {"calls": 4, "inclusive_s": 2.5706399460000284}, "StandardsEngine._compile": {"calls": 4, "inclusive_s": 0.8035883869997633}, "StandardsEngine._compiled_snapshot": {"calls": 2, "inclusive_s": 1.6914780800000244}, "StandardsEngine._proposal_projection": {"calls": 2, "inclusive_s": 3.5629788609999196}}, "setup_s": 9.220000265486306e-07, "body_s": 4.920367281999916, "teardown_s": 1.4919999102858128e-06} +{"event": "start", "test": "test_navigation_indexes.NavigationIndexWorkflowTest.test_retarget_dispositions_cannot_remove_unrelated_assertions", "at": 1790198388.9508712} +{"event": "end", "test": "test_navigation_indexes.NavigationIndexWorkflowTest.test_retarget_dispositions_cannot_remove_unrelated_assertions", "wall_s": 4.822995988000002, "cpu_s": 4.346325280999963, "status": "pass", "spans": {"SnapshotModule._content_id": {"calls": 4, "inclusive_s": 2.49624314100015}, "SnapshotModule.load_content": {"calls": 4, "inclusive_s": 2.5448493889998645}, "StandardsEngine._compile": {"calls": 4, "inclusive_s": 0.7765662100002828}, "StandardsEngine._compiled_snapshot": {"calls": 2, "inclusive_s": 1.676043848999825}, "StandardsEngine._proposal_projection": {"calls": 2, "inclusive_s": 3.488208317000044}, "StandardsEngine.propose": {"calls": 2, "inclusive_s": 4.817016647999935}}, "setup_s": 8.310000794153893e-07, "body_s": 4.822908519000066, "teardown_s": 1.3320000107341912e-06} +{"event": "start", "test": "test_navigation_indexes.NavigationIndexWorkflowTest.test_z_exact_index_proposal_requires_review_and_applies_through_engine", "at": 1790198393.7739425} +{"event": "observation", "test": "test_navigation_indexes.NavigationIndexWorkflowTest.test_z_exact_index_proposal_requires_review_and_applies_through_engine", "elapsed_s": 14.149408687000005, "stack": [" File \"/mnt/data/pse-performance-work/Coding-Standards/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/measurement-tools/run_timed_suite.py\", line 58, in \n result=unittest.TextTestRunner(verbosity=1,resultclass=Result).run(suite)\n", " File \"/usr/lib/python3.13/unittest/runner.py\", line 240, in run\n test(result)\n", " File \"/usr/lib/python3.13/unittest/suite.py\", line 84, in __call__\n return self.run(*args, **kwds)\n", " File \"/usr/lib/python3.13/unittest/suite.py\", line 122, in run\n test(result)\n", " File \"/usr/lib/python3.13/unittest/case.py\", line 707, in __call__\n return self.run(*args, **kwds)\n", " File \"/usr/lib/python3.13/unittest/case.py\", line 651, in run\n self._callTestMethod(testMethod)\n", " File \"/mnt/data/pse-performance-work/Coding-Standards/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/measurement-tools/run_timed_suite.py\", line 36, in timed\n try:return _fn(self,*args,**kwargs)\n", " File \"/usr/lib/python3.13/unittest/case.py\", line 606, in _callTestMethod\n if method() is not None:\n", " File \"/mnt/data/pse-performance-work/candidate-tests/tools/standards_engine/tests/test_navigation_indexes.py\", line 432, in test_z_exact_index_proposal_requires_review_and_applies_through_engine\n resolved = self.facade.resolve_workflow(\n", " File \"/mnt/data/pse-performance-work/candidate-tests/tools/standards_engine/standards_engine/tools.py\", line 298, in resolve_workflow\n return self._result(\"resolve_workflow\", self._engine.resolve_workflow(call))\n", " File \"/mnt/data/pse-performance-work/candidate-tests/tools/standards_engine/standards_engine/context_projection.py\", line 62, in invoke\n return function(engine, call)\n", " File \"/mnt/data/pse-performance-work/candidate-tests/tools/standards_engine/standards_engine/engine.py\", line 952, in resolve_workflow\n return advance(self, \"resolve_workflow\", call)\n", " File \"/mnt/data/pse-performance-work/candidate-tests/tools/standards_engine/standards_engine/agent_workflow.py\", line 193, in advance\n current = view(engine, bound)\n", " File \"/mnt/data/pse-performance-work/candidate-tests/tools/standards_engine/standards_engine/agent_workflow.py\", line 123, in view\n outcome = engine._analysis_result(engine._evaluate(bound.analysis))\n", " File \"/mnt/data/pse-performance-work/Coding-Standards/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/measurement-tools/run_timed_suite.py\", line 25, in observe\n try:return original(*args,**kwargs)\n", " File \"/mnt/data/pse-performance-work/candidate-tests/tools/standards_engine/standards_engine/engine.py\", line 1818, in _evaluate\n materials = self._evaluation_materials(state)\n", " File \"/mnt/data/pse-performance-work/candidate-tests/tools/standards_engine/standards_engine/engine.py\", line 1806, in _evaluation_materials\n projection = self._proposal_projection(revision, accepted)\n", " File \"/mnt/data/pse-performance-work/Coding-Standards/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/measurement-tools/run_timed_suite.py\", line 25, in observe\n try:return original(*args,**kwargs)\n", " File \"/mnt/data/pse-performance-work/candidate-tests/tools/standards_engine/standards_engine/engine.py\", line 1710, in _proposal_projection\n return self._logical_authoring.compile(\n", " File \"/mnt/data/pse-performance-work/candidate-tests/tools/standards_engine/standards_engine/logical_authoring.py\", line 994, in compile\n repository_paths = _refresh_suite_input_projection(\n", " File \"/mnt/data/pse-performance-work/candidate-tests/tools/standards_engine/standards_engine/logical_authoring.py\", line 2455, in _refresh_suite_input_projection\n files[_SUITE_INPUTS] = suite_input_projection_bytes(\n", " File \"/mnt/data/pse-performance-work/candidate-tests/tools/standards_verifier/standards_verifier/suite_inputs.py\", line 162, in suite_input_projection_bytes\n compile_suite_input_manifest(root, repository_paths=repository_paths)\n", " File \"/mnt/data/pse-performance-work/candidate-tests/tools/standards_verifier/standards_verifier/suite_inputs.py\", line 67, in compile_suite_input_manifest\n for declaration in check.authority_inputs(context):\n", " File \"/mnt/data/pse-performance-work/candidate-tests/tools/standards_verifier/standards_verifier/checks/markdown_link_coverage.py\", line 29, in authority_inputs\n targets = local_markdown_targets(context, self.id, self.path)\n", " File \"/mnt/data/pse-performance-work/candidate-tests/tools/standards_verifier/standards_verifier/checks/markdown_links.py\", line 62, in local_markdown_targets\n content = source.read_text(encoding=\"utf-8\")\n", " File \"/usr/lib/python3.13/pathlib/_local.py\", line 548, in read_text\n return PathBase.read_text(self, encoding, errors, newline)\n", " File \"/usr/lib/python3.13/pathlib/_abc.py\", line 632, in read_text\n with self.open(mode='r', encoding=encoding, errors=errors, newline=newline) as f:\n", " File \"/usr/lib/python3.13/pathlib/_local.py\", line 539, in open\n return io.open(self, mode, buffering, encoding, errors, newline)\n"]} +{"event": "observation", "test": "test_navigation_indexes.NavigationIndexWorkflowTest.test_z_exact_index_proposal_requires_review_and_applies_through_engine", "elapsed_s": 59.15615490799996, "stack": [" File \"/mnt/data/pse-performance-work/Coding-Standards/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/measurement-tools/run_timed_suite.py\", line 58, in \n result=unittest.TextTestRunner(verbosity=1,resultclass=Result).run(suite)\n", " File \"/usr/lib/python3.13/unittest/runner.py\", line 240, in run\n test(result)\n", " File \"/usr/lib/python3.13/unittest/suite.py\", line 84, in __call__\n return self.run(*args, **kwds)\n", " File \"/usr/lib/python3.13/unittest/suite.py\", line 122, in run\n test(result)\n", " File \"/usr/lib/python3.13/unittest/case.py\", line 707, in __call__\n return self.run(*args, **kwds)\n", " File \"/usr/lib/python3.13/unittest/case.py\", line 651, in run\n self._callTestMethod(testMethod)\n", " File \"/mnt/data/pse-performance-work/Coding-Standards/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/measurement-tools/run_timed_suite.py\", line 36, in timed\n try:return _fn(self,*args,**kwargs)\n", " File \"/usr/lib/python3.13/unittest/case.py\", line 606, in _callTestMethod\n if method() is not None:\n", " File \"/mnt/data/pse-performance-work/candidate-tests/tools/standards_engine/tests/test_navigation_indexes.py\", line 458, in test_z_exact_index_proposal_requires_review_and_applies_through_engine\n applied = self.facade.apply({\"context\": ready[\"context\"]})\n", " File \"/mnt/data/pse-performance-work/candidate-tests/tools/standards_engine/standards_engine/tools.py\", line 310, in apply\n return self._result(\"apply\", self._engine.apply(call))\n", " File \"/mnt/data/pse-performance-work/candidate-tests/tools/standards_engine/standards_engine/context_projection.py\", line 62, in invoke\n return function(engine, call)\n", " File \"/mnt/data/pse-performance-work/candidate-tests/tools/standards_engine/standards_engine/engine.py\", line 964, in apply\n return advance(self, \"apply\", call)\n", " File \"/mnt/data/pse-performance-work/candidate-tests/tools/standards_engine/standards_engine/agent_workflow.py\", line 257, in advance\n result = engine.apply_proposal(\n", " File \"/mnt/data/pse-performance-work/Coding-Standards/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/measurement-tools/run_timed_suite.py\", line 25, in observe\n try:return original(*args,**kwargs)\n", " File \"/mnt/data/pse-performance-work/candidate-tests/tools/standards_engine/standards_engine/context_projection.py\", line 62, in invoke\n return function(engine, call)\n", " File \"/mnt/data/pse-performance-work/candidate-tests/tools/standards_engine/standards_engine/engine.py\", line 1281, in apply_proposal\n with self._repository.materialize_candidate(\n", " File \"/usr/lib/python3.13/contextlib.py\", line 141, in __enter__\n return next(self.gen)\n", " File \"/mnt/data/pse-performance-work/candidate-tests/tools/repository_git/repository_git/repository.py\", line 345, in materialize_candidate\n self._write_candidate_index_file(candidate_root, candidate_file)\n", " File \"/mnt/data/pse-performance-work/candidate-tests/tools/repository_git/repository_git/repository.py\", line 566, in _write_candidate_index_file\n git_output(\n", " File \"/mnt/data/pse-performance-work/candidate-tests/tools/repository_git/repository_git/repository.py\", line 97, in git_output\n result = git_command(\n", " File \"/mnt/data/pse-performance-work/candidate-tests/tools/repository_git/repository_git/repository.py\", line 81, in git_command\n return _run_bounded(\n", " File \"/mnt/data/pse-performance-work/candidate-tests/tools/repository_git/repository_git/repository.py\", line 976, in _run_bounded\n returncode = process.wait(timeout=COMMAND_TIMEOUT_SECONDS)\n", " File \"/usr/lib/python3.13/subprocess.py\", line 1280, in wait\n return self._wait(timeout=timeout)\n", " File \"/usr/lib/python3.13/subprocess.py\", line 2060, in _wait\n time.sleep(delay)\n"]} +{"event": "end", "test": "test_navigation_indexes.NavigationIndexWorkflowTest.test_z_exact_index_proposal_requires_review_and_applies_through_engine", "wall_s": 98.85286198499989, "cpu_s": 37.65047915299999, "status": "pass", "spans": {"SnapshotModule._content_id": {"calls": 20, "inclusive_s": 12.38403301300059}, "SnapshotModule.load_content": {"calls": 18, "inclusive_s": 11.318893947000106}, "StandardsEngine._compile": {"calls": 39, "inclusive_s": 11.167690376000337}, "StandardsEngine._compiled_snapshot": {"calls": 14, "inclusive_s": 11.91062551799996}, "StandardsEngine._proposal_projection": {"calls": 11, "inclusive_s": 23.321910612999773}, "AuthoringModule.read_revision": {"calls": 43, "inclusive_s": 0.6286599519992251}, "StandardsEngine._validate_projected_inputs": {"calls": 7, "inclusive_s": 0.0025768130003598344}, "StandardsEngine._evaluate": {"calls": 7, "inclusive_s": 11.024364435000052}, "StandardsEngine.analyze_proposal": {"calls": 1, "inclusive_s": 2.6556894180000654}, "StandardsEngine.propose": {"calls": 2, "inclusive_s": 8.449281826000288}, "StandardsEngine.query_proposal": {"calls": 1, "inclusive_s": 2.828930206999985}, "StandardsEngine.resolve": {"calls": 1, "inclusive_s": 2.9193321230000038}, "StandardsEngine.review_proposal": {"calls": 1, "inclusive_s": 2.8581778520001535}, "StandardsEngine.verify_proposal": {"calls": 1, "inclusive_s": 32.14335995400006}, "StandardsEngine.apply_proposal": {"calls": 1, "inclusive_s": 33.33162470000002}}, "setup_s": 8.409999736613827e-07, "body_s": 98.85273462700002, "teardown_s": 1.3920000583311776e-06} +{"event": "observation", "test": "between-test/fixture", "elapsed_s": 5.3138745109999945, "stack": [" File \"/mnt/data/pse-performance-work/Coding-Standards/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/measurement-tools/run_timed_suite.py\", line 58, in \n result=unittest.TextTestRunner(verbosity=1,resultclass=Result).run(suite)\n", " File \"/usr/lib/python3.13/unittest/runner.py\", line 240, in run\n test(result)\n", " File \"/usr/lib/python3.13/unittest/suite.py\", line 84, in __call__\n return self.run(*args, **kwds)\n", " File \"/usr/lib/python3.13/unittest/suite.py\", line 114, in run\n self._handleClassSetUp(test, result)\n", " File \"/usr/lib/python3.13/unittest/suite.py\", line 166, in _handleClassSetUp\n setUpClass()\n", " File \"/mnt/data/pse-performance-work/candidate-tests/tools/standards_engine/tests/test_navigation_indexes.py\", line 147, in setUpClass\n refreshed = fixture_facade.verify_repository(\n", " File \"/mnt/data/pse-performance-work/candidate-tests/tools/standards_engine/standards_engine/tools.py\", line 224, in verify_repository\n return self._result(\"verify_repository\", self._engine.verify_repository(call))\n", " File \"/mnt/data/pse-performance-work/candidate-tests/tools/standards_engine/standards_engine/context_projection.py\", line 62, in invoke\n return function(engine, call)\n", " File \"/mnt/data/pse-performance-work/candidate-tests/tools/standards_engine/standards_engine/engine.py\", line 708, in verify_repository\n self._application_verifier(self._repository.root)\n", " File \"/mnt/data/pse-performance-work/candidate-tests/tools/standards_verifier/standards_verifier/cli.py\", line 76, in run_complete_verification\n results = tuple(Verifier(repo_root, registry).run(None))\n", " File \"/mnt/data/pse-performance-work/candidate-tests/tools/standards_verifier/standards_verifier/engine.py\", line 66, in run\n result = self._run_suite(catalog.suite(suite_id), catalog)\n", " File \"/mnt/data/pse-performance-work/candidate-tests/tools/standards_verifier/standards_verifier/engine.py\", line 100, in _run_suite\n diagnostics.extend(check.run(context))\n", " File \"/mnt/data/pse-performance-work/candidate-tests/tools/standards_verifier/standards_verifier/checks/python_package_contract.py\", line 70, in run\n for finding in execute_python_package_contract(context.repo_root)\n", " File \"/mnt/data/pse-performance-work/candidate-tests/tools/standards_verifier/standards_verifier/python_packages.py\", line 1312, in execute_python_package_contract\n completed = _execute_entrypoint(\n", " File \"/mnt/data/pse-performance-work/candidate-tests/tools/standards_verifier/standards_verifier/python_packages.py\", line 1403, in _execute_entrypoint\n return subprocess.run(\n", " File \"/usr/lib/python3.13/subprocess.py\", line 556, in run\n stdout, stderr = process.communicate(input, timeout=timeout)\n", " File \"/usr/lib/python3.13/subprocess.py\", line 1222, in communicate\n stdout, stderr = self._communicate(input, endtime, timeout)\n", " File \"/usr/lib/python3.13/subprocess.py\", line 2128, in _communicate\n ready = selector.select(timeout)\n", " File \"/usr/lib/python3.13/selectors.py\", line 398, in select\n fd_event_list = self._selector.poll(timeout)\n"]} +{"event": "start", "test": "test_navigation_indexes.ProtectedNavigationIndexTest.test_declared_routes_reject_omitted_owners_and_unsupported_artifacts", "at": 1790198524.9656541} +{"event": "end", "test": "test_navigation_indexes.ProtectedNavigationIndexTest.test_declared_routes_reject_omitted_owners_and_unsupported_artifacts", "wall_s": 4.898358779000091, "cpu_s": 4.415951714000016, "status": "pass", "spans": {"SnapshotModule._content_id": {"calls": 4, "inclusive_s": 2.4900210909997895}, "SnapshotModule.load_content": {"calls": 4, "inclusive_s": 2.5366870809998545}, "StandardsEngine._compile": {"calls": 4, "inclusive_s": 0.8288508419996106}, "StandardsEngine._compiled_snapshot": {"calls": 2, "inclusive_s": 1.6965696360000493}, "StandardsEngine._proposal_projection": {"calls": 2, "inclusive_s": 3.575980609999988}, "StandardsEngine.propose": {"calls": 2, "inclusive_s": 4.894130214999905}}, "setup_s": 1.742999984344351e-06, "body_s": 4.898186505000012, "teardown_s": 1.7330000900983578e-06} +{"event": "start", "test": "test_navigation_indexes.ProtectedNavigationIndexTest.test_z_declared_sections_survive_verified_index_application", "at": 1790198529.864082} +{"event": "observation", "test": "test_navigation_indexes.ProtectedNavigationIndexTest.test_z_declared_sections_survive_verified_index_application", "elapsed_s": 13.078814069999908, "stack": [" File \"/mnt/data/pse-performance-work/Coding-Standards/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/measurement-tools/run_timed_suite.py\", line 58, in \n result=unittest.TextTestRunner(verbosity=1,resultclass=Result).run(suite)\n", " File \"/usr/lib/python3.13/unittest/runner.py\", line 240, in run\n test(result)\n", " File \"/usr/lib/python3.13/unittest/suite.py\", line 84, in __call__\n return self.run(*args, **kwds)\n", " File \"/usr/lib/python3.13/unittest/suite.py\", line 122, in run\n test(result)\n", " File \"/usr/lib/python3.13/unittest/case.py\", line 707, in __call__\n return self.run(*args, **kwds)\n", " File \"/usr/lib/python3.13/unittest/case.py\", line 651, in run\n self._callTestMethod(testMethod)\n", " File \"/mnt/data/pse-performance-work/Coding-Standards/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/measurement-tools/run_timed_suite.py\", line 36, in timed\n try:return _fn(self,*args,**kwargs)\n", " File \"/usr/lib/python3.13/unittest/case.py\", line 606, in _callTestMethod\n if method() is not None:\n", " File \"/mnt/data/pse-performance-work/candidate-tests/tools/standards_engine/tests/test_navigation_indexes.py\", line 551, in test_z_declared_sections_survive_verified_index_application\n resolved = self.facade.resolve_workflow(\n", " File \"/mnt/data/pse-performance-work/candidate-tests/tools/standards_engine/standards_engine/tools.py\", line 298, in resolve_workflow\n return self._result(\"resolve_workflow\", self._engine.resolve_workflow(call))\n", " File \"/mnt/data/pse-performance-work/candidate-tests/tools/standards_engine/standards_engine/context_projection.py\", line 62, in invoke\n return function(engine, call)\n", " File \"/mnt/data/pse-performance-work/candidate-tests/tools/standards_engine/standards_engine/engine.py\", line 952, in resolve_workflow\n return advance(self, \"resolve_workflow\", call)\n", " File \"/mnt/data/pse-performance-work/candidate-tests/tools/standards_engine/standards_engine/agent_workflow.py\", line 228, in advance\n result = engine.resolve(\n", " File \"/mnt/data/pse-performance-work/Coding-Standards/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/measurement-tools/run_timed_suite.py\", line 25, in observe\n try:return original(*args,**kwargs)\n", " File \"/mnt/data/pse-performance-work/candidate-tests/tools/standards_engine/standards_engine/context_projection.py\", line 62, in invoke\n return function(engine, call)\n", " File \"/mnt/data/pse-performance-work/candidate-tests/tools/standards_engine/standards_engine/engine.py\", line 1638, in resolve\n materials = self._evaluation_materials(state)\n", " File \"/mnt/data/pse-performance-work/candidate-tests/tools/standards_engine/standards_engine/engine.py\", line 1806, in _evaluation_materials\n projection = self._proposal_projection(revision, accepted)\n", " File \"/mnt/data/pse-performance-work/Coding-Standards/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/measurement-tools/run_timed_suite.py\", line 25, in observe\n try:return original(*args,**kwargs)\n", " File \"/mnt/data/pse-performance-work/candidate-tests/tools/standards_engine/standards_engine/engine.py\", line 1710, in _proposal_projection\n return self._logical_authoring.compile(\n", " File \"/mnt/data/pse-performance-work/candidate-tests/tools/standards_engine/standards_engine/logical_authoring.py\", line 978, in compile\n self._apply_edit(\n", " File \"/mnt/data/pse-performance-work/candidate-tests/tools/standards_engine/standards_engine/logical_authoring.py\", line 1061, in _apply_edit\n compile_current(files).corpus,\n", " File \"/mnt/data/pse-performance-work/candidate-tests/tools/standards_engine/standards_engine/logical_authoring.py\", line 939, in compile_current\n _refresh_suite_input_projection(\n", " File \"/mnt/data/pse-performance-work/candidate-tests/tools/standards_engine/standards_engine/logical_authoring.py\", line 2454, in _refresh_suite_input_projection\n git_output(root, (\"add\", \"--force\", \"--all\", \"--\"))\n", " File \"/mnt/data/pse-performance-work/candidate-tests/tools/repository_git/repository_git/repository.py\", line 97, in git_output\n result = git_command(\n", " File \"/mnt/data/pse-performance-work/candidate-tests/tools/repository_git/repository_git/repository.py\", line 81, in git_command\n return _run_bounded(\n", " File \"/mnt/data/pse-performance-work/candidate-tests/tools/repository_git/repository_git/repository.py\", line 976, in _run_bounded\n returncode = process.wait(timeout=COMMAND_TIMEOUT_SECONDS)\n", " File \"/usr/lib/python3.13/subprocess.py\", line 1280, in wait\n return self._wait(timeout=timeout)\n", " File \"/usr/lib/python3.13/subprocess.py\", line 2060, in _wait\n time.sleep(delay)\n"]} +{"event": "end", "test": "test_navigation_indexes.ProtectedNavigationIndexTest.test_z_declared_sections_survive_verified_index_application", "wall_s": 56.663501788000076, "cpu_s": 24.35312712399997, "status": "pass", "spans": {"SnapshotModule._content_id": {"calls": 12, "inclusive_s": 7.296897302000161}, "SnapshotModule.load_content": {"calls": 11, "inclusive_s": 6.828967852000233}, "StandardsEngine._compile": {"calls": 27, "inclusive_s": 7.026706049999575}, "StandardsEngine._compiled_snapshot": {"calls": 9, "inclusive_s": 7.380407665000348}, "StandardsEngine._proposal_projection": {"calls": 8, "inclusive_s": 17.565218720000075}, "AuthoringModule.read_revision": {"calls": 37, "inclusive_s": 0.5228901390000829}, "StandardsEngine._validate_projected_inputs": {"calls": 6, "inclusive_s": 0.002513579000151367}, "StandardsEngine._evaluate": {"calls": 6, "inclusive_s": 8.360935888999848}, "StandardsEngine.analyze_proposal": {"calls": 1, "inclusive_s": 3.0736405000000104}, "StandardsEngine.propose": {"calls": 1, "inclusive_s": 6.3846722570001475}, "StandardsEngine.query_proposal": {"calls": 1, "inclusive_s": 2.7436272949998965}, "StandardsEngine.resolve": {"calls": 1, "inclusive_s": 2.707733210000015}, "StandardsEngine.review_proposal": {"calls": 1, "inclusive_s": 2.7151841830000194}, "StandardsEngine.apply_proposal": {"calls": 1, "inclusive_s": 32.75908996899989}}, "setup_s": 1.0320000001229346e-06, "body_s": 56.66342036800006, "teardown_s": 1.922999899761635e-06} +{"event": "start", "test": "test_platform_harness.PlatformHarnessTest.test_closed_store_round_trip_uses_public_operations", "at": 1790198586.5429459} +{"event": "observation", "test": "test_platform_harness.PlatformHarnessTest.test_closed_store_round_trip_uses_public_operations", "elapsed_s": 1.4049548549999145, "stack": [" File \"/mnt/data/pse-performance-work/Coding-Standards/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/measurement-tools/run_timed_suite.py\", line 58, in \n result=unittest.TextTestRunner(verbosity=1,resultclass=Result).run(suite)\n", " File \"/usr/lib/python3.13/unittest/runner.py\", line 240, in run\n test(result)\n", " File \"/usr/lib/python3.13/unittest/suite.py\", line 84, in __call__\n return self.run(*args, **kwds)\n", " File \"/usr/lib/python3.13/unittest/suite.py\", line 122, in run\n test(result)\n", " File \"/usr/lib/python3.13/unittest/case.py\", line 707, in __call__\n return self.run(*args, **kwds)\n", " File \"/usr/lib/python3.13/unittest/case.py\", line 651, in run\n self._callTestMethod(testMethod)\n", " File \"/mnt/data/pse-performance-work/Coding-Standards/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/measurement-tools/run_timed_suite.py\", line 36, in timed\n try:return _fn(self,*args,**kwargs)\n", " File \"/usr/lib/python3.13/unittest/case.py\", line 606, in _callTestMethod\n if method() is not None:\n", " File \"/mnt/data/pse-performance-work/candidate-tests/tools/standards_engine/tests/test_platform_harness.py\", line 26, in test_closed_store_round_trip_uses_public_operations\n produced = produce(REPOSITORY_ROOT, producer_store, producer_manifest)\n", " File \"/mnt/data/pse-performance-work/candidate-tests/tools/standards_engine/tests/platform_harness.py\", line 226, in produce\n facade.call(\"create_snapshot\", {\"kind\": \"create-snapshot\"}),\n", " File \"/mnt/data/pse-performance-work/candidate-tests/tools/standards_engine/tests/platform_harness.py\", line 144, in call\n return getattr(self._facade, operation)(arguments)\n", " File \"/mnt/data/pse-performance-work/candidate-tests/tools/standards_engine/standards_engine/tools.py\", line 178, in create_snapshot\n return self._result(\"create_snapshot\", self._engine.create_snapshot(call))\n", " File \"/mnt/data/pse-performance-work/candidate-tests/tools/standards_engine/standards_engine/context_projection.py\", line 62, in invoke\n return function(engine, call)\n", " File \"/mnt/data/pse-performance-work/candidate-tests/tools/standards_engine/standards_engine/engine.py\", line 506, in create_snapshot\n return self._capture_snapshot(call)\n", " File \"/mnt/data/pse-performance-work/candidate-tests/tools/standards_engine/standards_engine/engine.py\", line 516, in _capture_snapshot\n first = self._compile(recording)\n", " File \"/mnt/data/pse-performance-work/Coding-Standards/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/measurement-tools/run_timed_suite.py\", line 25, in observe\n try:return original(*args,**kwargs)\n", " File \"/mnt/data/pse-performance-work/candidate-tests/tools/standards_engine/standards_engine/engine.py\", line 1740, in _compile\n corpus, impact, load_coverage_horizon(source, corpus, impact)\n", " File \"/mnt/data/pse-performance-work/candidate-tests/tools/standards_analysis/standards_analysis/coverage.py\", line 548, in load_coverage_horizon\n return _load_coverage_horizon(source, corpus, compiled, path)\n", " File \"/mnt/data/pse-performance-work/candidate-tests/tools/standards_analysis/standards_analysis/coverage.py\", line 448, in _load_coverage_horizon\n suite_inputs = load_suite_input_manifest(selected_source, suite_inputs_path)\n", " File \"/mnt/data/pse-performance-work/candidate-tests/tools/standards_metadata/standards_metadata/suite_inputs.py\", line 587, in load_suite_input_manifest\n if file_digest(source.read_bytes(item.path)) != item.digest:\n", " File \"/mnt/data/pse-performance-work/candidate-tests/tools/standards_metadata/standards_metadata/source.py\", line 80, in read_bytes\n content = bytes(self._source.read_bytes(normalized))\n", " File \"/mnt/data/pse-performance-work/candidate-tests/tools/standards_engine/standards_engine/engine.py\", line 280, in read_bytes\n return self._reader.read_file(RepositoryPath.parse(path))\n", " File \"/mnt/data/pse-performance-work/candidate-tests/tools/repository_git/repository_git/repository.py\", line 899, in read_file\n return self._repository._read_file(self._revision, path, self._object)\n", " File \"/mnt/data/pse-performance-work/candidate-tests/tools/repository_git/repository_git/repository.py\", line 737, in _read_file\n return read_object(repository, oid, \"blob\", algorithm)\n", " File \"/mnt/data/pse-performance-work/candidate-tests/tools/repository_git/repository_git/repository.py\", line 906, in _object\n content = self._repository._object(repository, oid, expected_type, algorithm)\n", " File \"/mnt/data/pse-performance-work/candidate-tests/tools/repository_git/repository_git/repository.py\", line 775, in _object\n output = git_output(\n", " File \"/mnt/data/pse-performance-work/candidate-tests/tools/repository_git/repository_git/repository.py\", line 97, in git_output\n result = git_command(\n", " File \"/mnt/data/pse-performance-work/candidate-tests/tools/repository_git/repository_git/repository.py\", line 81, in git_command\n return _run_bounded(\n", " File \"/mnt/data/pse-performance-work/candidate-tests/tools/repository_git/repository_git/repository.py\", line 976, in _run_bounded\n returncode = process.wait(timeout=COMMAND_TIMEOUT_SECONDS)\n", " File \"/usr/lib/python3.13/subprocess.py\", line 1280, in wait\n return self._wait(timeout=timeout)\n", " File \"/usr/lib/python3.13/subprocess.py\", line 2060, in _wait\n time.sleep(delay)\n"]} +{"event": "end", "test": "test_platform_harness.PlatformHarnessTest.test_closed_store_round_trip_uses_public_operations", "wall_s": 12.231231835999779, "cpu_s": 8.25106262700001, "status": "pass", "spans": {"tools.standards_engine.standards_engine.tools._contracts": {"calls": 2, "inclusive_s": 0.557679736999944}, "StandardsEngine._compile": {"calls": 9, "inclusive_s": 3.362507157000209}, "SnapshotModule._content_id": {"calls": 8, "inclusive_s": 4.912292764000085}, "SnapshotModule.load_content": {"calls": 8, "inclusive_s": 4.3642474159994435}, "StandardsEngine._compiled_snapshot": {"calls": 8, "inclusive_s": 5.929433094999922}, "StandardsEngine._evaluate": {"calls": 3, "inclusive_s": 0.04850284600024679}, "StandardsEngine.prepare": {"calls": 1, "inclusive_s": 0.855884450000076}, "StandardsEngine.resolve": {"calls": 1, "inclusive_s": 0.8535022369999297}}, "setup_s": 1.511999926151475e-06, "body_s": 12.231011773000091, "teardown_s": 1.802999804567662e-06} +{"event": "start", "test": "test_platform_harness.PlatformHarnessTest.test_concurrent_probe_rejects_mismatched_content", "at": 1790198598.774269} +{"event": "end", "test": "test_platform_harness.PlatformHarnessTest.test_concurrent_probe_rejects_mismatched_content", "wall_s": 0.0006511379999665223, "cpu_s": 0.0006515790000207744, "status": "pass", "spans": {}, "setup_s": 1.2519999472715426e-06, "body_s": 0.0006030070001088461, "teardown_s": 5.699998837371822e-07} +{"event": "start", "test": "test_platform_harness.PlatformHarnessTest.test_consume_rejects_changed_store_before_open", "at": 1790198598.774952} +{"event": "end", "test": "test_platform_harness.PlatformHarnessTest.test_consume_rejects_changed_store_before_open", "wall_s": 0.0004979130001174781, "cpu_s": 0.0004985109999893211, "status": "pass", "spans": {}, "setup_s": 3.80999836124829e-07, "body_s": 0.00046073800012891297, "teardown_s": 7.710000318184029e-07} +{"event": "start", "test": "test_purpose_projection.PurposeProjectionTest.test_authoring_read_retrieves_reasoning_and_exposure_state", "at": 1790198600.3019276} +{"event": "end", "test": "test_purpose_projection.PurposeProjectionTest.test_authoring_read_retrieves_reasoning_and_exposure_state", "wall_s": 1.8923539869999786, "cpu_s": 1.8644242149999855, "status": "pass", "spans": {"tools.standards_engine.standards_engine.tools._contracts": {"calls": 1, "inclusive_s": 0.25406723199989756}, "SnapshotModule._content_id": {"calls": 2, "inclusive_s": 1.1707584159998987}, "SnapshotModule.load_content": {"calls": 2, "inclusive_s": 1.1956277699996463}, "StandardsEngine._compile": {"calls": 2, "inclusive_s": 0.41324702800011437}, "StandardsEngine._compiled_snapshot": {"calls": 2, "inclusive_s": 1.6136764430000312}}, "setup_s": 1.6230001165240537e-06, "body_s": 1.8921694260000095, "teardown_s": 2.003000190597959e-06} +{"event": "start", "test": "test_purpose_projection.PurposeProjectionTest.test_catalog_has_no_authoring_schema_closure", "at": 1790198602.1943486} +{"event": "end", "test": "test_purpose_projection.PurposeProjectionTest.test_catalog_has_no_authoring_schema_closure", "wall_s": 0.0030310600000120758, "cpu_s": 0.0030320060000121885, "status": "pass", "spans": {}, "setup_s": 1.0809999366756529e-06, "body_s": 0.002943531000028088, "teardown_s": 7.010000899754232e-07} +{"event": "start", "test": "test_purpose_projection.PurposeProjectionTest.test_direct_hidden_read_and_privileged_request_are_bounded", "at": 1790198602.197415} +{"event": "end", "test": "test_purpose_projection.PurposeProjectionTest.test_direct_hidden_read_and_privileged_request_are_bounded", "wall_s": 0.7841216799999984, "cpu_s": 0.7841165570000044, "status": "pass", "spans": {"SnapshotModule._content_id": {"calls": 1, "inclusive_s": 0.5875229060000038}, "SnapshotModule.load_content": {"calls": 1, "inclusive_s": 0.5986536739999337}, "StandardsEngine._compile": {"calls": 1, "inclusive_s": 0.18046236100008173}, "StandardsEngine._compiled_snapshot": {"calls": 1, "inclusive_s": 0.7815572370000154}}, "setup_s": 4.809999154531397e-07, "body_s": 0.784042073000137, "teardown_s": 1.5830000847927295e-06} +{"event": "start", "test": "test_purpose_projection.PurposeProjectionTest.test_domain_and_facade_admit_only_application_operations_before_work", "at": 1790198602.9816017} +{"event": "end", "test": "test_purpose_projection.PurposeProjectionTest.test_domain_and_facade_admit_only_application_operations_before_work", "wall_s": 0.4139558310000666, "cpu_s": 0.4138895720000164, "status": "pass", "spans": {"tools.standards_engine.standards_engine.tools._contracts": {"calls": 1, "inclusive_s": 0.41104744200015375}, "StandardsEngine.prepare": {"calls": 1, "inclusive_s": 3.416000004108355e-05}, "StandardsEngine.resolve": {"calls": 1, "inclusive_s": 3.349999997226405e-05}, "StandardsEngine.query_proposal": {"calls": 1, "inclusive_s": 3.184699994562834e-05}, "StandardsEngine.analyze_proposal": {"calls": 1, "inclusive_s": 3.341900014675048e-05}, "StandardsEngine.review_proposal": {"calls": 1, "inclusive_s": 3.2568000051469426e-05}, "StandardsEngine.apply_proposal": {"calls": 1, "inclusive_s": 3.155700005663675e-05}, "StandardsEngine.verify_proposal": {"calls": 1, "inclusive_s": 3.1716999956188374e-05}, "StandardsEngine.propose": {"calls": 1, "inclusive_s": 2.9494000045815483e-05}, "StandardsEngine.revise": {"calls": 1, "inclusive_s": 2.845199992407288e-05}}, "setup_s": 1.1820000054285629e-06, "body_s": 0.4138668499999767, "teardown_s": 1.3819999367115088e-06} +{"event": "start", "test": "test_purpose_projection.PurposeProjectionTest.test_hidden_intermediate_cannot_bridge_a_permitted_traversal", "at": 1790198603.395656} +{"event": "end", "test": "test_purpose_projection.PurposeProjectionTest.test_hidden_intermediate_cannot_bridge_a_permitted_traversal", "wall_s": 0.000766647999853376, "cpu_s": 0.0007672200000001794, "status": "pass", "spans": {}, "setup_s": 7.209998784674099e-07, "body_s": 0.0007225130000279023, "teardown_s": 5.899998996028444e-07} +{"event": "start", "test": "test_purpose_projection.PurposeProjectionTest.test_invalid_host_purpose_creates_no_store", "at": 1790198603.3964565} +{"event": "end", "test": "test_purpose_projection.PurposeProjectionTest.test_invalid_host_purpose_creates_no_store", "wall_s": 0.0003459489998931531, "cpu_s": 0.00034628399998837267, "status": "pass", "spans": {}, "setup_s": 3.799998467002297e-07, "body_s": 0.0003109780000158935, "teardown_s": 5.399999736255268e-07} +{"event": "start", "test": "test_purpose_projection.PurposeProjectionTest.test_material_change_requires_new_exposure_but_rationale_change_does_not", "at": 1790198603.396833} +{"event": "end", "test": "test_purpose_projection.PurposeProjectionTest.test_material_change_requires_new_exposure_but_rationale_change_does_not", "wall_s": 0.3852948000001106, "cpu_s": 0.3852787029999831, "status": "pass", "spans": {"StandardsEngine._compile": {"calls": 2, "inclusive_s": 0.36383166999985406}}, "setup_s": 4.1099997361015994e-07, "body_s": 0.38521289999994224, "teardown_s": 2.294000069014146e-06} +{"event": "start", "test": "test_purpose_projection.PurposeProjectionTest.test_native_query_and_handle_inspection_use_the_same_boundary", "at": 1790198603.7821977} +{"event": "end", "test": "test_purpose_projection.PurposeProjectionTest.test_native_query_and_handle_inspection_use_the_same_boundary", "wall_s": 2.7701549729999897, "cpu_s": 2.7696937569999704, "status": "pass", "spans": {"SnapshotModule._content_id": {"calls": 3, "inclusive_s": 2.01391192899996}, "SnapshotModule.load_content": {"calls": 3, "inclusive_s": 2.0535074199997325}, "StandardsEngine._compile": {"calls": 3, "inclusive_s": 0.6951619139999821}, "StandardsEngine._compiled_snapshot": {"calls": 3, "inclusive_s": 2.7581329520003237}}, "setup_s": 1.050999799190322e-06, "body_s": 2.7700760369998534, "teardown_s": 1.832000180002069e-06} +{"event": "start", "test": "test_purpose_projection.PurposeProjectionTest.test_read_has_exact_reviewed_content_and_explicit_permitted_fields", "at": 1790198606.5524542} +{"event": "end", "test": "test_purpose_projection.PurposeProjectionTest.test_read_has_exact_reviewed_content_and_explicit_permitted_fields", "wall_s": 1.8713063000000147, "cpu_s": 1.8711723389999975, "status": "pass", "spans": {"SnapshotModule._content_id": {"calls": 2, "inclusive_s": 1.4037487140001303}, "SnapshotModule.load_content": {"calls": 2, "inclusive_s": 1.4311382009998397}, "StandardsEngine._compile": {"calls": 2, "inclusive_s": 0.42665133700006663}, "StandardsEngine._compiled_snapshot": {"calls": 2, "inclusive_s": 1.8639174350000758}}, "setup_s": 1.3419999049801845e-06, "body_s": 1.8711103609998645, "teardown_s": 1.612999994904385e-06} +{"event": "start", "test": "test_purpose_projection.PurposeProjectionTest.test_router_presentation_change_requires_explicit_renewal", "at": 1790198608.423834} +{"event": "end", "test": "test_purpose_projection.PurposeProjectionTest.test_router_presentation_change_requires_explicit_renewal", "wall_s": 0.23601299599999948, "cpu_s": 0.23601878499999884, "status": "pass", "spans": {"StandardsEngine._compile": {"calls": 1, "inclusive_s": 0.22160637999991195}}, "setup_s": 1.1110000741609838e-06, "body_s": 0.23592447600003652, "teardown_s": 2.3239999791258015e-06} +{"event": "start", "test": "test_purpose_projection.PurposeProjectionTest.test_routing_retains_unknown_facts_and_blocks_missing_required_content", "at": 1790198608.6599193} +{"event": "end", "test": "test_purpose_projection.PurposeProjectionTest.test_routing_retains_unknown_facts_and_blocks_missing_required_content", "wall_s": 2.7923812829999406, "cpu_s": 2.7921314710000047, "status": "pass", "spans": {"SnapshotModule._content_id": {"calls": 3, "inclusive_s": 1.8922106410000197}, "SnapshotModule.load_content": {"calls": 3, "inclusive_s": 1.9490826999999626}, "StandardsEngine._compile": {"calls": 3, "inclusive_s": 0.8117522800000643}, "StandardsEngine._compiled_snapshot": {"calls": 3, "inclusive_s": 2.768682877999936}}, "setup_s": 1.1219999578315765e-06, "body_s": 2.792290709999861, "teardown_s": 1.9230001271353103e-06} +{"event": "start", "test": "test_purpose_projection.PurposeProjectionTest.test_unexpected_observation_failure_returns_no_private_context", "at": 1790198611.4524026} +{"event": "end", "test": "test_purpose_projection.PurposeProjectionTest.test_unexpected_observation_failure_returns_no_private_context", "wall_s": 0.8984227750001992, "cpu_s": 0.898324027000001, "status": "pass", "spans": {"SnapshotModule._content_id": {"calls": 1, "inclusive_s": 0.685821887999964}, "SnapshotModule.load_content": {"calls": 1, "inclusive_s": 0.6973672589999751}, "StandardsEngine._compile": {"calls": 1, "inclusive_s": 0.1963934049999807}, "StandardsEngine._compiled_snapshot": {"calls": 1, "inclusive_s": 0.8962884649999978}}, "setup_s": 1.2120001429138938e-06, "body_s": 0.8983284959999764, "teardown_s": 1.9330000213813037e-06} +{"event": "start", "test": "test_purpose_projection.PurposeProjectionTest.test_unsupported_capture_is_preserved_and_classified", "at": 1790198612.3508961} +{"event": "end", "test": "test_purpose_projection.PurposeProjectionTest.test_unsupported_capture_is_preserved_and_classified", "wall_s": 2.612176085000101, "cpu_s": 2.6119107499999927, "status": "pass", "spans": {"SnapshotModule._content_id": {"calls": 4, "inclusive_s": 2.5088586269998814}, "SnapshotModule.load_content": {"calls": 3, "inclusive_s": 1.9037524349998876}, "StandardsEngine._compile": {"calls": 1, "inclusive_s": 0.04574139400006061}, "StandardsEngine._compiled_snapshot": {"calls": 1, "inclusive_s": 0.669864786999824}}, "setup_s": 1.5929999790387228e-06, "body_s": 2.6120531039998696, "teardown_s": 3.2350001220038394e-06} +{"event": "start", "test": "test_purpose_projection.PurposeProjectionTest.test_whole_module_discovers_references_owned_by_its_policy_units", "at": 1790198614.9631782} +{"event": "end", "test": "test_purpose_projection.PurposeProjectionTest.test_whole_module_discovers_references_owned_by_its_policy_units", "wall_s": 0.0026545680000253924, "cpu_s": 0.0026555769999845324, "status": "pass", "spans": {}, "setup_s": 1.3310000213095918e-06, "body_s": 0.0025846239998372766, "teardown_s": 1.2420000530255493e-06} +{"event": "start", "test": "test_purpose_transport.PurposeTransportTest.test_actual_stdio_has_qualified_catalog_and_identical_result_encodings", "at": 1790198617.4090407} +{"event": "end", "test": "test_purpose_transport.PurposeTransportTest.test_actual_stdio_has_qualified_catalog_and_identical_result_encodings", "wall_s": 4.3426755279999725, "cpu_s": 0.0020285059999878285, "status": "pass", "spans": {}, "setup_s": 1.6320000213454477e-06, "body_s": 4.342502262999915, "teardown_s": 2.4930000108724926e-06} +{"event": "start", "test": "test_purpose_transport.PurposeTransportTest.test_cli_catalog_schema_example_and_denial_share_the_purpose", "at": 1790198621.751846} +{"event": "end", "test": "test_purpose_transport.PurposeTransportTest.test_cli_catalog_schema_example_and_denial_share_the_purpose", "wall_s": 8.321202078999931, "cpu_s": 0.011801939999998012, "status": "pass", "spans": {}, "setup_s": 1.2909999895782676e-06, "body_s": 8.320948515999817, "teardown_s": 2.2530000478582224e-06} +{"event": "start", "test": "test_purpose_transport.PurposeTransportTest.test_default_capture_reads_accepted_main_instead_of_unpublished_head", "at": 1790198630.0732799} +{"event": "observation", "test": "test_purpose_transport.PurposeTransportTest.test_default_capture_reads_accepted_main_instead_of_unpublished_head", "elapsed_s": 2.8850203140000303, "stack": [" File \"/mnt/data/pse-performance-work/Coding-Standards/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/measurement-tools/run_timed_suite.py\", line 58, in \n result=unittest.TextTestRunner(verbosity=1,resultclass=Result).run(suite)\n", " File \"/usr/lib/python3.13/unittest/runner.py\", line 240, in run\n test(result)\n", " File \"/usr/lib/python3.13/unittest/suite.py\", line 84, in __call__\n return self.run(*args, **kwds)\n", " File \"/usr/lib/python3.13/unittest/suite.py\", line 122, in run\n test(result)\n", " File \"/usr/lib/python3.13/unittest/case.py\", line 707, in __call__\n return self.run(*args, **kwds)\n", " File \"/usr/lib/python3.13/unittest/case.py\", line 651, in run\n self._callTestMethod(testMethod)\n", " File \"/mnt/data/pse-performance-work/Coding-Standards/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/measurement-tools/run_timed_suite.py\", line 36, in timed\n try:return _fn(self,*args,**kwargs)\n", " File \"/usr/lib/python3.13/unittest/case.py\", line 606, in _callTestMethod\n if method() is not None:\n", " File \"/mnt/data/pse-performance-work/candidate-tests/tools/standards_engine/tests/test_purpose_transport.py\", line 145, in test_default_capture_reads_accepted_main_instead_of_unpublished_head\n result = facade.read({\"target\": \"core\"})\n", " File \"/mnt/data/pse-performance-work/candidate-tests/tools/standards_engine/standards_engine/tools.py\", line 346, in read\n return self._result(\"read\", self._engine.read(call))\n", " File \"/mnt/data/pse-performance-work/candidate-tests/tools/standards_engine/standards_engine/context_projection.py\", line 56, in invoke\n return application_dispatch(engine, function.__name__, call)\n", " File \"/mnt/data/pse-performance-work/candidate-tests/tools/standards_engine/standards_engine/context_projection.py\", line 239, in application_dispatch\n captured = engine._capture_snapshot(c.CreateSnapshotCall(kind=\"create-snapshot\"))\n", " File \"/mnt/data/pse-performance-work/candidate-tests/tools/standards_engine/standards_engine/engine.py\", line 538, in _capture_snapshot\n summary = self._snapshots.create_snapshot(\n", " File \"/mnt/data/pse-performance-work/candidate-tests/tools/standards_snapshots/standards_snapshots/module.py\", line 96, in create_snapshot\n selected, self._content_id(capture), capture, self._time()\n", " File \"/mnt/data/pse-performance-work/Coding-Standards/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/measurement-tools/run_timed_suite.py\", line 25, in observe\n try:return original(*args,**kwargs)\n", " File \"/mnt/data/pse-performance-work/candidate-tests/tools/standards_snapshots/standards_snapshots/module.py\", line 210, in _content_id\n return hash_identity(\n", " File \"/mnt/data/pse-performance-work/candidate-tests/tools/standards_identity/standards_identity/encoding.py\", line 103, in hash_identity\n encoded = encode_identity_value(value)\n", " File \"/mnt/data/pse-performance-work/candidate-tests/tools/standards_identity/standards_identity/encoding.py\", line 85, in encode_identity_value\n return _encode(value)\n", " File \"/mnt/data/pse-performance-work/candidate-tests/tools/standards_identity/standards_identity/encoding.py\", line 198, in _encode\n return b\"[\" + b\",\".join(_encode(item) for item in value.values) + b\"]\"\n", " File \"/mnt/data/pse-performance-work/candidate-tests/tools/standards_identity/standards_identity/encoding.py\", line 198, in \n return b\"[\" + b\",\".join(_encode(item) for item in value.values) + b\"]\"\n", " File \"/mnt/data/pse-performance-work/candidate-tests/tools/standards_identity/standards_identity/encoding.py\", line 204, in _encode\n return b\"{\" + b\",\".join(encoded_members) + b\"}\"\n", " File \"/mnt/data/pse-performance-work/candidate-tests/tools/standards_identity/standards_identity/encoding.py\", line 201, in \n _encode_string(key) + b\":\" + _encode(member_value)\n", " File \"/mnt/data/pse-performance-work/candidate-tests/tools/standards_identity/standards_identity/encoding.py\", line 198, in _encode\n return b\"[\" + b\",\".join(_encode(item) for item in value.values) + b\"]\"\n", " File \"/mnt/data/pse-performance-work/candidate-tests/tools/standards_identity/standards_identity/encoding.py\", line 198, in \n return b\"[\" + b\",\".join(_encode(item) for item in value.values) + b\"]\"\n"]} +{"event": "end", "test": "test_purpose_transport.PurposeTransportTest.test_default_capture_reads_accepted_main_instead_of_unpublished_head", "wall_s": 4.079533113000025, "cpu_s": 2.8629756220000218, "status": "pass", "spans": {"tools.standards_engine.standards_engine.tools._contracts": {"calls": 1, "inclusive_s": 0.2971440710000479}, "StandardsEngine._compile": {"calls": 3, "inclusive_s": 2.055805997000107}, "SnapshotModule._content_id": {"calls": 2, "inclusive_s": 1.2930757040001026}, "SnapshotModule.load_content": {"calls": 1, "inclusive_s": 0.6601856309998766}, "StandardsEngine._compiled_snapshot": {"calls": 1, "inclusive_s": 0.8510318300000108}}, "setup_s": 1.3020001006225357e-06, "body_s": 4.07941002199982, "teardown_s": 2.5039998945430852e-06} +{"event": "start", "test": "test_purpose_transport.PurposeTransportTest.test_two_cold_processes_preserve_exact_application_read", "at": 1790198634.1529171} +{"event": "end", "test": "test_purpose_transport.PurposeTransportTest.test_two_cold_processes_preserve_exact_application_read", "wall_s": 9.927655206000054, "cpu_s": 0.0038168539999787754, "status": "pass", "spans": {}, "setup_s": 1.2519999472715426e-06, "body_s": 9.927546415999814, "teardown_s": 2.8550000479299342e-06} +{"event": "start", "test": "test_rendering.TextRenderingTest.test_application_purpose_is_distinct_from_authoring_publication", "at": 1790198644.0823967} +{"event": "end", "test": "test_rendering.TextRenderingTest.test_application_purpose_is_distinct_from_authoring_publication", "wall_s": 0.00047491899999840825, "cpu_s": 0.0004741950000379802, "status": "pass", "spans": {}, "setup_s": 1.2820000847568735e-06, "body_s": 0.00040140000010069343, "teardown_s": 1.0719998044805834e-06} +{"event": "start", "test": "test_rendering.TextRenderingTest.test_coverage_projection_preserves_subject_and_status", "at": 1790198644.0828958} +{"event": "end", "test": "test_rendering.TextRenderingTest.test_coverage_projection_preserves_subject_and_status", "wall_s": 5.979799993838242e-05, "cpu_s": 5.976900001769536e-05, "status": "pass", "spans": {}, "setup_s": 3.909999577444978e-07, "body_s": 3.236800012018648e-05, "teardown_s": 3.200000264769187e-07} +{"event": "start", "test": "test_rendering.TextRenderingTest.test_navigation_indexes_preserve_authority_and_exact_content", "at": 1790198644.082976} +{"event": "end", "test": "test_rendering.TextRenderingTest.test_navigation_indexes_preserve_authority_and_exact_content", "wall_s": 3.366900000401074e-05, "cpu_s": 3.366999999343534e-05, "status": "pass", "spans": {}, "setup_s": 2.6099996830453165e-07, "body_s": 1.1896999922100804e-05, "teardown_s": 2.399999630142702e-07} +{"event": "start", "test": "test_rendering.TextRenderingTest.test_pending_projection_is_deterministic_and_work_focused", "at": 1790198644.0830326} +{"event": "end", "test": "test_rendering.TextRenderingTest.test_pending_projection_is_deterministic_and_work_focused", "wall_s": 4.943299995829875e-05, "cpu_s": 4.940299999134368e-05, "status": "pass", "spans": {}, "setup_s": 2.100000529026147e-07, "body_s": 2.9392999977062573e-05, "teardown_s": 3.0999990485724993e-07} +{"event": "start", "test": "test_rendering.TextRenderingTest.test_projected_navigation_renders_revision_authority", "at": 1790198644.0830977} +{"event": "end", "test": "test_rendering.TextRenderingTest.test_projected_navigation_renders_revision_authority", "wall_s": 2.86520000827295e-05, "cpu_s": 2.8611999994154758e-05, "status": "pass", "spans": {}, "setup_s": 3.000000106112566e-07, "body_s": 9.754000075190561e-06, "teardown_s": 2.409999524388695e-07} +{"event": "start", "test": "test_rendering.TextRenderingTest.test_proposal_projection_exposes_only_opaque_handles", "at": 1790198644.0831409} +{"event": "end", "test": "test_rendering.TextRenderingTest.test_proposal_projection_exposes_only_opaque_handles", "wall_s": 2.6278999939677306e-05, "cpu_s": 2.624900002956565e-05, "status": "pass", "spans": {}, "setup_s": 2.700001004996011e-07, "body_s": 9.303000069849077e-06, "teardown_s": 2.200001745222835e-07} +{"event": "start", "test": "test_rendering.TextRenderingTest.test_proposal_review_renders_only_opaque_authority", "at": 1790198644.0831816} +{"event": "end", "test": "test_rendering.TextRenderingTest.test_proposal_review_renders_only_opaque_authority", "wall_s": 2.29139998282335e-05, "cpu_s": 2.2924000006696588e-05, "status": "pass", "spans": {}, "setup_s": 2.1999994714860804e-07, "body_s": 5.7780000588536495e-06, "teardown_s": 1.999999312829459e-07} +{"event": "start", "test": "test_rendering.TextRenderingTest.test_rejection_projection_accepts_the_generated_result_type", "at": 1790198644.083218} +{"event": "end", "test": "test_rendering.TextRenderingTest.test_rejection_projection_accepts_the_generated_result_type", "wall_s": 0.0002249009999104601, "cpu_s": 0.00022531499996603088, "status": "pass", "spans": {}, "setup_s": 1.8999980966327712e-07, "body_s": 0.00020194700005049526, "teardown_s": 3.7099994187883567e-07} +{"event": "start", "test": "test_rendering.TextRenderingTest.test_unknown_result_variant_is_a_programming_error", "at": 1790198644.0834656} +{"event": "end", "test": "test_rendering.TextRenderingTest.test_unknown_result_variant_is_a_programming_error", "wall_s": 0.00012366200007818406, "cpu_s": 0.00012370399997507775, "status": "pass", "spans": {}, "setup_s": 3.000000106112566e-07, "body_s": 0.00010099899986926175, "teardown_s": 3.410000317671802e-07} +{"event": "start", "test": "test_rendering.TextRenderingTest.test_verification_projection_preserves_revision_and_diagnostic_identity", "at": 1790198644.0836084} +{"event": "end", "test": "test_rendering.TextRenderingTest.test_verification_projection_preserves_revision_and_diagnostic_identity", "wall_s": 4.576699984681909e-05, "cpu_s": 4.573799998297545e-05, "status": "pass", "spans": {}, "setup_s": 3.010000000358559e-07, "body_s": 2.3815000076865545e-05, "teardown_s": 2.6999987312592566e-07} +{"event": "start", "test": "test_supporting_workflow.SupportingWorkflowTest.test_coordinated_publication_and_provenance_only_revision", "at": 1790198644.9482412} +{"event": "observation", "test": "test_supporting_workflow.SupportingWorkflowTest.test_coordinated_publication_and_provenance_only_revision", "elapsed_s": 33.0809858770001, "stack": [" File \"/mnt/data/pse-performance-work/Coding-Standards/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/measurement-tools/run_timed_suite.py\", line 58, in \n result=unittest.TextTestRunner(verbosity=1,resultclass=Result).run(suite)\n", " File \"/usr/lib/python3.13/unittest/runner.py\", line 240, in run\n test(result)\n", " File \"/usr/lib/python3.13/unittest/suite.py\", line 84, in __call__\n return self.run(*args, **kwds)\n", " File \"/usr/lib/python3.13/unittest/suite.py\", line 122, in run\n test(result)\n", " File \"/usr/lib/python3.13/unittest/case.py\", line 707, in __call__\n return self.run(*args, **kwds)\n", " File \"/usr/lib/python3.13/unittest/case.py\", line 651, in run\n self._callTestMethod(testMethod)\n", " File \"/mnt/data/pse-performance-work/Coding-Standards/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/measurement-tools/run_timed_suite.py\", line 36, in timed\n try:return _fn(self,*args,**kwargs)\n", " File \"/usr/lib/python3.13/unittest/case.py\", line 606, in _callTestMethod\n if method() is not None:\n", " File \"/mnt/data/pse-performance-work/candidate-tests/tools/standards_engine/tests/test_supporting_workflow.py\", line 105, in test_coordinated_publication_and_provenance_only_revision\n self.publish(proposed)\n", " File \"/mnt/data/pse-performance-work/candidate-tests/tools/standards_engine/tests/test_supporting_workflow.py\", line 71, in publish\n complete = self.resolve(proposed)\n", " File \"/mnt/data/pse-performance-work/candidate-tests/tools/standards_engine/tests/test_supporting_workflow.py\", line 62, in resolve\n proposed = self.author.resolve_workflow({\"context\": proposed[\"context\"], \"submission\": {\n", " File \"/mnt/data/pse-performance-work/candidate-tests/tools/standards_engine/standards_engine/tools.py\", line 298, in resolve_workflow\n return self._result(\"resolve_workflow\", self._engine.resolve_workflow(call))\n", " File \"/mnt/data/pse-performance-work/candidate-tests/tools/standards_engine/standards_engine/context_projection.py\", line 62, in invoke\n return function(engine, call)\n", " File \"/mnt/data/pse-performance-work/candidate-tests/tools/standards_engine/standards_engine/engine.py\", line 952, in resolve_workflow\n return advance(self, \"resolve_workflow\", call)\n", " File \"/mnt/data/pse-performance-work/candidate-tests/tools/standards_engine/standards_engine/agent_workflow.py\", line 193, in advance\n current = view(engine, bound)\n", " File \"/mnt/data/pse-performance-work/candidate-tests/tools/standards_engine/standards_engine/agent_workflow.py\", line 123, in view\n outcome = engine._analysis_result(engine._evaluate(bound.analysis))\n", " File \"/mnt/data/pse-performance-work/Coding-Standards/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/measurement-tools/run_timed_suite.py\", line 25, in observe\n try:return original(*args,**kwargs)\n", " File \"/mnt/data/pse-performance-work/candidate-tests/tools/standards_engine/standards_engine/engine.py\", line 1818, in _evaluate\n materials = self._evaluation_materials(state)\n", " File \"/mnt/data/pse-performance-work/candidate-tests/tools/standards_engine/standards_engine/engine.py\", line 1806, in _evaluation_materials\n projection = self._proposal_projection(revision, accepted)\n", " File \"/mnt/data/pse-performance-work/Coding-Standards/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/measurement-tools/run_timed_suite.py\", line 25, in observe\n try:return original(*args,**kwargs)\n", " File \"/mnt/data/pse-performance-work/candidate-tests/tools/standards_engine/standards_engine/engine.py\", line 1710, in _proposal_projection\n return self._logical_authoring.compile(\n", " File \"/mnt/data/pse-performance-work/candidate-tests/tools/standards_engine/standards_engine/logical_authoring.py\", line 994, in compile\n repository_paths = _refresh_suite_input_projection(\n", " File \"/mnt/data/pse-performance-work/candidate-tests/tools/standards_engine/standards_engine/logical_authoring.py\", line 2455, in _refresh_suite_input_projection\n files[_SUITE_INPUTS] = suite_input_projection_bytes(\n", " File \"/mnt/data/pse-performance-work/candidate-tests/tools/standards_verifier/standards_verifier/suite_inputs.py\", line 162, in suite_input_projection_bytes\n compile_suite_input_manifest(root, repository_paths=repository_paths)\n", " File \"/mnt/data/pse-performance-work/candidate-tests/tools/standards_verifier/standards_verifier/suite_inputs.py\", line 67, in compile_suite_input_manifest\n for declaration in check.authority_inputs(context):\n", " File \"/mnt/data/pse-performance-work/candidate-tests/tools/standards_verifier/standards_verifier/checks/metadata_route.py\", line 46, in authority_inputs\n corpus = load_canonical_module_corpus(context.repo_root)\n", " File \"/mnt/data/pse-performance-work/candidate-tests/tools/standards_metadata/standards_metadata/loader.py\", line 550, in load_canonical_module_corpus\n validation = validate_module_metadata(selected_source, members)\n", " File \"/mnt/data/pse-performance-work/candidate-tests/tools/standards_metadata/standards_metadata/loader.py\", line 442, in validate_module_metadata\n module, module_failures = _parse_module(selected_source, path)\n", " File \"/mnt/data/pse-performance-work/candidate-tests/tools/standards_metadata/standards_metadata/loader.py\", line 149, in _parse_module\n raw = source.read_bytes(path)\n", " File \"/mnt/data/pse-performance-work/candidate-tests/tools/standards_metadata/standards_metadata/source.py\", line 24, in read_bytes\n return contained_file(self._root, path).read_bytes()\n", " File \"/mnt/data/pse-performance-work/candidate-tests/tools/standards_metadata/standards_metadata/paths.py\", line 60, in contained_file\n return resolved\n", " File \"/usr/lib/python3.13/pathlib/_local.py\", line 672, in resolve\n return self.with_segments(os.path.realpath(self, strict=strict))\n", " File \"\", line 494, in realpath\n"]} +{"event": "observation", "test": "test_supporting_workflow.SupportingWorkflowTest.test_coordinated_publication_and_provenance_only_revision", "elapsed_s": 78.0892956990001, "stack": [" File \"/mnt/data/pse-performance-work/Coding-Standards/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/measurement-tools/run_timed_suite.py\", line 58, in \n result=unittest.TextTestRunner(verbosity=1,resultclass=Result).run(suite)\n", " File \"/usr/lib/python3.13/unittest/runner.py\", line 240, in run\n test(result)\n", " File \"/usr/lib/python3.13/unittest/suite.py\", line 84, in __call__\n return self.run(*args, **kwds)\n", " File \"/usr/lib/python3.13/unittest/suite.py\", line 122, in run\n test(result)\n", " File \"/usr/lib/python3.13/unittest/case.py\", line 707, in __call__\n return self.run(*args, **kwds)\n", " File \"/usr/lib/python3.13/unittest/case.py\", line 651, in run\n self._callTestMethod(testMethod)\n", " File \"/mnt/data/pse-performance-work/Coding-Standards/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/measurement-tools/run_timed_suite.py\", line 36, in timed\n try:return _fn(self,*args,**kwargs)\n", " File \"/usr/lib/python3.13/unittest/case.py\", line 606, in _callTestMethod\n if method() is not None:\n", " File \"/mnt/data/pse-performance-work/candidate-tests/tools/standards_engine/tests/test_supporting_workflow.py\", line 105, in test_coordinated_publication_and_provenance_only_revision\n self.publish(proposed)\n", " File \"/mnt/data/pse-performance-work/candidate-tests/tools/standards_engine/tests/test_supporting_workflow.py\", line 74, in publish\n applied = self.author.apply({\"context\": ready[\"context\"]})\n", " File \"/mnt/data/pse-performance-work/candidate-tests/tools/standards_engine/standards_engine/tools.py\", line 310, in apply\n return self._result(\"apply\", self._engine.apply(call))\n", " File \"/mnt/data/pse-performance-work/candidate-tests/tools/standards_engine/standards_engine/context_projection.py\", line 62, in invoke\n return function(engine, call)\n", " File \"/mnt/data/pse-performance-work/candidate-tests/tools/standards_engine/standards_engine/engine.py\", line 964, in apply\n return advance(self, \"apply\", call)\n", " File \"/mnt/data/pse-performance-work/candidate-tests/tools/standards_engine/standards_engine/agent_workflow.py\", line 257, in advance\n result = engine.apply_proposal(\n", " File \"/mnt/data/pse-performance-work/Coding-Standards/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/measurement-tools/run_timed_suite.py\", line 25, in observe\n try:return original(*args,**kwargs)\n", " File \"/mnt/data/pse-performance-work/candidate-tests/tools/standards_engine/standards_engine/context_projection.py\", line 62, in invoke\n return function(engine, call)\n", " File \"/mnt/data/pse-performance-work/candidate-tests/tools/standards_engine/standards_engine/engine.py\", line 1290, in apply_proposal\n verification = self._application_verifier(candidate.root)\n", " File \"/mnt/data/pse-performance-work/candidate-tests/tools/standards_verifier/standards_verifier/cli.py\", line 76, in run_complete_verification\n results = tuple(Verifier(repo_root, registry).run(None))\n", " File \"/mnt/data/pse-performance-work/candidate-tests/tools/standards_verifier/standards_verifier/engine.py\", line 66, in run\n result = self._run_suite(catalog.suite(suite_id), catalog)\n", " File \"/mnt/data/pse-performance-work/candidate-tests/tools/standards_verifier/standards_verifier/engine.py\", line 100, in _run_suite\n diagnostics.extend(check.run(context))\n", " File \"/mnt/data/pse-performance-work/candidate-tests/tools/standards_verifier/standards_verifier/checks/python_package_contract.py\", line 70, in run\n for finding in execute_python_package_contract(context.repo_root)\n", " File \"/mnt/data/pse-performance-work/candidate-tests/tools/standards_verifier/standards_verifier/python_packages.py\", line 1312, in execute_python_package_contract\n completed = _execute_entrypoint(\n", " File \"/mnt/data/pse-performance-work/candidate-tests/tools/standards_verifier/standards_verifier/python_packages.py\", line 1403, in _execute_entrypoint\n return subprocess.run(\n", " File \"/usr/lib/python3.13/subprocess.py\", line 556, in run\n stdout, stderr = process.communicate(input, timeout=timeout)\n", " File \"/usr/lib/python3.13/subprocess.py\", line 1222, in communicate\n stdout, stderr = self._communicate(input, endtime, timeout)\n", " File \"/usr/lib/python3.13/subprocess.py\", line 2128, in _communicate\n ready = selector.select(timeout)\n", " File \"/usr/lib/python3.13/selectors.py\", line 398, in select\n fd_event_list = self._selector.poll(timeout)\n"]} +{"event": "observation", "test": "test_supporting_workflow.SupportingWorkflowTest.test_coordinated_publication_and_provenance_only_revision", "elapsed_s": 123.09788030800019, "stack": [" File \"/mnt/data/pse-performance-work/Coding-Standards/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/measurement-tools/run_timed_suite.py\", line 58, in \n result=unittest.TextTestRunner(verbosity=1,resultclass=Result).run(suite)\n", " File \"/usr/lib/python3.13/unittest/runner.py\", line 240, in run\n test(result)\n", " File \"/usr/lib/python3.13/unittest/suite.py\", line 84, in __call__\n return self.run(*args, **kwds)\n", " File \"/usr/lib/python3.13/unittest/suite.py\", line 122, in run\n test(result)\n", " File \"/usr/lib/python3.13/unittest/case.py\", line 707, in __call__\n return self.run(*args, **kwds)\n", " File \"/usr/lib/python3.13/unittest/case.py\", line 651, in run\n self._callTestMethod(testMethod)\n", " File \"/mnt/data/pse-performance-work/Coding-Standards/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/measurement-tools/run_timed_suite.py\", line 36, in timed\n try:return _fn(self,*args,**kwargs)\n", " File \"/usr/lib/python3.13/unittest/case.py\", line 606, in _callTestMethod\n if method() is not None:\n", " File \"/mnt/data/pse-performance-work/candidate-tests/tools/standards_engine/tests/test_supporting_workflow.py\", line 119, in test_coordinated_publication_and_provenance_only_revision\n next_change = self.author.propose({\"change_set\": self.change([\n", " File \"/mnt/data/pse-performance-work/candidate-tests/tools/standards_engine/standards_engine/tools.py\", line 280, in propose\n return self._result(\"propose\", self._engine.propose(call))\n", " File \"/mnt/data/pse-performance-work/Coding-Standards/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/measurement-tools/run_timed_suite.py\", line 25, in observe\n try:return original(*args,**kwargs)\n", " File \"/mnt/data/pse-performance-work/candidate-tests/tools/standards_engine/standards_engine/context_projection.py\", line 62, in invoke\n return function(engine, call)\n", " File \"/mnt/data/pse-performance-work/candidate-tests/tools/standards_engine/standards_engine/engine.py\", line 934, in propose\n return propose(self, call)\n", " File \"/mnt/data/pse-performance-work/candidate-tests/tools/standards_engine/standards_engine/agent_workflow.py\", line 166, in propose\n captured = engine.create_snapshot(\n", " File \"/mnt/data/pse-performance-work/candidate-tests/tools/standards_engine/standards_engine/context_projection.py\", line 62, in invoke\n return function(engine, call)\n", " File \"/mnt/data/pse-performance-work/candidate-tests/tools/standards_engine/standards_engine/engine.py\", line 506, in create_snapshot\n return self._capture_snapshot(call)\n", " File \"/mnt/data/pse-performance-work/candidate-tests/tools/standards_engine/standards_engine/engine.py\", line 538, in _capture_snapshot\n summary = self._snapshots.create_snapshot(\n", " File \"/mnt/data/pse-performance-work/candidate-tests/tools/standards_snapshots/standards_snapshots/module.py\", line 96, in create_snapshot\n selected, self._content_id(capture), capture, self._time()\n", " File \"/mnt/data/pse-performance-work/Coding-Standards/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/measurement-tools/run_timed_suite.py\", line 25, in observe\n try:return original(*args,**kwargs)\n", " File \"/mnt/data/pse-performance-work/candidate-tests/tools/standards_snapshots/standards_snapshots/module.py\", line 207, in _content_id\n material = frame_path_byte_set(\n", " File \"/mnt/data/pse-performance-work/candidate-tests/tools/standards_identity/standards_identity/encoding.py\", line 153, in frame_path_byte_set\n selected.append((components, frame_path_bytes(components, content)))\n", " File \"/mnt/data/pse-performance-work/candidate-tests/tools/standards_identity/standards_identity/encoding.py\", line 141, in frame_path_bytes\n (\"bytes\", IdentityArray(content)),\n", " File \"/mnt/data/pse-performance-work/candidate-tests/tools/standards_identity/standards_identity/encoding.py\", line 35, in __init__\n _validate_value(value)\n"]} +{"event": "observation", "test": "test_supporting_workflow.SupportingWorkflowTest.test_coordinated_publication_and_provenance_only_revision", "elapsed_s": 168.144129044, "stack": [" File \"/mnt/data/pse-performance-work/Coding-Standards/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/measurement-tools/run_timed_suite.py\", line 58, in \n result=unittest.TextTestRunner(verbosity=1,resultclass=Result).run(suite)\n", " File \"/usr/lib/python3.13/unittest/runner.py\", line 240, in run\n test(result)\n", " File \"/usr/lib/python3.13/unittest/suite.py\", line 84, in __call__\n return self.run(*args, **kwds)\n", " File \"/usr/lib/python3.13/unittest/suite.py\", line 122, in run\n test(result)\n", " File \"/usr/lib/python3.13/unittest/case.py\", line 707, in __call__\n return self.run(*args, **kwds)\n", " File \"/usr/lib/python3.13/unittest/case.py\", line 651, in run\n self._callTestMethod(testMethod)\n", " File \"/mnt/data/pse-performance-work/Coding-Standards/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/measurement-tools/run_timed_suite.py\", line 36, in timed\n try:return _fn(self,*args,**kwargs)\n", " File \"/usr/lib/python3.13/unittest/case.py\", line 606, in _callTestMethod\n if method() is not None:\n", " File \"/mnt/data/pse-performance-work/candidate-tests/tools/standards_engine/tests/test_supporting_workflow.py\", line 123, in test_coordinated_publication_and_provenance_only_revision\n self.publish(next_change)\n", " File \"/mnt/data/pse-performance-work/candidate-tests/tools/standards_engine/tests/test_supporting_workflow.py\", line 74, in publish\n applied = self.author.apply({\"context\": ready[\"context\"]})\n", " File \"/mnt/data/pse-performance-work/candidate-tests/tools/standards_engine/standards_engine/tools.py\", line 310, in apply\n return self._result(\"apply\", self._engine.apply(call))\n", " File \"/mnt/data/pse-performance-work/candidate-tests/tools/standards_engine/standards_engine/context_projection.py\", line 62, in invoke\n return function(engine, call)\n", " File \"/mnt/data/pse-performance-work/candidate-tests/tools/standards_engine/standards_engine/engine.py\", line 964, in apply\n return advance(self, \"apply\", call)\n", " File \"/mnt/data/pse-performance-work/candidate-tests/tools/standards_engine/standards_engine/agent_workflow.py\", line 257, in advance\n result = engine.apply_proposal(\n", " File \"/mnt/data/pse-performance-work/Coding-Standards/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/measurement-tools/run_timed_suite.py\", line 25, in observe\n try:return original(*args,**kwargs)\n", " File \"/mnt/data/pse-performance-work/candidate-tests/tools/standards_engine/standards_engine/context_projection.py\", line 62, in invoke\n return function(engine, call)\n", " File \"/mnt/data/pse-performance-work/candidate-tests/tools/standards_engine/standards_engine/engine.py\", line 1290, in apply_proposal\n verification = self._application_verifier(candidate.root)\n", " File \"/mnt/data/pse-performance-work/candidate-tests/tools/standards_verifier/standards_verifier/cli.py\", line 76, in run_complete_verification\n results = tuple(Verifier(repo_root, registry).run(None))\n", " File \"/mnt/data/pse-performance-work/candidate-tests/tools/standards_verifier/standards_verifier/engine.py\", line 66, in run\n result = self._run_suite(catalog.suite(suite_id), catalog)\n", " File \"/mnt/data/pse-performance-work/candidate-tests/tools/standards_verifier/standards_verifier/engine.py\", line 100, in _run_suite\n diagnostics.extend(check.run(context))\n", " File \"/mnt/data/pse-performance-work/candidate-tests/tools/standards_verifier/standards_verifier/checks/python_package_contract.py\", line 70, in run\n for finding in execute_python_package_contract(context.repo_root)\n", " File \"/mnt/data/pse-performance-work/candidate-tests/tools/standards_verifier/standards_verifier/python_packages.py\", line 1294, in execute_python_package_contract\n completed = subprocess.run(\n", " File \"/usr/lib/python3.13/subprocess.py\", line 556, in run\n stdout, stderr = process.communicate(input, timeout=timeout)\n", " File \"/usr/lib/python3.13/subprocess.py\", line 1222, in communicate\n stdout, stderr = self._communicate(input, endtime, timeout)\n", " File \"/usr/lib/python3.13/subprocess.py\", line 2128, in _communicate\n ready = selector.select(timeout)\n", " File \"/usr/lib/python3.13/selectors.py\", line 398, in select\n fd_event_list = self._selector.poll(timeout)\n"]} +{"event": "end", "test": "test_supporting_workflow.SupportingWorkflowTest.test_coordinated_publication_and_provenance_only_revision", "wall_s": 188.03096219400004, "cpu_s": 109.980109384, "status": "pass", "spans": {"StandardsEngine._compile": {"calls": 119, "inclusive_s": 43.55813985099894}, "SnapshotModule._content_id": {"calls": 55, "inclusive_s": 35.61891940300029}, "SnapshotModule.load_content": {"calls": 45, "inclusive_s": 29.789769499999693}, "StandardsEngine._compiled_snapshot": {"calls": 41, "inclusive_s": 36.25745207299951}, "StandardsEngine._proposal_projection": {"calls": 29, "inclusive_s": 58.603815473000395}, "AuthoringModule.read_revision": {"calls": 136, "inclusive_s": 2.4351556599990545}, "StandardsEngine._validate_projected_inputs": {"calls": 33, "inclusive_s": 0.03455522000012934}, "StandardsEngine._evaluate": {"calls": 33, "inclusive_s": 38.219945630000666}, "StandardsEngine.analyze_proposal": {"calls": 2, "inclusive_s": 5.724102796000125}, "StandardsEngine.propose": {"calls": 2, "inclusive_s": 15.41011444500009}, "StandardsEngine.query_proposal": {"calls": 1, "inclusive_s": 2.8517902700000377}, "StandardsEngine.resolve": {"calls": 9, "inclusive_s": 25.474412296000082}, "StandardsEngine.review_proposal": {"calls": 2, "inclusive_s": 5.405798208000078}, "StandardsEngine.apply_proposal": {"calls": 2, "inclusive_s": 69.27285360600013}}, "setup_s": 1.9829999473586213e-06, "body_s": 188.03077779299997, "teardown_s": 1.582999857419054e-06} +{"event": "summary", "total_s": 920.254724692, "run": 166, "errors": 3, "failures": 1, "skips": 0} diff --git a/docs/plans/purpose-separated-standards-engine/reports/performance-core-evidence/full-engine.log b/docs/plans/purpose-separated-standards-engine/reports/performance-core-evidence/full-engine.log new file mode 100644 index 00000000..8696864e --- /dev/null +++ b/docs/plans/purpose-separated-standards-engine/reports/performance-core-evidence/full-engine.log @@ -0,0 +1,418 @@ +START test_agent_navigation.AgentNavigationTest.test_boolean_nullable_set_facts_aliases_and_multiple_causes +.END test_agent_navigation.AgentNavigationTest.test_boolean_nullable_set_facts_aliases_and_multiple_causes 0.837 pass +START test_agent_navigation.AgentNavigationTest.test_capture_rejection_never_advances_to_query +.END test_agent_navigation.AgentNavigationTest.test_capture_rejection_never_advances_to_query 0.0 pass +START test_agent_navigation.AgentNavigationTest.test_compact_read_preserves_text_authority_and_full_detail +.END test_agent_navigation.AgentNavigationTest.test_compact_read_preserves_text_authority_and_full_detail 1.939 pass +START test_agent_navigation.AgentNavigationTest.test_complete_explicit_facts_select_reviewed_modules +.END test_agent_navigation.AgentNavigationTest.test_complete_explicit_facts_select_reviewed_modules 1.621 pass +START test_agent_navigation.AgentNavigationTest.test_focused_read_continuations_are_callable_against_exact_snapshot +.END test_agent_navigation.AgentNavigationTest.test_focused_read_continuations_are_callable_against_exact_snapshot 2.555 pass +START test_agent_navigation.AgentNavigationTest.test_invalid_inputs_cannot_create_snapshot +.END test_agent_navigation.AgentNavigationTest.test_invalid_inputs_cannot_create_snapshot 0.0 pass +START test_agent_navigation.AgentNavigationTest.test_invalid_routing_values_do_not_become_negative_facts +.END test_agent_navigation.AgentNavigationTest.test_invalid_routing_values_do_not_become_negative_facts 1.657 pass +START test_agent_navigation.AgentNavigationTest.test_optional_capture_matches_explicit_route_and_preserves_unresolved +.END test_agent_navigation.AgentNavigationTest.test_optional_capture_matches_explicit_route_and_preserves_unresolved 4.151 pass +START test_agent_navigation.AgentNavigationTest.test_related_matches_native_permissions_and_projection +.END test_agent_navigation.AgentNavigationTest.test_related_matches_native_permissions_and_projection 3.365 pass +START test_agent_navigation.AgentNavigationTest.test_supplied_snapshot_never_captures_ambient_authority +.END test_agent_navigation.AgentNavigationTest.test_supplied_snapshot_never_captures_ambient_authority 1.597 pass +START test_agent_navigation.AgentNavigationTest.test_vocabulary_matches_router_and_questions_are_typed +.END test_agent_navigation.AgentNavigationTest.test_vocabulary_matches_router_and_questions_are_typed 2.738 pass +START test_agent_workflow.AgentWorkflowTest.test_analysis_rejection_retains_the_created_revision +.END test_agent_workflow.AgentWorkflowTest.test_analysis_rejection_retains_the_created_revision 2.346 pass +START test_agent_workflow.AgentWorkflowTest.test_context_is_immutable_existing_identity_and_foreign_records_reject +.END test_agent_workflow.AgentWorkflowTest.test_context_is_immutable_existing_identity_and_foreign_records_reject 4.557 pass +START test_agent_workflow.AgentWorkflowTest.test_normative_proposal_stops_at_real_pending_work +.END test_agent_workflow.AgentWorkflowTest.test_normative_proposal_stops_at_real_pending_work 17.719 pass +START test_agent_workflow.AgentWorkflowTest.test_reference_proposal_composes_analysis_without_review_or_application +.END test_agent_workflow.AgentWorkflowTest.test_reference_proposal_composes_analysis_without_review_or_application 8.105 pass +START test_agent_workflow.AgentWorkflowTest.test_review_is_explicit_and_current_authorization_is_required +.END test_agent_workflow.AgentWorkflowTest.test_review_is_explicit_and_current_authorization_is_required 12.366 pass +START test_agent_workflow.AgentWorkflowTest.test_revision_advancement_does_not_retarget_old_context +.END test_agent_workflow.AgentWorkflowTest.test_revision_advancement_does_not_retarget_old_context 19.589 pass +START test_analysis.AnalysisWorkflowTest.test_apply_create_and_retire_owns_topology_and_commit +EEND test_analysis.AnalysisWorkflowTest.test_apply_create_and_retire_owns_topology_and_commit 0.643 error +START test_analysis.AnalysisWorkflowTest.test_apply_proposal_composes_real_verification_and_cold_readback +EEND test_analysis.AnalysisWorkflowTest.test_apply_proposal_composes_real_verification_and_cold_readback 0.651 error +START test_analysis.AnalysisWorkflowTest.test_capture_compiles_live_and_frozen_sources_independently +.END test_analysis.AnalysisWorkflowTest.test_capture_compiles_live_and_frozen_sources_independently 2.461 pass +START test_analysis.AnalysisWorkflowTest.test_cold_load_rejects_obsolete_domain_contracts +.END test_analysis.AnalysisWorkflowTest.test_cold_load_rejects_obsolete_domain_contracts 0.013 pass +START test_analysis.AnalysisWorkflowTest.test_coverage_exclusions_require_exact_evidence_before_resolution +.END test_analysis.AnalysisWorkflowTest.test_coverage_exclusions_require_exact_evidence_before_resolution 2.554 pass +START test_analysis.AnalysisWorkflowTest.test_current_authorization_is_not_reused_with_material +.END test_analysis.AnalysisWorkflowTest.test_current_authorization_is_not_reused_with_material 2.55 pass +START test_analysis.AnalysisWorkflowTest.test_distinct_snapshot_roots_retain_distinct_material_and_lifecycle +.END test_analysis.AnalysisWorkflowTest.test_distinct_snapshot_roots_retain_distinct_material_and_lifecycle 4.614 pass +START test_analysis.AnalysisWorkflowTest.test_equal_transition_is_idempotent_and_different_evidence_branches +.END test_analysis.AnalysisWorkflowTest.test_equal_transition_is_idempotent_and_different_evidence_branches 3.512 pass +START test_analysis.AnalysisWorkflowTest.test_lifecycle_change_during_authorization_blocks_post_submission_evaluation +.END test_analysis.AnalysisWorkflowTest.test_lifecycle_change_during_authorization_blocks_post_submission_evaluation 2.897 pass +START test_analysis.AnalysisWorkflowTest.test_policy_free_standard_creation_enters_public_analysis +.END test_analysis.AnalysisWorkflowTest.test_policy_free_standard_creation_enters_public_analysis 4.213 pass +START test_analysis.AnalysisWorkflowTest.test_prepare_persists_parent_bound_public_work +.END test_analysis.AnalysisWorkflowTest.test_prepare_persists_parent_bound_public_work 0.854 pass +START test_analysis.AnalysisWorkflowTest.test_prior_analysis_reuses_the_same_valid_decision +.END test_analysis.AnalysisWorkflowTest.test_prior_analysis_reuses_the_same_valid_decision 2.566 pass +START test_analysis.AnalysisWorkflowTest.test_prior_decisions_reuse_material_but_recheck_each_decision +.END test_analysis.AnalysisWorkflowTest.test_prior_decisions_reuse_material_but_recheck_each_decision 2.732 pass +START test_analysis.AnalysisWorkflowTest.test_proposal_analysis_derives_inputs_and_replays_exact_revision +.END test_analysis.AnalysisWorkflowTest.test_proposal_analysis_derives_inputs_and_replays_exact_revision 12.256 pass +START test_analysis.AnalysisWorkflowTest.test_proposal_analysis_uses_one_projection_and_one_verified_base +.END test_analysis.AnalysisWorkflowTest.test_proposal_analysis_uses_one_projection_and_one_verified_base 4.425 pass +START test_analysis.AnalysisWorkflowTest.test_relationship_only_proposals_enter_a1c_and_replay_cold +.END test_analysis.AnalysisWorkflowTest.test_relationship_only_proposals_enter_a1c_and_replay_cold 21.635 pass +START test_analysis.AnalysisWorkflowTest.test_resolved_parent_work_is_not_applicable_to_child +.END test_analysis.AnalysisWorkflowTest.test_resolved_parent_work_is_not_applicable_to_child 2.473 pass +START test_analysis.AnalysisWorkflowTest.test_review_composition_publishes_readiness_for_complete_analysis +.END test_analysis.AnalysisWorkflowTest.test_review_composition_publishes_readiness_for_complete_analysis 24.67 pass +START test_analysis.AnalysisWorkflowTest.test_same_snapshot_material_is_loaded_once_per_decision_operation +.END test_analysis.AnalysisWorkflowTest.test_same_snapshot_material_is_loaded_once_per_decision_operation 2.685 pass +START test_analysis.AnalysisWorkflowTest.test_snapshot_creation_rejects_changed_replay_path_closure +.END test_analysis.AnalysisWorkflowTest.test_snapshot_creation_rejects_changed_replay_path_closure 0.013 pass +START test_analysis.AnalysisWorkflowTest.test_state_and_children_are_inspectable_in_a_fresh_process +.END test_analysis.AnalysisWorkflowTest.test_state_and_children_are_inspectable_in_a_fresh_process 3.504 pass +START test_applicability_contract.ApplicabilityContractTest.test_former_applicability_implementations_are_not_fallbacks +.END test_applicability_contract.ApplicabilityContractTest.test_former_applicability_implementations_are_not_fallbacks 0.0 pass +START test_applicability_contract.ApplicabilityContractTest.test_runtime_domains_cover_the_public_serialized_applicability_shapes +.END test_applicability_contract.ApplicabilityContractTest.test_runtime_domains_cover_the_public_serialized_applicability_shapes 0.001 pass +START test_authoring.AuthoringTests.test_application_intent_is_current_head_guarded_and_records_applied +.END test_authoring.AuthoringTests.test_application_intent_is_current_head_guarded_and_records_applied 0.037 pass +START test_authoring.AuthoringTests.test_create_and_find_are_durable_through_the_public_facade +.END test_authoring.AuthoringTests.test_create_and_find_are_durable_through_the_public_facade 2.379 pass +START test_authoring.AuthoringTests.test_create_rejects_duplicate_facets_and_validator_failure_is_atomic +.END test_authoring.AuthoringTests.test_create_rejects_duplicate_facets_and_validator_failure_is_atomic 0.003 pass +START test_authoring.AuthoringTests.test_create_translates_invalid_change_set_unicode_to_a_typed_rejection +.END test_authoring.AuthoringTests.test_create_translates_invalid_change_set_unicode_to_a_typed_rejection 0.293 pass +START test_authoring.AuthoringTests.test_discovery_rejects_a_revision_without_content_bound_authority +.END test_authoring.AuthoringTests.test_discovery_rejects_a_revision_without_content_bound_authority 0.004 pass +START test_authoring.AuthoringTests.test_discovery_rejects_the_old_revision_contract_as_unsupported +.END test_authoring.AuthoringTests.test_discovery_rejects_the_old_revision_contract_as_unsupported 0.285 pass +START test_authoring.AuthoringTests.test_proposal_discovery_uses_opaque_keyset_continuations +.END test_authoring.AuthoringTests.test_proposal_discovery_uses_opaque_keyset_continuations 0.008 pass +START test_authoring.AuthoringTests.test_proposals_follow_snapshot_quarantine_and_purge_lifecycle +.END test_authoring.AuthoringTests.test_proposals_follow_snapshot_quarantine_and_purge_lifecycle 0.005 pass +START test_authoring.AuthoringTests.test_readiness_is_content_bound_durable_and_current_head_guarded +.END test_authoring.AuthoringTests.test_readiness_is_content_bound_durable_and_current_head_guarded 0.023 pass +START test_authoring.AuthoringTests.test_readiness_rejects_incomplete_decisions_without_persistence +.END test_authoring.AuthoringTests.test_readiness_rejects_incomplete_decisions_without_persistence 0.004 pass +START test_authoring.AuthoringTests.test_readiness_rejects_invalid_proposal_commit_material +.END test_authoring.AuthoringTests.test_readiness_rejects_invalid_proposal_commit_material 0.004 pass +START test_authoring.AuthoringTests.test_revise_is_durable_and_stale_writes_leave_no_partial_record +.END test_authoring.AuthoringTests.test_revise_is_durable_and_stale_writes_leave_no_partial_record 0.617 pass +START test_authoring.AuthoringTests.test_stale_readiness_cannot_publish_application_intent +.END test_authoring.AuthoringTests.test_stale_readiness_cannot_publish_application_intent 0.011 pass +START test_coverage_publication.EngineAuditPublicationTest.test_review_verify_apply_recover_and_read_without_original_database +FEND test_coverage_publication.EngineAuditPublicationTest.test_review_verify_apply_recover_and_read_without_original_database 29.545 failure +START test_evidence_maintenance.EvidenceMaintenanceInterfaceTest.test_preview_and_overlap_preserve_working_tree_then_apply_retires +.END test_evidence_maintenance.EvidenceMaintenanceInterfaceTest.test_preview_and_overlap_preserve_working_tree_then_apply_retires 107.767 pass +START test_evidence_maintenance.EvidenceMaintenanceTest.test_consumer_registration_enters_existing_policy_owner +.END test_evidence_maintenance.EvidenceMaintenanceTest.test_consumer_registration_enters_existing_policy_owner 0.001 pass +START test_evidence_maintenance.EvidenceMaintenanceTest.test_pruning_preserves_current_claims_and_removes_stale_receipts +.END test_evidence_maintenance.EvidenceMaintenanceTest.test_pruning_preserves_current_claims_and_removes_stale_receipts 0.001 pass +START test_evidence_maintenance.EvidenceMaintenanceTest.test_registered_checker_retirement_removes_its_graph_edges +.END test_evidence_maintenance.EvidenceMaintenanceTest.test_registered_checker_retirement_removes_its_graph_edges 0.001 pass +START test_evidence_maintenance.EvidenceMaintenanceTest.test_retirement_preserves_real_dependencies_and_normative_consumers +.END test_evidence_maintenance.EvidenceMaintenanceTest.test_retirement_preserves_real_dependencies_and_normative_consumers 0.0 pass +START test_evidence_maintenance.EvidenceMaintenanceTest.test_subject_unregistration_preserves_guidance_and_retained_units +.END test_evidence_maintenance.EvidenceMaintenanceTest.test_subject_unregistration_preserves_guidance_and_retained_units 0.0 pass +START test_evidence_maintenance.EvidenceMaintenanceTest.test_unknown_retirement_does_not_mutate_authority +.END test_evidence_maintenance.EvidenceMaintenanceTest.test_unknown_retirement_does_not_mutate_authority 0.0 pass +START test_generated_contract.GeneratedContractTest.test_agent_tools_are_the_exact_compiler_projection +.END test_generated_contract.GeneratedContractTest.test_agent_tools_are_the_exact_compiler_projection 0.273 pass +START test_generated_contract.GeneratedContractTest.test_authored_examples_satisfy_the_public_contract +.END test_generated_contract.GeneratedContractTest.test_authored_examples_satisfy_the_public_contract 0.257 pass +START test_generated_contract.GeneratedContractTest.test_compiler_owns_the_complete_public_definition_closure +.END test_generated_contract.GeneratedContractTest.test_compiler_owns_the_complete_public_definition_closure 0.53 pass +START test_generated_contract.GeneratedContractTest.test_coverage_read_is_scoped_optional_and_uses_repository_authority +.END test_generated_contract.GeneratedContractTest.test_coverage_read_is_scoped_optional_and_uses_repository_authority 3.562 pass +START test_generated_contract.GeneratedContractTest.test_generated_contract_projections_are_current +.END test_generated_contract.GeneratedContractTest.test_generated_contract_projections_are_current 1.719 pass +START test_generated_contract.GeneratedContractTest.test_generated_native_models_decode_complete_v20_values +.END test_generated_contract.GeneratedContractTest.test_generated_native_models_decode_complete_v20_values 0.001 pass +START test_generated_contract.GeneratedContractTest.test_identity_fixtures_use_valid_public_handle_versions +.END test_generated_contract.GeneratedContractTest.test_identity_fixtures_use_valid_public_handle_versions 0.268 pass +START test_generated_contract.GeneratedContractTest.test_interface_operations_bind_generated_calls_results_and_facade +.END test_generated_contract.GeneratedContractTest.test_interface_operations_bind_generated_calls_results_and_facade 0.266 pass +START test_generated_contract.GeneratedContractTest.test_local_evidence_rejects_missing_files_and_wrong_digests +.END test_generated_contract.GeneratedContractTest.test_local_evidence_rejects_missing_files_and_wrong_digests 0.0 pass +START test_generated_contract.GeneratedContractTest.test_local_facade_binds_always_allow_authorization +.END test_generated_contract.GeneratedContractTest.test_local_facade_binds_always_allow_authorization 0.27 pass +START test_generated_contract.GeneratedContractTest.test_missing_verification_input_returns_a_typed_rejection +.END test_generated_contract.GeneratedContractTest.test_missing_verification_input_returns_a_typed_rejection 0.264 pass +START test_generated_contract.GeneratedContractTest.test_prepare_facade_passes_the_complete_generated_call +.END test_generated_contract.GeneratedContractTest.test_prepare_facade_passes_the_complete_generated_call 0.289 pass +START test_generated_contract.GeneratedContractTest.test_review_call_requires_exactly_three_decisions +.END test_generated_contract.GeneratedContractTest.test_review_call_requires_exactly_three_decisions 0.001 pass +START test_generated_contract.GeneratedContractTest.test_router_read_exposes_editable_definitions_only_when_requested +.END test_generated_contract.GeneratedContractTest.test_router_read_exposes_editable_definitions_only_when_requested 8.889 pass +START test_generated_contract.GeneratedContractTest.test_verification_is_exposed_without_publication_and_refresh_is_explicit +.END test_generated_contract.GeneratedContractTest.test_verification_is_exposed_without_publication_and_refresh_is_explicit 0.279 pass +START test_logical_authoring.LogicalAuthoringTests.test_change_set_is_immutable_and_normalized_before_compilation +.END test_logical_authoring.LogicalAuthoringTests.test_change_set_is_immutable_and_normalized_before_compilation 0.0 pass +START test_logical_authoring.LogicalAuthoringTests.test_compiler_projects_module_relationships_through_current_owners +.END test_logical_authoring.LogicalAuthoringTests.test_compiler_projects_module_relationships_through_current_owners 0.913 pass +START test_logical_authoring.LogicalAuthoringTests.test_compiler_revises_one_registered_policy_and_derives_analysis_input +.END test_logical_authoring.LogicalAuthoringTests.test_compiler_revises_one_registered_policy_and_derives_analysis_input 0.874 pass +START test_logical_authoring.LogicalAuthoringTests.test_create_nested_standard_and_route_atomically +.END test_logical_authoring.LogicalAuthoringTests.test_create_nested_standard_and_route_atomically 1.432 pass +START test_logical_authoring.LogicalAuthoringTests.test_create_standard_hides_all_required_repository_projections +.END test_logical_authoring.LogicalAuthoringTests.test_create_standard_hides_all_required_repository_projections 1.963 pass +START test_logical_authoring.LogicalAuthoringTests.test_created_standard_can_be_retired_with_complete_explicit_closure +.END test_logical_authoring.LogicalAuthoringTests.test_created_standard_can_be_retired_with_complete_explicit_closure 4.121 pass +START test_logical_authoring.LogicalAuthoringTests.test_duplicate_route_target_rejected +.END test_logical_authoring.LogicalAuthoringTests.test_duplicate_route_target_rejected 0.206 pass +START test_logical_authoring.LogicalAuthoringTests.test_fact_presentation_and_value_order_preserve_semantic_revision +.END test_logical_authoring.LogicalAuthoringTests.test_fact_presentation_and_value_order_preserve_semantic_revision 0.869 pass +START test_logical_authoring.LogicalAuthoringTests.test_fact_revision_and_referenced_removal_are_validated +.END test_logical_authoring.LogicalAuthoringTests.test_fact_revision_and_referenced_removal_are_validated 1.773 pass +START test_logical_authoring.LogicalAuthoringTests.test_move_preserves_identity_and_relocates_relationship_authority +.END test_logical_authoring.LogicalAuthoringTests.test_move_preserves_identity_and_relocates_relationship_authority 1.433 pass +START test_logical_authoring.LogicalAuthoringTests.test_new_fact_and_rule_compile_together_and_unused_fact_can_be_removed +.END test_logical_authoring.LogicalAuthoringTests.test_new_fact_and_rule_compile_together_and_unused_fact_can_be_removed 2.025 pass +START test_logical_authoring.LogicalAuthoringTests.test_noop_and_cyclic_relationship_changes_are_typed +.END test_logical_authoring.LogicalAuthoringTests.test_noop_and_cyclic_relationship_changes_are_typed 0.769 pass +START test_logical_authoring.LogicalAuthoringTests.test_null_applicability_is_unsupported_by_toml_authority +.END test_logical_authoring.LogicalAuthoringTests.test_null_applicability_is_unsupported_by_toml_authority 0.0 pass +START test_logical_authoring.LogicalAuthoringTests.test_opaque_consumer_handle_is_snapshot_bound +.END test_logical_authoring.LogicalAuthoringTests.test_opaque_consumer_handle_is_snapshot_bound 0.92 pass +START test_logical_authoring.LogicalAuthoringTests.test_policy_relationship_put_and_remove_replay_cumulatively +.END test_logical_authoring.LogicalAuthoringTests.test_policy_relationship_put_and_remove_replay_cumulatively 4.399 pass +START test_logical_authoring.LogicalAuthoringTests.test_retired_standard_successor_must_survive_the_final_program +.END test_logical_authoring.LogicalAuthoringTests.test_retired_standard_successor_must_survive_the_final_program 3.457 pass +START test_logical_authoring.LogicalAuthoringTests.test_retirement_requires_and_applies_complete_relationship_dispositions +.END test_logical_authoring.LogicalAuthoringTests.test_retirement_requires_and_applies_complete_relationship_dispositions 2.53 pass +START test_logical_authoring.LogicalAuthoringTests.test_route_targets_can_be_swapped_in_one_atomic_change +.END test_logical_authoring.LogicalAuthoringTests.test_route_targets_can_be_swapped_in_one_atomic_change 0.921 pass +START test_logical_authoring.LogicalAuthoringTests.test_rule_update_and_removal_keep_readable_and_executable_routes_in_sync +.END test_logical_authoring.LogicalAuthoringTests.test_rule_update_and_removal_keep_readable_and_executable_routes_in_sync 1.831 pass +START test_logical_authoring.LogicalAuthoringTests.test_supporting_records_and_withdrawal_use_the_final_candidate +.END test_logical_authoring.LogicalAuthoringTests.test_supporting_records_and_withdrawal_use_the_final_candidate 4.355 pass +START test_logical_authoring.LogicalAuthoringTests.test_unknown_route_fact_is_rejected_without_changing_base +.END test_logical_authoring.LogicalAuthoringTests.test_unknown_route_fact_is_rejected_without_changing_base 0.785 pass +START test_logical_authoring.LogicalAuthoringTests.test_verified_compiled_base_is_reused_but_candidate_compiles +.END test_logical_authoring.LogicalAuthoringTests.test_verified_compiled_base_is_reused_but_candidate_compiles 1.596 pass +START test_logical_authoring.LogicalAuthoringTests.test_whole_module_rescope_preserves_identity_and_explicit_meaning +.END test_logical_authoring.LogicalAuthoringTests.test_whole_module_rescope_preserves_identity_and_explicit_meaning 1.087 pass +START test_logical_authoring.LogicalAuthoringTests.test_whole_standard_revision_requires_companion_policy_semantics +.END test_logical_authoring.LogicalAuthoringTests.test_whole_standard_revision_requires_companion_policy_semantics 1.856 pass +START test_mcp.MCPTest.test_application_failure_diagnostic_omits_private_exception +.END test_mcp.MCPTest.test_application_failure_diagnostic_omits_private_exception 0.002 pass +START test_mcp.MCPTest.test_authoring_description_carries_exact_contract_without_type_rendering +.END test_mcp.MCPTest.test_authoring_description_carries_exact_contract_without_type_rendering 0.131 pass +START test_mcp.MCPTest.test_authoring_inputs_expose_structure_and_preserve_recursive_validation +.END test_mcp.MCPTest.test_authoring_inputs_expose_structure_and_preserve_recursive_validation 0.018 pass +START test_mcp.MCPTest.test_catalog_schemas_validate_authored_examples_and_resolve_refs +.END test_mcp.MCPTest.test_catalog_schemas_validate_authored_examples_and_resolve_refs 1.785 pass +START test_mcp.MCPTest.test_default_catalog_focuses_navigation_and_workflows +.END test_mcp.MCPTest.test_default_catalog_focuses_navigation_and_workflows 0.013 pass +START test_mcp.MCPTest.test_default_guidance_uses_available_recovery_tools +.END test_mcp.MCPTest.test_default_guidance_uses_available_recovery_tools 0.008 pass +START test_mcp.MCPTest.test_input_projection_preserves_reference_siblings +.END test_mcp.MCPTest.test_input_projection_preserves_reference_siblings 0.0 pass +START test_mcp.MCPTest.test_internal_failure_is_tool_error_without_retry +.END test_mcp.MCPTest.test_internal_failure_is_tool_error_without_retry 0.021 pass +START test_mcp.MCPTest.test_lifecycle_and_protocol_errors_never_open_engine +.END test_mcp.MCPTest.test_lifecycle_and_protocol_errors_never_open_engine 0.01 pass +START test_mcp.MCPTest.test_module_stdio_launch_from_unrelated_working_directory +.END test_mcp.MCPTest.test_module_stdio_launch_from_unrelated_working_directory 1.974 pass +START test_mcp.MCPTest.test_parse_errors_and_notifications_keep_stream_synchronized +.END test_mcp.MCPTest.test_parse_errors_and_notifications_keep_stream_synchronized 0.01 pass +START test_mcp.MCPTest.test_preserves_typed_outcomes_and_never_retries +.END test_mcp.MCPTest.test_preserves_typed_outcomes_and_never_retries 0.013 pass +START test_mcp.MCPTest.test_real_snapshot_read_and_validation_through_server +.END test_mcp.MCPTest.test_real_snapshot_read_and_validation_through_server 3.756 pass +START test_navigation.NavigationTest.test_development_proportionality_routes_directly_and_before_planning +.END test_navigation.NavigationTest.test_development_proportionality_routes_directly_and_before_planning 1.637 pass +START test_navigation.NavigationTest.test_live_worktree_mutation_cannot_change_snapshot_reads +EEND test_navigation.NavigationTest.test_live_worktree_mutation_cannot_change_snapshot_reads 0.161 error +START test_navigation.NavigationTest.test_proposal_creation_returns_typed_failure_for_invalid_projected_content +.END test_navigation.NavigationTest.test_proposal_creation_returns_typed_failure_for_invalid_projected_content 2.478 pass +START test_navigation.NavigationTest.test_proposal_query_projects_every_request_from_an_exact_revision +.END test_navigation.NavigationTest.test_proposal_query_projects_every_request_from_an_exact_revision 13.959 pass +START test_navigation.NavigationTest.test_read_related_and_inspect_share_the_snapshot_root +.END test_navigation.NavigationTest.test_read_related_and_inspect_share_the_snapshot_root 3.27 pass +START test_navigation.NavigationTest.test_route_selects_direct_modules_and_required_closure +.END test_navigation.NavigationTest.test_route_selects_direct_modules_and_required_closure 0.824 pass +START test_navigation.NavigationTest.test_unknown_and_invalid_route_facts_have_typed_results +.END test_navigation.NavigationTest.test_unknown_and_invalid_route_facts_have_typed_results 1.613 pass +START test_navigation_indexes.NavigationIndexAuthorityTest.test_absent_catalog_exposes_no_authoring_capability +.END test_navigation_indexes.NavigationIndexAuthorityTest.test_absent_catalog_exposes_no_authoring_capability 0.0 pass +START test_navigation_indexes.NavigationIndexAuthorityTest.test_bad_catalog_and_non_utf8_content_are_typed_rejections +.END test_navigation_indexes.NavigationIndexAuthorityTest.test_bad_catalog_and_non_utf8_content_are_typed_rejections 0.0 pass +START test_navigation_indexes.NavigationIndexAuthorityTest.test_declared_routes_bind_their_owner_content_and_exact_declarations +.END test_navigation_indexes.NavigationIndexAuthorityTest.test_declared_routes_bind_their_owner_content_and_exact_declarations 0.0 pass +START test_navigation_indexes.NavigationIndexAuthorityTest.test_old_captured_index_without_route_inventory_remains_readable +.END test_navigation_indexes.NavigationIndexAuthorityTest.test_old_captured_index_without_route_inventory_remains_readable 0.0 pass +START test_navigation_indexes.NavigationIndexAuthorityTest.test_registration_cannot_make_a_normative_standard_writable +.END test_navigation_indexes.NavigationIndexAuthorityTest.test_registration_cannot_make_a_normative_standard_writable 0.0 pass +START test_navigation_indexes.NavigationIndexAuthorityTest.test_review_fingerprint_binds_destination_authority_without_inventing_policy_changes +.END test_navigation_indexes.NavigationIndexAuthorityTest.test_review_fingerprint_binds_destination_authority_without_inventing_policy_changes 0.0 pass +START test_navigation_indexes.NavigationIndexWorkflowTest.test_cross_snapshot_handle_is_not_an_authorization_to_retarget +.END test_navigation_indexes.NavigationIndexWorkflowTest.test_cross_snapshot_handle_is_not_an_authorization_to_retarget 5.618 pass +START test_navigation_indexes.NavigationIndexWorkflowTest.test_discovery_captures_exact_content_without_claiming_policy_authority +.END test_navigation_indexes.NavigationIndexWorkflowTest.test_discovery_captures_exact_content_without_claiming_policy_authority 1.731 pass +START test_navigation_indexes.NavigationIndexWorkflowTest.test_fresh_mcp_process_exposes_snapshot_bound_navigation +.END test_navigation_indexes.NavigationIndexWorkflowTest.test_fresh_mcp_process_exposes_snapshot_bound_navigation 3.031 pass +START test_navigation_indexes.NavigationIndexWorkflowTest.test_invalid_selections_do_not_create_an_applicable_candidate +.END test_navigation_indexes.NavigationIndexWorkflowTest.test_invalid_selections_do_not_create_an_applicable_candidate 4.921 pass +START test_navigation_indexes.NavigationIndexWorkflowTest.test_retarget_dispositions_cannot_remove_unrelated_assertions +.END test_navigation_indexes.NavigationIndexWorkflowTest.test_retarget_dispositions_cannot_remove_unrelated_assertions 4.823 pass +START test_navigation_indexes.NavigationIndexWorkflowTest.test_z_exact_index_proposal_requires_review_and_applies_through_engine +.END test_navigation_indexes.NavigationIndexWorkflowTest.test_z_exact_index_proposal_requires_review_and_applies_through_engine 98.853 pass +START test_navigation_indexes.ProtectedNavigationIndexTest.test_declared_routes_reject_omitted_owners_and_unsupported_artifacts +.END test_navigation_indexes.ProtectedNavigationIndexTest.test_declared_routes_reject_omitted_owners_and_unsupported_artifacts 4.898 pass +START test_navigation_indexes.ProtectedNavigationIndexTest.test_z_declared_sections_survive_verified_index_application +.END test_navigation_indexes.ProtectedNavigationIndexTest.test_z_declared_sections_survive_verified_index_application 56.664 pass +START test_platform_harness.PlatformHarnessTest.test_closed_store_round_trip_uses_public_operations +.END test_platform_harness.PlatformHarnessTest.test_closed_store_round_trip_uses_public_operations 12.231 pass +START test_platform_harness.PlatformHarnessTest.test_concurrent_probe_rejects_mismatched_content +.END test_platform_harness.PlatformHarnessTest.test_concurrent_probe_rejects_mismatched_content 0.001 pass +START test_platform_harness.PlatformHarnessTest.test_consume_rejects_changed_store_before_open +.END test_platform_harness.PlatformHarnessTest.test_consume_rejects_changed_store_before_open 0.0 pass +START test_purpose_projection.PurposeProjectionTest.test_authoring_read_retrieves_reasoning_and_exposure_state +.END test_purpose_projection.PurposeProjectionTest.test_authoring_read_retrieves_reasoning_and_exposure_state 1.892 pass +START test_purpose_projection.PurposeProjectionTest.test_catalog_has_no_authoring_schema_closure +.END test_purpose_projection.PurposeProjectionTest.test_catalog_has_no_authoring_schema_closure 0.003 pass +START test_purpose_projection.PurposeProjectionTest.test_direct_hidden_read_and_privileged_request_are_bounded +.END test_purpose_projection.PurposeProjectionTest.test_direct_hidden_read_and_privileged_request_are_bounded 0.784 pass +START test_purpose_projection.PurposeProjectionTest.test_domain_and_facade_admit_only_application_operations_before_work +.END test_purpose_projection.PurposeProjectionTest.test_domain_and_facade_admit_only_application_operations_before_work 0.414 pass +START test_purpose_projection.PurposeProjectionTest.test_hidden_intermediate_cannot_bridge_a_permitted_traversal +.END test_purpose_projection.PurposeProjectionTest.test_hidden_intermediate_cannot_bridge_a_permitted_traversal 0.001 pass +START test_purpose_projection.PurposeProjectionTest.test_invalid_host_purpose_creates_no_store +.END test_purpose_projection.PurposeProjectionTest.test_invalid_host_purpose_creates_no_store 0.0 pass +START test_purpose_projection.PurposeProjectionTest.test_material_change_requires_new_exposure_but_rationale_change_does_not +.END test_purpose_projection.PurposeProjectionTest.test_material_change_requires_new_exposure_but_rationale_change_does_not 0.385 pass +START test_purpose_projection.PurposeProjectionTest.test_native_query_and_handle_inspection_use_the_same_boundary +.END test_purpose_projection.PurposeProjectionTest.test_native_query_and_handle_inspection_use_the_same_boundary 2.77 pass +START test_purpose_projection.PurposeProjectionTest.test_read_has_exact_reviewed_content_and_explicit_permitted_fields +.END test_purpose_projection.PurposeProjectionTest.test_read_has_exact_reviewed_content_and_explicit_permitted_fields 1.871 pass +START test_purpose_projection.PurposeProjectionTest.test_router_presentation_change_requires_explicit_renewal +.END test_purpose_projection.PurposeProjectionTest.test_router_presentation_change_requires_explicit_renewal 0.236 pass +START test_purpose_projection.PurposeProjectionTest.test_routing_retains_unknown_facts_and_blocks_missing_required_content +.END test_purpose_projection.PurposeProjectionTest.test_routing_retains_unknown_facts_and_blocks_missing_required_content 2.792 pass +START test_purpose_projection.PurposeProjectionTest.test_unexpected_observation_failure_returns_no_private_context +.END test_purpose_projection.PurposeProjectionTest.test_unexpected_observation_failure_returns_no_private_context 0.898 pass +START test_purpose_projection.PurposeProjectionTest.test_unsupported_capture_is_preserved_and_classified +.END test_purpose_projection.PurposeProjectionTest.test_unsupported_capture_is_preserved_and_classified 2.612 pass +START test_purpose_projection.PurposeProjectionTest.test_whole_module_discovers_references_owned_by_its_policy_units +.END test_purpose_projection.PurposeProjectionTest.test_whole_module_discovers_references_owned_by_its_policy_units 0.003 pass +START test_purpose_transport.PurposeTransportTest.test_actual_stdio_has_qualified_catalog_and_identical_result_encodings +.END test_purpose_transport.PurposeTransportTest.test_actual_stdio_has_qualified_catalog_and_identical_result_encodings 4.343 pass +START test_purpose_transport.PurposeTransportTest.test_cli_catalog_schema_example_and_denial_share_the_purpose +.END test_purpose_transport.PurposeTransportTest.test_cli_catalog_schema_example_and_denial_share_the_purpose 8.321 pass +START test_purpose_transport.PurposeTransportTest.test_default_capture_reads_accepted_main_instead_of_unpublished_head +.END test_purpose_transport.PurposeTransportTest.test_default_capture_reads_accepted_main_instead_of_unpublished_head 4.08 pass +START test_purpose_transport.PurposeTransportTest.test_two_cold_processes_preserve_exact_application_read +.END test_purpose_transport.PurposeTransportTest.test_two_cold_processes_preserve_exact_application_read 9.928 pass +START test_rendering.TextRenderingTest.test_application_purpose_is_distinct_from_authoring_publication +.END test_rendering.TextRenderingTest.test_application_purpose_is_distinct_from_authoring_publication 0.0 pass +START test_rendering.TextRenderingTest.test_coverage_projection_preserves_subject_and_status +.END test_rendering.TextRenderingTest.test_coverage_projection_preserves_subject_and_status 0.0 pass +START test_rendering.TextRenderingTest.test_navigation_indexes_preserve_authority_and_exact_content +.END test_rendering.TextRenderingTest.test_navigation_indexes_preserve_authority_and_exact_content 0.0 pass +START test_rendering.TextRenderingTest.test_pending_projection_is_deterministic_and_work_focused +.END test_rendering.TextRenderingTest.test_pending_projection_is_deterministic_and_work_focused 0.0 pass +START test_rendering.TextRenderingTest.test_projected_navigation_renders_revision_authority +.END test_rendering.TextRenderingTest.test_projected_navigation_renders_revision_authority 0.0 pass +START test_rendering.TextRenderingTest.test_proposal_projection_exposes_only_opaque_handles +.END test_rendering.TextRenderingTest.test_proposal_projection_exposes_only_opaque_handles 0.0 pass +START test_rendering.TextRenderingTest.test_proposal_review_renders_only_opaque_authority +.END test_rendering.TextRenderingTest.test_proposal_review_renders_only_opaque_authority 0.0 pass +START test_rendering.TextRenderingTest.test_rejection_projection_accepts_the_generated_result_type +.END test_rendering.TextRenderingTest.test_rejection_projection_accepts_the_generated_result_type 0.0 pass +START test_rendering.TextRenderingTest.test_unknown_result_variant_is_a_programming_error +.END test_rendering.TextRenderingTest.test_unknown_result_variant_is_a_programming_error 0.0 pass +START test_rendering.TextRenderingTest.test_verification_projection_preserves_revision_and_diagnostic_identity +.END test_rendering.TextRenderingTest.test_verification_projection_preserves_revision_and_diagnostic_identity 0.0 pass +START test_supporting_workflow.SupportingWorkflowTest.test_coordinated_publication_and_provenance_only_revision +.END test_supporting_workflow.SupportingWorkflowTest.test_coordinated_publication_and_provenance_only_revision 188.031 pass + +====================================================================== +ERROR: test_apply_create_and_retire_owns_topology_and_commit (test_analysis.AnalysisWorkflowTest.test_apply_create_and_retire_owns_topology_and_commit) +---------------------------------------------------------------------- +Traceback (most recent call last): + File "/mnt/data/pse-performance-work/Coding-Standards/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/measurement-tools/run_timed_suite.py", line 36, in timed + try:return _fn(self,*args,**kwargs) + ~~~^^^^^^^^^^^^^^^^^^^^^ + File "/usr/lib/python3.13/unittest/case.py", line 606, in _callTestMethod + if method() is not None: + ~~~~~~^^ + File "/mnt/data/pse-performance-work/candidate-tests/tools/standards_engine/tests/test_analysis.py", line 599, in test_apply_create_and_retire_owns_topology_and_commit + initial = engine._repository.branch_revision("main") + File "/mnt/data/pse-performance-work/candidate-tests/tools/repository_git/repository_git/repository.py", line 217, in branch_revision + return self._revision(f"refs/heads/{branch}^{{commit}}") + ~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "/mnt/data/pse-performance-work/candidate-tests/tools/repository_git/repository_git/repository.py", line 664, in _revision + output = git_output( + self._repository, + ("rev-parse", "--verify", "--end-of-options", revision), + max_output_bytes=256, + ) + File "/mnt/data/pse-performance-work/candidate-tests/tools/repository_git/repository_git/repository.py", line 105, in git_output + raise unavailable( + ...<2 lines>... + ) +tools.repository_git.repository_git.errors.GitRepositoryError: REPOSITORY_GIT.COMMAND_UNAVAILABLE: Git exited with 128: fatal: Needed a single revision + +====================================================================== +ERROR: test_apply_proposal_composes_real_verification_and_cold_readback (test_analysis.AnalysisWorkflowTest.test_apply_proposal_composes_real_verification_and_cold_readback) +---------------------------------------------------------------------- +Traceback (most recent call last): + File "/mnt/data/pse-performance-work/Coding-Standards/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/measurement-tools/run_timed_suite.py", line 36, in timed + try:return _fn(self,*args,**kwargs) + ~~~^^^^^^^^^^^^^^^^^^^^^ + File "/usr/lib/python3.13/unittest/case.py", line 606, in _callTestMethod + if method() is not None: + ~~~~~~^^ + File "/mnt/data/pse-performance-work/candidate-tests/tools/standards_engine/tests/test_analysis.py", line 315, in test_apply_proposal_composes_real_verification_and_cold_readback + expected = engine._repository.branch_revision("main") + File "/mnt/data/pse-performance-work/candidate-tests/tools/repository_git/repository_git/repository.py", line 217, in branch_revision + return self._revision(f"refs/heads/{branch}^{{commit}}") + ~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "/mnt/data/pse-performance-work/candidate-tests/tools/repository_git/repository_git/repository.py", line 664, in _revision + output = git_output( + self._repository, + ("rev-parse", "--verify", "--end-of-options", revision), + max_output_bytes=256, + ) + File "/mnt/data/pse-performance-work/candidate-tests/tools/repository_git/repository_git/repository.py", line 105, in git_output + raise unavailable( + ...<2 lines>... + ) +tools.repository_git.repository_git.errors.GitRepositoryError: REPOSITORY_GIT.COMMAND_UNAVAILABLE: Git exited with 128: fatal: Needed a single revision + +====================================================================== +ERROR: test_live_worktree_mutation_cannot_change_snapshot_reads (test_navigation.NavigationTest.test_live_worktree_mutation_cannot_change_snapshot_reads) +---------------------------------------------------------------------- +Traceback (most recent call last): + File "/mnt/data/pse-performance-work/Coding-Standards/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/measurement-tools/run_timed_suite.py", line 36, in timed + try:return _fn(self,*args,**kwargs) + ~~~^^^^^^^^^^^^^^^^^^^^^ + File "/usr/lib/python3.13/unittest/case.py", line 606, in _callTestMethod + if method() is not None: + ~~~~~~^^ + File "/mnt/data/pse-performance-work/candidate-tests/tools/standards_engine/tests/test_navigation.py", line 297, in test_live_worktree_mutation_cannot_change_snapshot_reads + snapshot = created.snapshot.snapshot + ^^^^^^^^^^^^^^^^ +AttributeError: 'RejectedResult' object has no attribute 'snapshot' + +====================================================================== +FAIL: test_review_verify_apply_recover_and_read_without_original_database (test_coverage_publication.EngineAuditPublicationTest.test_review_verify_apply_recover_and_read_without_original_database) +---------------------------------------------------------------------- +Traceback (most recent call last): + File "/mnt/data/pse-performance-work/Coding-Standards/docs/plans/purpose-separated-standards-engine/reports/standards-engine-performance-report/measurement-tools/run_timed_suite.py", line 36, in timed + try:return _fn(self,*args,**kwargs) + ~~~^^^^^^^^^^^^^^^^^^^^^ +AssertionError: 'rejected-result' != 'create-snapshot-result' +- rejected-result ++ create-snapshot-result + : {'kind': 'rejected-result', 'code': 'REPOSITORY_GIT.COMMAND_UNAVAILABLE', 'outcome': 'unavailable', 'message': 'Git exited with 128: fatal: Needed a single revision', 'details': {}, 'next_operations': []} + +---------------------------------------------------------------------- +Ran 166 tests in 918.980s + +FAILED (failures=1, errors=3) diff --git a/docs/plans/purpose-separated-standards-engine/reports/performance-core-evidence/measure_primitives.py b/docs/plans/purpose-separated-standards-engine/reports/performance-core-evidence/measure_primitives.py new file mode 100644 index 00000000..cdf70f7a --- /dev/null +++ b/docs/plans/purpose-separated-standards-engine/reports/performance-core-evidence/measure_primitives.py @@ -0,0 +1,97 @@ +"""Measure exact identities and optional capture retention in disposable inputs.""" +from __future__ import annotations + +import argparse +import gc +import hashlib +import json +import os +from pathlib import Path +import sys +import tempfile +import time +from unittest.mock import patch + +parser = argparse.ArgumentParser() +parser.add_argument('--repo', type=Path, required=True) +parser.add_argument('--store', type=Path, required=True) +parser.add_argument('--snapshot', type=Path, required=True) +parser.add_argument('--output', type=Path, required=True) +parser.add_argument('--capture', action='store_true') +a = parser.parse_args() +root = a.repo.resolve() +os.chdir(root) +sys.path.insert(0, str(root)) +from tools.standards_engine.standards_engine import StandardsEngine +from tools.standards_engine.standards_engine import _generated_contract as c +from tools.standards_identity.standards_identity import encode_identity_value, frame_path_byte_set +from tools.standards_snapshots.standards_snapshots import SnapshotModule + +rows = [] + +def timed(name, function): + wall, cpu = time.perf_counter(), time.process_time() + value = function() + rows.append({'operation': name, 'wall_s': time.perf_counter() - wall, + 'cpu_s': time.process_time() - cpu}) + return value + +with StandardsEngine.open_repository(root, purpose='authoring', store_path=a.store.resolve()) as engine: + handle = c.SnapshotHandle.from_value(json.loads(a.snapshot.read_text())) + identity, capture = engine._snapshots._store.load_content(engine._snapshot_id(handle)) + entries = tuple((file.path.components, file.content) for file in capture.files) + for repeat in range(5): + frame = timed('frame', lambda: frame_path_byte_set(entries)) + encoded = timed('encode', lambda: encode_identity_value(frame)) + encoded_digest = hashlib.sha256(encoded).hexdigest() + encoded_length = len(encoded) + del frame, encoded + gc.collect() + observed = timed('complete_identity', lambda: SnapshotModule._content_id(capture)) + assert observed == identity, (observed, identity) + result = {'measurements': rows, 'source_files': len(entries), + 'raw_bytes': sum(len(value) for _, value in entries), + 'content_identity': identity, 'encoded_sha256': encoded_digest, + 'encoded_bytes': encoded_length} + +if a.capture: + from tools.repository_git.repository_git import RevisionReadSession + original_object = RevisionReadSession._object + original_close = RevisionReadSession.close + counts = {'requests': 0, 'peak_payload_bytes': 0, 'peak_entries': 0, + 'closed_payload_bytes': [], 'closed_entries': []} + + def observe_object(session, *args): + value = original_object(session, *args) + counts['requests'] += 1 + counts['peak_payload_bytes'] = max(counts['peak_payload_bytes'], session.cached_bytes) + counts['peak_entries'] = max(counts['peak_entries'], session.cached_objects) + return value + + def observe_close(session): + original_close(session) + counts['closed_payload_bytes'].append(session.cached_bytes) + counts['closed_entries'].append(session.cached_objects) + + compiles = [] + original_compile = StandardsEngine._compile + + def observe_compile(source): + compiles.append(source) + return original_compile(source) + + with tempfile.TemporaryDirectory(prefix='capture-retention-') as temporary: + with (patch.object(RevisionReadSession, '_object', observe_object), + patch.object(RevisionReadSession, 'close', observe_close), + patch.object(StandardsEngine, '_compile', staticmethod(observe_compile)), + StandardsEngine.open_repository(root, purpose='authoring', + store_path=Path(temporary) / 'engine.sqlite3') as engine): + created = engine.create_snapshot(c.CreateSnapshotCall(kind='create-snapshot')) + assert isinstance(created, c.CreateSnapshotResult), created + assert len(compiles) == 2 and compiles[0] is not compiles[1] + assert compiles[0].requested_paths == compiles[1].requested_paths + counts['independent_compiles'] = len(compiles) + result['capture_retention'] = counts + +a.output.write_text(json.dumps(result, indent=2) + '\n') +print(json.dumps(result, indent=2)) diff --git a/docs/plans/purpose-separated-standards-engine/reports/performance-core-evidence/measure_transport.py b/docs/plans/purpose-separated-standards-engine/reports/performance-core-evidence/measure_transport.py new file mode 100644 index 00000000..455bd95f --- /dev/null +++ b/docs/plans/purpose-separated-standards-engine/reports/performance-core-evidence/measure_transport.py @@ -0,0 +1,91 @@ +"""Observe unchanged CLI/MCP contracts in an explicitly disposable checkout.""" +import argparse +import hashlib +import json +import os +from pathlib import Path +import shutil +import subprocess +import sys +import time + +p = argparse.ArgumentParser() +p.add_argument('--repo', type=Path, required=True) +p.add_argument('--store', type=Path, required=True) +p.add_argument('--snapshot', type=Path, required=True) +p.add_argument('--output', type=Path, required=True) +p.add_argument('--confirm-disposable', action='store_true', required=True) +a = p.parse_args() +root = a.repo.resolve() +snapshot = json.loads(a.snapshot.read_text()) +target = root / '.standards-engine' / 'snapshots-v1.sqlite3' +target.parent.mkdir(exist_ok=True) +# Measurements supply a closed store. Exclusive creation preserves any existing +# installation; the caller selects a new disposable checkout for another run. +with a.store.open('rb') as source, target.open('xb') as output: + shutil.copyfileobj(source, output) +env = {**os.environ, 'PYTHONPATH': str(root), 'PYTHONDONTWRITEBYTECODE': '1'} +rows = [] + +def observe(name, action): + start = time.perf_counter() + value = action() + rows.append({'operation': name, 'wall_s': time.perf_counter() - start, + 'result_digest': hashlib.sha256(json.dumps(value, sort_keys=True).encode()).hexdigest()}) + return value + +payload = {'snapshot': snapshot, 'request': {'kind': 'read', 'target': 'workflow.planning'}} +cli = [sys.executable, '-P', str(root / '.agents/skills/standards-engine/scripts/invoke.py'), + '--purpose', 'authoring', '--repo-root', str(root), 'query'] + +def cli_read(): + result = subprocess.run(cli, input=json.dumps(payload), text=True, capture_output=True, + cwd=root, env=env, check=True) + value = json.loads(result.stdout) + assert value['kind'] == 'read-result', value + return value + +for i in range(3): + observe('cold_cli_read', cli_read) + +for i in range(2): + start = time.perf_counter() + with a.output.with_suffix(f'.mcp-{i}.stderr').open('w') as errors: + proc = subprocess.Popen([sys.executable, '-P', '-m', + 'tools.standards_engine.standards_engine.mcp', '--purpose', 'authoring', + '--repo-root', str(root)], cwd=root, env=env, stdin=subprocess.PIPE, + stdout=subprocess.PIPE, stderr=errors, text=True, bufsize=1) + def rpc(message): + proc.stdin.write(json.dumps(message) + '\n') + proc.stdin.flush() + response = json.loads(proc.stdout.readline()) + assert 'error' not in response, response + return response['result'] + try: + rpc({'jsonrpc': '2.0', 'id': 1, 'method': 'initialize', 'params': { + 'protocolVersion': '2025-11-25', 'capabilities': {}, + 'clientInfo': {'name': 'performance-probe', 'version': '1'}}}) + rows.append({'operation': 'cold_mcp_initialize', 'wall_s': time.perf_counter() - start}) + proc.stdin.write(json.dumps({'jsonrpc': '2.0', 'method': 'notifications/initialized'}) + '\n') + proc.stdin.flush() + tools = rpc({'jsonrpc': '2.0', 'id': 2, 'method': 'tools/list', 'params': {}}) + assert len(tools['tools']) == 15 + for j in range(3): + value = observe('mcp_explicit_read', lambda: rpc({ + 'jsonrpc': '2.0', 'id': j + 3, 'method': 'tools/call', 'params': { + 'name': 'read', 'arguments': {'snapshot': snapshot, 'target': 'workflow.planning'}}})) + assert not value.get('isError', False), value + assert value['structuredContent']['kind'] == 'compact-read-result' + if i == 0: + value = observe('mcp_implicit_capture_read', lambda: rpc({ + 'jsonrpc': '2.0', 'id': 20, 'method': 'tools/call', 'params': { + 'name': 'read', 'arguments': {'target': 'workflow.planning'}}})) + assert not value.get('isError', False), value + finally: + proc.stdin.close() + proc.wait() + proc.stdout.close() + assert proc.returncode == 0 + +a.output.write_text(json.dumps(rows, indent=2) + '\n') +print(json.dumps(rows, indent=2)) diff --git a/docs/plans/purpose-separated-standards-engine/reports/performance-core-evidence/package-graph_engine.log b/docs/plans/purpose-separated-standards-engine/reports/performance-core-evidence/package-graph_engine.log new file mode 100644 index 00000000..13ed3aec --- /dev/null +++ b/docs/plans/purpose-separated-standards-engine/reports/performance-core-evidence/package-graph_engine.log @@ -0,0 +1,42 @@ +test_exact_and_group_traversal_require_explicit_direction (test_cli.CliTest.test_exact_and_group_traversal_require_explicit_direction) ... ok +test_hostile_control_characters_are_rejected_not_emitted (test_cli.CliTest.test_hostile_control_characters_are_rejected_not_emitted) ... ok +test_list_groups_is_deterministic (test_cli.CliTest.test_list_groups_is_deterministic) ... ok +test_node_query_reports_identity_direction_groups_metadata_and_provenance (test_cli.CliTest.test_node_query_reports_identity_direction_groups_metadata_and_provenance) ... ok +test_transitive_group_query_reports_explanatory_path (test_cli.CliTest.test_transitive_group_query_reports_explanatory_path) ... ok +test_unknown_group_fails_for_unconnected_artifact_queries (test_cli.CliTest.test_unknown_group_fails_for_unconnected_artifact_queries) ... ok +test_caller_can_explicitly_register_one_selected_manifest (test_manifest.ManifestTest.test_caller_can_explicitly_register_one_selected_manifest) ... ok +test_registered_manifest_loads_nodes_groups_edges_and_provenance (test_manifest.ManifestTest.test_registered_manifest_loads_nodes_groups_edges_and_provenance) ... ok +test_registered_provider_contributes_and_unregistered_provider_does_not (test_manifest.ManifestTest.test_registered_provider_contributes_and_unregistered_provider_does_not) ... ok +test_strict_schema_rejects_unknown_fields (test_manifest.ManifestTest.test_strict_schema_rejects_unknown_fields) ... ok +test_unknown_source_kind_and_mismatched_identity_are_rejected (test_manifest.ManifestTest.test_unknown_source_kind_and_mismatched_identity_are_rejected) ... ok +test_unregistered_manifest_file_contributes_nothing (test_manifest.ManifestTest.test_unregistered_manifest_file_contributes_nothing) ... ok +test_closed_projection_round_trips_every_graph_record (test_projection.GraphProjectionTest.test_closed_projection_round_trips_every_graph_record) ... ok +test_compatible_cross_source_node_declarations_merge_once (test_registry.EdgeRegistryTest.test_compatible_cross_source_node_declarations_merge_once) ... ok +test_contradictory_aliases_and_duplicate_artifact_nodes_are_rejected (test_registry.EdgeRegistryTest.test_contradictory_aliases_and_duplicate_artifact_nodes_are_rejected) ... ok +test_dependency_order_is_dependency_first_and_honors_preferred_ties (test_registry.EdgeRegistryTest.test_dependency_order_is_dependency_first_and_honors_preferred_ties) ... ok +test_duplicate_ids_dangling_endpoints_and_invalid_groups_are_rejected (test_registry.EdgeRegistryTest.test_duplicate_ids_dangling_endpoints_and_invalid_groups_are_rejected) ... ok +test_edge_can_belong_to_multiple_groups_without_duplication (test_registry.EdgeRegistryTest.test_edge_can_belong_to_multiple_groups_without_duplication) ... ok +test_exact_edge_traversal_follows_only_selected_edge (test_registry.EdgeRegistryTest.test_exact_edge_traversal_follows_only_selected_edge) ... ok +test_existing_unconnected_artifact_returns_empty_result (test_registry.EdgeRegistryTest.test_existing_unconnected_artifact_returns_empty_result) ... ok +test_explicit_logical_artifacts_remove_filesystem_dependency (test_registry.EdgeRegistryTest.test_explicit_logical_artifacts_remove_filesystem_dependency) ... ok +test_explicitly_permitted_transitive_traversal_terminates_cycle (test_registry.EdgeRegistryTest.test_explicitly_permitted_transitive_traversal_terminates_cycle) ... ok +test_group_filter_excludes_edges_outside_selected_group (test_registry.EdgeRegistryTest.test_group_filter_excludes_edges_outside_selected_group) ... ok +test_group_traversal_follows_only_eligible_group_edges (test_registry.EdgeRegistryTest.test_group_traversal_follows_only_eligible_group_edges) ... ok +test_incoming_outgoing_and_incident_queries_are_directional (test_registry.EdgeRegistryTest.test_incoming_outgoing_and_incident_queries_are_directional) ... ok +test_logical_and_path_aliases_resolve_to_the_same_node_and_edges (test_registry.EdgeRegistryTest.test_logical_and_path_aliases_resolve_to_the_same_node_and_edges) ... ok +test_long_dependency_chain_and_cycle_do_not_use_python_recursion (test_registry.EdgeRegistryTest.test_long_dependency_chain_and_cycle_do_not_use_python_recursion) ... ok +test_missing_artifact_and_unknown_logical_node_are_distinct (test_registry.EdgeRegistryTest.test_missing_artifact_and_unknown_logical_node_are_distinct) ... ok +test_one_declaration_is_discoverable_from_both_endpoints (test_registry.EdgeRegistryTest.test_one_declaration_is_discoverable_from_both_endpoints) ... ok +test_provenance_is_retained_on_queries_and_traversal (test_registry.EdgeRegistryTest.test_provenance_is_retained_on_queries_and_traversal) ... ok +test_provider_cannot_misstate_authoritative_provenance (test_registry.EdgeRegistryTest.test_provider_cannot_misstate_authoritative_provenance) ... ok +test_repository_and_symlink_escape_are_rejected (test_registry.EdgeRegistryTest.test_repository_and_symlink_escape_are_rejected) ... ok +test_result_order_is_independent_of_declaration_order (test_registry.EdgeRegistryTest.test_result_order_is_independent_of_declaration_order) ... ok +test_transitive_traversal_is_rejected_by_default (test_registry.EdgeRegistryTest.test_transitive_traversal_is_rejected_by_default) ... ok +test_unknown_group_and_edge_return_typed_failures (test_registry.EdgeRegistryTest.test_unknown_group_and_edge_return_typed_failures) ... ok +test_unknown_group_is_rejected_for_unconnected_artifact (test_registry.EdgeRegistryTest.test_unknown_group_is_rejected_for_unconnected_artifact) ... ok +test_unregistered_sources_contribute_no_edges (test_registry.EdgeRegistryTest.test_unregistered_sources_contribute_no_edges) ... ok + +---------------------------------------------------------------------- +Ran 37 tests in 0.214s + +OK diff --git a/docs/plans/purpose-separated-standards-engine/reports/performance-core-evidence/package-repository_git.log b/docs/plans/purpose-separated-standards-engine/reports/performance-core-evidence/package-repository_git.log new file mode 100644 index 00000000..911247a8 --- /dev/null +++ b/docs/plans/purpose-separated-standards-engine/reports/performance-core-evidence/package-repository_git.log @@ -0,0 +1,21 @@ +test_branch_revision_is_independent_of_the_checked_out_head (test_repository.GitRepositoryTests.test_branch_revision_is_independent_of_the_checked_out_head) ... ok +test_candidate_is_isolated_and_published_by_expected_target (test_repository.GitRepositoryTests.test_candidate_is_isolated_and_published_by_expected_target) ... ok +test_candidate_publication_loses_a_race_at_the_atomic_update (test_repository.GitRepositoryTests.test_candidate_publication_loses_a_race_at_the_atomic_update) ... ok +test_candidate_publication_rejects_stale_target_and_drift (test_repository.GitRepositoryTests.test_candidate_publication_rejects_stale_target_and_drift) ... ok +test_candidate_rejects_invalid_topology_and_no_effect (test_repository.GitRepositoryTests.test_candidate_rejects_invalid_topology_and_no_effect) ... ok +test_current_capture_is_exact_after_worktree_and_head_change (test_repository.GitRepositoryTests.test_current_capture_is_exact_after_worktree_and_head_change) ... ok +test_environment_and_output_are_bounded (test_repository.GitRepositoryTests.test_environment_and_output_are_bounded) ... ok +test_explicit_gitlink_repository_is_traversed (test_repository.GitRepositoryTests.test_explicit_gitlink_repository_is_traversed) ... ok +test_index_observations_are_exact_and_nul_delimited (test_repository.GitRepositoryTests.test_index_observations_are_exact_and_nul_delimited) ... ok +test_path_and_object_failures_are_typed (test_repository.GitRepositoryTests.test_path_and_object_failures_are_typed) ... ok +test_read_session_bounds_and_eviction_preserve_verified_reads (test_repository.GitRepositoryTests.test_read_session_bounds_and_eviction_preserve_verified_reads) ... ok +test_read_session_failures_are_unretained_and_cleanup_is_terminal (test_repository.GitRepositoryTests.test_read_session_failures_are_unretained_and_cleanup_is_terminal) ... ok +test_read_session_keeps_gitlink_repository_identity (test_repository.GitRepositoryTests.test_read_session_keeps_gitlink_repository_identity) ... ok +test_read_session_preserves_sha256_and_object_safety_limits (test_repository.GitRepositoryTests.test_read_session_preserves_sha256_and_object_safety_limits) ... ok +test_read_session_reuses_verified_objects_and_pins_revision (test_repository.GitRepositoryTests.test_read_session_reuses_verified_objects_and_pins_revision) ... ok +test_uncertain_update_preserves_recovery_required_authority (test_repository.GitRepositoryTests.test_uncertain_update_preserves_recovery_required_authority) ... ok + +---------------------------------------------------------------------- +Ran 16 tests in 1.551s + +OK diff --git a/docs/plans/purpose-separated-standards-engine/reports/performance-core-evidence/package-standards_analysis.log b/docs/plans/purpose-separated-standards-engine/reports/performance-core-evidence/package-standards_analysis.log new file mode 100644 index 00000000..acd249e6 --- /dev/null +++ b/docs/plans/purpose-separated-standards-engine/reports/performance-core-evidence/package-standards_analysis.log @@ -0,0 +1,105 @@ +test_authorization_context_mismatch_is_rejected (test_authority.AnalysisTrustTest.test_authorization_context_mismatch_is_rejected) ... ok +test_authorization_record_is_canonical_and_exactly_bound (test_authority.AnalysisTrustTest.test_authorization_record_is_canonical_and_exactly_bound) ... ok +test_denied_and_missing_authority_remain_distinct (test_authority.AnalysisTrustTest.test_denied_and_missing_authority_remain_distinct) ... ok +test_duplicate_provider_identity_is_rejected (test_authority.AnalysisTrustTest.test_duplicate_provider_identity_is_rejected) ... ok +test_evidence_content_must_match_its_digest (test_authority.AnalysisTrustTest.test_evidence_content_must_match_its_digest) ... ok +test_execution_contract_view_is_order_independent (test_authority.AnalysisTrustTest.test_execution_contract_view_is_order_independent) ... ok +test_addition_requires_semantic_overlay_and_cannot_reuse_tombstone (test_changes.ChangeClassificationTest.test_addition_requires_semantic_overlay_and_cannot_reuse_tombstone) ... ok +test_addition_seeds_policy_and_owner_context (test_changes.ChangeClassificationTest.test_addition_seeds_policy_and_owner_context) ... ok +test_derives_modification_move_addition_and_removal (test_changes.ChangeClassificationTest.test_derives_modification_move_addition_and_removal) ... ok +test_derives_split_and_merge_from_lifecycle_links (test_changes.ChangeClassificationTest.test_derives_split_and_merge_from_lifecycle_links) ... ok +test_derives_unchanged_policy_when_it_seeds_an_affected_graph (test_changes.ChangeClassificationTest.test_derives_unchanged_policy_when_it_seeds_an_affected_graph) ... ok +test_duplicate_change_and_orphan_proposal_are_rejected (test_changes.ChangeClassificationTest.test_duplicate_change_and_orphan_proposal_are_rejected) ... ok +test_explicit_preservation_binds_new_structure_without_advancing_meaning (test_changes.ChangeClassificationTest.test_explicit_preservation_binds_new_structure_without_advancing_meaning) ... ok +test_lifecycle_mismatches_are_rejected (test_changes.ChangeClassificationTest.test_lifecycle_mismatches_are_rejected) ... ok +test_merge_retires_predecessors_and_proposes_exact_successor (test_changes.ChangeClassificationTest.test_merge_retires_predecessors_and_proposes_exact_successor) ... ok +test_modification_rejects_move_and_accepted_revision_mutation (test_changes.ChangeClassificationTest.test_modification_rejects_move_and_accepted_revision_mutation) ... ok +test_module_change_seeds_module_graph_without_inventing_a_policy (test_changes.ChangeClassificationTest.test_module_change_seeds_module_graph_without_inventing_a_policy) ... ok +test_removal_requires_exact_tombstone (test_changes.ChangeClassificationTest.test_removal_requires_exact_tombstone) ... ok +test_removal_requires_tombstone_and_keeps_accepted_policy_seed (test_changes.ChangeClassificationTest.test_removal_requires_tombstone_and_keeps_accepted_policy_seed) ... ok +test_representation_only_change_does_not_claim_semantic_equivalence (test_changes.ChangeClassificationTest.test_representation_only_change_does_not_claim_semantic_equivalence) ... ok +test_same_and_cross_module_moves_select_exact_context (test_changes.ChangeClassificationTest.test_same_and_cross_module_moves_select_exact_context) ... ok +test_semantic_modification_binds_overlay_and_exact_graph_groups (test_changes.ChangeClassificationTest.test_semantic_modification_binds_overlay_and_exact_graph_groups) ... ok +test_semantic_overlay_requires_exact_next_revision_and_structure (test_changes.ChangeClassificationTest.test_semantic_overlay_requires_exact_next_revision_and_structure) ... ok +test_split_retires_predecessor_and_proposes_exact_successors (test_changes.ChangeClassificationTest.test_split_retires_predecessor_and_proposes_exact_successors) ... ok +test_structural_change_without_overlay_remains_unresolved (test_changes.ChangeClassificationTest.test_structural_change_without_overlay_remains_unresolved) ... ok +test_unchanged_unit_is_distinct_from_representation_candidate (test_changes.ChangeClassificationTest.test_unchanged_unit_is_distinct_from_representation_candidate) ... ok +test_wrong_cardinality_and_module_are_rejected (test_changes.ChangeClassificationTest.test_wrong_cardinality_and_module_are_rejected) ... ok +test_consumer_review_tracks_its_consumer_without_suite_fanout (test_coverage.CoverageTest.test_consumer_review_tracks_its_consumer_without_suite_fanout) ... ok +test_current_repository_attestation_is_validated_and_loaded (test_coverage.CoverageTest.test_current_repository_attestation_is_validated_and_loaded) ... ok +test_duplicate_current_repository_attestations_are_rejected (test_coverage.CoverageTest.test_duplicate_current_repository_attestations_are_rejected) ... ok +test_engine_receipt_uses_engine_authority_and_retains_exact_review (test_coverage.CoverageTest.test_engine_receipt_uses_engine_authority_and_retains_exact_review) ... ok +test_horizon_fingerprints_registered_content (test_coverage.CoverageTest.test_horizon_fingerprints_registered_content) ... ok +test_pinned_attestation_rejects_changed_review_or_exclusion_bytes (test_coverage.CoverageTest.test_pinned_attestation_rejects_changed_review_or_exclusion_bytes) ... ok +test_pinned_attestation_rejects_unknown_provider (test_coverage.CoverageTest.test_pinned_attestation_rejects_unknown_provider) ... ok +test_pinned_attestation_remains_bound_to_its_requirement (test_coverage.CoverageTest.test_pinned_attestation_remains_bound_to_its_requirement) ... ok +test_reading_authority_label_does_not_change_coverage (test_coverage.CoverageTest.test_reading_authority_label_does_not_change_coverage) ... ok +test_repository_attestation_rejects_malformed_requirement_id (test_coverage.CoverageTest.test_repository_attestation_rejects_malformed_requirement_id) ... ok +test_repository_attestation_requires_authorized_principal (test_coverage.CoverageTest.test_repository_attestation_requires_authorized_principal) ... ok +test_repository_coverage_grant_can_be_revoked_without_identity_cycle (test_coverage.CoverageTest.test_repository_coverage_grant_can_be_revoked_without_identity_cycle) ... ok +test_selected_input_change_stales_exact_repository_attestation (test_coverage.CoverageTest.test_selected_input_change_stales_exact_repository_attestation) ... ok +test_selected_relationship_changes_only_its_subject_requirement (test_coverage.CoverageTest.test_selected_relationship_changes_only_its_subject_requirement) ... ok +test_selected_suite_input_changes_subject_requirement (test_coverage.CoverageTest.test_selected_suite_input_changes_subject_requirement) ... ok +test_stale_repository_attestation_is_not_current_coverage (test_coverage.CoverageTest.test_stale_repository_attestation_is_not_current_coverage) ... ok +test_unrelated_input_change_preserves_exact_repository_attestation (test_coverage.CoverageTest.test_unrelated_input_change_preserves_exact_repository_attestation) ... ok +test_unrelated_relationship_does_not_change_subject_definition (test_coverage.CoverageTest.test_unrelated_relationship_does_not_change_subject_definition) ... ok +test_unrelated_suite_input_preserves_subject_requirement (test_coverage.CoverageTest.test_unrelated_suite_input_preserves_subject_requirement) ... ok +test_accepted_true_trace_dominates_proposed_unknown_trace (test_impact.ImpactSelectionTest.test_accepted_true_trace_dominates_proposed_unknown_trace) ... ok +test_addition_uses_policy_impact_and_transitive_owner_context_groups (test_impact.ImpactSelectionTest.test_addition_uses_policy_impact_and_transitive_owner_context_groups) ... ok +test_canonical_scope_equality_defines_compatibility (test_impact.ImpactSelectionTest.test_canonical_scope_equality_defines_compatibility) ... ok +test_compatible_policy_selectors_consolidate_independent_of_order (test_impact.ImpactSelectionTest.test_compatible_policy_selectors_consolidate_independent_of_order) ... ok +test_compiled_policy_edge_requires_and_retains_matching_semantics (test_impact.ImpactSelectionTest.test_compiled_policy_edge_requires_and_retains_matching_semantics) ... ok +test_conflicting_review_contract_identity_is_rejected (test_impact.ImpactSelectionTest.test_conflicting_review_contract_identity_is_rejected) ... ok +test_consumer_review_retains_complete_policy_provenance (test_impact.ImpactSelectionTest.test_consumer_review_retains_complete_policy_provenance) ... ok +test_cross_module_move_unions_policy_and_owner_context (test_impact.ImpactSelectionTest.test_cross_module_move_unions_policy_and_owner_context) ... ok +test_exact_fact_values_participate_in_consumer_identity (test_impact.ImpactSelectionTest.test_exact_fact_values_participate_in_consumer_identity) ... ok +test_fact_schema_evolution_rejects_instead_of_guessing (test_impact.ImpactSelectionTest.test_fact_schema_evolution_rejects_instead_of_guessing) ... ok +test_fact_set_from_another_schema_is_rejected (test_impact.ImpactSelectionTest.test_fact_set_from_another_schema_is_rejected) ... ok +test_false_applicability_creates_no_resolution_work (test_impact.ImpactSelectionTest.test_false_applicability_creates_no_resolution_work) ... ok +test_merge_unions_every_predecessor_and_successor_impact (test_impact.ImpactSelectionTest.test_merge_unions_every_predecessor_and_successor_impact) ... ok +test_missing_seed_or_group_is_a_typed_analysis_failure (test_impact.ImpactSelectionTest.test_missing_seed_or_group_is_a_typed_analysis_failure) ... ok +test_modification_unions_accepted_and_proposed_edges_with_both_traces (test_impact.ImpactSelectionTest.test_modification_unions_accepted_and_proposed_edges_with_both_traces) ... ok +test_only_material_unknown_facts_create_resolution_work (test_impact.ImpactSelectionTest.test_only_material_unknown_facts_create_resolution_work) ... ok +test_policy_unit_source_registers_active_alias_and_retired_identity (test_impact.ImpactSelectionTest.test_policy_unit_source_registers_active_alias_and_retired_identity) ... ok +test_relationship_addition_and_removal_both_require_review (test_impact.ImpactSelectionTest.test_relationship_addition_and_removal_both_require_review) ... ok +test_removal_traverses_only_accepted_policy_impact (test_impact.ImpactSelectionTest.test_removal_traverses_only_accepted_policy_impact) ... ok +test_review_contract_identity_defines_compatibility (test_impact.ImpactSelectionTest.test_review_contract_identity_defines_compatibility) ... ok +test_scope_and_contract_changes_each_change_obligation_identity (test_impact.ImpactSelectionTest.test_scope_and_contract_changes_each_change_obligation_identity) ... ok +test_split_unions_predecessor_and_every_successor_impact (test_impact.ImpactSelectionTest.test_split_unions_predecessor_and_every_successor_impact) ... ok +test_unknown_applicability_creates_one_exact_fact_requirement (test_impact.ImpactSelectionTest.test_unknown_applicability_creates_one_exact_fact_requirement) ... ok +test_added_normative_module_requires_whole_artifact_review (test_obligations.UnmappedNormativeObligationTest.test_added_normative_module_requires_whole_artifact_review) ... ok +test_mapped_policy_change_does_not_create_unmapped_obligation (test_obligations.UnmappedNormativeObligationTest.test_mapped_policy_change_does_not_create_unmapped_obligation) ... ok +test_omitted_changed_policy_descriptor_cannot_silently_pass (test_obligations.UnmappedNormativeObligationTest.test_omitted_changed_policy_descriptor_cannot_silently_pass) ... ok +test_reference_only_change_does_not_create_normative_obligation (test_obligations.UnmappedNormativeObligationTest.test_reference_only_change_does_not_create_normative_obligation) ... ok +test_unmapped_decision_contract_matches_public_schema (test_obligations.UnmappedNormativeObligationTest.test_unmapped_decision_contract_matches_public_schema) ... ok +test_unmapped_document_change_creates_mandatory_whole_artifact_obligation (test_obligations.UnmappedNormativeObligationTest.test_unmapped_document_change_creates_mandatory_whole_artifact_obligation) ... ok +test_cause_changes_change_projection_and_missing_authority_rejects (test_reading.ReadingPlanCompilerTest.test_cause_changes_change_projection_and_missing_authority_rejects) ... ok +test_compatible_obligations_collapse_to_plural_references (test_reading.ReadingPlanCompilerTest.test_compatible_obligations_collapse_to_plural_references) ... ok +test_entry_rejects_noncanonical_or_duplicate_causes (test_reading.ReadingPlanCompilerTest.test_entry_rejects_noncanonical_or_duplicate_causes) ... ok +test_every_dependency_edge_and_direct_cause_is_retained (test_reading.ReadingPlanCompilerTest.test_every_dependency_edge_and_direct_cause_is_retained) ... ok +test_exact_scope_and_state_rules_are_mechanical (test_reading.ReadingPlanCompilerTest.test_exact_scope_and_state_rules_are_mechanical) ... ok +test_activity_prerequisites_do_not_invent_publication_or_history_work (test_routing.RouterProjectionTest.test_activity_prerequisites_do_not_invent_publication_or_history_work) ... ok +test_canonical_guidance_links_resolve_current_headings (test_routing.RouterProjectionTest.test_canonical_guidance_links_resolve_current_headings) ... ok +test_detail_pages_are_selected_from_the_affected_decision (test_routing.RouterProjectionTest.test_detail_pages_are_selected_from_the_affected_decision) ... ok +test_every_normative_module_has_an_executable_route (test_routing.RouterProjectionTest.test_every_normative_module_has_an_executable_route) ... ok +test_missing_detail_facts_remain_unknown (test_routing.RouterProjectionTest.test_missing_detail_facts_remain_unknown) ... ok +test_projection_rejects_target_drift_from_router_tables (test_routing.RouterProjectionTest.test_projection_rejects_target_drift_from_router_tables) ... ok +test_repository_and_frozen_sources_produce_equal_projection (test_routing.RouterProjectionTest.test_repository_and_frozen_sources_produce_equal_projection) ... ok +test_repository_projection_compiles_registered_modules_and_programs (test_routing.RouterProjectionTest.test_repository_projection_compiles_registered_modules_and_programs) ... ok +test_rust_crossings_select_language_specific_safety (test_routing.RouterProjectionTest.test_rust_crossings_select_language_specific_safety) ... ok +test_small_rust_fix_omits_specialized_decisions (test_routing.RouterProjectionTest.test_small_rust_fix_omits_specialized_decisions) ... ok +test_ui_text_and_api_changes_do_not_invent_unrelated_concerns (test_routing.RouterProjectionTest.test_ui_text_and_api_changes_do_not_invent_unrelated_concerns) ... ok +test_analysis_aggregate_declares_exact_snapshot_roots (test_state.AnalysisStateTest.test_analysis_aggregate_declares_exact_snapshot_roots) ... ok +test_conflicting_decisions_cannot_share_one_state (test_state.AnalysisStateTest.test_conflicting_decisions_cannot_share_one_state) ... ok +test_decision_order_does_not_change_identity (test_state.AnalysisStateTest.test_decision_order_does_not_change_identity) ... ok +test_different_decision_evidence_changes_identity (test_state.AnalysisStateTest.test_different_decision_evidence_changes_identity) ... ok +test_malformed_current_state_is_invalid (test_state.AnalysisStateTest.test_malformed_current_state_is_invalid) ... ok +test_obsolete_snapshot_only_state_is_unsupported (test_state.AnalysisStateTest.test_obsolete_snapshot_only_state_is_unsupported) ... ok +test_projected_revision_is_identity_bound_and_depends_on_its_base (test_state.AnalysisStateTest.test_projected_revision_is_identity_bound_and_depends_on_its_base) ... ok +test_round_trip_preserves_canonical_identity (test_state.AnalysisStateTest.test_round_trip_preserves_canonical_identity) ... ok +test_well_formed_future_state_is_unsupported (test_state.AnalysisStateTest.test_well_formed_future_state_is_unsupported) ... ok + +---------------------------------------------------------------------- +Ran 100 tests in 0.724s + +OK diff --git a/docs/plans/purpose-separated-standards-engine/reports/performance-core-evidence/package-standards_applicability.log b/docs/plans/purpose-separated-standards-engine/reports/performance-core-evidence/package-standards_applicability.log new file mode 100644 index 00000000..c45befb8 --- /dev/null +++ b/docs/plans/purpose-separated-standards-engine/reports/performance-core-evidence/package-standards_applicability.log @@ -0,0 +1,17 @@ +test_aliases_normalize_and_conflicting_inputs_reject (test_applicability.ApplicabilityTest.test_aliases_normalize_and_conflicting_inputs_reject) ... ok +test_all_any_and_not_cover_the_complete_truth_table (test_applicability.ApplicabilityTest.test_all_any_and_not_cover_the_complete_truth_table) ... ok +test_empty_schema_compiles_fact_free_always (test_applicability.ApplicabilityTest.test_empty_schema_compiles_fact_free_always) ... ok +test_every_fact_type_binds_through_one_schema (test_applicability.ApplicabilityTest.test_every_fact_type_binds_through_one_schema) ... ok +test_every_operator_and_fact_state_uses_three_valued_logic (test_applicability.ApplicabilityTest.test_every_operator_and_fact_state_uses_three_valued_logic) ... ok +test_immutable_mapping_and_sequence_values_bind_at_the_interface (test_applicability.ApplicabilityTest.test_immutable_mapping_and_sequence_values_bind_at_the_interface) ... ok +test_invalid_schema_expression_and_values_reject (test_applicability.ApplicabilityTest.test_invalid_schema_expression_and_values_reject) ... ok +test_prompt_and_aliases_do_not_change_semantic_identity (test_applicability.ApplicabilityTest.test_prompt_and_aliases_do_not_change_semantic_identity) ... ok +test_runtime_module_imports_only_the_standard_library (test_applicability.ApplicabilityTest.test_runtime_module_imports_only_the_standard_library) ... ok +test_schema_and_program_digests_are_stable_and_schema_bound (test_applicability.ApplicabilityTest.test_schema_and_program_digests_are_stable_and_schema_bound) ... ok +test_semantic_contract_and_reverse_dependencies_are_exact (test_applicability.ApplicabilityTest.test_semantic_contract_and_reverse_dependencies_are_exact) ... ok +test_unknown_facts_are_reported_only_when_material (test_applicability.ApplicabilityTest.test_unknown_facts_are_reported_only_when_material) ... ok + +---------------------------------------------------------------------- +Ran 12 tests in 0.012s + +OK diff --git a/docs/plans/purpose-separated-standards-engine/reports/performance-core-evidence/package-standards_contracts.log b/docs/plans/purpose-separated-standards-engine/reports/performance-core-evidence/package-standards_contracts.log new file mode 100644 index 00000000..ae11e7a3 --- /dev/null +++ b/docs/plans/purpose-separated-standards-engine/reports/performance-core-evidence/package-standards_contracts.log @@ -0,0 +1,28 @@ +test_canonical_schema_and_interface_have_one_exact_public_closure (test_compiler.ContractCompilerTest.test_canonical_schema_and_interface_have_one_exact_public_closure) ... ok +test_dialect_keyword_pattern_and_alias_profile_is_closed (test_compiler.ContractCompilerTest.test_dialect_keyword_pattern_and_alias_profile_is_closed) ... ok +test_inputs_are_copied_before_compilation (test_compiler.ContractCompilerTest.test_inputs_are_copied_before_compilation) ... ok +test_interface_and_schema_roots_must_agree_exactly (test_compiler.ContractCompilerTest.test_interface_and_schema_roots_must_agree_exactly) ... ok +test_operation_catalog_is_authoritative_and_duplicate_dispatch_is_rejected (test_compiler.ContractCompilerTest.test_operation_catalog_is_authoritative_and_duplicate_dispatch_is_rejected) ... ok +test_operation_variants_preserve_submission_capability_coverage (test_compiler.ContractCompilerTest.test_operation_variants_preserve_submission_capability_coverage) ... ok +test_unreachable_missing_and_remote_references_have_typed_outcomes (test_compiler.ContractCompilerTest.test_unreachable_missing_and_remote_references_have_typed_outcomes) ... ok +test_variant_has_its_own_closed_roots_and_immutable_selection (test_compiler.OperationVariantTest.test_variant_has_its_own_closed_roots_and_immutable_selection) ... ok +test_variant_rejects_unknown_definitions_fields_and_duplicate_results (test_compiler.OperationVariantTest.test_variant_rejects_unknown_definitions_fields_and_duplicate_results) ... ok +test_isolated_environment_uses_the_exact_selected_runtime (test_dependency_resolution.DependencyResolutionTest.test_isolated_environment_uses_the_exact_selected_runtime) ... skipped 'dependency lock admits CPython 3.11 and 3.12 only' +test_lock_contains_only_the_reviewed_exact_artifacts (test_dependency_resolution.DependencyResolutionTest.test_lock_contains_only_the_reviewed_exact_artifacts) ... ok +test_manifest_declares_only_the_two_direct_dependencies (test_dependency_resolution.DependencyResolutionTest.test_manifest_declares_only_the_two_direct_dependencies) ... ok +test_agent_tools_derive_every_operation_and_reachable_definition (test_projection.ContractProjectionTest.test_agent_tools_derive_every_operation_and_reachable_definition) ... ok +test_every_admitted_projection_keyword_has_a_feature_local_mutation (test_projection.ContractProjectionTest.test_every_admitted_projection_keyword_has_a_feature_local_mutation) ... ok +test_feature_local_mutations_change_projection_without_default_injection (test_projection.ContractProjectionTest.test_feature_local_mutations_change_projection_without_default_injection) ... ok +test_generated_models_are_immutable_complete_and_validator_backed (test_projection.ContractProjectionTest.test_generated_models_are_immutable_complete_and_validator_backed) ... ok +test_optional_values_distinguish_omission_from_explicit_values (test_projection.ContractProjectionTest.test_optional_values_distinguish_omission_from_explicit_values) ... ok +test_adapter_rejects_values_outside_strict_json_before_validation (test_semantics.ContractSemanticsTest.test_adapter_rejects_values_outside_strict_json_before_validation) ... ok +test_decode_constructs_from_one_root_validation_proof (test_semantics.ContractSemanticsTest.test_decode_constructs_from_one_root_validation_proof) ... ok +test_json_equality_domains_use_the_selected_validator (test_semantics.ContractSemanticsTest.test_json_equality_domains_use_the_selected_validator) ... ok +test_primitive_composition_object_array_string_and_number_keywords (test_semantics.ContractSemanticsTest.test_primitive_composition_object_array_string_and_number_keywords) ... ok +test_unique_items_covers_every_json_value_family (test_semantics.ContractSemanticsTest.test_unique_items_covers_every_json_value_family) ... ok +test_validation_failures_have_stable_nested_pointers (test_semantics.ContractSemanticsTest.test_validation_failures_have_stable_nested_pointers) ... ok + +---------------------------------------------------------------------- +Ran 23 tests in 25.339s + +OK (skipped=1) diff --git a/docs/plans/purpose-separated-standards-engine/reports/performance-core-evidence/package-standards_graph.log b/docs/plans/purpose-separated-standards-engine/reports/performance-core-evidence/package-standards_graph.log new file mode 100644 index 00000000..0638ffda --- /dev/null +++ b/docs/plans/purpose-separated-standards-engine/reports/performance-core-evidence/package-standards_graph.log @@ -0,0 +1,7 @@ +test_metadata_projection_preserves_groups_aliases_and_transitive_order (test_metadata_graph.MetadataGraphTest.test_metadata_projection_preserves_groups_aliases_and_transitive_order) ... ok +test_navigation_registry_combines_metadata_and_policy_impact_once (test_metadata_graph.MetadataGraphTest.test_navigation_registry_combines_metadata_and_policy_impact_once) ... ok + +---------------------------------------------------------------------- +Ran 2 tests in 0.065s + +OK diff --git a/docs/plans/purpose-separated-standards-engine/reports/performance-core-evidence/package-standards_identity.log b/docs/plans/purpose-separated-standards-engine/reports/performance-core-evidence/package-standards_identity.log new file mode 100644 index 00000000..4d0a761c --- /dev/null +++ b/docs/plans/purpose-separated-standards-engine/reports/performance-core-evidence/package-standards_identity.log @@ -0,0 +1,16 @@ +test_authored_identity_v2_fixture_matrix (test_identity.IdentityEncodingTest.test_authored_identity_v2_fixture_matrix) ... ok +test_boolean_and_integer_are_distinct_and_unbounded (test_identity.IdentityEncodingTest.test_boolean_and_integer_are_distinct_and_unbounded) ... ok +test_byte_tokens_and_string_spans_match_independent_preimages (test_identity.IdentityEncodingTest.test_byte_tokens_and_string_spans_match_independent_preimages) ... ok +test_domain_and_prefix_grammar_is_closed (test_identity.IdentityEncodingTest.test_domain_and_prefix_grammar_is_closed) ... ok +test_encodes_every_supported_value_with_exact_bytes (test_identity.IdentityEncodingTest.test_encodes_every_supported_value_with_exact_bytes) ... ok +test_hash_uses_exact_domain_separated_length_frame (test_identity.IdentityEncodingTest.test_hash_uses_exact_domain_separated_length_frame) ... ok +test_path_byte_frames_preserve_exact_paths_and_bytes (test_identity.IdentityEncodingTest.test_path_byte_frames_preserve_exact_paths_and_bytes) ... ok +test_path_frames_are_constructed_once_and_keep_empty_file_content (test_identity.IdentityEncodingTest.test_path_frames_are_constructed_once_and_keep_empty_file_content) ... ok +test_preserves_array_order_and_rejects_duplicate_object_keys (test_identity.IdentityEncodingTest.test_preserves_array_order_and_rejects_duplicate_object_keys) ... ok +test_preserves_unicode_codepoints_and_sorts_keys_by_codepoint (test_identity.IdentityEncodingTest.test_preserves_unicode_codepoints_and_sorts_keys_by_codepoint) ... ok +test_rejects_mutable_floating_subclass_and_invalid_unicode_values (test_identity.IdentityEncodingTest.test_rejects_mutable_floating_subclass_and_invalid_unicode_values) ... ok + +---------------------------------------------------------------------- +Ran 11 tests in 0.021s + +OK diff --git a/docs/plans/purpose-separated-standards-engine/reports/performance-core-evidence/package-standards_metadata.log b/docs/plans/purpose-separated-standards-engine/reports/performance-core-evidence/package-standards_metadata.log new file mode 100644 index 00000000..dee2f0d2 --- /dev/null +++ b/docs/plans/purpose-separated-standards-engine/reports/performance-core-evidence/package-standards_metadata.log @@ -0,0 +1,36 @@ +test_directory_and_frozen_sources_produce_equal_corpora (test_metadata.StandardsMetadataTest.test_directory_and_frozen_sources_produce_equal_corpora) ... ok +test_frozen_source_rejects_missing_and_contradictory_paths (test_metadata.StandardsMetadataTest.test_frozen_source_rejects_missing_and_contradictory_paths) ... ok +test_identity_owner_and_relation_failures_are_typed (test_metadata.StandardsMetadataTest.test_identity_owner_and_relation_failures_are_typed) ... ok +test_loads_immutable_corpus_and_resolves_id_and_path (test_metadata.StandardsMetadataTest.test_loads_immutable_corpus_and_resolves_id_and_path) ... ok +test_long_acyclic_relation_chain_is_iterative (test_metadata.StandardsMetadataTest.test_long_acyclic_relation_chain_is_iterative) ... ok +test_malformed_manifest_missing_member_and_symlink_escape_are_typed (test_metadata.StandardsMetadataTest.test_malformed_manifest_missing_member_and_symlink_escape_are_typed) ... ok +test_manifest_schema_and_member_paths_are_strict (test_metadata.StandardsMetadataTest.test_manifest_schema_and_member_paths_are_strict) ... ok +test_recording_source_rejects_content_that_changes_during_one_load (test_metadata.StandardsMetadataTest.test_recording_source_rejects_content_that_changes_during_one_load) ... ok +test_relation_cycles_are_distinguished (test_metadata.StandardsMetadataTest.test_relation_cycles_are_distinguished) ... ok +test_single_module_loader_returns_neutral_failure (test_metadata.StandardsMetadataTest.test_single_module_loader_returns_neutral_failure) ... ok +test_combined_corpus_resolves_modules_and_policy_units_from_one_snapshot (test_policy_units.PolicyUnitTest.test_combined_corpus_resolves_modules_and_policy_units_from_one_snapshot) ... ok +test_identity_conflicts_and_legacy_ids_are_rejected (test_policy_units.PolicyUnitTest.test_identity_conflicts_and_legacy_ids_are_rejected) ... ok +test_locator_must_resolve_exactly_once (test_policy_units.PolicyUnitTest.test_locator_must_resolve_exactly_once) ... ok +test_nested_policy_unit_locators_are_rejected_as_overlapping (test_policy_units.PolicyUnitTest.test_nested_policy_unit_locators_are_rejected_as_overlapping) ... ok +test_repository_seed_resolves_exact_heading_and_module_path (test_policy_units.PolicyUnitTest.test_repository_seed_resolves_exact_heading_and_module_path) ... ok +test_rewrapping_changes_representation_not_structure (test_policy_units.PolicyUnitTest.test_rewrapping_changes_representation_not_structure) ... ok +test_split_lifecycle_requires_reciprocal_tombstone_and_predecessors (test_policy_units.PolicyUnitTest.test_split_lifecycle_requires_reciprocal_tombstone_and_predecessors) ... ok +test_tombstone_successors_use_policy_identity_rules (test_policy_units.PolicyUnitTest.test_tombstone_successors_use_policy_identity_rules) ... ok +test_two_active_ids_cannot_own_the_same_locator (test_policy_units.PolicyUnitTest.test_two_active_ids_cannot_own_the_same_locator) ... ok +test_unmapped_projection_excludes_exact_policy_unit_scope (test_policy_units.PolicyUnitTest.test_unmapped_projection_excludes_exact_policy_unit_scope) ... ok +test_dependency_cycle_is_rejected (test_suite_inputs.SuiteInputManifestTest.test_dependency_cycle_is_rejected) ... ok +test_loads_validated_manifest_and_derives_transitive_projection (test_suite_inputs.SuiteInputManifestTest.test_loads_validated_manifest_and_derives_transitive_projection) ... ok +test_stale_input_is_rejected (test_suite_inputs.SuiteInputManifestTest.test_stale_input_is_rejected) ... ok +test_transitive_suite_change_updates_selected_fingerprint (test_suite_inputs.SuiteInputManifestTest.test_transitive_suite_change_updates_selected_fingerprint) ... ok +test_unrelated_suite_change_preserves_selected_fingerprint (test_suite_inputs.SuiteInputManifestTest.test_unrelated_suite_change_preserves_selected_fingerprint) ... ok +test_binding_controls_current_and_stale_states (test_supporting_content.SupportingContentTest.test_binding_controls_current_and_stale_states) ... ok +test_empty_registration_is_an_honest_unreviewed_state (test_supporting_content.SupportingContentTest.test_empty_registration_is_an_honest_unreviewed_state) ... ok +test_historical_claim_has_reference_shape_and_preserves_unicode (test_supporting_content.SupportingContentTest.test_historical_claim_has_reference_shape_and_preserves_unicode) ... ok +test_supersession_uses_retained_distinct_records (test_supporting_content.SupportingContentTest.test_supersession_uses_retained_distinct_records) ... ok +test_unknown_history_does_not_require_a_fabricated_reason (test_supporting_content.SupportingContentTest.test_unknown_history_does_not_require_a_fabricated_reason) ... ok +test_unsupported_capture_does_not_become_an_empty_manifest (test_supporting_content.SupportingContentTest.test_unsupported_capture_does_not_become_an_empty_manifest) ... ok + +---------------------------------------------------------------------- +Ran 31 tests in 0.492s + +OK diff --git a/docs/plans/purpose-separated-standards-engine/reports/performance-core-evidence/package-standards_policy_impact.log b/docs/plans/purpose-separated-standards-engine/reports/performance-core-evidence/package-standards_policy_impact.log new file mode 100644 index 00000000..4da08fe1 --- /dev/null +++ b/docs/plans/purpose-separated-standards-engine/reports/performance-core-evidence/package-standards_policy_impact.log @@ -0,0 +1,15 @@ +test_compiled_authority_joins_module_and_policy_unit_graph_sources (test_compiler.PolicyImpactCompilerTest.test_compiled_authority_joins_module_and_policy_unit_graph_sources) ... ok +test_conditional_relationship_compiles_and_evaluates_one_program (test_compiler.PolicyImpactCompilerTest.test_conditional_relationship_compiles_and_evaluates_one_program) ... ok +test_consumer_review_requires_the_new_contract_and_legacy_suites_still_load (test_compiler.PolicyImpactCompilerTest.test_consumer_review_requires_the_new_contract_and_legacy_suites_still_load) ... ok +test_contract_derived_relation_target_matrix_is_complete (test_compiler.PolicyImpactCompilerTest.test_contract_derived_relation_target_matrix_is_complete) ... ok +test_contract_owns_required_evidence_and_decodes_optionals_strictly (test_compiler.PolicyImpactCompilerTest.test_contract_owns_required_evidence_and_decodes_optionals_strictly) ... ok +test_edge_identity_is_injective_for_separator_bearing_ids (test_compiler.PolicyImpactCompilerTest.test_edge_identity_is_injective_for_separator_bearing_ids) ... ok +test_invalid_declarations_reject_with_typed_failures (test_compiler.PolicyImpactCompilerTest.test_invalid_declarations_reject_with_typed_failures) ... ok +test_relationship_sources_require_exact_active_owner_policy_units (test_compiler.PolicyImpactCompilerTest.test_relationship_sources_require_exact_active_owner_policy_units) ... ok +test_repository_declarations_compile_one_graph_and_semantics_view (test_compiler.PolicyImpactCompilerTest.test_repository_declarations_compile_one_graph_and_semantics_view) ... ok +test_v1_and_dual_authority_inputs_reject_without_compatibility (test_compiler.PolicyImpactCompilerTest.test_v1_and_dual_authority_inputs_reject_without_compatibility) ... ok + +---------------------------------------------------------------------- +Ran 10 tests in 0.331s + +OK diff --git a/docs/plans/purpose-separated-standards-engine/reports/performance-core-evidence/package-standards_snapshots.log b/docs/plans/purpose-separated-standards-engine/reports/performance-core-evidence/package-standards_snapshots.log new file mode 100644 index 00000000..3935bb8e --- /dev/null +++ b/docs/plans/purpose-separated-standards-engine/reports/performance-core-evidence/package-standards_snapshots.log @@ -0,0 +1,28 @@ +test_cold_reopen_and_closed_store_copy_reconstruct_exact_values (test_module.SnapshotModuleTests.test_cold_reopen_and_closed_store_copy_reconstruct_exact_values) ... ok +test_equal_content_roots_have_independent_lifecycle_and_discovery (test_module.SnapshotModuleTests.test_equal_content_roots_have_independent_lifecycle_and_discovery) ... ok +test_equal_content_with_nested_paths_can_be_recaptured_after_reopen (test_module.SnapshotModuleTests.test_equal_content_with_nested_paths_can_be_recaptured_after_reopen) ... ok +test_expired_snapshot_id_cannot_be_reused (test_module.SnapshotModuleTests.test_expired_snapshot_id_cannot_be_reused) ... ok +test_keyset_pagination_uses_opaque_snapshot_continuation (test_module.SnapshotModuleTests.test_keyset_pagination_uses_opaque_snapshot_continuation) ... ok +test_multi_root_aggregate_is_unavailable_and_cascades_as_one_value (test_module.SnapshotModuleTests.test_multi_root_aggregate_is_unavailable_and_cascades_as_one_value) ... ok +test_nested_domain_values_reject_ambiguous_or_wrong_types (test_module.SnapshotModuleTests.test_nested_domain_values_reject_ambiguous_or_wrong_types) ... ok +test_snapshot_id_collision_rejects_without_aliasing_content (test_module.SnapshotModuleTests.test_snapshot_id_collision_rejects_without_aliasing_content) ... ok +test_aggregate_publication_can_require_an_exact_current_root_head (test_store.SnapshotStoreTests.test_aggregate_publication_can_require_an_exact_current_root_head) ... ok +test_aggregate_publication_is_idempotent_but_contradiction_rejects (test_store.SnapshotStoreTests.test_aggregate_publication_is_idempotent_but_contradiction_rejects) ... ok +test_aggregate_root_head_advances_once_and_rejects_a_stale_writer (test_store.SnapshotStoreTests.test_aggregate_root_head_advances_once_and_rejects_a_stale_writer) ... ok +test_equal_content_roots_share_content_until_the_last_root_expires (test_store.SnapshotStoreTests.test_equal_content_roots_share_content_until_the_last_root_expires) ... ok +test_failed_new_store_initialization_removes_owned_staging_file (test_store.SnapshotStoreTests.test_failed_new_store_initialization_removes_owned_staging_file) ... ok +test_guarded_aggregate_set_is_atomic_and_rejects_a_stale_head (test_store.SnapshotStoreTests.test_guarded_aggregate_set_is_atomic_and_rejects_a_stale_head) ... ok +test_interrupted_aggregate_root_advance_rolls_back_record_and_head (test_store.SnapshotStoreTests.test_interrupted_aggregate_root_advance_rolls_back_record_and_head) ... ok +test_interrupted_purge_rolls_back_root_aggregate_and_tombstone (test_store.SnapshotStoreTests.test_interrupted_purge_rolls_back_root_aggregate_and_tombstone) ... ok +test_interrupted_version_one_migration_rolls_back_every_change (test_store.SnapshotStoreTests.test_interrupted_version_one_migration_rolls_back_every_change) ... ok +test_invalid_database_and_unsupported_path_are_rejected (test_store.SnapshotStoreTests.test_invalid_database_and_unsupported_path_are_rejected) ... ok +test_invalid_existing_store_is_not_configured_before_rejection (test_store.SnapshotStoreTests.test_invalid_existing_store_is_not_configured_before_rejection) ... ok +test_invalid_version_one_authority_is_not_migrated (test_store.SnapshotStoreTests.test_invalid_version_one_authority_is_not_migrated) ... ok +test_quarantined_root_blocks_new_aggregate_publication (test_store.SnapshotStoreTests.test_quarantined_root_blocks_new_aggregate_publication) ... ok +test_snapshot_material_rows_reject_updates (test_store.SnapshotStoreTests.test_snapshot_material_rows_reject_updates) ... ok +test_version_one_store_migrates_transactionally_without_changing_a1c_rows (test_store.SnapshotStoreTests.test_version_one_store_migrates_transactionally_without_changing_a1c_rows) ... ok + +---------------------------------------------------------------------- +Ran 23 tests in 0.093s + +OK diff --git a/docs/plans/purpose-separated-standards-engine/reports/performance-core-evidence/package-standards_verifier.log b/docs/plans/purpose-separated-standards-engine/reports/performance-core-evidence/package-standards_verifier.log new file mode 100644 index 00000000..65d9634f --- /dev/null +++ b/docs/plans/purpose-separated-standards-engine/reports/performance-core-evidence/package-standards_verifier.log @@ -0,0 +1,167 @@ +test_normalize_path_accepts_exact_and_prefix_paths (test_decision_traceability.DecisionTraceabilityTest.test_normalize_path_accepts_exact_and_prefix_paths) ... ok +test_normalize_path_rejects_escaping_or_ambiguous_paths (test_decision_traceability.DecisionTraceabilityTest.test_normalize_path_rejects_escaping_or_ambiguous_paths) ... ok +test_reviewed_isolated_git_contract (test_decision_traceability.DecisionTraceabilityTest.test_reviewed_isolated_git_contract) ... ok +test_all_validates_unrelated_malformed_suite (test_engine.EngineTest.test_all_validates_unrelated_malformed_suite) ... ok +test_cli_formats_preserve_assertion_exit_classification (test_engine.EngineTest.test_cli_formats_preserve_assertion_exit_classification) ... ok +test_cli_json_preserves_typed_diagnostics (test_engine.EngineTest.test_cli_json_preserves_typed_diagnostics) ... ok +test_cli_list_does_not_parse_suite_bodies (test_engine.EngineTest.test_cli_list_does_not_parse_suite_bodies) ... ok +test_complete_runs_the_full_python_suite_catalog (test_engine.EngineTest.test_complete_runs_the_full_python_suite_catalog) ... ok +test_complete_supports_structured_json_output (test_engine.EngineTest.test_complete_supports_structured_json_output) ... ok +test_contained_path_accepts_missing_directory_and_valid_symlink (test_engine.EngineTest.test_contained_path_accepts_missing_directory_and_valid_symlink) ... ok +test_contained_path_rejects_parent_and_symlink_escape (test_engine.EngineTest.test_contained_path_rejects_parent_and_symlink_escape) ... ok +test_dependency_cycle_is_invalid (test_engine.EngineTest.test_dependency_cycle_is_invalid) ... ok +test_dependency_diamond_executes_each_suite_once (test_engine.EngineTest.test_dependency_diamond_executes_each_suite_once) ... ok +test_dependency_graph_resolves_registered_suite_ids_and_paths (test_engine.EngineTest.test_dependency_graph_resolves_registered_suite_ids_and_paths) ... ok +test_dependency_order_does_not_depend_on_registry_order (test_engine.EngineTest.test_dependency_order_does_not_depend_on_registry_order) ... ok +test_engine_errors_derive_exit_status_from_the_typed_outcome (test_engine.EngineTest.test_engine_errors_derive_exit_status_from_the_typed_outcome) ... ok +test_focused_selection_ignores_unrelated_malformed_suite (test_engine.EngineTest.test_focused_selection_ignores_unrelated_malformed_suite) ... ok +test_focused_selection_validates_malformed_dependency (test_engine.EngineTest.test_focused_selection_validates_malformed_dependency) ... ok +test_malformed_toml_is_invalid (test_engine.EngineTest.test_malformed_toml_is_invalid) ... ok +test_missing_evidence_is_unavailable (test_engine.EngineTest.test_missing_evidence_is_unavailable) ... ok +test_parent_path_and_symlink_escape_are_invalid (test_engine.EngineTest.test_parent_path_and_symlink_escape_are_invalid) ... ok +test_repository_path_preserves_contained_path_lexical_contract (test_engine.EngineTest.test_repository_path_preserves_contained_path_lexical_contract) ... ok +test_unknown_check_field_is_invalid (test_engine.EngineTest.test_unknown_check_field_is_invalid) ... ok +test_navigation_contract_accepts_rewording_but_requires_real_links (test_file_contracts.FileContractsTest.test_navigation_contract_accepts_rewording_but_requires_real_links) ... ok +test_archived_ref_must_resolve_to_exact_commit (test_git_reachability.GitReachabilityTest.test_archived_ref_must_resolve_to_exact_commit) ... ok +test_discard_requires_exact_authority_record (test_git_reachability.GitReachabilityTest.test_discard_requires_exact_authority_record) ... ok +test_duplicate_oid_is_rejected (test_git_reachability.GitReachabilityTest.test_duplicate_oid_is_rejected) ... ok +test_legacy_ref_suffix_dispositions_are_rejected (test_git_reachability.GitReachabilityTest.test_legacy_ref_suffix_dispositions_are_rejected) ... ok +test_malformed_oid_is_rejected (test_git_reachability.GitReachabilityTest.test_malformed_oid_is_rejected) ... ok +test_malformed_reference_is_invalid (test_git_reachability.GitReachabilityTest.test_malformed_reference_is_invalid) ... ok +test_manifest_path_cannot_escape_repository (test_git_reachability.GitReachabilityTest.test_manifest_path_cannot_escape_repository) ... ok +test_public_entrypoint_renders_unavailable_git_failure (test_git_reachability.GitReachabilityTest.test_public_entrypoint_renders_unavailable_git_failure) ... ok +test_repository_identity_ignores_ambient_git_overrides (test_git_reachability.GitReachabilityTest.test_repository_identity_ignores_ambient_git_overrides) ... ok +test_retained_ref_accepts_an_ancestor (test_git_reachability.GitReachabilityTest.test_retained_ref_accepts_an_ancestor) ... ok +test_retained_ref_rejects_unreachable_commit (test_git_reachability.GitReachabilityTest.test_retained_ref_rejects_unreachable_commit) ... ok +test_unavailable_git_is_a_typed_reachability_failure (test_git_reachability.GitReachabilityTest.test_unavailable_git_is_a_typed_reachability_failure) ... ok +test_unknown_reference_is_distinct (test_git_reachability.GitReachabilityTest.test_unknown_reference_is_distinct) ... ok +test_applicability_and_exclusion_cannot_both_be_none (test_metadata.MetadataGraphTest.test_applicability_and_exclusion_cannot_both_be_none) ... ok +test_canonical_owner_must_equal_normalized_path (test_metadata.MetadataGraphTest.test_canonical_owner_must_equal_normalized_path) ... ok +test_config_requires_exactly_one_mode (test_metadata.MetadataGraphTest.test_config_requires_exactly_one_mode) ... ok +test_cross_relation_cycle_is_reported (test_metadata.MetadataGraphTest.test_cross_relation_cycle_is_reported) ... ok +test_duplicate_module_ids_are_rejected (test_metadata.MetadataGraphTest.test_duplicate_module_ids_are_rejected) ... ok +test_field_count_is_exact (test_metadata.MetadataGraphTest.test_field_count_is_exact) ... ok +test_fixture_corpus_compares_exact_diagnostic_sequences (test_metadata.MetadataGraphTest.test_fixture_corpus_compares_exact_diagnostic_sequences) ... ok +test_fixture_corpus_mismatch_is_typed (test_metadata.MetadataGraphTest.test_fixture_corpus_mismatch_is_typed) ... ok +test_metadata_adapter_resolves_ids_paths_and_named_groups (test_metadata.MetadataGraphTest.test_metadata_adapter_resolves_ids_paths_and_named_groups) ... ok +test_missing_input_is_unavailable (test_metadata.MetadataGraphTest.test_missing_input_is_unavailable) ... ok +test_module_id_role_and_level_domains_are_typed (test_metadata.MetadataGraphTest.test_module_id_role_and_level_domains_are_typed) ... ok +test_prose_is_preserved_and_must_not_be_empty (test_metadata.MetadataGraphTest.test_prose_is_preserved_and_must_not_be_empty) ... ok +test_relation_grammar_rejects_empty_and_mixed_none_items (test_metadata.MetadataGraphTest.test_relation_grammar_rejects_empty_and_mixed_none_items) ... ok +test_relation_targets_must_be_unique (test_metadata.MetadataGraphTest.test_relation_targets_must_be_unique) ... ok +test_requires_cycle_and_combined_cycle_are_reported (test_metadata.MetadataGraphTest.test_requires_cycle_and_combined_cycle_are_reported) ... ok +test_role_specific_level_is_enforced (test_metadata.MetadataGraphTest.test_role_specific_level_is_enforced) ... ok +test_self_edges_and_specialization_role_are_rejected (test_metadata.MetadataGraphTest.test_self_edges_and_specialization_role_are_rejected) ... ok +test_specialization_cycle_and_combined_cycle_are_reported (test_metadata.MetadataGraphTest.test_specialization_cycle_and_combined_cycle_are_reported) ... ok +test_symbolic_values_require_one_backticked_token (test_metadata.MetadataGraphTest.test_symbolic_values_require_one_backticked_token) ... ok +test_unresolved_targets_are_rejected (test_metadata.MetadataGraphTest.test_unresolved_targets_are_rejected) ... ok +test_valid_module_and_profile_graph_passes (test_metadata.MetadataGraphTest.test_valid_module_and_profile_graph_passes) ... ok +test_direct_module_mutation_fails (test_metadata_route.MetadataRouteTest.test_direct_module_mutation_fails) ... ok +test_exact_direct_modules_and_graph_closure_pass (test_metadata_route.MetadataRouteTest.test_exact_direct_modules_and_graph_closure_pass) ... ok +test_expectation_case_coverage_is_exact (test_metadata_route.MetadataRouteTest.test_expectation_case_coverage_is_exact) ... ok +test_requires_closure_mutation_fails (test_metadata_route.MetadataRouteTest.test_requires_closure_mutation_fails) ... ok +test_unresolved_route_cannot_claim_resolved_selection (test_metadata_route.MetadataRouteTest.test_unresolved_route_cannot_claim_resolved_selection) ... ok +test_invalid_fixtures_preserve_diagnostics (test_plan_contract.PlanContractTest.test_invalid_fixtures_preserve_diagnostics) ... ok +test_parser_rejects_unknown_and_contradictory_configuration (test_plan_contract.PlanContractTest.test_parser_rejects_unknown_and_contradictory_configuration) ... ok +test_valid_fixtures_pass (test_plan_contract.PlanContractTest.test_valid_fixtures_pass) ... ok +test_adapter_queries_compiled_registry_in_deterministic_consumer_order (test_policy_impact.PolicyImpactTest.test_adapter_queries_compiled_registry_in_deterministic_consumer_order) ... ok +test_compiler_owns_relation_target_compatibility (test_policy_impact.PolicyImpactTest.test_compiler_owns_relation_target_compatibility) ... ok +test_current_commit_graph_has_complete_alias_and_suite_closure (test_policy_impact.PolicyImpactTest.test_current_commit_graph_has_complete_alias_and_suite_closure) ... ok +test_current_planning_graph_has_explicit_consumer_and_alias_closure (test_policy_impact.PolicyImpactTest.test_current_planning_graph_has_explicit_consumer_and_alias_closure) ... ok +test_custom_manifest_has_no_implicit_coverage_authority (test_policy_impact.PolicyImpactTest.test_custom_manifest_has_no_implicit_coverage_authority) ... ok +test_old_policy_query_and_bespoke_graph_files_are_absent (test_policy_impact.PolicyImpactTest.test_old_policy_query_and_bespoke_graph_files_are_absent) ... ok +test_registered_loader_consumes_engine_coverage_authority (test_policy_impact.PolicyImpactTest.test_registered_loader_consumes_engine_coverage_authority) ... ok +test_registered_loader_translates_compiler_failure (test_policy_impact.PolicyImpactTest.test_registered_loader_translates_compiler_failure) ... ok +test_rejects_unknown_owner_and_evidence_owner (test_policy_impact.PolicyImpactTest.test_rejects_unknown_owner_and_evidence_owner) ... ok +test_uncovered_owner_query_is_typed_unavailable (test_policy_impact.PolicyImpactTest.test_uncovered_owner_query_is_typed_unavailable) ... ok +test_arbitrary_attributes_do_not_imply_import_machinery (test_python_package_contract.PythonPackageContractTest.test_arbitrary_attributes_do_not_imply_import_machinery) ... ok +test_assignment_rhs_precedes_module_and_class_target_binding (test_python_package_contract.PythonPackageContractTest.test_assignment_rhs_precedes_module_and_class_target_binding) ... ok +test_assignment_targets_bind_from_left_to_right (test_python_package_contract.PythonPackageContractTest.test_assignment_targets_bind_from_left_to_right) ... ok +test_augmented_assignment_loads_bound_target_before_store (test_python_package_contract.PythonPackageContractTest.test_augmented_assignment_loads_bound_target_before_store) ... ok +test_class_comprehension_does_not_close_over_class_sys_binding (test_python_package_contract.PythonPackageContractTest.test_class_comprehension_does_not_close_over_class_sys_binding) ... ok +test_complete_conditional_benign_binding_is_preserved (test_python_package_contract.PythonPackageContractTest.test_complete_conditional_benign_binding_is_preserved) ... ok +test_comprehension_targets_are_benign_lexical_bindings (test_python_package_contract.PythonPackageContractTest.test_comprehension_targets_are_benign_lexical_bindings) ... ok +test_conditional_binding_does_not_hide_builtin_capability (test_python_package_contract.PythonPackageContractTest.test_conditional_binding_does_not_hide_builtin_capability) ... ok +test_conditional_deletion_may_restore_builtin_capability (test_python_package_contract.PythonPackageContractTest.test_conditional_deletion_may_restore_builtin_capability) ... ok +test_conditional_sys_alias_retains_possible_capability (test_python_package_contract.PythonPackageContractTest.test_conditional_sys_alias_retains_possible_capability) ... ok +test_conditional_sys_alias_retains_provenance_in_nested_scope (test_python_package_contract.PythonPackageContractTest.test_conditional_sys_alias_retains_provenance_in_nested_scope) ... ok +test_deleted_module_binding_restores_builtin_capability (test_python_package_contract.PythonPackageContractTest.test_deleted_module_binding_restores_builtin_capability) ... ok +test_dependency_and_source_ownership_are_exact (test_python_package_contract.PythonPackageContractTest.test_dependency_and_source_ownership_are_exact) ... ok +test_entrypoint_executes_declared_operation_instead_of_help (test_python_package_contract.PythonPackageContractTest.test_entrypoint_executes_declared_operation_instead_of_help) ... ok +test_exact_public_import_and_dependency_closure_pass (test_python_package_contract.PythonPackageContractTest.test_exact_public_import_and_dependency_closure_pass) ... ok +test_exception_alias_is_a_benign_binding_inside_its_handler (test_python_package_contract.PythonPackageContractTest.test_exception_alias_is_a_benign_binding_inside_its_handler) ... ok +test_exception_alias_is_unbound_after_its_handler (test_python_package_contract.PythonPackageContractTest.test_exception_alias_is_unbound_after_its_handler) ... ok +test_fixture_construction_failure_is_a_typed_finding (test_python_package_contract.PythonPackageContractTest.test_fixture_construction_failure_is_a_typed_finding) ... ok +test_indexed_copy_excludes_untracked_ambient_files (test_python_package_contract.PythonPackageContractTest.test_indexed_copy_excludes_untracked_ambient_files) ... ok +test_indexed_copy_uses_staged_bytes_not_worktree_bytes (test_python_package_contract.PythonPackageContractTest.test_indexed_copy_uses_staged_bytes_not_worktree_bytes) ... ok +test_later_class_binding_does_not_hide_sys_modules_bypass (test_python_package_contract.PythonPackageContractTest.test_later_class_binding_does_not_hide_sys_modules_bypass) ... ok +test_later_module_binding_does_not_hide_builtin_capability_access (test_python_package_contract.PythonPackageContractTest.test_later_module_binding_does_not_hide_builtin_capability_access) ... ok +test_loaded_name_inside_assignment_target_is_not_a_binding (test_python_package_contract.PythonPackageContractTest.test_loaded_name_inside_assignment_target_is_not_a_binding) ... ok +test_method_does_not_close_over_class_sys_binding (test_python_package_contract.PythonPackageContractTest.test_method_does_not_close_over_class_sys_binding) ... ok +test_private_child_and_unexported_root_name_are_distinct (test_python_package_contract.PythonPackageContractTest.test_private_child_and_unexported_root_name_are_distinct) ... ok +test_public_execution_failure_is_distinct (test_python_package_contract.PythonPackageContractTest.test_public_execution_failure_is_distinct) ... ok +test_shadowed_capability_names_are_not_treated_as_import_machinery (test_python_package_contract.PythonPackageContractTest.test_shadowed_capability_names_are_not_treated_as_import_machinery) ... ok +test_simple_sys_alias_retains_capability_provenance (test_python_package_contract.PythonPackageContractTest.test_simple_sys_alias_retains_capability_provenance) ... ok +test_star_and_dynamic_import_bypasses_are_rejected (test_python_package_contract.PythonPackageContractTest.test_star_and_dynamic_import_bypasses_are_rejected) ... ok +test_supported_branch_exits_preserve_possible_unbinding (test_python_package_contract.PythonPackageContractTest.test_supported_branch_exits_preserve_possible_unbinding) ... ok +test_sys_modules_import_capability_bypass_is_rejected (test_python_package_contract.PythonPackageContractTest.test_sys_modules_import_capability_bypass_is_rejected) ... ok +test_verifier_git_fixtures_ignore_ambient_repository_overrides (test_python_package_contract.PythonPackageContractTest.test_verifier_git_fixtures_ignore_ambient_repository_overrides) ... ok +test_canonical_cli_uses_the_complete_repository_composition (test_repository_graph.RepositoryGraphTest.test_canonical_cli_uses_the_complete_repository_composition) ... ok +test_every_corpus_member_resolves_by_id_and_path (test_repository_graph.RepositoryGraphTest.test_every_corpus_member_resolves_by_id_and_path) ... ok +test_existing_unregistered_artifact_returns_empty_incidence (test_repository_graph.RepositoryGraphTest.test_existing_unregistered_artifact_returns_empty_incidence) ... ok +test_metadata_edges_exactly_match_canonical_document_relations (test_repository_graph.RepositoryGraphTest.test_metadata_edges_exactly_match_canonical_document_relations) ... ok +test_one_artifact_reports_edges_from_independent_registered_sources (test_repository_graph.RepositoryGraphTest.test_one_artifact_reports_edges_from_independent_registered_sources) ... ok +test_previously_unselected_normative_and_reference_aliases_resolve (test_repository_graph.RepositoryGraphTest.test_previously_unselected_normative_and_reference_aliases_resolve) ... ok +test_repository_composition_registers_every_migrated_group (test_repository_graph.RepositoryGraphTest.test_repository_composition_registers_every_migrated_group) ... ok +test_suite_id_and_path_report_policy_and_dependency_edges (test_repository_graph.RepositoryGraphTest.test_suite_id_and_path_report_policy_and_dependency_edges) ... ok +test_markdown_destination_coverage_missing_target_is_unavailable (test_routing_checks.RoutingChecksTest.test_markdown_destination_coverage_missing_target_is_unavailable) ... ok +test_markdown_destination_coverage_preserves_anchor_identity (test_routing_checks.RoutingChecksTest.test_markdown_destination_coverage_preserves_anchor_identity) ... ok +test_markdown_destination_coverage_rejects_escape_and_external (test_routing_checks.RoutingChecksTest.test_markdown_destination_coverage_rejects_escape_and_external) ... ok +test_markdown_link_coverage_ignores_external_and_reference_links (test_routing_checks.RoutingChecksTest.test_markdown_link_coverage_ignores_external_and_reference_links) ... ok +test_markdown_link_coverage_matches_exact_destinations (test_routing_checks.RoutingChecksTest.test_markdown_link_coverage_matches_exact_destinations) ... ok +test_markdown_link_coverage_missing_member_is_unavailable (test_routing_checks.RoutingChecksTest.test_markdown_link_coverage_missing_member_is_unavailable) ... ok +test_markdown_link_coverage_normalizes_local_targets (test_routing_checks.RoutingChecksTest.test_markdown_link_coverage_normalizes_local_targets) ... ok +test_markdown_link_coverage_preserves_markdown_input_diagnostics (test_routing_checks.RoutingChecksTest.test_markdown_link_coverage_preserves_markdown_input_diagnostics) ... ok +test_markdown_link_coverage_rejects_empty_and_duplicate_members (test_routing_checks.RoutingChecksTest.test_markdown_link_coverage_rejects_empty_and_duplicate_members) ... ok +test_markdown_link_coverage_rejects_empty_projection (test_routing_checks.RoutingChecksTest.test_markdown_link_coverage_rejects_empty_projection) ... ok +test_markdown_link_coverage_rejects_escaping_link (test_routing_checks.RoutingChecksTest.test_markdown_link_coverage_rejects_escaping_link) ... ok +test_markdown_link_coverage_rejects_unknown_field (test_routing_checks.RoutingChecksTest.test_markdown_link_coverage_rejects_unknown_field) ... ok +test_markdown_link_coverage_rejects_unknown_identity (test_routing_checks.RoutingChecksTest.test_markdown_link_coverage_rejects_unknown_identity) ... ok +test_markdown_link_coverage_reports_each_missing_member (test_routing_checks.RoutingChecksTest.test_markdown_link_coverage_reports_each_missing_member) ... ok +test_markdown_link_coverage_requires_one_projected_column (test_routing_checks.RoutingChecksTest.test_markdown_link_coverage_requires_one_projected_column) ... ok +test_markdown_links_absolute_target_is_invalid (test_routing_checks.RoutingChecksTest.test_markdown_links_absolute_target_is_invalid) ... ok +test_markdown_links_accept_nested_fragments_and_external_targets (test_routing_checks.RoutingChecksTest.test_markdown_links_accept_nested_fragments_and_external_targets) ... ok +test_markdown_links_accept_projected_members (test_routing_checks.RoutingChecksTest.test_markdown_links_accept_projected_members) ... ok +test_markdown_links_invalid_utf8_is_invalid (test_routing_checks.RoutingChecksTest.test_markdown_links_invalid_utf8_is_invalid) ... ok +test_markdown_links_missing_source_is_unavailable (test_routing_checks.RoutingChecksTest.test_markdown_links_missing_source_is_unavailable) ... ok +test_markdown_links_missing_target_is_unavailable (test_routing_checks.RoutingChecksTest.test_markdown_links_missing_target_is_unavailable) ... ok +test_markdown_links_parent_escape_is_invalid (test_routing_checks.RoutingChecksTest.test_markdown_links_parent_escape_is_invalid) ... ok +test_markdown_links_paths_must_be_non_empty_and_unique (test_routing_checks.RoutingChecksTest.test_markdown_links_paths_must_be_non_empty_and_unique) ... ok +test_markdown_links_reject_paths_and_members_together (test_routing_checks.RoutingChecksTest.test_markdown_links_reject_paths_and_members_together) ... ok +test_markdown_links_symlink_escape_is_invalid (test_routing_checks.RoutingChecksTest.test_markdown_links_symlink_escape_is_invalid) ... ok +test_markdown_links_unknown_field_is_invalid (test_routing_checks.RoutingChecksTest.test_markdown_links_unknown_field_is_invalid) ... ok +test_contradictory_cross_check_states_are_typed (test_suite_inputs.SuiteInputProjectionTest.test_contradictory_cross_check_states_are_typed) ... ok +test_explicit_repository_paths_use_the_canonical_projection_owner (test_suite_inputs.SuiteInputProjectionTest.test_explicit_repository_paths_use_the_canonical_projection_owner) ... ok +test_freshness_binds_suite_and_input_bytes (test_suite_inputs.SuiteInputProjectionTest.test_freshness_binds_suite_and_input_bytes) ... ok +test_missing_required_present_input_is_rejected (test_suite_inputs.SuiteInputProjectionTest.test_missing_required_present_input_is_rejected) ... ok +test_present_absence_assertion_is_rejected (test_suite_inputs.SuiteInputProjectionTest.test_present_absence_assertion_is_rejected) ... ok +test_projection_distinguishes_content_and_absence (test_suite_inputs.SuiteInputProjectionTest.test_projection_distinguishes_content_and_absence) ... ok +test_repository_index_membership_changes_projection_identity (test_suite_inputs.SuiteInputProjectionTest.test_repository_index_membership_changes_projection_identity) ... ok +test_repository_projection_covers_every_parsed_check_adapter (test_suite_inputs.SuiteInputProjectionTest.test_repository_projection_covers_every_parsed_check_adapter) ... ok +test_written_projection_is_canonical_json (test_suite_inputs.SuiteInputProjectionTest.test_written_projection_is_canonical_json) ... ok +test_written_projection_rejects_stale_registry (test_suite_inputs.SuiteInputProjectionTest.test_written_projection_rejects_stale_registry) ... ok +test_written_projection_rejects_stale_repository_index (test_suite_inputs.SuiteInputProjectionTest.test_written_projection_rejects_stale_repository_index) ... ok +test_written_projection_rejects_stale_suite_definition (test_suite_inputs.SuiteInputProjectionTest.test_written_projection_rejects_stale_suite_definition) ... ok +test_written_projection_rejects_tracked_membership_removal (test_suite_inputs.SuiteInputProjectionTest.test_written_projection_rejects_tracked_membership_removal) ... ok +test_written_projection_rejects_transitive_input_mutation (test_suite_inputs.SuiteInputProjectionTest.test_written_projection_rejects_transitive_input_mutation) ... ok + +---------------------------------------------------------------------- +Ran 156 tests in 24.647s + +OK +STALE evaluation/standards-effectiveness/generated/suite-inputs.json +STALE evaluation/standards-effectiveness/generated/suite-inputs.json +STALE evaluation/standards-effectiveness/generated/suite-inputs.json +STALE evaluation/standards-effectiveness/generated/suite-inputs.json +STALE evaluation/standards-effectiveness/generated/suite-inputs.json +STALE evaluation/standards-effectiveness/generated/suite-inputs.json diff --git a/docs/plans/purpose-separated-standards-engine/reports/performance-core-evidence/package-summary.json b/docs/plans/purpose-separated-standards-engine/reports/performance-core-evidence/package-summary.json new file mode 100644 index 00000000..bf9fbffd --- /dev/null +++ b/docs/plans/purpose-separated-standards-engine/reports/performance-core-evidence/package-summary.json @@ -0,0 +1,68 @@ +[ + { + "package": "graph_engine", + "run": 37, + "skipped": 0, + "status": "passed" + }, + { + "package": "repository_git", + "run": 16, + "skipped": 0, + "status": "passed" + }, + { + "package": "standards_analysis", + "run": 100, + "skipped": 0, + "status": "passed" + }, + { + "package": "standards_applicability", + "run": 12, + "skipped": 0, + "status": "passed" + }, + { + "package": "standards_contracts", + "run": 23, + "skipped": 1, + "status": "passed" + }, + { + "package": "standards_graph", + "run": 2, + "skipped": 0, + "status": "passed" + }, + { + "package": "standards_identity", + "run": 11, + "skipped": 0, + "status": "passed" + }, + { + "package": "standards_metadata", + "run": 31, + "skipped": 0, + "status": "passed" + }, + { + "package": "standards_policy_impact", + "run": 10, + "skipped": 0, + "status": "passed" + }, + { + "package": "standards_snapshots", + "run": 23, + "skipped": 0, + "status": "passed" + }, + { + "package": "standards_verifier", + "run": 156, + "skipped": 0, + "status": "passed" + } +] diff --git a/docs/plans/purpose-separated-standards-engine/reports/performance-core-evidence/per-test-disposition.csv b/docs/plans/purpose-separated-standards-engine/reports/performance-core-evidence/per-test-disposition.csv new file mode 100644 index 00000000..9f882dad --- /dev/null +++ b/docs/plans/purpose-separated-standards-engine/reports/performance-core-evidence/per-test-disposition.csv @@ -0,0 +1,167 @@ +test,initial_status,initial_wall_s,final_disposition,evidence +test_agent_navigation.AgentNavigationTest.test_boolean_nullable_set_facts_aliases_and_multiple_causes,pass,0.8374316270000008,passed,full-engine.jsonl +test_agent_navigation.AgentNavigationTest.test_capture_rejection_never_advances_to_query,pass,0.0004963899999665955,passed,full-engine.jsonl +test_agent_navigation.AgentNavigationTest.test_compact_read_preserves_text_authority_and_full_detail,pass,1.938903286000027,passed,full-engine.jsonl +test_agent_navigation.AgentNavigationTest.test_complete_explicit_facts_select_reviewed_modules,pass,1.6206403980000914,passed,full-engine.jsonl +test_agent_navigation.AgentNavigationTest.test_focused_read_continuations_are_callable_against_exact_snapshot,pass,2.5552656720000186,passed,full-engine.jsonl +test_agent_navigation.AgentNavigationTest.test_invalid_inputs_cannot_create_snapshot,pass,0.00038675899997997476,passed,full-engine.jsonl +test_agent_navigation.AgentNavigationTest.test_invalid_routing_values_do_not_become_negative_facts,pass,1.656523421000088,passed,full-engine.jsonl +test_agent_navigation.AgentNavigationTest.test_optional_capture_matches_explicit_route_and_preserves_unresolved,pass,4.1506553330000315,passed,full-engine.jsonl +test_agent_navigation.AgentNavigationTest.test_related_matches_native_permissions_and_projection,pass,3.364521964000005,passed,full-engine.jsonl +test_agent_navigation.AgentNavigationTest.test_supplied_snapshot_never_captures_ambient_authority,pass,1.5971001110000316,passed,full-engine.jsonl +test_agent_navigation.AgentNavigationTest.test_vocabulary_matches_router_and_questions_are_typed,pass,2.7376943400000755,passed,full-engine.jsonl +test_agent_workflow.AgentWorkflowTest.test_analysis_rejection_retains_the_created_revision,pass,2.346051282000076,passed,full-engine.jsonl +test_agent_workflow.AgentWorkflowTest.test_context_is_immutable_existing_identity_and_foreign_records_reject,pass,4.556730729000037,passed,full-engine.jsonl +test_agent_workflow.AgentWorkflowTest.test_normative_proposal_stops_at_real_pending_work,pass,17.71921971100005,passed,full-engine.jsonl +test_agent_workflow.AgentWorkflowTest.test_reference_proposal_composes_analysis_without_review_or_application,pass,8.105361828000014,passed,full-engine.jsonl +test_agent_workflow.AgentWorkflowTest.test_review_is_explicit_and_current_authorization_is_required,pass,12.365775857000017,passed,full-engine.jsonl +test_agent_workflow.AgentWorkflowTest.test_revision_advancement_does_not_retarget_old_context,pass,19.588788710000017,passed,full-engine.jsonl +test_analysis.AnalysisWorkflowTest.test_apply_create_and_retire_owns_topology_and_commit,error,0.6427231130001019,passed_after_disposable_main_fixture_repair,fixture-reruns.log +test_analysis.AnalysisWorkflowTest.test_apply_proposal_composes_real_verification_and_cold_readback,error,0.6510440649999509,passed_after_disposable_main_fixture_repair,fixture-reruns.log +test_analysis.AnalysisWorkflowTest.test_capture_compiles_live_and_frozen_sources_independently,pass,2.46063453499994,passed,full-engine.jsonl +test_analysis.AnalysisWorkflowTest.test_cold_load_rejects_obsolete_domain_contracts,pass,0.013399433000131467,passed,full-engine.jsonl +test_analysis.AnalysisWorkflowTest.test_coverage_exclusions_require_exact_evidence_before_resolution,pass,2.5536305880000327,passed,full-engine.jsonl +test_analysis.AnalysisWorkflowTest.test_current_authorization_is_not_reused_with_material,pass,2.549788031999924,passed,full-engine.jsonl +test_analysis.AnalysisWorkflowTest.test_distinct_snapshot_roots_retain_distinct_material_and_lifecycle,pass,4.61391589699997,passed,full-engine.jsonl +test_analysis.AnalysisWorkflowTest.test_equal_transition_is_idempotent_and_different_evidence_branches,pass,3.5120162980001624,passed,full-engine.jsonl +test_analysis.AnalysisWorkflowTest.test_lifecycle_change_during_authorization_blocks_post_submission_evaluation,pass,2.8972310050000942,passed,full-engine.jsonl +test_analysis.AnalysisWorkflowTest.test_policy_free_standard_creation_enters_public_analysis,pass,4.212555537000071,passed,full-engine.jsonl +test_analysis.AnalysisWorkflowTest.test_prepare_persists_parent_bound_public_work,pass,0.8536476829999629,passed,full-engine.jsonl +test_analysis.AnalysisWorkflowTest.test_prior_analysis_reuses_the_same_valid_decision,pass,2.5657630400000926,passed,full-engine.jsonl +test_analysis.AnalysisWorkflowTest.test_prior_decisions_reuse_material_but_recheck_each_decision,pass,2.731527830999994,passed,full-engine.jsonl +test_analysis.AnalysisWorkflowTest.test_proposal_analysis_derives_inputs_and_replays_exact_revision,pass,12.256338472999914,passed,full-engine.jsonl +test_analysis.AnalysisWorkflowTest.test_proposal_analysis_uses_one_projection_and_one_verified_base,pass,4.42507883799999,passed,full-engine.jsonl +test_analysis.AnalysisWorkflowTest.test_relationship_only_proposals_enter_a1c_and_replay_cold,pass,21.634839305000014,passed,full-engine.jsonl +test_analysis.AnalysisWorkflowTest.test_resolved_parent_work_is_not_applicable_to_child,pass,2.4726617460000853,passed,full-engine.jsonl +test_analysis.AnalysisWorkflowTest.test_review_composition_publishes_readiness_for_complete_analysis,pass,24.669981077999864,passed,full-engine.jsonl +test_analysis.AnalysisWorkflowTest.test_same_snapshot_material_is_loaded_once_per_decision_operation,pass,2.6850981219999994,passed,full-engine.jsonl +test_analysis.AnalysisWorkflowTest.test_snapshot_creation_rejects_changed_replay_path_closure,pass,0.012781743999994433,passed,full-engine.jsonl +test_analysis.AnalysisWorkflowTest.test_state_and_children_are_inspectable_in_a_fresh_process,pass,3.5037326449999,passed,full-engine.jsonl +test_applicability_contract.ApplicabilityContractTest.test_former_applicability_implementations_are_not_fallbacks,pass,0.00030302900017886714,passed,full-engine.jsonl +test_applicability_contract.ApplicabilityContractTest.test_runtime_domains_cover_the_public_serialized_applicability_shapes,pass,0.0014179289998992317,passed,full-engine.jsonl +test_authoring.AuthoringTests.test_application_intent_is_current_head_guarded_and_records_applied,pass,0.037209057000154644,passed,full-engine.jsonl +test_authoring.AuthoringTests.test_create_and_find_are_durable_through_the_public_facade,pass,2.378662125999881,passed,full-engine.jsonl +test_authoring.AuthoringTests.test_create_rejects_duplicate_facets_and_validator_failure_is_atomic,pass,0.0032442629999422934,passed,full-engine.jsonl +test_authoring.AuthoringTests.test_create_translates_invalid_change_set_unicode_to_a_typed_rejection,pass,0.2933159379999779,passed,full-engine.jsonl +test_authoring.AuthoringTests.test_discovery_rejects_a_revision_without_content_bound_authority,pass,0.0035239979999914794,passed,full-engine.jsonl +test_authoring.AuthoringTests.test_discovery_rejects_the_old_revision_contract_as_unsupported,pass,0.285431373999927,passed,full-engine.jsonl +test_authoring.AuthoringTests.test_proposal_discovery_uses_opaque_keyset_continuations,pass,0.008022848000109661,passed,full-engine.jsonl +test_authoring.AuthoringTests.test_proposals_follow_snapshot_quarantine_and_purge_lifecycle,pass,0.005388748000086707,passed,full-engine.jsonl +test_authoring.AuthoringTests.test_readiness_is_content_bound_durable_and_current_head_guarded,pass,0.022556464999979653,passed,full-engine.jsonl +test_authoring.AuthoringTests.test_readiness_rejects_incomplete_decisions_without_persistence,pass,0.0037537670000347134,passed,full-engine.jsonl +test_authoring.AuthoringTests.test_readiness_rejects_invalid_proposal_commit_material,pass,0.003876059000049281,passed,full-engine.jsonl +test_authoring.AuthoringTests.test_revise_is_durable_and_stale_writes_leave_no_partial_record,pass,0.6170374470000297,passed,full-engine.jsonl +test_authoring.AuthoringTests.test_stale_readiness_cannot_publish_application_intent,pass,0.010567605999995067,passed,full-engine.jsonl +test_coverage_publication.EngineAuditPublicationTest.test_review_verify_apply_recover_and_read_without_original_database,failure,29.544787694999968,passed_after_disposable_main_fixture_repair,fixture-reruns.log +test_evidence_maintenance.EvidenceMaintenanceInterfaceTest.test_preview_and_overlap_preserve_working_tree_then_apply_retires,pass,107.767203505,passed,full-engine.jsonl +test_evidence_maintenance.EvidenceMaintenanceTest.test_consumer_registration_enters_existing_policy_owner,pass,0.0006521709999560699,passed,full-engine.jsonl +test_evidence_maintenance.EvidenceMaintenanceTest.test_pruning_preserves_current_claims_and_removes_stale_receipts,pass,0.0005143769999449432,passed,full-engine.jsonl +test_evidence_maintenance.EvidenceMaintenanceTest.test_registered_checker_retirement_removes_its_graph_edges,pass,0.0005909899998641777,passed,full-engine.jsonl +test_evidence_maintenance.EvidenceMaintenanceTest.test_retirement_preserves_real_dependencies_and_normative_consumers,pass,0.00042121000001316133,passed,full-engine.jsonl +test_evidence_maintenance.EvidenceMaintenanceTest.test_subject_unregistration_preserves_guidance_and_retained_units,pass,0.0004505639999479172,passed,full-engine.jsonl +test_evidence_maintenance.EvidenceMaintenanceTest.test_unknown_retirement_does_not_mutate_authority,pass,0.0001516439999704744,passed,full-engine.jsonl +test_generated_contract.GeneratedContractTest.test_agent_tools_are_the_exact_compiler_projection,pass,0.2728950210000676,passed,full-engine.jsonl +test_generated_contract.GeneratedContractTest.test_authored_examples_satisfy_the_public_contract,pass,0.2573290369998631,passed,full-engine.jsonl +test_generated_contract.GeneratedContractTest.test_compiler_owns_the_complete_public_definition_closure,pass,0.5303712130000804,passed,full-engine.jsonl +test_generated_contract.GeneratedContractTest.test_coverage_read_is_scoped_optional_and_uses_repository_authority,pass,3.5617112630000065,passed,full-engine.jsonl +test_generated_contract.GeneratedContractTest.test_generated_contract_projections_are_current,pass,1.7192598419999285,passed,full-engine.jsonl +test_generated_contract.GeneratedContractTest.test_generated_native_models_decode_complete_v20_values,pass,0.000813258000107453,passed,full-engine.jsonl +test_generated_contract.GeneratedContractTest.test_identity_fixtures_use_valid_public_handle_versions,pass,0.26847314399992683,passed,full-engine.jsonl +test_generated_contract.GeneratedContractTest.test_interface_operations_bind_generated_calls_results_and_facade,pass,0.26638536000018576,passed,full-engine.jsonl +test_generated_contract.GeneratedContractTest.test_local_evidence_rejects_missing_files_and_wrong_digests,pass,0.0004440840000370372,passed,full-engine.jsonl +test_generated_contract.GeneratedContractTest.test_local_facade_binds_always_allow_authorization,pass,0.2696082560000832,passed,full-engine.jsonl +test_generated_contract.GeneratedContractTest.test_missing_verification_input_returns_a_typed_rejection,pass,0.26429220699992584,passed,full-engine.jsonl +test_generated_contract.GeneratedContractTest.test_prepare_facade_passes_the_complete_generated_call,pass,0.28884328799995274,passed,full-engine.jsonl +test_generated_contract.GeneratedContractTest.test_review_call_requires_exactly_three_decisions,pass,0.0007507660000101168,passed,full-engine.jsonl +test_generated_contract.GeneratedContractTest.test_router_read_exposes_editable_definitions_only_when_requested,pass,8.889241313999946,passed,full-engine.jsonl +test_generated_contract.GeneratedContractTest.test_verification_is_exposed_without_publication_and_refresh_is_explicit,pass,0.2786341060000268,passed,full-engine.jsonl +test_logical_authoring.LogicalAuthoringTests.test_change_set_is_immutable_and_normalized_before_compilation,pass,0.0003581680000479537,passed,full-engine.jsonl +test_logical_authoring.LogicalAuthoringTests.test_compiler_projects_module_relationships_through_current_owners,pass,0.9131950850000976,passed,full-engine.jsonl +test_logical_authoring.LogicalAuthoringTests.test_compiler_revises_one_registered_policy_and_derives_analysis_input,pass,0.8735137060000397,passed,full-engine.jsonl +test_logical_authoring.LogicalAuthoringTests.test_create_nested_standard_and_route_atomically,pass,1.4324417949999315,passed,full-engine.jsonl +test_logical_authoring.LogicalAuthoringTests.test_create_standard_hides_all_required_repository_projections,pass,1.9631332840001505,passed,full-engine.jsonl +test_logical_authoring.LogicalAuthoringTests.test_created_standard_can_be_retired_with_complete_explicit_closure,pass,4.121309773999883,passed,full-engine.jsonl +test_logical_authoring.LogicalAuthoringTests.test_duplicate_route_target_rejected,pass,0.2060134470000321,passed,full-engine.jsonl +test_logical_authoring.LogicalAuthoringTests.test_fact_presentation_and_value_order_preserve_semantic_revision,pass,0.8692442120000123,passed,full-engine.jsonl +test_logical_authoring.LogicalAuthoringTests.test_fact_revision_and_referenced_removal_are_validated,pass,1.7725244869998278,passed,full-engine.jsonl +test_logical_authoring.LogicalAuthoringTests.test_move_preserves_identity_and_relocates_relationship_authority,pass,1.4331184969998958,passed,full-engine.jsonl +test_logical_authoring.LogicalAuthoringTests.test_new_fact_and_rule_compile_together_and_unused_fact_can_be_removed,pass,2.0248914670000886,passed,full-engine.jsonl +test_logical_authoring.LogicalAuthoringTests.test_noop_and_cyclic_relationship_changes_are_typed,pass,0.7691954590000023,passed,full-engine.jsonl +test_logical_authoring.LogicalAuthoringTests.test_null_applicability_is_unsupported_by_toml_authority,pass,0.00012941099998897698,passed,full-engine.jsonl +test_logical_authoring.LogicalAuthoringTests.test_opaque_consumer_handle_is_snapshot_bound,pass,0.9197795380000571,passed,full-engine.jsonl +test_logical_authoring.LogicalAuthoringTests.test_policy_relationship_put_and_remove_replay_cumulatively,pass,4.39874384399991,passed,full-engine.jsonl +test_logical_authoring.LogicalAuthoringTests.test_retired_standard_successor_must_survive_the_final_program,pass,3.4574913049998486,passed,full-engine.jsonl +test_logical_authoring.LogicalAuthoringTests.test_retirement_requires_and_applies_complete_relationship_dispositions,pass,2.5303860960000293,passed,full-engine.jsonl +test_logical_authoring.LogicalAuthoringTests.test_route_targets_can_be_swapped_in_one_atomic_change,pass,0.9206845290000274,passed,full-engine.jsonl +test_logical_authoring.LogicalAuthoringTests.test_rule_update_and_removal_keep_readable_and_executable_routes_in_sync,pass,1.8309306200001174,passed,full-engine.jsonl +test_logical_authoring.LogicalAuthoringTests.test_supporting_records_and_withdrawal_use_the_final_candidate,pass,4.355350497000018,passed,full-engine.jsonl +test_logical_authoring.LogicalAuthoringTests.test_unknown_route_fact_is_rejected_without_changing_base,pass,0.7853784080000423,passed,full-engine.jsonl +test_logical_authoring.LogicalAuthoringTests.test_verified_compiled_base_is_reused_but_candidate_compiles,pass,1.5961022310000317,passed,full-engine.jsonl +test_logical_authoring.LogicalAuthoringTests.test_whole_module_rescope_preserves_identity_and_explicit_meaning,pass,1.0868945980000717,passed,full-engine.jsonl +test_logical_authoring.LogicalAuthoringTests.test_whole_standard_revision_requires_companion_policy_semantics,pass,1.8562809770000968,passed,full-engine.jsonl +test_mcp.MCPTest.test_application_failure_diagnostic_omits_private_exception,pass,0.0020127640000282554,passed,full-engine.jsonl +test_mcp.MCPTest.test_authoring_description_carries_exact_contract_without_type_rendering,pass,0.13113863300009143,passed,full-engine.jsonl +test_mcp.MCPTest.test_authoring_inputs_expose_structure_and_preserve_recursive_validation,pass,0.017841503999989072,passed,full-engine.jsonl +test_mcp.MCPTest.test_catalog_schemas_validate_authored_examples_and_resolve_refs,pass,1.7847841620000509,passed,full-engine.jsonl +test_mcp.MCPTest.test_default_catalog_focuses_navigation_and_workflows,pass,0.012622260999933133,passed,full-engine.jsonl +test_mcp.MCPTest.test_default_guidance_uses_available_recovery_tools,pass,0.00837898400004633,passed,full-engine.jsonl +test_mcp.MCPTest.test_input_projection_preserves_reference_siblings,pass,0.0002456419999816717,passed,full-engine.jsonl +test_mcp.MCPTest.test_internal_failure_is_tool_error_without_retry,pass,0.020836793000171383,passed,full-engine.jsonl +test_mcp.MCPTest.test_lifecycle_and_protocol_errors_never_open_engine,pass,0.009848476999877676,passed,full-engine.jsonl +test_mcp.MCPTest.test_module_stdio_launch_from_unrelated_working_directory,pass,1.973889214999872,passed,full-engine.jsonl +test_mcp.MCPTest.test_parse_errors_and_notifications_keep_stream_synchronized,pass,0.009688772999879802,passed,full-engine.jsonl +test_mcp.MCPTest.test_preserves_typed_outcomes_and_never_retries,pass,0.01318392700000004,passed,full-engine.jsonl +test_mcp.MCPTest.test_real_snapshot_read_and_validation_through_server,pass,3.7557615820001047,passed,full-engine.jsonl +test_navigation.NavigationTest.test_development_proportionality_routes_directly_and_before_planning,pass,1.6367227620000904,passed,full-engine.jsonl +test_navigation.NavigationTest.test_live_worktree_mutation_cannot_change_snapshot_reads,error,0.16070887699993364,passed_after_disposable_main_fixture_repair,fixture-reruns.log +test_navigation.NavigationTest.test_proposal_creation_returns_typed_failure_for_invalid_projected_content,pass,2.4775117540000338,passed,full-engine.jsonl +test_navigation.NavigationTest.test_proposal_query_projects_every_request_from_an_exact_revision,pass,13.958943899000133,passed,full-engine.jsonl +test_navigation.NavigationTest.test_read_related_and_inspect_share_the_snapshot_root,pass,3.2695243929999833,passed,full-engine.jsonl +test_navigation.NavigationTest.test_route_selects_direct_modules_and_required_closure,pass,0.8237572030000138,passed,full-engine.jsonl +test_navigation.NavigationTest.test_unknown_and_invalid_route_facts_have_typed_results,pass,1.6132154839999657,passed,full-engine.jsonl +test_navigation_indexes.NavigationIndexAuthorityTest.test_absent_catalog_exposes_no_authoring_capability,pass,0.00010575600003903673,passed,full-engine.jsonl +test_navigation_indexes.NavigationIndexAuthorityTest.test_bad_catalog_and_non_utf8_content_are_typed_rejections,pass,0.000275795999868933,passed,full-engine.jsonl +test_navigation_indexes.NavigationIndexAuthorityTest.test_declared_routes_bind_their_owner_content_and_exact_declarations,pass,0.00043056499998783693,passed,full-engine.jsonl +test_navigation_indexes.NavigationIndexAuthorityTest.test_old_captured_index_without_route_inventory_remains_readable,pass,0.00012019699988741195,passed,full-engine.jsonl +test_navigation_indexes.NavigationIndexAuthorityTest.test_registration_cannot_make_a_normative_standard_writable,pass,7.846600010452676e-05,passed,full-engine.jsonl +test_navigation_indexes.NavigationIndexAuthorityTest.test_review_fingerprint_binds_destination_authority_without_inventing_policy_changes,pass,0.00023453499989045667,passed,full-engine.jsonl +test_navigation_indexes.NavigationIndexWorkflowTest.test_cross_snapshot_handle_is_not_an_authorization_to_retarget,pass,5.617682994000006,passed,full-engine.jsonl +test_navigation_indexes.NavigationIndexWorkflowTest.test_discovery_captures_exact_content_without_claiming_policy_authority,pass,1.7305331009999918,passed,full-engine.jsonl +test_navigation_indexes.NavigationIndexWorkflowTest.test_fresh_mcp_process_exposes_snapshot_bound_navigation,pass,3.0310449259998222,passed,full-engine.jsonl +test_navigation_indexes.NavigationIndexWorkflowTest.test_invalid_selections_do_not_create_an_applicable_candidate,pass,4.92051156499997,passed,full-engine.jsonl +test_navigation_indexes.NavigationIndexWorkflowTest.test_retarget_dispositions_cannot_remove_unrelated_assertions,pass,4.822995988000002,passed,full-engine.jsonl +test_navigation_indexes.NavigationIndexWorkflowTest.test_z_exact_index_proposal_requires_review_and_applies_through_engine,pass,98.85286198499989,passed,full-engine.jsonl +test_navigation_indexes.ProtectedNavigationIndexTest.test_declared_routes_reject_omitted_owners_and_unsupported_artifacts,pass,4.898358779000091,passed,full-engine.jsonl +test_navigation_indexes.ProtectedNavigationIndexTest.test_z_declared_sections_survive_verified_index_application,pass,56.663501788000076,passed,full-engine.jsonl +test_platform_harness.PlatformHarnessTest.test_closed_store_round_trip_uses_public_operations,pass,12.231231835999779,passed,full-engine.jsonl +test_platform_harness.PlatformHarnessTest.test_concurrent_probe_rejects_mismatched_content,pass,0.0006511379999665223,passed,full-engine.jsonl +test_platform_harness.PlatformHarnessTest.test_consume_rejects_changed_store_before_open,pass,0.0004979130001174781,passed,full-engine.jsonl +test_purpose_projection.PurposeProjectionTest.test_authoring_read_retrieves_reasoning_and_exposure_state,pass,1.8923539869999786,passed,full-engine.jsonl +test_purpose_projection.PurposeProjectionTest.test_catalog_has_no_authoring_schema_closure,pass,0.0030310600000120758,passed,full-engine.jsonl +test_purpose_projection.PurposeProjectionTest.test_direct_hidden_read_and_privileged_request_are_bounded,pass,0.7841216799999984,passed,full-engine.jsonl +test_purpose_projection.PurposeProjectionTest.test_domain_and_facade_admit_only_application_operations_before_work,pass,0.4139558310000666,passed,full-engine.jsonl +test_purpose_projection.PurposeProjectionTest.test_hidden_intermediate_cannot_bridge_a_permitted_traversal,pass,0.000766647999853376,passed,full-engine.jsonl +test_purpose_projection.PurposeProjectionTest.test_invalid_host_purpose_creates_no_store,pass,0.0003459489998931531,passed,full-engine.jsonl +test_purpose_projection.PurposeProjectionTest.test_material_change_requires_new_exposure_but_rationale_change_does_not,pass,0.3852948000001106,passed,full-engine.jsonl +test_purpose_projection.PurposeProjectionTest.test_native_query_and_handle_inspection_use_the_same_boundary,pass,2.7701549729999897,passed,full-engine.jsonl +test_purpose_projection.PurposeProjectionTest.test_read_has_exact_reviewed_content_and_explicit_permitted_fields,pass,1.8713063000000147,passed,full-engine.jsonl +test_purpose_projection.PurposeProjectionTest.test_router_presentation_change_requires_explicit_renewal,pass,0.23601299599999948,passed,full-engine.jsonl +test_purpose_projection.PurposeProjectionTest.test_routing_retains_unknown_facts_and_blocks_missing_required_content,pass,2.7923812829999406,passed,full-engine.jsonl +test_purpose_projection.PurposeProjectionTest.test_unexpected_observation_failure_returns_no_private_context,pass,0.8984227750001992,passed,full-engine.jsonl +test_purpose_projection.PurposeProjectionTest.test_unsupported_capture_is_preserved_and_classified,pass,2.612176085000101,passed,full-engine.jsonl +test_purpose_projection.PurposeProjectionTest.test_whole_module_discovers_references_owned_by_its_policy_units,pass,0.0026545680000253924,passed,full-engine.jsonl +test_purpose_transport.PurposeTransportTest.test_actual_stdio_has_qualified_catalog_and_identical_result_encodings,pass,4.3426755279999725,passed,full-engine.jsonl +test_purpose_transport.PurposeTransportTest.test_cli_catalog_schema_example_and_denial_share_the_purpose,pass,8.321202078999931,passed,full-engine.jsonl +test_purpose_transport.PurposeTransportTest.test_default_capture_reads_accepted_main_instead_of_unpublished_head,pass,4.079533113000025,passed,full-engine.jsonl +test_purpose_transport.PurposeTransportTest.test_two_cold_processes_preserve_exact_application_read,pass,9.927655206000054,passed,full-engine.jsonl +test_rendering.TextRenderingTest.test_application_purpose_is_distinct_from_authoring_publication,pass,0.00047491899999840825,passed,full-engine.jsonl +test_rendering.TextRenderingTest.test_coverage_projection_preserves_subject_and_status,pass,5.979799993838242e-05,passed,full-engine.jsonl +test_rendering.TextRenderingTest.test_navigation_indexes_preserve_authority_and_exact_content,pass,3.366900000401074e-05,passed,full-engine.jsonl +test_rendering.TextRenderingTest.test_pending_projection_is_deterministic_and_work_focused,pass,4.943299995829875e-05,passed,full-engine.jsonl +test_rendering.TextRenderingTest.test_projected_navigation_renders_revision_authority,pass,2.86520000827295e-05,passed,full-engine.jsonl +test_rendering.TextRenderingTest.test_proposal_projection_exposes_only_opaque_handles,pass,2.6278999939677306e-05,passed,full-engine.jsonl +test_rendering.TextRenderingTest.test_proposal_review_renders_only_opaque_authority,pass,2.29139998282335e-05,passed,full-engine.jsonl +test_rendering.TextRenderingTest.test_rejection_projection_accepts_the_generated_result_type,pass,0.0002249009999104601,passed,full-engine.jsonl +test_rendering.TextRenderingTest.test_unknown_result_variant_is_a_programming_error,pass,0.00012366200007818406,passed,full-engine.jsonl +test_rendering.TextRenderingTest.test_verification_projection_preserves_revision_and_diagnostic_identity,pass,4.576699984681909e-05,passed,full-engine.jsonl +test_supporting_workflow.SupportingWorkflowTest.test_coordinated_publication_and_provenance_only_revision,pass,188.03096219400004,passed,full-engine.jsonl diff --git a/docs/plans/purpose-separated-standards-engine/reports/performance-core-evidence/structural-final-code.json b/docs/plans/purpose-separated-standards-engine/reports/performance-core-evidence/structural-final-code.json new file mode 100644 index 00000000..bdb5ca9d --- /dev/null +++ b/docs/plans/purpose-separated-standards-engine/reports/performance-core-evidence/structural-final-code.json @@ -0,0 +1,11 @@ +{ + "kind": "verify-repository-result", + "refreshed_verification_inputs": true, + "verification": { + "checks": 121, + "exit_code": 0, + "failures": [], + "passed": true, + "suites": 73 + } +} diff --git a/docs/plans/purpose-separated-standards-engine/reports/performance-core-evidence/test-candidate.txt b/docs/plans/purpose-separated-standards-engine/reports/performance-core-evidence/test-candidate.txt new file mode 100644 index 00000000..14623a6a --- /dev/null +++ b/docs/plans/purpose-separated-standards-engine/reports/performance-core-evidence/test-candidate.txt @@ -0,0 +1 @@ +a42d6d25bb8b803ca655792304e1a820a60d1eac diff --git a/docs/plans/purpose-separated-standards-engine/reports/performance-core-evidence/tested-source.json b/docs/plans/purpose-separated-standards-engine/reports/performance-core-evidence/tested-source.json new file mode 100644 index 00000000..e1e899ab --- /dev/null +++ b/docs/plans/purpose-separated-standards-engine/reports/performance-core-evidence/tested-source.json @@ -0,0 +1,62 @@ +[ + { + "path": "tools/repository_git/repository_git/__init__.py", + "sha256": "cb435df2b2c852168aa9750165e062bb9d48f27318e9af8628fbca23df1a25ac", + "final_fixture_candidate_ast_equal": true, + "initial_full_run_ast_equal": true + }, + { + "path": "tools/repository_git/repository_git/repository.py", + "sha256": "ce80fb027f30e176f14bd199dfaa475a1d9be2917a23f80897b72ea0cbc321ef", + "final_fixture_candidate_ast_equal": true, + "initial_full_run_ast_equal": true + }, + { + "path": "tools/repository_git/tests/test_repository.py", + "sha256": "23037b75194f4654f9bb5494d46e73256845ac505bdc3e5c53408d37c2357cca", + "final_fixture_candidate_ast_equal": true, + "initial_full_run_ast_equal": false + }, + { + "path": "tools/standards_engine/standards_engine/engine.py", + "sha256": "c934cec565312dfcf92351d7fb042091dc641e60591e1bdb98ba32faf4dd5ea4", + "final_fixture_candidate_ast_equal": true, + "initial_full_run_ast_equal": true + }, + { + "path": "tools/standards_engine/standards_engine/logical_authoring.py", + "sha256": "6f4eb0303a5a9bf44d28457e5829bb9e3b3d7b67bd13db7dc43f7202758fca53", + "final_fixture_candidate_ast_equal": true, + "initial_full_run_ast_equal": true + }, + { + "path": "tools/standards_engine/tests/test_analysis.py", + "sha256": "677ba6c5b7bda515e43e5be469be1e4f5642ecdb3d1c818605da3acc6eea7146", + "final_fixture_candidate_ast_equal": true, + "initial_full_run_ast_equal": false + }, + { + "path": "tools/standards_engine/tests/test_logical_authoring.py", + "sha256": "7faadf717b1848a74fdfa58f912247c3cd348f8b14c830bcb492cdcac67a61b7", + "final_fixture_candidate_ast_equal": true, + "initial_full_run_ast_equal": true + }, + { + "path": "tools/standards_engine/tests/test_navigation.py", + "sha256": "b2ba4be37af25fdacb834732144a2e1c5b3d010f0bdb469b402191e2246cee41", + "final_fixture_candidate_ast_equal": true, + "initial_full_run_ast_equal": false + }, + { + "path": "tools/standards_identity/standards_identity/encoding.py", + "sha256": "4c69fdefc956148e3628ea56dbbe2cb3c3a7860b20aa3a27bb8593d6d54ee84e", + "final_fixture_candidate_ast_equal": true, + "initial_full_run_ast_equal": true + }, + { + "path": "tools/standards_identity/tests/test_identity.py", + "sha256": "0d1407eec003c8f01c6e8ca51ef00b4f567ad10b44e4cdcd535db7c99c2ee5e7", + "final_fixture_candidate_ast_equal": true, + "initial_full_run_ast_equal": true + } +] diff --git a/docs/plans/purpose-separated-standards-engine/reports/performance-core-increment.md b/docs/plans/purpose-separated-standards-engine/reports/performance-core-increment.md new file mode 100644 index 00000000..62496e69 --- /dev/null +++ b/docs/plans/purpose-separated-standards-engine/reports/performance-core-increment.md @@ -0,0 +1,135 @@ +# Performance core increment — implementation and evidence + +**Status:** implemented; local supporting verification complete. Supported-environment and independently reviewed performance acceptance remain unclaimed. + +**Branch:** `implementation/purpose-separated-standards-engine` +**Input revision:** `90a3c8f13f517ad1dc32342fa10a4f1af181ed81` +**Scope:** the first increment of the [performance design](standards-engine-performance-report/design.md), authorized for implementation after that report was imported. + +## Result and boundary + +This change implements exact-format Identity-v2 acceleration, bounded operation-scoped reuse of verified Git objects, and explicit immutable-material reuse within native analysis operations. It retains the two independent capture compiles, captured path closure and semantic-signature comparisons, accepted-main selection, purpose-qualified projection, current authorization, live snapshot lifecycle checks, proposal-revision binding, publication verification/CAS, and observation-only recovery. + +The source checkout's local `main` remains `366c1d90a24bbfb50973f62b155a5f3396c0f107`. The user's checkout, installed configuration and database were unavailable and were not modified. Disposable qualification clones deliberately establish their own accepted `main` at the candidate. The fixed-corpus benchmark instead keeps its disposable `main` at the input revision while loading the changed implementation, so baseline and candidate capture exactly the same inputs. + +Normative standards, examples and prompts intended for ordinary standards use, policy declarations, public interface schemas, generated public models, dependency locks and version domains remain unchanged. The generated verification-input manifest is refreshed through the existing Engine operation. The existing accepted purpose-separation plan is not relabeled or reopened by this implementation report. + +## Implementation ownership + +| Owner | Change | Retained guarantee | +| --- | --- | --- | +| `standards_identity/encoding.py` | Construct validated path frames once; use exact byte-domain integer tokens and segment-based Unicode escaping/validation. | Identical Identity-v2 canonical preimages, scalar validation, arbitrary-size integer handling, domain/length framing and IDs. Full durable-load hashing still runs. | +| `repository_git` | Add a single-owner `RevisionReadSession`; use bounded LRU reuse of fully verified immutable object bytes at an exact revision. | Existing object header/type/length/framing/hash validation on each miss; path/mode/gitlink interpretation on each read; no failure caching. | +| Engine capture/evidence composition | Own and close a read session for each exact-revision bulk read. | Resolve accepted main once. Close the live reader before independent frozen replay. Mutable-source recording semantics remain unchanged. | +| Engine analysis | Pass a private `_EvaluationMaterials` value through prepare, prior-decision validation, resolution and provider-driven reevaluation. | Separate decision evaluations and fresh lifecycle/revision/authorization observations; one verified input per distinct root within the operation. | +| Logical authoring | Borrow an already compiled base only when it owns the exact supplied frozen source; reuse the exact proposal projection during validation. | Changed candidates still compile fully. Internal proof is not a public request or authorization input. | + +The helper holds no response, authorization grant, provider result, mutable proposal-head decision, readiness or publication state. It is passed explicitly and expires with the owning operation. Focused workflow preflight and composed native operations retain separate barriers; the implementation does not stretch reuse over every nested public call. Publication and recovery continue to acquire their existing current observations. + +The Git session retains at most 8 MiB of payload and 1,024 entries, with zero bounds supporting verified uncached operation. Keys include the configured repository, OID, expected type and hash algorithm. Valid oversized entries and evictions use normal verified reads. Close clears the cache and rejects subsequent reads. The session contains no long-lived subprocess; each Git command retains the existing bounded lifecycle. These are implementation-local retention settings, not generic standards or an RSS promise. + +Cross-call compiled caches, persisted caches, selective compilation, a second graph/store, MCP lifetime changes, SQLite policy changes and additional compatibility paths remain outside this increment. Measured explicit MCP reads are about 1.1 seconds without those mechanisms; their extra state is deferred rather than assumed necessary. + +## Paired operation measurements + +Measurements use the same host, interpreter, dependencies, captured corpus and operation sequence before and after the change. They are local supporting results, not a supported-platform release claim. The final candidate sweeps ran after the other long campaigns completed. There are three independent operation sweeps; each contains three explicit reads. The sample establishes medians/ranges, not p95 or p99. Baseline then candidate execution is sequential rather than a randomized crossover, and wall-time variability remains an environmental limitation. + +Both executable variants capture **434 files / 3,708,262 bytes** into **4,558,848-byte temporary SQLite databases**. Neither uses the archived 240 MB store. [Raw baseline](performance-core-evidence/baseline-operations.jsonl), [raw candidate](performance-core-evidence/candidate-operations.jsonl), and [comparison CSV including ranges](performance-core-evidence/comparison.csv) preserve the observations. + +| Operation | Samples before / after | Baseline median | Candidate median | Speedup | Latency reduction | +| --- | ---: | ---: | ---: | ---: | ---: | +| `snapshot_capture` | 3 / 3 | 15.020 s | 2.529 s | 5.94× | 83.2% | +| `explicit_policy_read` | 9 / 9 | 3.059 s | 0.815 s | 3.75× | 73.4% | +| `policy_inspection` | 3 / 3 | 3.016 s | 0.808 s | 3.73× | 73.2% | +| `explicit_route` | 3 / 3 | 3.111 s | 0.991 s | 3.14× | 68.1% | +| `prepare_same_snapshot` | 3 / 3 | 6.243 s | 0.828 s | 7.54× | 86.7% | +| `resolve_same_snapshot` | 3 / 3 | 12.358 s | 0.851 s | 14.53× | 93.1% | +| `reopened_policy_read` | 6 / 6 | 2.978 s | 0.877 s | 3.40× | 70.6% | +| `identity_complete_identity` | 5 / 5 | 2.572 s | 0.592 s | 4.34× | 77.0% | +| `cold_cli_read` | 3 / 3 | 5.178 s | 3.122 s | 1.66× | 39.7% | +| `mcp_explicit_read` | 6 / 6 | 3.275 s | 1.095 s | 2.99× | 66.6% | +| `mcp_implicit_capture_read` | 1 / 1 | 18.180 s | 3.582 s | 5.08× | 80.3% | + +The single implicit-capture transport observation is labeled as a single sample, not a stable median distribution. Cold CLI reads include Python/import/interface construction; explicit native reads start with an existing facade. MCP measurements include two separate server processes, three explicit reads per process, and normal per-call Engine/store opening. MCP startup itself remains approximately 1.6 seconds; it was not optimized. Existing-store opening remains approximately 4–5 ms. + +### Integrity and work-count evidence + +| Observation | Baseline | Candidate | +| --- | ---: | ---: | +| Capture logical source reads / unique paths | 1,137 / 434 | 1,137 / 434 | +| Capture fully verified Git object fetches / unique keys | 6,134 / 524 | 524 / 524 | +| Total Git commands in representative capture | 6,135 | 525 | +| Independent live and frozen full compiles | 2 | 2 | +| Same-snapshot prepare content loads / compiles | 2 / 2 | 1 / 1 | +| Same-snapshot resolve content loads / compiles | 4 / 4 | 1 / 1 | +| Resolve decision evaluations | 2 | 2 | + +The full 3.71 MB capture produces the same **13,031,223 encoded bytes**, encoded digest `73cbb95660b04a89dd8fd5f11adb8cadd99f4651ec6836fbd75720bdc8084bc0`, and content ID `snapshot-content:sha256:e95df9fd7e1c346706c40733ef93b39f87a6a29e50fad8fcb993a99fc1f10582` in both implementations. [Primitive baseline](performance-core-evidence/baseline-primitives.json) and [primitive candidate](performance-core-evidence/candidate-primitives.json) each contain five observations. The optimized full identity median is 23.0% of baseline, meeting the design's local one-quarter target. + +The capture cache peaked at **3,744,707 payload bytes and 524 entries**, below both budgets, and reported zero retained payload/entries after close. This measures cache-owned payload and entry count, not full process memory; captured source bytes may remain held independently because replay requires them. Whole-process RSS and allocation traces are not used to claim an independent memory speedup. + +Cold CLI full-result hashes and explicit MCP result hashes match their respective baseline outputs byte-for-byte after canonical result serialization. No retained cross-call cache is needed for those results. Explicit reopen reads and the existing cold-process tests establish that these gains do not depend on an originating Engine instance. + +## Long-test reproduction + +`test_agent_workflow.AgentWorkflowTest.test_normative_proposal_stops_at_real_pending_work` passed before and after with its original assertions: + +| Metric | Fresh baseline | Candidate | +| --- | ---: | ---: | +| Test body wall time | 116.120 s | 17.719 s | +| Content-identity computations | 32 | 10 | +| Full compiles | 52 | 18 | +| Proposal projections | 21 | 9 | +| Stored revision reads | 24 | 32 | + +The extra cheap revision observations retain current authority while expensive immutable derivation falls. Identity work decreased from 83.129 s to 6.294 s in this test. Inclusive parent/child spans overlap and are not additive. [Baseline log](performance-core-evidence/baseline-long.jsonl) and [candidate campaign](performance-core-evidence/full-engine.jsonl) contain the detailed traces. + +This workflow comparison uses each revision's candidate-derived fixture corpus, unlike the fixed-corpus operation benchmark. Candidate test timing comes from the Engine campaign rather than a randomized repeated single-test study. It is a directly observed improvement for that named case, not a claim of a uniform whole-suite speedup or proof of the identity of an earlier unnamed pause. + +## Functional verification + +The complete Engine population contains **166 distinct tests**. The initial full campaign produced 162 passes and four fixture errors/failures. Investigation showed that two disposable-clone helpers inherited the feature branch name and never established a local accepted `main`. The repair creates `main` only in those disposable candidate repositories. Production accepted-main selection and every behavior assertion remain unchanged. + +The four cases subsequently passed on the repaired candidate, including actual topology publication, exact-candidate verification and cold readback, coverage publication/interruption recovery, and snapshot reads after worktree changes. Thus all 166 have successful evidence **across the full campaign and the four reruns**; this is not represented as one clean full-suite command. The initial errors remain visible in [full-engine.log](performance-core-evidence/full-engine.log), and corrections in [fixture-reruns.log](performance-core-evidence/fixture-reruns.log) and [per-test disposition](performance-core-evidence/per-test-disposition.csv). + +All changed production Python ASTs match the full-run candidate. The only subsequent Python changes are the two Engine fixture repairs and an additional real SHA-256/object-limit Repository Git test, which passed in its complete final package run. Final implementation/test ASTs match the tested source; [tested-source.json](performance-core-evidence/tested-source.json) records this comparison and file digests. The full run and fixture reruns overlapped during part of execution, so their elapsed totals are not treated as a clean sequential suite benchmark. The final operation and transport sweeps started after both completed. + +New regressions prove exact scalar/byte/Unicode framing, one frame construction per input path, cache disabling/eviction/oversized behavior, missing/corrupt objects, gitlink repository isolation, real SHA-256 Git repositories, read-session close semantics, same/distinct snapshot handling, pre/post decision evaluation, fresh denial/authorization, quarantine during authorization, independent capture compiles, and borrowed-projection ownership. Existing purpose, hidden-intermediary, unsupported capture, publication, stale-state and cold-recovery tests retain their assertions. + +Supporting packages ran separately: + +| Package | Tests run | Result | +| --- | ---: | --- | +| `graph_engine` | 37 | Passed | +| `repository_git` | 16 | Passed | +| `standards_analysis` | 100 | Passed | +| `standards_applicability` | 12 | Passed | +| `standards_contracts` | 23 | Passed; 1 interpreter-dependent skip | +| `standards_graph` | 2 | Passed | +| `standards_identity` | 11 | Passed | +| `standards_metadata` | 31 | Passed | +| `standards_policy_impact` | 10 | Passed | +| `standards_snapshots` | 23 | Passed | +| `standards_verifier` | 156 | Passed | + +The 421 package-test invocations include one existing interpreter-dependent skip in Contracts. The structural checkpoint separately reports **73 suites / 121 checks passed**; it is not substituted for behavioral tests. No installed formatter/linter result or independently delegated review is claimed. Review of the changed call sites, invariants and test differences was performed in this implementation session. + +## Environment and acceptance limits + +[Environment evidence](performance-core-evidence/environment.json): Python **3.13.5**, Git **2.47.3**, SQLite **3.46.1**, Linux **6.18.44**, four-CPU cgroup quota and 4 GiB memory limit. Python is outside the repository's supported 3.11/3.12 range; local `rpds-py 2026.5.1` differs from pinned `2026.6.3`. Other recorded dependency versions match their lock. Dependencies and support declarations were preserved. + +The required remaining qualification is a clean complete suite in the supported locked environment, plus the configured official SDK/client lane and independent review before claiming this increment fully qualified for the installed system. The real stdio/CLI measurements here are stronger than mocks but do not substitute for the official configured client. No performance threshold was used to kill otherwise-correct application work. + +The local targets for capture, explicit reads, full identity cost, same-snapshot preparation/resolution and the named long test were met. New supported-host measurements should establish their absolute deployment budgets rather than copy these local numbers. Existing main/store cutover and unfinished-work dispositions remain the installation owner's responsibility; this increment adds no store conversion or new persisted/public version. + +## Reproduction + +Use isolated clones and disposable stores only. Preserve the actual user branch, main and installed store. Obtain a baseline checkout at the input revision and a second checkout with this implementation. For a fixed-corpus comparison, make the disposable local main in both clones identify the input revision; run the candidate executable code without moving that benchmark main. For full functional qualification, the disposable candidate main must identify the tested candidate, matching the installed-candidate contract. + +Run `measurement-tools/measure_operations.py` in the adjacent original performance report with `--repo`, a new `--output` directory and `--samples 3` for each executable. It produces the input store and snapshot handles used by the two supplemental [primitive](performance-core-evidence/measure_primitives.py) and [transport](performance-core-evidence/measure_transport.py) probes. Give those probes an explicitly selected disposable store/snapshot; the transport probe additionally requires `--confirm-disposable`. Their output paths retain the raw results. The original `timed_suite.py` script records per-test bodies, setup/teardown, counters and overlapping spans; preserve both failures and rerun results. + +In the supported locked interpreter, run the eleven package discovery commands under `tools//tests` and `unittest discover -s tools/standards_engine/tests`; use `PYTHONPATH=.:tools/standards_verifier` where required. Run the separate Engine `verify_repository` checkpoint and inspect its actual `verification.passed` result. The publication tests use real disposable Git and SQLite state. + +## Retained scope decision + +The measured first increment solves the large redundant work without a new cross-call cache or changing transport/storage lifetime. Keep those larger options deferred. Residual latency is now primarily ordinary full content verification, compiler and process/interface construction; only a subsequent measured requirement should admit extra retained state. The original design/evidence remain historical inputs, while this report records the implementation and its observed limits. diff --git a/evaluation/standards-effectiveness/generated/suite-inputs.json b/evaluation/standards-effectiveness/generated/suite-inputs.json index b73c496e..087c18fa 100644 --- a/evaluation/standards-effectiveness/generated/suite-inputs.json +++ b/evaluation/standards-effectiveness/generated/suite-inputs.json @@ -6355,7 +6355,7 @@ ] }, { - "digest": "sha256:81f5ff1af10b568e46bd2b6ca8dd0e3c64cd3626e1be11e5d45b073b1f969f70", + "digest": "sha256:cb435df2b2c852168aa9750165e062bb9d48f27318e9af8628fbca23df1a25ac", "path": "tools/repository_git/repository_git/__init__.py", "state": "present", "uses": [ @@ -6406,7 +6406,7 @@ ] }, { - "digest": "sha256:ebdc15ffb94a54a4a5d6f56a49fd4d219644ef20f66114e54cb187580347e194", + "digest": "sha256:ce80fb027f30e176f14bd199dfaa475a1d9be2917a23f80897b72ea0cbc321ef", "path": "tools/repository_git/repository_git/repository.py", "state": "present", "uses": [ @@ -6423,7 +6423,7 @@ ] }, { - "digest": "sha256:b727c8c1eaaec46fd02bfb7065f5b5c4c974c91e84c1869507c3d6f407e9497a", + "digest": "sha256:23037b75194f4654f9bb5494d46e73256845ac505bdc3e5c53408d37c2357cca", "path": "tools/repository_git/tests/test_repository.py", "state": "present", "uses": [ @@ -7065,7 +7065,7 @@ ] }, { - "digest": "sha256:1c163e2cd93a4354d5ad229ad727b3028d6e00c050a4554c640601e8b1742fbf", + "digest": "sha256:c934cec565312dfcf92351d7fb042091dc641e60591e1bdb98ba32faf4dd5ea4", "path": "tools/standards_engine/standards_engine/engine.py", "state": "present", "uses": [ @@ -7099,7 +7099,7 @@ ] }, { - "digest": "sha256:2f2159e438f8eeee9881cc9b3f992ae141013340b11d50ac9be887ab9587fd41", + "digest": "sha256:6f4eb0303a5a9bf44d28457e5829bb9e3b3d7b67bd13db7dc43f7202758fca53", "path": "tools/standards_engine/standards_engine/logical_authoring.py", "state": "present", "uses": [ @@ -7193,7 +7193,7 @@ ] }, { - "digest": "sha256:cf24d14bd144c1a34c18a2b0edbfd2335f813c464d2d4c8e1bd269706236812f", + "digest": "sha256:677ba6c5b7bda515e43e5be469be1e4f5642ecdb3d1c818605da3acc6eea7146", "path": "tools/standards_engine/tests/test_analysis.py", "state": "present", "uses": [ @@ -7304,7 +7304,7 @@ ] }, { - "digest": "sha256:11b6b749fc5c31c303116fdb92d137750d10c9ef93a8475c6556b77ffb79f535", + "digest": "sha256:d1031886e125b743e5fa71e17d502aeddebe3a8184c76ee0976676fc5fc09a1f", "path": "tools/standards_identity/README.md", "state": "present", "uses": [ @@ -7350,7 +7350,7 @@ ] }, { - "digest": "sha256:577a30f295d8010df286cacd940fa5a1bae410272d9ed353d9d3298184d4628f", + "digest": "sha256:4c69fdefc956148e3628ea56dbbe2cb3c3a7860b20aa3a27bb8593d6d54ee84e", "path": "tools/standards_identity/standards_identity/encoding.py", "state": "present", "uses": [ @@ -13254,7 +13254,7 @@ "path": "evaluation/standards-effectiveness/suite-registry.toml" }, "repository_index": { - "digest": "sha256:81accaad31b34d4cc0f8e6805bd8a92edb63f5957edc30a5ae5a94f67e15a974", + "digest": "sha256:8d4d7663b51117f0cadb45bb83fb9da288e200c485dc59af2f92d1b1edbb2c8a", "uses": [ { "check": "python-package-contract", diff --git a/tools/repository_git/README.md b/tools/repository_git/README.md index dac401f6..d6f02078 100644 --- a/tools/repository_git/README.md +++ b/tools/repository_git/README.md @@ -8,6 +8,23 @@ The package owns no standards semantics, snapshot lifecycle, SQLite storage, or public Engine operation. Callers resolve one revision and retain that exact value while loaders request files. Worktree changes and later commits cannot substitute bytes for the retained revision. + +`read_session(revision)` gives one bulk-read owner bounded reuse of fully +verified Git objects. The owner closes the session when its operation ends. +Entries are keyed by the configured repository, object ID, expected object type, +and hash algorithm. Each miss performs the ordinary header, size, framing, +and object-hash checks. Path, mode and explicit gitlink interpretation still +run for every file request. A fresh session verifies its first reads again. + +The defaults retain at most 8 MiB of object payload and 1,024 entries; callers +may select smaller bounds or zero retention. Entry bookkeeping is bounded by +the entry cap separately from payload. Evicted and oversized valid objects use +the same verified read path. The session is single-owner and contains no child +process beyond those already owned by an individual Git command. Earlier +verified objects remain immutable operation inputs; the session is not a +continuous audit of the underlying disk. Ordinary `read_file` retains its +independent, uncached observation boundary. + The Adapter can also return the exact sorted path observation for a retained commit tree; callers persist that observation when later deterministic projections must survive worktree or branch replacement. diff --git a/tools/repository_git/repository_git/__init__.py b/tools/repository_git/repository_git/__init__.py index 3cfa0392..10542788 100644 --- a/tools/repository_git/repository_git/__init__.py +++ b/tools/repository_git/repository_git/__init__.py @@ -14,6 +14,7 @@ COMMAND_TIMEOUT_SECONDS, DEFAULT_OUTPUT_LIMIT, GitRepository, + RevisionReadSession, git_command, git_output, indexed_paths, @@ -31,6 +32,7 @@ "FailureKind", "GitCommandResult", "GitRepository", + "RevisionReadSession", "GitRepositoryError", "GitRepositoryFailure", "GitlinkRepository", diff --git a/tools/repository_git/repository_git/repository.py b/tools/repository_git/repository_git/repository.py index a5c9eb41..05ef1c8a 100644 --- a/tools/repository_git/repository_git/repository.py +++ b/tools/repository_git/repository_git/repository.py @@ -7,6 +7,8 @@ import threading import tempfile from contextlib import contextmanager +from collections import OrderedDict +from collections.abc import Callable from pathlib import Path from typing import Iterable, Iterator, Literal, Sequence @@ -26,6 +28,10 @@ DEFAULT_OUTPUT_LIMIT = 64 * 1024 * 1024 ERROR_OUTPUT_LIMIT = 1024 * 1024 COMMAND_TIMEOUT_SECONDS = 30 +# A revision-read owner may override these retention budgets. They bound cached +# payload and entry overhead separately from the existing per-object safety cap. +DEFAULT_REVISION_CACHE_BYTES = 8 * 1024 * 1024 +DEFAULT_REVISION_CACHE_OBJECTS = 1024 def sanitized_git_environment() -> dict[str, str]: @@ -674,20 +680,44 @@ def capture_current(self, paths: Iterable[RepositoryPath]) -> RepositoryCapture: "capture paths must be nonempty and unique", ) revision = self.current_revision() - return RepositoryCapture( + with self.read_session(revision) as reader: + return RepositoryCapture( + revision, + (CapturedFile(path, reader.read_file(path)) for path in selected), + ) + + def read_session( + self, + revision: RepositoryRevision, + *, + max_cached_bytes: int = DEFAULT_REVISION_CACHE_BYTES, + max_cached_objects: int = DEFAULT_REVISION_CACHE_OBJECTS, + ) -> RevisionReadSession: + """Own bounded verified-object reuse for one exact revision read.""" + return RevisionReadSession( + self, revision, - (CapturedFile(path, self.read_file(revision, path)) for path in selected), + max_cached_bytes=max_cached_bytes, + max_cached_objects=max_cached_objects, ) def read_file(self, revision: RepositoryRevision, path: RepositoryPath) -> bytes: + return self._read_file(revision, path, self._object) + + def _read_file( + self, + revision: RepositoryRevision, + path: RepositoryPath, + read_object: Callable[[Path, str, str, str], bytes], + ) -> bytes: algorithm = _algorithm(revision.oid) - commit = self._object(self._repository, revision.oid, "commit", algorithm) + commit = read_object(self._repository, revision.oid, "commit", algorithm) tree_oid = _commit_tree(commit, algorithm) repository = self._repository traversed: list[str] = [] index = 0 while index < len(path.components): - tree = self._object(repository, tree_oid, "tree", algorithm) + tree = read_object(repository, tree_oid, "tree", algorithm) entries = _tree_entries(tree, algorithm) component = path.components[index] try: @@ -705,7 +735,7 @@ def read_file(self, revision: RepositoryRevision, path: RepositoryPath) -> bytes "REPOSITORY_GIT.NON_DIRECTORY", f"{component!r} is a file before the requested leaf", ) - return self._object(repository, oid, "blob", algorithm) + return read_object(repository, oid, "blob", algorithm) if mode in {"40000", "040000"}: if final: raise unsupported( @@ -729,7 +759,7 @@ def read_file(self, revision: RepositoryRevision, path: RepositoryPath) -> bytes ) repository = nested algorithm = _algorithm(oid) - nested_commit = self._object(repository, oid, "commit", algorithm) + nested_commit = read_object(repository, oid, "commit", algorithm) tree_oid = _commit_tree(nested_commit, algorithm) index += 1 continue @@ -800,6 +830,102 @@ def _object( return content +class RevisionReadSession: + """Single-owner, exact-revision reads; close releases all retained objects. + + Only fully verified object bytes enter the cache. Tree/path interpretation + still runs for each requested file. Successful earlier reads establish this + operation's immutable input, not ongoing health of the original object store. + Every new session verifies its first reads again. + """ + + def __init__( + self, + repository: GitRepository, + revision: RepositoryRevision, + *, + max_cached_bytes: int = DEFAULT_REVISION_CACHE_BYTES, + max_cached_objects: int = DEFAULT_REVISION_CACHE_OBJECTS, + ) -> None: + if type(revision) is not RepositoryRevision: + raise invalid( + "REPOSITORY_GIT.INVALID_REVISION", "read session requires an exact revision" + ) + if any( + type(value) is not int or value < 0 + for value in (max_cached_bytes, max_cached_objects) + ): + raise invalid( + "REPOSITORY_GIT.INVALID_BOUND", "cache bounds must be nonnegative integers" + ) + self._repository = repository + self._revision = revision + self._max_bytes = max_cached_bytes + self._max_objects = max_cached_objects + self._objects: OrderedDict[tuple[Path, str, str, str], bytes] = OrderedDict() + self._cached_bytes = 0 + self._closed = False + + @property + def revision(self) -> RepositoryRevision: + return self._revision + + @property + def cached_bytes(self) -> int: + """Retained verified payload, excluding the bounded entry bookkeeping.""" + return self._cached_bytes + + @property + def cached_objects(self) -> int: + return len(self._objects) + + def close(self) -> None: + self._objects.clear() + self._cached_bytes = 0 + self._closed = True + + def __enter__(self) -> RevisionReadSession: + self._require_open() + return self + + def __exit__(self, *_: object) -> None: + self.close() + + def _require_open(self) -> None: + if self._closed: + raise invalid( + "REPOSITORY_GIT.READ_SESSION_CLOSED", "the revision read session is closed" + ) + + def read_file(self, path: RepositoryPath) -> bytes: + self._require_open() + return self._repository._read_file(self._revision, path, self._object) + + def _object( + self, repository: Path, oid: str, expected_type: str, algorithm: str + ) -> bytes: + key = (repository, oid, expected_type, algorithm) + if key in self._objects: + self._objects.move_to_end(key) + return self._objects[key] + content = self._repository._object(repository, oid, expected_type, algorithm) + if ( + not self._max_objects + or len(content) > self._max_bytes + or not self._max_bytes + ): + return content + while self._objects and ( + len(self._objects) >= self._max_objects + or self._cached_bytes + len(content) > self._max_bytes + ): + _key, evicted = self._objects.popitem(last=False) + self._cached_bytes -= len(evicted) + self._objects[key] = content + self._cached_bytes += len(content) + return content + + def _run_bounded( command: tuple[str, ...], *, diff --git a/tools/repository_git/tests/test_repository.py b/tools/repository_git/tests/test_repository.py index 18ad3229..29765ab3 100644 --- a/tools/repository_git/tests/test_repository.py +++ b/tools/repository_git/tests/test_repository.py @@ -713,6 +713,145 @@ def test_environment_and_output_are_bounded(self) -> None: "REPOSITORY_GIT.INVALID_COMMAND", ) + + def test_read_session_reuses_verified_objects_and_pins_revision(self) -> None: + with tempfile.TemporaryDirectory() as directory: + root = Path(directory) + self._initialize(root) + (root / "a").write_bytes(b"old") + (root / "b").write_bytes(b"old") + self._commit(root, "base") + repository = GitRepository(root) + revision = repository.current_revision() + with mock.patch.object(repository, "_object", wraps=repository._object) as fetch: + with repository.read_session(revision) as session: + self.assertEqual(session.read_file(RepositoryPath.parse("a")), b"old") + self.assertEqual(session.read_file(RepositoryPath.parse("b")), b"old") + self.assertEqual(fetch.call_count, 3) # commit, tree, shared blob + (root / "a").write_bytes(b"new") + self._commit(root, "advance") + self.assertEqual(session.read_file(RepositoryPath.parse("a")), b"old") + self.assertEqual(fetch.call_count, 3) + self.assertEqual(session.revision, revision) + self.assertEqual(session.cached_bytes, 0) + self.assertEqual(session.cached_objects, 0) + with self.assertRaises(GitRepositoryError) as raised: + session.read_file(RepositoryPath.parse("a")) + self.assertEqual(raised.exception.failure.code, "REPOSITORY_GIT.READ_SESSION_CLOSED") + with repository.read_session(repository.current_revision()) as new_session: + self.assertEqual(new_session.read_file(RepositoryPath.parse("a")), b"new") + self.assertEqual(fetch.call_count, 6) + + def test_read_session_bounds_and_eviction_preserve_verified_reads(self) -> None: + with tempfile.TemporaryDirectory() as directory: + root = Path(directory) + self._initialize(root) + content = b"large" * 300 + (root / "a").write_bytes(content) + self._commit(root, "base") + repository = GitRepository(root) + path, revision = RepositoryPath.parse("a"), repository.current_revision() + for byte_limit, entry_limit in ((0, 10), (4096, 0), (4096, 1), (256, 10)): + with self.subTest(bytes=byte_limit, entries=entry_limit): + with mock.patch.object(repository, "_object", wraps=repository._object) as fetch: + with repository.read_session(revision, max_cached_bytes=byte_limit, + max_cached_objects=entry_limit) as session: + self.assertEqual(session.read_file(path), content) + self.assertEqual(session.read_file(path), content) + self.assertLessEqual(session.cached_bytes, byte_limit) + self.assertLessEqual(session.cached_objects, entry_limit) + # Zero budget, eviction, and oversized blobs all take + # the same fully verified read path on a later miss. + self.assertGreater(fetch.call_count, 3) + for invalid_bound in (-1, True, 1.5): + with self.assertRaises(GitRepositoryError): + repository.read_session(revision, max_cached_bytes=invalid_bound) + + def test_read_session_failures_are_unretained_and_cleanup_is_terminal(self) -> None: + with tempfile.TemporaryDirectory() as directory: + root = Path(directory) + self._initialize(root) + (root / "a").write_bytes(b"original") + self._commit(root, "base") + repository = GitRepository(root) + revision, path = repository.current_revision(), RepositoryPath.parse("a") + oid = self._git(root, "rev-parse", "HEAD:a").strip() + blob = root / ".git" / "objects" / oid[:2] / oid[2:] + saved = blob.read_bytes() + with repository.read_session(revision) as session: + blob.unlink() + with self.assertRaises(GitRepositoryError): + session.read_file(path) + blob.write_bytes(saved) + self.assertEqual(session.read_file(path), b"original") + # Each fresh owner validates its inputs instead of inheriting an + # earlier owner's observation of the repository's health. + blob.write_bytes(b"corrupt loose object") + with self.assertRaises(GitRepositoryError): + with repository.read_session(revision) as failed: + failed.read_file(path) + self.assertEqual(failed.cached_objects, 0) + self.assertEqual(failed.cached_bytes, 0) + blob.write_bytes(saved) + for cached in (False, True): + with repository.read_session(revision, max_cached_objects=10 if cached else 0) as session: + with self.assertRaises(GitRepositoryError) as error: + session.read_file(RepositoryPath.parse("missing")) + self.assertEqual(error.exception.failure.code, "REPOSITORY_GIT.OBJECT_UNAVAILABLE") + + def test_read_session_keeps_gitlink_repository_identity(self) -> None: + with tempfile.TemporaryDirectory() as directory: + root, nested = Path(directory) / "root", Path(directory) / "nested" + root.mkdir(); nested.mkdir() + for repo in (root, nested): + self._initialize(repo) + (repo / "same").write_bytes(b"same") + self._commit(repo, "base") + nested_oid = self._git(nested, "rev-parse", "HEAD").strip() + self._git(root, "update-index", "--add", "--cacheinfo", "160000", nested_oid, "vendor") + self._git(root, "commit", "-qm", "gitlink") + repository = GitRepository(root, gitlinks=(GitlinkRepository( + RepositoryPath.parse("vendor"), nested),)) + with mock.patch.object(repository, "_object", wraps=repository._object) as fetch: + with repository.read_session(repository.current_revision()) as session: + self.assertEqual(session.read_file(RepositoryPath.parse("same")), b"same") + self.assertEqual(session.read_file(RepositoryPath.parse("vendor/same")), b"same") + self.assertEqual(session.read_file(RepositoryPath.parse("vendor/same")), b"same") + shared_oid = self._git(root, "rev-parse", "HEAD:same").strip() + owners = {call.args[0] for call in fetch.call_args_list if call.args[1] == shared_oid} + self.assertEqual(owners, {root.resolve(), nested.resolve()}) + + + def test_read_session_preserves_sha256_and_object_safety_limits(self) -> None: + with tempfile.TemporaryDirectory() as directory: + root = Path(directory) + self._git(root, "init", "--quiet", "--object-format=sha256") + self._git(root, "config", "user.email", "test@example.invalid") + self._git(root, "config", "user.name", "Test") + content = b"x" * 8192 + (root / "a").write_bytes(content) + self._commit(root, "sha256 fixture") + repository = GitRepository(root) + revision = repository.current_revision() + self.assertEqual(len(revision.oid), 64) + path = RepositoryPath.parse("a") + with repository.read_session(revision) as session: + self.assertEqual(session.read_file(path), content) + self.assertEqual(session.read_file(path), content) + self.assertEqual(session.cached_objects, 3) + restricted = GitRepository(root, max_object_bytes=512) + failures = [] + for entries in (0, 1024): + with restricted.read_session(revision, max_cached_objects=entries) as session: + for _ in range(2): + with self.assertRaises(GitRepositoryError) as error: + session.read_file(path) + failures.append(error.exception.failure.code) + self.assertEqual(len(set(failures)), 1) + self.assertIn(failures[0], { + "REPOSITORY_GIT.OUTPUT_LIMIT", "REPOSITORY_GIT.OBJECT_LIMIT" + }) + @classmethod def _initialize(cls, root: Path) -> None: cls._git(root, "init", "-q") diff --git a/tools/standards_engine/PURPOSE-SEPARATION.md b/tools/standards_engine/PURPOSE-SEPARATION.md index 4390f35f..68d58adf 100644 --- a/tools/standards_engine/PURPOSE-SEPARATION.md +++ b/tools/standards_engine/PURPOSE-SEPARATION.md @@ -56,6 +56,28 @@ application output). Old Analysis records are unsupported under Analysis 7. Existing SQLite storage mechanics and Snapshot handle version 5 remain in use; there is no automatic deletion, conversion, alternate old reader or dual write. +## Operation-local performance ownership + +Capture owns one bounded exact-revision Git read session for its recorded +first pass, closes that session, and compiles the frozen replay independently. +Both the requested-path closure and semantic signature still have to agree. +The selected accepted-main revision stays fixed throughout that capture. + +Analysis preparation and resolution borrow verified immutable inputs for the +current native operation. Identical snapshot roles share one material value; +distinct roots keep independent lifecycle and content observations. Exact +proposal projections carry their already-compiled base into logical authoring, +while changed candidates take the complete compiler path. Retained-decision +and pre-/post-submission evaluations still run independently, with current +lifecycle, revision and authorization observations at their existing boundaries. +The immutable material does not retain provider outcomes or evaluation results. + +Each subsequent operation loads and verifies its own captured bytes. Publication +verification, target compare-and-swap and recovery obtain fresh observations; +no operation-local material crosses those barriers as permission or readiness. +The MCP/facade/SQLite lifetime remains per call. There is no cross-call compiled +cache, persistent derived cache, or alternate identity format in this increment. + ## Application qualification A declaration identifies an entire canonical module or registered operational diff --git a/tools/standards_engine/standards_engine/engine.py b/tools/standards_engine/standards_engine/engine.py index d079282b..ff143586 100644 --- a/tools/standards_engine/standards_engine/engine.py +++ b/tools/standards_engine/standards_engine/engine.py @@ -14,6 +14,7 @@ CandidateFile, CandidateCommitMessage, GitRepository, + RevisionReadSession, GitRepositoryError, RepositoryPath, RepositoryRevision, @@ -254,16 +255,29 @@ def semantic_signature(self) -> tuple[object, ...]: ) +@dataclass(frozen=True, slots=True) +class _EvaluationMaterials: + """Verified immutable inputs borrowed only by one analysis operation. + + Decision states, providers, authorization, and live root checks stay outside + this value. Publication and recovery obtain their own current observations. + """ + + base_snapshot: SnapshotId + proposed_material: SnapshotMaterialRef | ProjectedRevisionMaterialRef + accepted: CompiledSnapshot + proposed: CompiledSnapshot + revision: ProposalRevision | None = None + projection: LogicalProjection | None = None + + class _GitRevisionSource: - def __init__(self, repository: GitRepository, revision: RepositoryRevision) -> None: - self._repository = repository - self._revision = revision + def __init__(self, reader: RevisionReadSession) -> None: + self._reader = reader def read_bytes(self, path: str) -> bytes: try: - return self._repository.read_file( - self._revision, RepositoryPath.parse(path) - ) + return self._reader.read_file(RepositoryPath.parse(path)) except GitRepositoryError as error: if error.failure.kind != "unavailable": raise @@ -497,11 +511,10 @@ def _capture_snapshot( del call try: revision = self._repository.branch_revision(CANONICAL_TARGET_BRANCH) - recording = RecordingContentSource( - _GitRevisionSource(self._repository, revision) - ) - first = self._compile(recording) - frozen = recording.freeze() + with self._repository.read_session(revision) as reader: + recording = RecordingContentSource(_GitRevisionSource(reader)) + first = self._compile(recording) + frozen = recording.freeze() replay = RecordingContentSource(frozen) try: second = self._compile(replay) @@ -570,9 +583,8 @@ def maintain_evidence( ), ) paths = self._repository.revision_paths(expected) - files = { - str(path): self._repository.read_file(expected, path) for path in paths - } + with self._repository.read_session(expected) as reader: + files = {str(path): reader.read_file(path) for path in paths} compiled = self._compile(FrozenContentSource(files)) requirements = { coverage_requirement_id(compiled.coverage.requirements[s], v) @@ -1063,7 +1075,7 @@ def analyze_proposal( try: revision = self._authoring.read_revision(call.revision.id) accepted = self._compiled_snapshot(revision.base_snapshot) - projection = self._proposal_projection(revision) + projection = self._proposal_projection(revision, accepted) proposed = projection.compiled semantic_proposals = projection.semantic_proposals affected_policy_ids = set(projection.analysis_policy_ids) @@ -1094,7 +1106,14 @@ def analyze_proposal( ) return self._evaluate_publish_project( state, - self._evaluate_compiled(state, accepted, proposed, revision), + _EvaluationMaterials( + state.base_snapshot, + state.proposed_material, + accepted, + proposed, + revision, + projection, + ), ) except self._domain_errors() as error: return self._domain_rejection(error) @@ -1588,7 +1607,11 @@ def prepare( base_snapshot = self._snapshot_id(request.base_snapshot) proposed_snapshot = self._snapshot_id(request.proposed_snapshot) base = self._compiled_snapshot(base_snapshot) - proposed = self._compiled_snapshot(proposed_snapshot) + proposed = ( + base + if proposed_snapshot == base_snapshot + else self._compiled_snapshot(proposed_snapshot) + ) attestations, authorizations = self._repository_decisions( request.changes, base, proposed ) @@ -1602,12 +1625,12 @@ def prepare( domain_contracts=self._domain_contracts(), execution_contracts=self._execution_context.contract_view(), ) - if not isinstance(request.prior_analysis, MissingValue): - state = self._reuse_prior(state, request.prior_analysis) - return self._evaluate_publish_project( - state, - self._evaluate_compiled(state, base, proposed), + materials = _EvaluationMaterials( + state.base_snapshot, state.proposed_material, base, proposed ) + if not isinstance(request.prior_analysis, MissingValue): + state = self._reuse_prior(state, request.prior_analysis, materials) + return self._evaluate_publish_project(state, materials) except self._domain_errors() as error: return self._domain_rejection(error) @@ -1617,8 +1640,9 @@ def resolve( ) -> PendingResult | CompleteResult | RejectedResult: try: state = self._load_analysis(call.analysis) - successor = self._apply_submission(self._evaluate(state), call) - return self._evaluate_publish_project(successor) + materials = self._evaluation_materials(state) + successor = self._apply_submission(self._evaluate(state, materials), call) + return self._evaluate_publish_project(successor, materials) except self._domain_errors() as error: return self._domain_rejection(error) @@ -1679,16 +1703,22 @@ def _compiled_snapshot(self, snapshot: SnapshotId) -> CompiledSnapshot: def _compiled_revision(self, revision: ProposalRevision) -> CompiledSnapshot: return self._proposal_projection(revision).compiled - def _proposal_projection(self, revision: ProposalRevision) -> LogicalProjection: - capture = self._snapshots.load_content(revision.base_snapshot) - base = FrozenContentSource( - (str(item.path), item.content) for item in capture.files + def _proposal_projection( + self, + revision: ProposalRevision, + accepted: CompiledSnapshot | None = None, + ) -> LogicalProjection: + accepted = ( + self._compiled_snapshot(revision.base_snapshot) + if accepted is None + else accepted ) return self._logical_authoring.compile( - base, + accepted.source, LogicalProgram(revision.change_sets), base_snapshot=str(revision.base_snapshot), base_repository_paths=revision.base_repository_paths, + compiled_base=accepted, ) def _validate_logical_revision(self, revision: ProposalRevision) -> None: @@ -1759,24 +1789,79 @@ def _repository_decisions( tuple(authorizations[key] for key in sorted(authorizations)), ) - def _evaluate(self, state: DomainAnalysisState) -> AnalysisEvaluation: + def _evaluation_materials(self, state: DomainAnalysisState) -> _EvaluationMaterials: accepted = self._compiled_snapshot(state.base_snapshot) proposed_ref = state.proposed_material if isinstance(proposed_ref, SnapshotMaterialRef): - proposed = self._compiled_snapshot(proposed_ref.snapshot) - revision = None + proposed = ( + accepted + if proposed_ref.snapshot == state.base_snapshot + else self._compiled_snapshot(proposed_ref.snapshot) + ) + return _EvaluationMaterials( + state.base_snapshot, proposed_ref, accepted, proposed + ) + revision = self._authoring.read_revision(proposed_ref.revision_id) + if revision.base_snapshot != state.base_snapshot: + raise AnalysisError( + AnalysisFailure( + "ANALYSIS.MATERIAL_BASE_MISMATCH", + "invalid", + "Proposal revision and analysis base snapshots differ.", + ) + ) + projection = self._proposal_projection(revision, accepted) + return _EvaluationMaterials( + state.base_snapshot, + proposed_ref, + accepted, + projection.compiled, + revision, + projection, + ) + + def _evaluate( + self, + state: DomainAnalysisState, + materials: _EvaluationMaterials | None = None, + ) -> AnalysisEvaluation: + if materials is None: + materials = self._evaluation_materials(state) + if ( + materials.base_snapshot != state.base_snapshot + or materials.proposed_material != state.proposed_material + ): + raise AnalysisError( + AnalysisFailure( + "ANALYSIS.MATERIAL_INPUT_MISMATCH", + "invalid", + "Borrowed analysis material belongs to different immutable inputs.", + ) + ) + # A submission/provider can change live access while the immutable bytes + # remain valid. Recheck lifecycle and revision authority at every decision + # evaluation; only byte validation and pure compilation are reused. + self._snapshots.snapshot(state.base_snapshot) + if isinstance(state.proposed_material, SnapshotMaterialRef): + if state.proposed_material.snapshot != state.base_snapshot: + self._snapshots.snapshot(state.proposed_material.snapshot) else: - revision = self._authoring.read_revision(proposed_ref.revision_id) - if revision.base_snapshot != state.base_snapshot: + current = self._authoring.read_revision(state.proposed_material.revision_id) + if current != materials.revision: raise AnalysisError( AnalysisFailure( - "ANALYSIS.MATERIAL_BASE_MISMATCH", + "ANALYSIS.MATERIAL_INPUT_MISMATCH", "invalid", - "Proposal revision and analysis base snapshots differ.", + "The current stored revision differs from borrowed analysis material.", ) ) - proposed = self._proposal_projection(revision).compiled - return self._evaluate_compiled(state, accepted, proposed, revision) + return self._evaluate_compiled( + state, + materials.accepted, + materials.proposed, + materials.revision, + materials.projection, + ) def _evaluate_compiled( self, @@ -1784,10 +1869,16 @@ def _evaluate_compiled( accepted: CompiledSnapshot, proposed: CompiledSnapshot, revision: ProposalRevision | None = None, + projection: LogicalProjection | None = None, ) -> AnalysisEvaluation: proposed_ref = state.proposed_material if isinstance(proposed_ref, ProjectedRevisionMaterialRef): - if revision is None or revision.revision_id != proposed_ref.revision_id: + if ( + revision is None + or revision.revision_id != proposed_ref.revision_id + or projection is None + or projection.compiled is not proposed + ): raise AnalysisError( AnalysisFailure( "ANALYSIS.MATERIAL_INPUT_MISMATCH", @@ -1795,7 +1886,7 @@ def _evaluate_compiled( "Resolved proposal revision does not match the analysis state.", ) ) - self._validate_projected_inputs(state, revision, accepted, proposed) + self._validate_projected_inputs(state, accepted, proposed, projection) return evaluate_analysis( state, self._analysis_material(SnapshotMaterialRef(state.base_snapshot), accepted), @@ -1822,11 +1913,10 @@ def _analysis_material( def _validate_projected_inputs( self, state: DomainAnalysisState, - revision: ProposalRevision, accepted: CompiledSnapshot, proposed: CompiledSnapshot, + projection: LogicalProjection, ) -> None: - projection = self._proposal_projection(revision) semantic_proposals = projection.semantic_proposals affected_policy_ids = set(projection.analysis_policy_ids) affected_policy_ids.update(str(item["policy"]) for item in semantic_proposals) @@ -1930,10 +2020,11 @@ def _canonical_records(values: Iterable[Mapping[str, object]]) -> tuple[str, ... def _evaluate_publish_project( self, state: DomainAnalysisState, - evaluation: AnalysisEvaluation | None = None, + materials: _EvaluationMaterials | None = None, ) -> PendingResult | CompleteResult: - evaluation = self._evaluate(state) if evaluation is None else evaluation - state, evaluation = self._apply_providers(state, evaluation) + materials = self._evaluation_materials(state) if materials is None else materials + evaluation = self._evaluate(state, materials) + state, evaluation = self._apply_providers(state, evaluation, materials) self._snapshots.publish_aggregate( state.aggregate(self._analysis_children(evaluation)) ) @@ -1943,6 +2034,7 @@ def _apply_providers( self, state: DomainAnalysisState, evaluation: AnalysisEvaluation, + materials: _EvaluationMaterials, ) -> tuple[DomainAnalysisState, AnalysisEvaluation]: while evaluation.pending_requirements: applied = False @@ -2071,7 +2163,7 @@ def _apply_providers( authorization.as_contract(), ), ) - evaluation = self._evaluate(state) + evaluation = self._evaluate(state, materials) applied = True break if applied: @@ -2125,6 +2217,7 @@ def _reuse_prior( self, state: DomainAnalysisState, prior: AnalysisHandle, + materials: _EvaluationMaterials, ) -> DomainAnalysisState: previous = self._load_analysis(prior) if previous.execution_contracts != state.execution_contracts: @@ -2154,7 +2247,7 @@ def _reuse_prior( } ) try: - self._evaluate(candidate) + self._evaluate(candidate, materials) except AnalysisError as error: if error.failure.code == "ANALYSIS.INVALID_RETAINED_DECISION": continue diff --git a/tools/standards_engine/standards_engine/logical_authoring.py b/tools/standards_engine/standards_engine/logical_authoring.py index 3c86cd5c..8ce0fb38 100644 --- a/tools/standards_engine/standards_engine/logical_authoring.py +++ b/tools/standards_engine/standards_engine/logical_authoring.py @@ -925,6 +925,7 @@ def compile( *, base_snapshot: str | None = None, base_repository_paths: Iterable[str], + compiled_base: Any | None = None, ) -> LogicalProjection: if type(base) is not FrozenContentSource or type(program) is not LogicalProgram: raise _invalid( @@ -942,7 +943,17 @@ def compile_current(current: dict[str, bytes]) -> Any: ) return self._compile_authorities(FrozenContentSource(current)) - base_compiled = self._compile_authorities(base) + if compiled_base is None: + base_compiled = self._compile_authorities(base) + else: + # This internal borrowed proof is usable only with the exact source + # it compiled. Changed candidates always take the full compiler path. + if getattr(compiled_base, "source", None) is not base: + raise _invalid( + "AUTHORING.COMPILED_BASE_MISMATCH", + "compiled base must own the exact supplied frozen source", + ) + base_compiled = compiled_base files = dict(base.files) repository_paths = selected_repository_paths for change_set in program.change_sets: diff --git a/tools/standards_engine/tests/test_analysis.py b/tools/standards_engine/tests/test_analysis.py index 945ce03b..9d4a3f63 100644 --- a/tools/standards_engine/tests/test_analysis.py +++ b/tools/standards_engine/tests/test_analysis.py @@ -210,6 +210,14 @@ def _clone_tracked_worktree(destination: Path) -> None: ) + # This disposable fixture accepts the exact materialized candidate. Its + # source may be checked out on any development branch. + subprocess.run( + ("git", "-C", str(destination), "checkout", "--quiet", "-B", "main", "HEAD"), + check=True, + ) + + class ExactAuthorizer: contract = AuthorizationAuthorityContract( "issuer.fixture", @@ -1968,11 +1976,137 @@ def test_cold_load_rejects_obsolete_domain_contracts(self) -> None: self.assertEqual(result.code, "ANALYSIS.DOMAIN_CONTRACT_UNSUPPORTED") self.assertEqual(result.outcome, "unsupported") - def prepare(self, *, prior: dict[str, object] | None = None): + + def test_same_snapshot_material_is_loaded_once_per_decision_operation(self) -> None: + with mock.patch.object(self.engine, "_compiled_snapshot", + wraps=self.engine._compiled_snapshot) as load: + pending = self.prepare() + self.assertIsInstance(pending, PendingResult) + self.assertEqual(load.call_count, 1) + submission = self.disposition_submission(pending, "reuse-input-review") + authorizer = self.engine._execution_context.authorization + with (mock.patch.object(self.engine, "_compiled_snapshot", + wraps=self.engine._compiled_snapshot) as load, + mock.patch.object(self.engine, "_evaluate_compiled", + wraps=self.engine._evaluate_compiled) as evaluate, + mock.patch.object(authorizer, "authorize", wraps=authorizer.authorize) as authorize): + result = self.engine.resolve(submission) + self.assertIsInstance(result, (PendingResult, CompleteResult)) + self.assertEqual(load.call_count, 1) + self.assertEqual(evaluate.call_count, 2) + before, after = (call.args[0] for call in evaluate.call_args_list) + self.assertNotEqual(before.analysis_id, after.analysis_id) + self.assertGreater(authorize.call_count, 0) + result_again = self.engine.resolve(submission) + self.assertEqual(result_again.as_contract(), result.as_contract()) + self.assertEqual(load.call_count, 2) # a fresh proof for a new operation + self.assertEqual(evaluate.call_count, 4) + + def test_distinct_snapshot_roots_retain_distinct_material_and_lifecycle(self) -> None: + capture = self.engine._snapshots.load_content(self.engine._snapshot_id(self.snapshot)) + other = self.engine._snapshots.create_snapshot(capture).snapshot + proposed = self.engine._snapshot_handle(other) + with mock.patch.object(self.engine, "_compiled_snapshot", + wraps=self.engine._compiled_snapshot) as load: + result = self.prepare(proposed=proposed) + self.assertIsInstance(result, PendingResult) + self.assertEqual(load.call_count, 2) + self.assertEqual({str(call.args[0]) for call in load.call_args_list}, + {self.snapshot.id, str(other)}) + self.engine._snapshots.delete_snapshot(other) + rejected = self.prepare(proposed=proposed) + self.assertIsInstance(rejected, RejectedResult) + self.assertIsInstance(self.prepare(), PendingResult) + + + def test_prior_decisions_reuse_material_but_recheck_each_decision(self) -> None: + pending = self.prepare() + resolved = self.engine.resolve(self.disposition_submission(pending, "prior-input-review")) + self.assertIsInstance(resolved, (PendingResult, CompleteResult)) + with (mock.patch.object(self.engine, "_compiled_snapshot", + wraps=self.engine._compiled_snapshot) as load, + mock.patch.object(self.engine, "_evaluate_compiled", + wraps=self.engine._evaluate_compiled) as evaluate): + reused = self.prepare(prior=resolved.handle.as_contract()) + self.assertIsInstance(reused, (PendingResult, CompleteResult)) + self.assertEqual(load.call_count, 1) + self.assertGreaterEqual(evaluate.call_count, 2) + self.assertEqual(reused.handle, resolved.handle) + + def test_current_authorization_is_not_reused_with_material(self) -> None: + pending = self.prepare() + submission = self.disposition_submission(pending, "current-authorization-review") + authorizer = self.engine._execution_context.authorization + with mock.patch.object(authorizer, "authorize", + return_value=AuthorizationDenied("Denied now.")): + denied = self.engine.resolve(submission) + self.assertIsInstance(denied, RejectedResult) + self.assertIsInstance(self.engine.resolve(submission), (PendingResult, CompleteResult)) + + def test_lifecycle_change_during_authorization_blocks_post_submission_evaluation(self) -> None: + pending = self.prepare() + submission = self.disposition_submission(pending, "lifecycle-during-review") + authorizer = self.engine._execution_context.authorization + original = authorizer.authorize + snapshot = self.engine._snapshot_id(self.snapshot) + + def quarantine(request): + claim = original(request) + self.engine._snapshots.delete_snapshot(snapshot) + return claim + + try: + with mock.patch.object(authorizer, "authorize", side_effect=quarantine): + rejected = self.engine.resolve(submission) + self.assertIsInstance(rejected, RejectedResult) + self.assertEqual(rejected.outcome, "unavailable") + finally: + self.engine._snapshots.undelete_snapshot(snapshot) + self.assertIsInstance(self.engine.resolve(submission), (PendingResult, CompleteResult)) + + def test_proposal_analysis_uses_one_projection_and_one_verified_base(self) -> None: + capture = self.engine._snapshots.load_content(self.engine._snapshot_id(self.snapshot)) + planning = next(item.content.decode("utf-8") for item in capture.files + if str(item.path) == "workflows/planning.md") + body = _section_body(planning, WRITTEN_PLAN_TITLE) + "\nUse the selected acceptance evidence." + created = self.engine.create_proposal(CreateProposalCall.from_value({ + "kind": "create-proposal", "base_snapshot": self.snapshot.as_contract(), + "change_set": _policy_change_set(policy=POLICY, title=WRITTEN_PLAN_TITLE, + body=body, accepted_revision=1, proposed_revision=2, + purpose="Exercise exact compiled proposal inputs."), + })) + self.assertIsInstance(created, CreateProposalResult) + with (mock.patch.object(self.engine, "_compiled_snapshot", + wraps=self.engine._compiled_snapshot) as load, + mock.patch.object(self.engine, "_proposal_projection", + wraps=self.engine._proposal_projection) as project): + result = self.engine.analyze_proposal(AnalyzeProposalCall.from_value({ + "revision": created.revision.as_contract()})) + self.assertIsInstance(result, PendingResult) + self.assertEqual(load.call_count, 1) + self.assertEqual(project.call_count, 1) + + def test_capture_compiles_live_and_frozen_sources_independently(self) -> None: + sources = [] + original = self.engine._compile + + def observe(source): + sources.append(source) + return original(source) + + with mock.patch.object(self.engine, "_compile", side_effect=observe): + result = self.engine.create_snapshot(CreateSnapshotCall(kind="create-snapshot")) + self.assertIsInstance(result, CreateSnapshotResult) + self.assertEqual(len(sources), 2) + self.assertIsNot(sources[0], sources[1]) + self.assertEqual(sources[0].requested_paths, sources[1].requested_paths) + + def prepare(self, *, prior: dict[str, object] | None = None, + proposed: dict[str, object] | None = None): request: dict[str, object] = { "kind": "analysis-request", "base_snapshot": self.snapshot.as_contract(), - "proposed_snapshot": self.snapshot.as_contract(), + "proposed_snapshot": self.snapshot.as_contract() if proposed is None else proposed, "changes": [ { "kind": "modification", diff --git a/tools/standards_engine/tests/test_logical_authoring.py b/tools/standards_engine/tests/test_logical_authoring.py index 00efc346..88370ddc 100644 --- a/tools/standards_engine/tests/test_logical_authoring.py +++ b/tools/standards_engine/tests/test_logical_authoring.py @@ -5,6 +5,7 @@ import tempfile import tomllib import unittest +from unittest import mock from pathlib import Path from tools.repository_git.repository_git import indexed_paths @@ -18,6 +19,7 @@ from tools.standards_engine.standards_engine.engine import StandardsEngine from tools.standards_metadata.standards_metadata import ( DirectoryContentSource, + FrozenContentSource, RecordingContentSource, PolicyUnitTombstone, file_digest, @@ -70,6 +72,26 @@ def setUpClass(cls) -> None: cls.compiled = StandardsEngine._compile(cls.base) cls.repository_paths = indexed_paths(cls.root) + + def test_verified_compiled_base_is_reused_but_candidate_compiles(self) -> None: + program = LogicalProgram((self.change_set([self.new_standard_edit()]),)) + with mock.patch.object(StandardsEngine, "_compile", wraps=StandardsEngine._compile) as compile: + compiler = LogicalAuthoringCompiler(compile) + ordinary = compiler.compile(self.base, program, base_repository_paths=self.repository_paths) + ordinary_count = compile.call_count + compile.reset_mock() + borrowed = compiler.compile(self.base, program, base_repository_paths=self.repository_paths, + compiled_base=self.compiled) + self.assertEqual(compile.call_count, ordinary_count - 1) + self.assertGreater(compile.call_count, 0) + self.assertEqual(borrowed.source.files, ordinary.source.files) + self.assertEqual(borrowed.semantic_proposals, ordinary.semantic_proposals) + self.assertIsNot(borrowed.compiled, self.compiled) + with self.assertRaises(AuthoringError) as raised: + compiler.compile(FrozenContentSource(dict(self.base.files)), program, + base_repository_paths=self.repository_paths, compiled_base=self.compiled) + self.assertEqual(raised.exception.failure.code, "AUTHORING.COMPILED_BASE_MISMATCH") + def change_set(self, edits: list[dict[str, object]]) -> StandardsChangeSet: return StandardsChangeSet.from_mapping( { diff --git a/tools/standards_engine/tests/test_navigation.py b/tools/standards_engine/tests/test_navigation.py index d83bd540..d3c61f77 100644 --- a/tools/standards_engine/tests/test_navigation.py +++ b/tools/standards_engine/tests/test_navigation.py @@ -287,6 +287,12 @@ def test_live_worktree_mutation_cannot_change_snapshot_reads(self) -> None: ("git", "clone", "-q", "--no-hardlinks", str(REPO_ROOT), str(root)), check=True, ) + # The disposable fixture accepts its cloned candidate regardless + # of the branch checked out in the source repository. + subprocess.run( + ("git", "-C", str(root), "checkout", "--quiet", "-B", "main", "HEAD"), + check=True, + ) engine = StandardsEngine.open_repository( root, store_path=Path(temporary) / "standards.sqlite3" , purpose="authoring") diff --git a/tools/standards_identity/README.md b/tools/standards_identity/README.md index 031efb1d..2b3faf30 100644 --- a/tools/standards_identity/README.md +++ b/tools/standards_identity/README.md @@ -28,3 +28,12 @@ codecs. `frame_path_bytes` and `frame_path_byte_set` provide one neutral, representation-preserving frame for logical paths and exact bytes; callers still own path validity, set membership, and the identity domain. Unframed single-file content digests remain SHA-256 over raw bytes. + + +Encoding retains the exact identity-v2 preimage, including arbitrary-size +integer spelling, Unicode scalar identity, control escaping, key ordering and +framed lengths. Bounded decimal tokens accelerate the byte domain; string +encoding batches ordinary spans. Path-byte-set framing retains each validated +frame once. These are implementation optimizations, with no identity version, +public representation, digest or supported-domain change. The differential +preimage tests remain a small independent oracle for future encoder changes. diff --git a/tools/standards_identity/standards_identity/encoding.py b/tools/standards_identity/standards_identity/encoding.py index 4c792f0a..2d6248f7 100644 --- a/tools/standards_identity/standards_identity/encoding.py +++ b/tools/standards_identity/standards_identity/encoding.py @@ -13,6 +13,16 @@ _ID_PREFIX = re.compile(r"[a-z][a-z0-9.-]*\Z", re.ASCII) _DECIMAL_CHUNK_BASE = 1_000_000_000 _DECIMAL_CHUNK_WIDTH = 9 +# Exact decimal tokens for the byte domain; larger integers retain the +# arbitrary-precision encoder and its independence from Python's digit limit. +_BYTE_TOKENS = tuple(str(value).encode("ascii") for value in range(256)) +_SURROGATE = re.compile(r"[\ud800-\udfff]") +_ESCAPED_CHARACTER = re.compile(r'["\\\x00-\x1f]') +_STRING_ESCAPES = { + '"': '\\"', + "\\": "\\\\", + **{chr(value): f"\\u{value:04x}" for value in range(32)}, +} @dataclass(frozen=True, slots=True, init=False) @@ -137,19 +147,18 @@ def frame_path_byte_set( entries: Iterable[tuple[Iterable[str], bytes]], ) -> IdentityArray: """Frame a path-keyed byte set in codepoint path order.""" - selected: list[tuple[tuple[str, ...], bytes]] = [] + selected: list[tuple[tuple[str, ...], IdentityObject]] = [] for path, content in entries: components = tuple(path) - frame_path_bytes(components, content) - selected.append((components, content)) + selected.append((components, frame_path_bytes(components, content))) selected.sort(key=lambda item: tuple(tuple(map(ord, part)) for part in item[0])) - paths = tuple(path for path, _content in selected) + paths = tuple(path for path, _frame in selected) if not selected or len(set(paths)) != len(paths): raise invalid( "IDENTITY.INVALID_PATH_SET", "path-byte set must be nonempty with unique paths", ) - return IdentityArray(frame_path_bytes(path, content) for path, content in selected) + return IdentityArray(frame for _path, frame in selected) def _validate_value(value: object) -> None: @@ -168,13 +177,11 @@ def _validate_value(value: object) -> None: def _validate_scalar_string(value: str) -> None: - for character in value: - codepoint = ord(character) - if 0xD800 <= codepoint <= 0xDFFF: - raise invalid( - "IDENTITY.INVALID_UNICODE", - "strings must contain Unicode scalar values", - ) + if _SURROGATE.search(value) is not None: + raise invalid( + "IDENTITY.INVALID_UNICODE", + "strings must contain Unicode scalar values", + ) def _encode(value: IdentityValue) -> bytes: @@ -184,7 +191,7 @@ def _encode(value: IdentityValue) -> bytes: if value_type is bool: return b"true" if value else b"false" if value_type is int: - return _encode_integer(value) + return _BYTE_TOKENS[value] if 0 <= value < 256 else _encode_integer(value) if value_type is str: return _encode_string(value) if value_type is IdentityArray: @@ -216,19 +223,10 @@ def _encode_integer(value: int) -> bytes: def _encode_string(value: str) -> bytes: - chunks = [b'"'] - for character in value: - codepoint = ord(character) - if character == '"': - chunks.append(b'\\"') - elif character == "\\": - chunks.append(b"\\\\") - elif codepoint <= 0x1F: - chunks.append(f"\\u{codepoint:04x}".encode("ascii")) - else: - chunks.append(character.encode("utf-8")) - chunks.append(b'"') - return b"".join(chunks) + # The pattern copies ordinary Unicode segments as a whole. Controls keep + # identity-v2's lowercase \u00xx spelling rather than JSON's short escapes. + escaped = _ESCAPED_CHARACTER.sub(lambda match: _STRING_ESCAPES[match[0]], value) + return b'"' + escaped.encode("utf-8") + b'"' __all__ = ( diff --git a/tools/standards_identity/tests/test_identity.py b/tools/standards_identity/tests/test_identity.py index 731c2d31..b0c2130a 100644 --- a/tools/standards_identity/tests/test_identity.py +++ b/tools/standards_identity/tests/test_identity.py @@ -3,6 +3,8 @@ import hashlib import json import struct +import random +from unittest import mock import unittest from pathlib import Path @@ -32,6 +34,73 @@ def _identity_value(value: object): class IdentityEncodingTest(unittest.TestCase): + + def test_byte_tokens_and_string_spans_match_independent_preimages(self) -> None: + # This oracle is intentionally expressed per scalar, independently of + # the production span encoder. It fixes the unchanged identity-v2 wire. + def reference(value): + if value is None: + return b"null" + if type(value) is bool: + return b"true" if value else b"false" + if type(value) is int: + return str(value).encode("ascii") + if type(value) is str: + body = [] + for char in value: + codepoint = ord(char) + if char in ('"', "\\"): + body.append(b"\\" + char.encode("ascii")) + elif codepoint < 32: + body.append(("\\u%04x" % codepoint).encode("ascii")) + else: + body.append(char.encode("utf-8")) + return b'"' + b"".join(body) + b'"' + if type(value) is IdentityArray: + return b"[" + b",".join(map(reference, value.values)) + b"]" + return b"{" + b",".join( + reference(key) + b":" + reference(member) + for key, member in value.members + ) + b"}" + + cases = [IdentityArray(range(256)), IdentityArray((-257, -1, 256, 257)), + "", '"\\', "".join(map(chr, range(32))), + "plain text" * 1000, + "\x1f\x20\x7f\x80\u07ff\u0800\ud7ff\ue000\uffff\U0010ffff"] + rng = random.Random(9317) + alphabet = ('"', "\\", "\x00", "\n", "é", "e\u0301", "漢", "\U0001f680", "a") + for _ in range(128): + text = "".join(rng.choices(alphabet, k=rng.randrange(80))) + cases.append(IdentityObject((("text", text), ("bytes", IdentityArray( + rng.randrange(-1024, 1024) for _ in range(32)))))) + for value in cases: + expected = reference(value) + self.assertEqual(encode_identity_value(value), expected) + domain, prefix = b"encoding:test", b"sample" + frame = (b"coding-standards:identity:v2\0" + struct.pack(">I", len(domain)) + + domain + struct.pack(">I", len(prefix)) + prefix + + struct.pack(">Q", len(expected)) + expected) + self.assertEqual(hash_identity("encoding:test", "sample", value), + "sample:sha256:" + hashlib.sha256(frame).hexdigest()) + + def test_path_frames_are_constructed_once_and_keep_empty_file_content(self) -> None: + import tools.standards_identity.standards_identity.encoding as encoding + entries = [(('é', 'a'), b''), (('a',), bytes(range(256)))] + with mock.patch.object(encoding, 'frame_path_bytes', wraps=frame_path_bytes) as frame: + selected = frame_path_byte_set(entries) + self.assertEqual(frame.call_count, len(entries)) + expected = IdentityArray((frame_path_bytes(('a',), bytes(range(256))), + frame_path_bytes(('é', 'a'), b''))) + self.assertEqual(encode_identity_value(selected), encode_identity_value(expected)) + for entries in ([], [(('a',), b'a'), (('a',), b'b')]): + with self.assertRaises(IdentityError) as raised: + frame_path_byte_set(entries) + self.assertEqual(raised.exception.failure.code, 'IDENTITY.INVALID_PATH_SET') + for char in ('\ud800', '\udfff'): + with self.assertRaises(IdentityError) as raised: + encode_identity_value('prefix' + char + 'suffix') + self.assertEqual(raised.exception.failure.code, 'IDENTITY.INVALID_UNICODE') + def test_authored_identity_v2_fixture_matrix(self) -> None: corpus = json.loads(FIXTURE_PATH.read_text(encoding="utf-8")) self.assertEqual(corpus["schema_version"], 2) From 2aef993edc8a47ce474468c641cc2e542e3ec8da Mon Sep 17 00:00:00 2001 From: ChatGPT Date: Wed, 23 Sep 2026 22:44:18 +0000 Subject: [PATCH 08/26] perf(engine): share proposal material across focused workflows Carry one operation-owned verified base and exact proposal projection through focused preflight, prospective validation, analysis and result projection. Move Authoring preparation to the invocation boundary and preserve independent evaluations, lifecycle, revision, authorization, capture and publication checks. Verification: all 177 Engine tests passed in isolated module processes; 421 supporting tests (one existing interpreter-dependent skip); 73 structural suites / 121 checks. Paired three-sample measurements show approximately 2.3x faster proposal creation and 2x revision/resolution. Local Python 3.13 results remain distinct from supported installed qualification. --- .../reports/performance-nested-increment.md | 183 +++++++++++++ .../comparison.csv | 9 + .../measure_nested.py | 181 ++++++++++++ .../measurement-environment.json | 32 +++ .../paired-baseline.jsonl | 24 ++ .../paired-candidate.jsonl | 24 ++ .../paired-status.json | 36 +++ .../source-binding.json | 41 +++ .../structural.json | 14 + .../test-timings.csv | 178 ++++++++++++ .../verification.json | 258 ++++++++++++++++++ .../generated/suite-inputs.json | 20 +- tools/standards_engine/PURPOSE-SEPARATION.md | 21 +- .../standards_engine/agent_workflow.py | 50 ++-- .../standards_engine/authoring.py | 35 ++- .../standards_engine/engine.py | 75 +++-- .../standards_engine/operation_materials.py | 71 +++++ .../tests/test_agent_workflow.py | 2 +- .../standards_engine/tests/test_authoring.py | 40 ++- .../tests/test_nested_materials.py | 243 +++++++++++++++++ 20 files changed, 1458 insertions(+), 79 deletions(-) create mode 100644 docs/plans/purpose-separated-standards-engine/reports/performance-nested-increment.md create mode 100644 docs/plans/purpose-separated-standards-engine/reports/performance-nested-increment/comparison.csv create mode 100644 docs/plans/purpose-separated-standards-engine/reports/performance-nested-increment/measure_nested.py create mode 100644 docs/plans/purpose-separated-standards-engine/reports/performance-nested-increment/measurement-environment.json create mode 100644 docs/plans/purpose-separated-standards-engine/reports/performance-nested-increment/paired-baseline.jsonl create mode 100644 docs/plans/purpose-separated-standards-engine/reports/performance-nested-increment/paired-candidate.jsonl create mode 100644 docs/plans/purpose-separated-standards-engine/reports/performance-nested-increment/paired-status.json create mode 100644 docs/plans/purpose-separated-standards-engine/reports/performance-nested-increment/source-binding.json create mode 100644 docs/plans/purpose-separated-standards-engine/reports/performance-nested-increment/structural.json create mode 100644 docs/plans/purpose-separated-standards-engine/reports/performance-nested-increment/test-timings.csv create mode 100644 docs/plans/purpose-separated-standards-engine/reports/performance-nested-increment/verification.json create mode 100644 tools/standards_engine/standards_engine/operation_materials.py create mode 100644 tools/standards_engine/tests/test_nested_materials.py diff --git a/docs/plans/purpose-separated-standards-engine/reports/performance-nested-increment.md b/docs/plans/purpose-separated-standards-engine/reports/performance-nested-increment.md new file mode 100644 index 00000000..8dcb17be --- /dev/null +++ b/docs/plans/purpose-separated-standards-engine/reports/performance-nested-increment.md @@ -0,0 +1,183 @@ +# Nested proposal-material reuse — implementation and evidence + +**Status:** implemented and locally verified; supported installed qualification and independent review are not claimed for this new increment. + +**Branch:** `implementation/purpose-separated-standards-engine` +**Base:** `63338566110bf8de9d0a84fddf3322cc6bb6c0c9` +**Scope:** complete operation-local reuse through focused proposal creation, revision, analysis, and resolution. The user separately reported successful installed qualification and independent review of the preceding increment; that report is not new verification of this candidate. + +## Objective and admission + +The [performance design](standards-engine-performance-report/design.md) already admits passing verified immutable inputs through one operation. This increment closes the measured gap between focused workflow preflight, prospective revision validation, and native analysis. It preserves separate decision evaluations and current authority observations. Existing normative guidance, public schemas, persisted formats, dependency locks, Identity-v2, capture replay, and installed configuration remain unchanged. + +The write set is the Engine's operation-material owner, authoring preparation boundary, focused workflow composition, corresponding tests, `PURPOSE-SEPARATION.md`, this report/evidence, and the generated verification-input manifest. Authoring's preparation dependency becomes invocation-owned rather than Engine-lifetime; its durable root coordination remains in the existing Authoring module. All in-repository callers are updated together. This is an internal Python composition change, not a new wire or persistence contract. + +## Composed design and proof lifetime + +The only added helper, `ProposalMaterials`, owns one verified base and the latest exact proposal projection. A focused invocation passes it explicitly. The Engine retains no scope field, and no global registry, context variable, cross-call cache, database or transport lifetime carries the scope across calls. One complete immutable projection replaces another when the revision changes. During a revision build the previous and current working values may coexist transiently; this is operation working memory, not an accumulating cache. + +`AuthoringModule` receives its `ProposalPreparation` collaborator per create/revise invocation. That interface contains only prospective validation and exact base-repository path observation. The module still owns proposal identity, durable root creation, current-head checks, conditional advancement, and publication failure behavior. The Engine composes the concrete preparation and computation. Test-only fixture preparation preserves the prior low-level tests' synthetic-corpus boundary; real Engine tests exercise the production collaborator. + +The snapshot content is fully verified once before its first use in an operation. Every reuse observes current snapshot lifecycle. Analysis loads and validates stored revisions at its existing boundaries, and the preflight and pre-/post-submission evaluations remain independent. Authorization and provider decisions are never retained in the helper. A new public invocation, including reentrant invocation on the same Engine, starts with its own helper and durable material checks. + +Public authoring entrypoints admit purpose before entering private composed helpers. Internal helpers carry the already admitted scope; the purpose contract and generated public schemas are unchanged. Review, verification, application, and recovery receive their existing fresh material/authority observations rather than a borrowed focused scope. Capture performs the independent live and frozen compilations before any proposal-material reuse. + +The helper clears its retained values on successful return, rejection, or an exception. There is one coherent owner for this proof lifetime. Removing it would distribute repeated derivation and its lifetime rules back across prospective validation, preflight, and analysis; it contains an actual measured responsibility rather than introducing a general cache framework. + +## Behavioral acceptance + +| Claim | Deciding evidence | State | +| --- | --- | --- | +| Reference and normative `propose` reuse one verified base and one projection through validation/analysis | Real disposable Git/SQLite workflow plus counted material operations | Passed locally | +| `revise` uses one base and independently builds the previous and new projections | Revision-content, stale-context and operation-count regressions | Passed locally | +| Focused resolution retains three evaluations while sharing input material | Preflight plus pre-/post-submission assertions | Passed locally | +| Current lifecycle, head and evidence decisions retain authority | Quarantine-during-authorization, competing-head and invalid-evidence regressions | Passed locally | +| Other invocations and purposes cannot borrow this scope | Separate invocation, public reentry, application-denial and cleanup regressions | Passed locally | +| Capture and publication/recovery remain correct | Existing real-boundary suites and explicit independent-capture regression | Passed locally | + +## Measurements + +Three complete serial sweeps per implementation used the same committed fixture +source at `63338566`. All 48 observations share the same captured content ID, +434 files and **3,733,667 source bytes**. The final candidate's production-source +hashes match the tested candidate. Baseline and candidate used the same Python, +dependency installation and host. No package-test processes ran concurrently +with the final timing comparison. The public facade and snapshot were already +constructed; fixture creation and capture are outside each operation timing. + +| Operation | Baseline median | Candidate median | Ratio | +| --- | ---: | ---: | ---: | +| Reference `propose` | 3.674 s | 1.595 s | 2.30x | +| Normative `propose` | 3.790 s | 1.620 s | 2.34x | +| Focused `revise` | 5.719 s | 2.878 s | 1.99x | +| Focused `resolve_workflow` | 3.324 s | 1.739 s | 1.91x | +| Focused `analyze` from a draft revision | 1.618 s | 1.650 s | 0.98x | +| Native `analyze_proposal` | 1.660 s | 1.525 s | 1.09x | +| `workflow_status` | 1.619 s | 1.590 s | 1.02x | +| `query_proposal` | 1.493 s | 1.568 s | 0.95x | + +The first four rows address measured redundant derivation. The last four are +controls: their material-operation counts are unchanged, and these small samples +do not establish meaningful speedups or regressions for them. In particular, +focused `analyze` is valid from a draft revision context; it is not a request to +re-analyze a completed workflow context. Three samples establish medians and +ranges, not tail-latency service levels. No installed Codex/SDK or full-suite +speedup is inferred from these native-facade measurements. + +| Operation | Durable content loads | Full compiler calls | Proposal projections | Decision evaluations | +| --- | --- | --- | --- | --- | +| Reference `propose` | 3 → 1 | 4 → 2 | 2 → 1 | 1 → 1 | +| Normative `propose` | 3 → 1 | 4 → 2 | 2 → 1 | 1 → 1 | +| Focused `revise` | 3 → 1 | 6 → 3 | 3 → 2 | 2 → 2 | +| Focused `resolve_workflow` | 2 → 1 | 4 → 2 | 2 → 1 | 3 → 3 | + +Full compiler counts include the base and changed candidate compilation. +Resolution retains **three** separate evaluations: focused preflight and the +pre-/post-submission states. A revised proposal retains independent old/new +candidate compilations. Every new public call obtains fresh verified material; +no measured result depends on cross-call state. The implicit-capture regression +separately proves both independent record/replay compiler passes. + +Instrumented spans are inclusive and are not added together. Actual wall times, +ranges, CPU observations and the fixed corpus binding are retained in: + +- [Comparison CSV](performance-nested-increment/comparison.csv). +- [Baseline observations](performance-nested-increment/paired-baseline.jsonl) and + [candidate observations](performance-nested-increment/paired-candidate.jsonl). +- [Environment and measured source hashes](performance-nested-increment/measurement-environment.json). +- [Reproduction driver](performance-nested-increment/measure_nested.py). + +The helper's retained population is one base and the latest projection, verified +by ownership and cleanup regressions. Peak process RSS was not measured for this +increment; transient compiler working memory is not represented as a byte-budget +claim. + +### Reproducing the paired comparison + +Use separate baseline/candidate implementation checkouts and one common baseline +fixture checkout. Run each command serially with a new output filename: + +```bash +python /path/to/measure_nested.py --source /path/to/baseline \ + --fixture-source /path/to/baseline --output /path/to/baseline.jsonl --repeats 3 +python /path/to/measure_nested.py --source /path/to/candidate \ + --fixture-source /path/to/baseline --output /path/to/candidate.jsonl --repeats 3 +``` + +The driver changes only disposable fixtures and the selected evidence file. It +checks the expected successful/pending outcome for each operation and counts the +same real implementation boundaries on both sides. The normative fixture is +synthetic test content, not a published standards change. + +## Regression and structural evidence + +All **177 Engine tests passed** exactly once in the final campaign. They ran in +18 isolated per-module Python processes, with at most three modules concurrent; +each test module owned independent fixture repositories and stores. This is full +discovered test-population coverage, not a claim of one serial ordered suite run. +The qualification repository was a private Git CLI candidate +`20f05cd5800a5a27feb69bd2df2f1bc5db9b5879` with its own accepted `main`. +Its changed Python sources are byte-identical to the delivered implementation. + +The eleven supporting package suites ran **421 tests: 420 passed and one existing +interpreter-dependent skip**. These covered Graph, Repository Git, Analysis, +Applicability, Contracts, Standards Graph, Identity, Metadata, Policy Impact, +Snapshots and the Verifier. Existing assertions and test populations were +preserved. Low-level Authoring fixtures now supply the invocation-owned +preparation interface; their synthetic validation scope is not claimed as real +Engine preparation coverage. + +The new eleven regressions cover coherent creation/revision, exact operation +counts, invalid evidence, snapshot quarantine during authorization, a competing +proposal head after preflight, fresh subsequent reads, independent public +reentry, cleanup after exceptions, independent capture passes, and denial of +application-purpose authoring. Existing real Git/SQLite publication, cold +recovery, coordinated supporting-content publication, native/CLI/MCP transport, +and purpose-projection tests all passed in the final campaign. + +[The verification inventory](performance-nested-increment/verification.json) +retains per-module/package outcomes. [Per-test timings](performance-nested-increment/test-timings.csv) +include setup/body/teardown but were measured under concurrent test execution; +they are diagnostic, not paired performance evidence. +[The source binding](performance-nested-increment/source-binding.json) records +exact tested hashes and a separate Python 3.11 grammar check. Grammar acceptance +is not execution on Python 3.11. + +The final structural checkpoint is recorded separately in +[structural evidence](performance-nested-increment/structural.json). Its checks +validate declared structure and generated freshness, not prose quality or the +functional test results. Raw test-process logs are included in the delivery +archive's `evidence/qualification/` directory. + +## Qualification boundary + +The local runtime is Python 3.13.5, Git 2.47.3 and SQLite 3.46.1. The repository supports Python 3.11/3.12. Local `rpds-py` is 2026.5.1 rather than locked 2026.6.3. The lock and support declarations remain unchanged. This candidate needs its own supported locked run and independent review before claiming installed acceptance; the user's qualification of `63338566` does not transfer automatically. The official MCP SDK and configured Codex installation are not present here. + +The source reconstruction preserves local accepted `main` at `366c1d9`. Disposable test clones place their own local `main` at a candidate. The user's working tree, installed database, archived proposals and Codex configuration are outside the write set. + +Cross-call compilation retention, selective compilation, SQLite changes and transport-lifetime changes remain outside this increment. Native calls that already derive their material once are expected controls, not promised speedups. + +## Review and integration disposition + +The implementation retains the existing public schema, persisted state, +identity framing, accepted-main capture and two-pass replay, purpose projection, +and per-call Engine/store lifetime. Source comparison confirms normative +standards, registered prompts/templates, public contracts, dependency locks, +and the previous Identity/Git performance implementation are unchanged. + +The internal `AuthoringModule` preparation collaborator is now supplied per +create/revise invocation. All in-repository callers were updated together; old +constructor callback parameters and their unused Engine adapters were removed. +This is a coordinated internal Python interface replacement, not a runtime +compatibility layer. The previous accepted plan is not reopened or relabeled. + +This increment closes nested focused proposal/analysis material reuse at the +implemented boundaries. Review, verification, application and recovery retain +fresh existing observations; cross-call compilation and transport-lifetime +changes remain separate conditional work. The complete broader design is not +claimed to be implemented. + +The final Git CLI commit and exact tree are identified by the delivery manifest. +The supplied incremental bundle preserves that commit; the patch independently +reproduces its tree. Remote integration and installed acceptance are separate +from the local evidence above. diff --git a/docs/plans/purpose-separated-standards-engine/reports/performance-nested-increment/comparison.csv b/docs/plans/purpose-separated-standards-engine/reports/performance-nested-increment/comparison.csv new file mode 100644 index 00000000..1f4756a1 --- /dev/null +++ b/docs/plans/purpose-separated-standards-engine/reports/performance-nested-increment/comparison.csv @@ -0,0 +1,9 @@ +operation,samples_per_side,baseline_median_s,baseline_min_s,baseline_max_s,baseline_content_loads,baseline_full_compiles,baseline_proposal_projections,baseline_decision_evaluations,candidate_median_s,candidate_min_s,candidate_max_s,candidate_content_loads,candidate_full_compiles,candidate_proposal_projections,candidate_decision_evaluations,speedup +propose_reference,3,3.674002825999878,3.649184873999957,3.6872312349998992,3,4,2,1,1.5947095950000403,1.5746108480000203,1.6583738489998723,1,2,1,1,2.3038695180107607 +analyze_context,3,1.6178395080000882,1.6172349200001008,1.630896802000052,1,2,1,1,1.650389443999984,1.5886815350002053,1.6621399299999666,1,2,1,1,0.9802774211152213 +analyze_proposal,3,1.6601961949997985,1.5068632980000984,1.6868983919998755,1,2,1,1,1.5251470459998018,1.4919322009998268,1.6360473550000734,1,2,1,1,1.0885482808718068 +workflow_status,3,1.619377656000097,1.5673715269999775,1.6993095929999527,1,2,1,1,1.5904890079998495,1.543877928000029,1.7386147489999075,1,2,1,1,1.0181633748205383 +query_proposal,3,1.493301190000011,1.471018494999953,1.502974649999942,1,2,1,0,1.5677220319998924,1.5256402469999557,1.6732436560000679,1,2,1,0,0.9525293129261282 +revise_reference,3,5.719463563999852,5.617175153000062,5.843801905999953,3,6,3,2,2.8782149990001926,2.768210837999959,2.890247047999992,1,3,2,2,1.9871564723228203 +propose_normative,3,3.7901937999999973,3.7877159180000035,3.8149101540000174,3,4,2,1,1.620197017999999,1.601183077000087,1.6473141619999296,1,2,1,1,2.3393413010219475 +resolve_workflow,3,3.32356278799989,3.283968767000033,3.4416641160000836,2,4,2,3,1.739495591999912,1.7326738969998132,1.7569060900000295,1,2,1,3,1.9106474332474528 diff --git a/docs/plans/purpose-separated-standards-engine/reports/performance-nested-increment/measure_nested.py b/docs/plans/purpose-separated-standards-engine/reports/performance-nested-increment/measure_nested.py new file mode 100644 index 00000000..fd038ad8 --- /dev/null +++ b/docs/plans/purpose-separated-standards-engine/reports/performance-nested-increment/measure_nested.py @@ -0,0 +1,181 @@ +"""Measure real nested authoring operations against one explicit fixture source. + +Run baseline and candidate serially, with separate ``--source`` checkouts and +one common ``--fixture-source`` checkout. The source repositories remain +unchanged; all proposal and snapshot writes use disposable Git/SQLite fixtures. +""" +from __future__ import annotations + +import argparse +from collections import Counter +from contextlib import ExitStack +import json +from pathlib import Path +import sys +import tempfile +import time +from typing import Callable, TextIO +from unittest.mock import patch + + +def main() -> None: + parser = argparse.ArgumentParser(description=__doc__) + parser.add_argument("--source", type=Path, required=True) + parser.add_argument("--fixture-source", type=Path, required=True) + parser.add_argument("--output", type=Path, required=True) + parser.add_argument("--repeats", type=int, default=3) + arguments = parser.parse_args() + if arguments.repeats < 1: + parser.error("--repeats must be positive") + source = arguments.source.resolve(strict=True) + fixture_source = arguments.fixture_source.resolve(strict=True) + sys.path.insert(0, str(source)) + + from tools.standards_analysis.standards_analysis import AnalysisExecutionContext + from tools.standards_engine.standards_engine import AgentToolFacade, StandardsEngine + from tools.standards_engine.standards_engine import _generated_contract as contract + from tools.standards_engine.standards_engine.logical_authoring import LogicalAuthoringCompiler + from tools.standards_engine.standards_engine.tools import LocalAlwaysAllowAuthorizer, _contracts + from tools.standards_engine.tests import test_agent_workflow as fixtures + from tools.standards_snapshots.standards_snapshots import SnapshotModule + + # Only fixture preparation uses this location. The imported implementation + # remains the separately selected --source revision. + fixtures.ROOT = fixture_source + + def run_trial(trial: int, stream: TextIO) -> None: + with tempfile.TemporaryDirectory(prefix="nested-operation-timing-") as temporary: + root = Path(temporary) / "repository" + fixtures.prepare_repository(root) + with StandardsEngine.open_repository( + root, purpose="authoring", + execution_context=AnalysisExecutionContext(LocalAlwaysAllowAuthorizer(root)), + ) as engine: + facade = AgentToolFacade(engine, _contracts(root)) + created = facade.create_snapshot({"kind": "create-snapshot"}) + if created["kind"] != "create-snapshot-result": + raise AssertionError(created) + snapshot = created["snapshot"]["snapshot"] + identity = engine._snapshot_id(contract.SnapshotHandle.from_value(snapshot)) + capture = engine._snapshots.load_content(identity) + dimensions = { + "files": len(capture.files), + "source_bytes": sum(len(item.content) for item in capture.files), + "content_id": str(engine._snapshots._content_id(capture)), + "source_revision": capture.source_revision, + } + + def measure( + name: str, expected: str, invoke: Callable[[], dict], + ) -> dict: + counts: Counter[str] = Counter() + spans: Counter[str] = Counter() + with ExitStack() as patches: + for owner, method in ( + (StandardsEngine, "_compiled_snapshot"), + (StandardsEngine, "_proposal_projection"), + (StandardsEngine, "_evaluate"), + (LogicalAuthoringCompiler, "compile"), + (SnapshotModule, "load_content"), + ): + original = getattr(owner, method) + key = owner.__name__ + "." + method + + def timed(self, *args, _original=original, _key=key, **kwargs): + counts[_key] += 1 + started = time.perf_counter() + try: + return _original(self, *args, **kwargs) + finally: + spans[_key] += time.perf_counter() - started + + patches.enter_context(patch.object(owner, method, timed)) + + original_compile = StandardsEngine._compile + + def timed_compile(content): + key = "StandardsEngine._compile" + counts[key] += 1 + started = time.perf_counter() + try: + return original_compile(content) + finally: + spans[key] += time.perf_counter() - started + + patches.enter_context(patch.object( + StandardsEngine, "_compile", staticmethod(timed_compile), + )) + # The logical compiler captured its callback at construction; + # instrument that callback as well as direct Engine compiles. + patches.enter_context(patch.object( + engine._logical_authoring, "_compile_authorities", timed_compile, + )) + started = time.perf_counter() + cpu = time.process_time() + result = invoke() + elapsed_cpu = time.process_time() - cpu + elapsed = time.perf_counter() - started + observed = result.get("status", result["kind"]) + if observed != expected: + raise AssertionError((name, expected, result)) + record = { + "corpus": dimensions, "trial": trial, "operation": name, + "seconds": elapsed, "cpu_seconds": elapsed_cpu, + "status": observed, "counts": dict(counts), + "inclusive_seconds": dict(spans), + } + encoded = json.dumps(record) + stream.write(encoded + "\n") + stream.flush() + print(encoded, flush=True) + return result + + reference = measure("propose_reference", "complete", lambda: facade.propose({ + "snapshot": snapshot, + "change_set": fixtures.reference_change(root, "nestedref"), + })) + measure("analyze_context", "complete", lambda: facade.analyze({ + "context": reference["revision"], + })) + measure("analyze_proposal", "complete", lambda: facade.analyze_proposal({ + "revision": reference["revision"], + })) + measure("workflow_status", "complete", lambda: facade.workflow_status({ + "context": reference["context"], + })) + measure("query_proposal", "proposal-read-result", lambda: facade.query_proposal({ + "revision": reference["revision"], + "request": {"kind": "read", "target": "reference.testing.nestedref"}, + })) + measure("revise_reference", "complete", lambda: facade.revise({ + "context": reference["context"], + "change_set": fixtures.reference_change(root, "nestedref", revision=True), + })) + change = fixtures.reference_change(root, "nestednorm") + change["edits"][0]["standard"].update( + id="topic.nested-normative-fixture", role="topic", level="MUST", + body="Resolve this isolated semantic impact explicitly.\n", + ) + normative = measure("propose_normative", "needs-action", lambda: facade.propose({ + "snapshot": snapshot, "change_set": change, + })) + obligation = normative["outcome"]["obligations"][0] + submission = { + "kind": "impact-disposition", "obligation": obligation["handle"], + "result": "confirmed", + "rationale": "The isolated scope is explicitly acknowledged.", + "evidence": [fixtures.evidence(root)], + "fingerprint": obligation["fingerprint"], + } + measure("resolve_workflow", "complete", lambda: facade.resolve_workflow({ + "context": normative["context"], "submission": submission, + })) + + # Exclusive creation protects an earlier measurement from accidental overwrite. + with arguments.output.open("x", encoding="utf-8") as stream: + for trial in range(arguments.repeats): + run_trial(trial, stream) + + +if __name__ == "__main__": + main() diff --git a/docs/plans/purpose-separated-standards-engine/reports/performance-nested-increment/measurement-environment.json b/docs/plans/purpose-separated-standards-engine/reports/performance-nested-increment/measurement-environment.json new file mode 100644 index 00000000..18758647 --- /dev/null +++ b/docs/plans/purpose-separated-standards-engine/reports/performance-nested-increment/measurement-environment.json @@ -0,0 +1,32 @@ +{ + "baseline_revision": "63338566110bf8de9d0a84fddf3322cc6bb6c0c9", + "candidate_source_hashes": { + "tools/standards_engine/standards_engine/agent_workflow.py": "c133d520bc82c951e6f9be3ee6e6b7ca2ecdc7cde4c38b8c4ee1a42533a494d9", + "tools/standards_engine/standards_engine/authoring.py": "6761c6b11a3904052b873c0db8d83127bb8080f0dc73fff3c6a2d26620bcd538", + "tools/standards_engine/standards_engine/engine.py": "1c40aeafc3b247b8acded59b4b9fd9bb99c8eb00d59b795f8b60cce03243a196", + "tools/standards_engine/standards_engine/operation_materials.py": "fff7a6cba434679b8d95f89d1eb17e25013b9887047c2dd7ab632d3b4d84a6fe", + "tools/standards_engine/tests/test_agent_workflow.py": "d429509a1fead84d65a885d098e9dd5d8b78ca8e975b2a4727c3041ae01c81f6", + "tools/standards_engine/tests/test_authoring.py": "7246399d408485f0f135b4f07b964bc9e2c6c1e0ff6d55a970d5e5aef0cd8d37", + "tools/standards_engine/tests/test_nested_materials.py": "ab107415318aba18acdef76bc5da969ff4343317beb3097872e7f7acf5901020" + }, + "captured_corpus": { + "content_id": "snapshot-content:sha256:b4bd401f3eec9938044b0971b0804c131de8b45fae3fbc764b92fa63ac446a35", + "files": 434, + "source_bytes": 3733667, + "source_revision": "63338566110bf8de9d0a84fddf3322cc6bb6c0c9" + }, + "python": "3.13.5 (main, Jul 15 2026, 20:25:40) [GCC 14.2.0]", + "sqlite": "3.46.1", + "git": "git version 2.47.3", + "platform": "Linux-6.18.44-x86_64-with-glibc2.41", + "dependencies": { + "attrs": "26.1.0", + "jsonschema": "4.26.0", + "referencing": "0.37.0", + "jsonschema-specifications": "2025.9.1", + "rpds-py": "2026.5.1", + "typing-extensions": "4.16.0" + }, + "method": "Three complete sequences per side, baseline then candidate serially. Full regression/package processes finished before these measurements. Both sides use the exact committed baseline as fixture source. Operation wall times exclude fixture capture, imports, and facade setup. Span timings are inclusive. The final production-source hashes match the qualification candidate and measured candidate.", + "probe_sha256": "9c49f0c4136072888d5f0c54c622f31e024f2cd6319cd11222e5e24db7daf3df" +} diff --git a/docs/plans/purpose-separated-standards-engine/reports/performance-nested-increment/paired-baseline.jsonl b/docs/plans/purpose-separated-standards-engine/reports/performance-nested-increment/paired-baseline.jsonl new file mode 100644 index 00000000..9ac22f54 --- /dev/null +++ b/docs/plans/purpose-separated-standards-engine/reports/performance-nested-increment/paired-baseline.jsonl @@ -0,0 +1,24 @@ +{"corpus": {"files": 434, "source_bytes": 3733667, "content_id": "snapshot-content:sha256:b4bd401f3eec9938044b0971b0804c131de8b45fae3fbc764b92fa63ac446a35", "source_revision": "63338566110bf8de9d0a84fddf3322cc6bb6c0c9"}, "trial": 0, "operation": "propose_reference", "seconds": 3.674002825999878, "cpu_seconds": 3.4215265629999996, "status": "complete", "counts": {"SnapshotModule.load_content": 3, "StandardsEngine._proposal_projection": 2, "StandardsEngine._compiled_snapshot": 2, "StandardsEngine._compile": 4, "LogicalAuthoringCompiler.compile": 2, "StandardsEngine._evaluate": 1}, "inclusive_seconds": {"SnapshotModule.load_content": 1.8024982290000935, "StandardsEngine._compile": 0.7196989200001553, "StandardsEngine._compiled_snapshot": 1.5683621830000902, "LogicalAuthoringCompiler.compile": 1.3709204569997837, "StandardsEngine._proposal_projection": 2.1544547089999924, "StandardsEngine._evaluate": 0.02863323299993681}} +{"corpus": {"files": 434, "source_bytes": 3733667, "content_id": "snapshot-content:sha256:b4bd401f3eec9938044b0971b0804c131de8b45fae3fbc764b92fa63ac446a35", "source_revision": "63338566110bf8de9d0a84fddf3322cc6bb6c0c9"}, "trial": 0, "operation": "analyze_context", "seconds": 1.6172349200001008, "cpu_seconds": 1.4937901260000004, "status": "complete", "counts": {"StandardsEngine._compiled_snapshot": 1, "SnapshotModule.load_content": 1, "StandardsEngine._compile": 2, "StandardsEngine._proposal_projection": 1, "LogicalAuthoringCompiler.compile": 1, "StandardsEngine._evaluate": 1}, "inclusive_seconds": {"SnapshotModule.load_content": 0.6053373730001113, "StandardsEngine._compile": 0.3667110799999591, "StandardsEngine._compiled_snapshot": 0.7908745920001365, "LogicalAuthoringCompiler.compile": 0.6772320169998238, "StandardsEngine._proposal_projection": 0.6772464079999736, "StandardsEngine._evaluate": 0.029460870999855615}} +{"corpus": {"files": 434, "source_bytes": 3733667, "content_id": "snapshot-content:sha256:b4bd401f3eec9938044b0971b0804c131de8b45fae3fbc764b92fa63ac446a35", "source_revision": "63338566110bf8de9d0a84fddf3322cc6bb6c0c9"}, "trial": 0, "operation": "analyze_proposal", "seconds": 1.6868983919998755, "cpu_seconds": 1.5607464830000009, "status": "complete", "counts": {"StandardsEngine._compiled_snapshot": 1, "SnapshotModule.load_content": 1, "StandardsEngine._compile": 2, "StandardsEngine._proposal_projection": 1, "LogicalAuthoringCompiler.compile": 1, "StandardsEngine._evaluate": 1}, "inclusive_seconds": {"SnapshotModule.load_content": 0.6188985359999606, "StandardsEngine._compile": 0.5144663279997985, "StandardsEngine._compiled_snapshot": 0.9382945330000894, "LogicalAuthoringCompiler.compile": 0.6972169080002004, "StandardsEngine._proposal_projection": 0.6972303969998848, "StandardsEngine._evaluate": 0.029845571000123527}} +{"corpus": {"files": 434, "source_bytes": 3733667, "content_id": "snapshot-content:sha256:b4bd401f3eec9938044b0971b0804c131de8b45fae3fbc764b92fa63ac446a35", "source_revision": "63338566110bf8de9d0a84fddf3322cc6bb6c0c9"}, "trial": 0, "operation": "workflow_status", "seconds": 1.619377656000097, "cpu_seconds": 1.4954455919999994, "status": "complete", "counts": {"StandardsEngine._evaluate": 1, "StandardsEngine._compiled_snapshot": 1, "SnapshotModule.load_content": 1, "StandardsEngine._compile": 2, "StandardsEngine._proposal_projection": 1, "LogicalAuthoringCompiler.compile": 1}, "inclusive_seconds": {"SnapshotModule.load_content": 0.6177574719999939, "StandardsEngine._compile": 0.37134210299996084, "StandardsEngine._compiled_snapshot": 0.8017321279999123, "LogicalAuthoringCompiler.compile": 0.7126280239999687, "StandardsEngine._proposal_projection": 0.7126394409999648, "StandardsEngine._evaluate": 1.5640194920001704}} +{"corpus": {"files": 434, "source_bytes": 3733667, "content_id": "snapshot-content:sha256:b4bd401f3eec9938044b0971b0804c131de8b45fae3fbc764b92fa63ac446a35", "source_revision": "63338566110bf8de9d0a84fddf3322cc6bb6c0c9"}, "trial": 0, "operation": "query_proposal", "seconds": 1.502974649999942, "cpu_seconds": 1.3797098240000008, "status": "proposal-read-result", "counts": {"StandardsEngine._proposal_projection": 1, "StandardsEngine._compiled_snapshot": 1, "SnapshotModule.load_content": 1, "StandardsEngine._compile": 2, "LogicalAuthoringCompiler.compile": 1}, "inclusive_seconds": {"SnapshotModule.load_content": 0.613092141999914, "StandardsEngine._compile": 0.3651336629998241, "StandardsEngine._compiled_snapshot": 0.8005898440001147, "LogicalAuthoringCompiler.compile": 0.6836297490001471, "StandardsEngine._proposal_projection": 1.485536436000075}} +{"corpus": {"files": 434, "source_bytes": 3733667, "content_id": "snapshot-content:sha256:b4bd401f3eec9938044b0971b0804c131de8b45fae3fbc764b92fa63ac446a35", "source_revision": "63338566110bf8de9d0a84fddf3322cc6bb6c0c9"}, "trial": 0, "operation": "revise_reference", "seconds": 5.843801905999953, "cpu_seconds": 5.177740318, "status": "complete", "counts": {"StandardsEngine._evaluate": 2, "StandardsEngine._compiled_snapshot": 3, "SnapshotModule.load_content": 3, "StandardsEngine._compile": 6, "StandardsEngine._proposal_projection": 3, "LogicalAuthoringCompiler.compile": 3}, "inclusive_seconds": {"SnapshotModule.load_content": 1.984318151000025, "StandardsEngine._compile": 1.1032644969998273, "StandardsEngine._compiled_snapshot": 2.549934014999735, "LogicalAuthoringCompiler.compile": 3.053520330000083, "StandardsEngine._proposal_projection": 3.9105127349996565, "StandardsEngine._evaluate": 1.5774047700001574}} +{"corpus": {"files": 434, "source_bytes": 3733667, "content_id": "snapshot-content:sha256:b4bd401f3eec9938044b0971b0804c131de8b45fae3fbc764b92fa63ac446a35", "source_revision": "63338566110bf8de9d0a84fddf3322cc6bb6c0c9"}, "trial": 0, "operation": "propose_normative", "seconds": 3.7877159180000035, "cpu_seconds": 3.5384918560000003, "status": "needs-action", "counts": {"SnapshotModule.load_content": 3, "StandardsEngine._proposal_projection": 2, "StandardsEngine._compiled_snapshot": 2, "StandardsEngine._compile": 4, "LogicalAuthoringCompiler.compile": 2, "StandardsEngine._evaluate": 1}, "inclusive_seconds": {"SnapshotModule.load_content": 1.8500084879999577, "StandardsEngine._compile": 0.7566160250000848, "StandardsEngine._compiled_snapshot": 1.6361891770000057, "LogicalAuthoringCompiler.compile": 1.403767065000011, "StandardsEngine._proposal_projection": 2.240964490000124, "StandardsEngine._evaluate": 0.032001970999999685}} +{"corpus": {"files": 434, "source_bytes": 3733667, "content_id": "snapshot-content:sha256:b4bd401f3eec9938044b0971b0804c131de8b45fae3fbc764b92fa63ac446a35", "source_revision": "63338566110bf8de9d0a84fddf3322cc6bb6c0c9"}, "trial": 0, "operation": "resolve_workflow", "seconds": 3.4416641160000836, "cpu_seconds": 3.1937477459999997, "status": "complete", "counts": {"StandardsEngine._evaluate": 3, "StandardsEngine._compiled_snapshot": 2, "SnapshotModule.load_content": 2, "StandardsEngine._compile": 4, "StandardsEngine._proposal_projection": 2, "LogicalAuthoringCompiler.compile": 2}, "inclusive_seconds": {"SnapshotModule.load_content": 1.2457648499998868, "StandardsEngine._compile": 0.8991972469998473, "StandardsEngine._compiled_snapshot": 1.637175008999975, "LogicalAuthoringCompiler.compile": 1.5547966289996111, "StandardsEngine._proposal_projection": 1.5548182920001636, "StandardsEngine._evaluate": 1.6525423800001136}} +{"corpus": {"files": 434, "source_bytes": 3733667, "content_id": "snapshot-content:sha256:b4bd401f3eec9938044b0971b0804c131de8b45fae3fbc764b92fa63ac446a35", "source_revision": "63338566110bf8de9d0a84fddf3322cc6bb6c0c9"}, "trial": 1, "operation": "propose_reference", "seconds": 3.6872312349998992, "cpu_seconds": 3.4398662500000015, "status": "complete", "counts": {"SnapshotModule.load_content": 3, "StandardsEngine._proposal_projection": 2, "StandardsEngine._compiled_snapshot": 2, "StandardsEngine._compile": 4, "LogicalAuthoringCompiler.compile": 2, "StandardsEngine._evaluate": 1}, "inclusive_seconds": {"SnapshotModule.load_content": 1.802503373000036, "StandardsEngine._compile": 0.7363866789996791, "StandardsEngine._compiled_snapshot": 1.5785903939997752, "LogicalAuthoringCompiler.compile": 1.3670817039999292, "StandardsEngine._proposal_projection": 2.1590484180001113, "StandardsEngine._evaluate": 0.028563259000065955}} +{"corpus": {"files": 434, "source_bytes": 3733667, "content_id": "snapshot-content:sha256:b4bd401f3eec9938044b0971b0804c131de8b45fae3fbc764b92fa63ac446a35", "source_revision": "63338566110bf8de9d0a84fddf3322cc6bb6c0c9"}, "trial": 1, "operation": "analyze_context", "seconds": 1.6178395080000882, "cpu_seconds": 1.4966375659999969, "status": "complete", "counts": {"StandardsEngine._compiled_snapshot": 1, "SnapshotModule.load_content": 1, "StandardsEngine._compile": 2, "StandardsEngine._proposal_projection": 1, "LogicalAuthoringCompiler.compile": 1, "StandardsEngine._evaluate": 1}, "inclusive_seconds": {"SnapshotModule.load_content": 0.6130055270000412, "StandardsEngine._compile": 0.36002649299985023, "StandardsEngine._compiled_snapshot": 0.791495871999814, "LogicalAuthoringCompiler.compile": 0.6770630430000892, "StandardsEngine._proposal_projection": 0.677076081999985, "StandardsEngine._evaluate": 0.02856807500006653}} +{"corpus": {"files": 434, "source_bytes": 3733667, "content_id": "snapshot-content:sha256:b4bd401f3eec9938044b0971b0804c131de8b45fae3fbc764b92fa63ac446a35", "source_revision": "63338566110bf8de9d0a84fddf3322cc6bb6c0c9"}, "trial": 1, "operation": "analyze_proposal", "seconds": 1.6601961949997985, "cpu_seconds": 1.5363898719999938, "status": "complete", "counts": {"StandardsEngine._compiled_snapshot": 1, "SnapshotModule.load_content": 1, "StandardsEngine._compile": 2, "StandardsEngine._proposal_projection": 1, "LogicalAuthoringCompiler.compile": 1, "StandardsEngine._evaluate": 1}, "inclusive_seconds": {"SnapshotModule.load_content": 0.6008499590000156, "StandardsEngine._compile": 0.5017190540002048, "StandardsEngine._compiled_snapshot": 0.9201304690000143, "LogicalAuthoringCompiler.compile": 0.6895098689999486, "StandardsEngine._proposal_projection": 0.6895257429998765, "StandardsEngine._evaluate": 0.02982877600015854}} +{"corpus": {"files": 434, "source_bytes": 3733667, "content_id": "snapshot-content:sha256:b4bd401f3eec9938044b0971b0804c131de8b45fae3fbc764b92fa63ac446a35", "source_revision": "63338566110bf8de9d0a84fddf3322cc6bb6c0c9"}, "trial": 1, "operation": "workflow_status", "seconds": 1.5673715269999775, "cpu_seconds": 1.4437506350000007, "status": "complete", "counts": {"StandardsEngine._evaluate": 1, "StandardsEngine._compiled_snapshot": 1, "SnapshotModule.load_content": 1, "StandardsEngine._compile": 2, "StandardsEngine._proposal_projection": 1, "LogicalAuthoringCompiler.compile": 1}, "inclusive_seconds": {"SnapshotModule.load_content": 0.6094458330001089, "StandardsEngine._compile": 0.36195887899998525, "StandardsEngine._compiled_snapshot": 0.7957843130000128, "LogicalAuthoringCompiler.compile": 0.6692947380001897, "StandardsEngine._proposal_projection": 0.669306355000117, "StandardsEngine._evaluate": 1.513369621000038}} +{"corpus": {"files": 434, "source_bytes": 3733667, "content_id": "snapshot-content:sha256:b4bd401f3eec9938044b0971b0804c131de8b45fae3fbc764b92fa63ac446a35", "source_revision": "63338566110bf8de9d0a84fddf3322cc6bb6c0c9"}, "trial": 1, "operation": "query_proposal", "seconds": 1.471018494999953, "cpu_seconds": 1.3483179910000018, "status": "proposal-read-result", "counts": {"StandardsEngine._proposal_projection": 1, "StandardsEngine._compiled_snapshot": 1, "SnapshotModule.load_content": 1, "StandardsEngine._compile": 2, "LogicalAuthoringCompiler.compile": 1}, "inclusive_seconds": {"SnapshotModule.load_content": 0.6006749539999419, "StandardsEngine._compile": 0.355134014999976, "StandardsEngine._compiled_snapshot": 0.7815800589999071, "LogicalAuthoringCompiler.compile": 0.6716597790000378, "StandardsEngine._proposal_projection": 1.4545839219999834}} +{"corpus": {"files": 434, "source_bytes": 3733667, "content_id": "snapshot-content:sha256:b4bd401f3eec9938044b0971b0804c131de8b45fae3fbc764b92fa63ac446a35", "source_revision": "63338566110bf8de9d0a84fddf3322cc6bb6c0c9"}, "trial": 1, "operation": "revise_reference", "seconds": 5.719463563999852, "cpu_seconds": 5.101320093000005, "status": "complete", "counts": {"StandardsEngine._evaluate": 2, "StandardsEngine._compiled_snapshot": 3, "SnapshotModule.load_content": 3, "StandardsEngine._compile": 6, "StandardsEngine._proposal_projection": 3, "LogicalAuthoringCompiler.compile": 3}, "inclusive_seconds": {"SnapshotModule.load_content": 1.8137608269998964, "StandardsEngine._compile": 1.2377754170001936, "StandardsEngine._compiled_snapshot": 2.4910386609999478, "LogicalAuthoringCompiler.compile": 2.986857541000063, "StandardsEngine._proposal_projection": 3.7728679650001595, "StandardsEngine._evaluate": 1.557090435000191}} +{"corpus": {"files": 434, "source_bytes": 3733667, "content_id": "snapshot-content:sha256:b4bd401f3eec9938044b0971b0804c131de8b45fae3fbc764b92fa63ac446a35", "source_revision": "63338566110bf8de9d0a84fddf3322cc6bb6c0c9"}, "trial": 1, "operation": "propose_normative", "seconds": 3.7901937999999973, "cpu_seconds": 3.5422631719999984, "status": "needs-action", "counts": {"SnapshotModule.load_content": 3, "StandardsEngine._proposal_projection": 2, "StandardsEngine._compiled_snapshot": 2, "StandardsEngine._compile": 4, "LogicalAuthoringCompiler.compile": 2, "StandardsEngine._evaluate": 1}, "inclusive_seconds": {"SnapshotModule.load_content": 1.8485016229999474, "StandardsEngine._compile": 0.7680655680001109, "StandardsEngine._compiled_snapshot": 1.646496359000139, "LogicalAuthoringCompiler.compile": 1.3991748070000085, "StandardsEngine._proposal_projection": 2.2386465300000964, "StandardsEngine._evaluate": 0.0316383010001573}} +{"corpus": {"files": 434, "source_bytes": 3733667, "content_id": "snapshot-content:sha256:b4bd401f3eec9938044b0971b0804c131de8b45fae3fbc764b92fa63ac446a35", "source_revision": "63338566110bf8de9d0a84fddf3322cc6bb6c0c9"}, "trial": 1, "operation": "resolve_workflow", "seconds": 3.32356278799989, "cpu_seconds": 3.074996096999996, "status": "complete", "counts": {"StandardsEngine._evaluate": 3, "StandardsEngine._compiled_snapshot": 2, "SnapshotModule.load_content": 2, "StandardsEngine._compile": 4, "StandardsEngine._proposal_projection": 2, "LogicalAuthoringCompiler.compile": 2}, "inclusive_seconds": {"SnapshotModule.load_content": 1.2221175399999993, "StandardsEngine._compile": 0.8602818920003301, "StandardsEngine._compiled_snapshot": 1.5925824079999984, "LogicalAuthoringCompiler.compile": 1.4896154590003334, "StandardsEngine._proposal_projection": 1.489637860999892, "StandardsEngine._evaluate": 1.5821167380001953}} +{"corpus": {"files": 434, "source_bytes": 3733667, "content_id": "snapshot-content:sha256:b4bd401f3eec9938044b0971b0804c131de8b45fae3fbc764b92fa63ac446a35", "source_revision": "63338566110bf8de9d0a84fddf3322cc6bb6c0c9"}, "trial": 2, "operation": "propose_reference", "seconds": 3.649184873999957, "cpu_seconds": 3.401649458999998, "status": "complete", "counts": {"SnapshotModule.load_content": 3, "StandardsEngine._proposal_projection": 2, "StandardsEngine._compiled_snapshot": 2, "StandardsEngine._compile": 4, "LogicalAuthoringCompiler.compile": 2, "StandardsEngine._evaluate": 1}, "inclusive_seconds": {"SnapshotModule.load_content": 1.7941586219997134, "StandardsEngine._compile": 0.7240927740001553, "StandardsEngine._compiled_snapshot": 1.5643366129997958, "LogicalAuthoringCompiler.compile": 1.346907500999805, "StandardsEngine._proposal_projection": 2.1286771099998987, "StandardsEngine._evaluate": 0.029603522000115845}} +{"corpus": {"files": 434, "source_bytes": 3733667, "content_id": "snapshot-content:sha256:b4bd401f3eec9938044b0971b0804c131de8b45fae3fbc764b92fa63ac446a35", "source_revision": "63338566110bf8de9d0a84fddf3322cc6bb6c0c9"}, "trial": 2, "operation": "analyze_context", "seconds": 1.630896802000052, "cpu_seconds": 1.5060231819999998, "status": "complete", "counts": {"StandardsEngine._compiled_snapshot": 1, "SnapshotModule.load_content": 1, "StandardsEngine._compile": 2, "StandardsEngine._proposal_projection": 1, "LogicalAuthoringCompiler.compile": 1, "StandardsEngine._evaluate": 1}, "inclusive_seconds": {"SnapshotModule.load_content": 0.6111955979999948, "StandardsEngine._compile": 0.36187040399977377, "StandardsEngine._compiled_snapshot": 0.7921785859998636, "LogicalAuthoringCompiler.compile": 0.6893021819998921, "StandardsEngine._proposal_projection": 0.6893167040000208, "StandardsEngine._evaluate": 0.029125213000043004}} +{"corpus": {"files": 434, "source_bytes": 3733667, "content_id": "snapshot-content:sha256:b4bd401f3eec9938044b0971b0804c131de8b45fae3fbc764b92fa63ac446a35", "source_revision": "63338566110bf8de9d0a84fddf3322cc6bb6c0c9"}, "trial": 2, "operation": "analyze_proposal", "seconds": 1.5068632980000984, "cpu_seconds": 1.385431625999999, "status": "complete", "counts": {"StandardsEngine._compiled_snapshot": 1, "SnapshotModule.load_content": 1, "StandardsEngine._compile": 2, "StandardsEngine._proposal_projection": 1, "LogicalAuthoringCompiler.compile": 1, "StandardsEngine._evaluate": 1}, "inclusive_seconds": {"SnapshotModule.load_content": 0.6050485279999975, "StandardsEngine._compile": 0.356064139999944, "StandardsEngine._compiled_snapshot": 0.782121165000035, "LogicalAuthoringCompiler.compile": 0.6751279420000174, "StandardsEngine._proposal_projection": 0.6751413320000665, "StandardsEngine._evaluate": 0.028843515000062325}} +{"corpus": {"files": 434, "source_bytes": 3733667, "content_id": "snapshot-content:sha256:b4bd401f3eec9938044b0971b0804c131de8b45fae3fbc764b92fa63ac446a35", "source_revision": "63338566110bf8de9d0a84fddf3322cc6bb6c0c9"}, "trial": 2, "operation": "workflow_status", "seconds": 1.6993095929999527, "cpu_seconds": 1.576842505000002, "status": "complete", "counts": {"StandardsEngine._evaluate": 1, "StandardsEngine._compiled_snapshot": 1, "SnapshotModule.load_content": 1, "StandardsEngine._compile": 2, "StandardsEngine._proposal_projection": 1, "LogicalAuthoringCompiler.compile": 1}, "inclusive_seconds": {"SnapshotModule.load_content": 0.6021260570000777, "StandardsEngine._compile": 0.3673569340000995, "StandardsEngine._compiled_snapshot": 0.7854160580000098, "LogicalAuthoringCompiler.compile": 0.8159471559999929, "StandardsEngine._proposal_projection": 0.8159573610000734, "StandardsEngine._evaluate": 1.647071768999922}} +{"corpus": {"files": 434, "source_bytes": 3733667, "content_id": "snapshot-content:sha256:b4bd401f3eec9938044b0971b0804c131de8b45fae3fbc764b92fa63ac446a35", "source_revision": "63338566110bf8de9d0a84fddf3322cc6bb6c0c9"}, "trial": 2, "operation": "query_proposal", "seconds": 1.493301190000011, "cpu_seconds": 1.3628902260000046, "status": "proposal-read-result", "counts": {"StandardsEngine._proposal_projection": 1, "StandardsEngine._compiled_snapshot": 1, "SnapshotModule.load_content": 1, "StandardsEngine._compile": 2, "LogicalAuthoringCompiler.compile": 1}, "inclusive_seconds": {"SnapshotModule.load_content": 0.6058235279999735, "StandardsEngine._compile": 0.3806335379999837, "StandardsEngine._compiled_snapshot": 0.7943614749999597, "LogicalAuthoringCompiler.compile": 0.6802481129998341, "StandardsEngine._proposal_projection": 1.4759628360000079}} +{"corpus": {"files": 434, "source_bytes": 3733667, "content_id": "snapshot-content:sha256:b4bd401f3eec9938044b0971b0804c131de8b45fae3fbc764b92fa63ac446a35", "source_revision": "63338566110bf8de9d0a84fddf3322cc6bb6c0c9"}, "trial": 2, "operation": "revise_reference", "seconds": 5.617175153000062, "cpu_seconds": 4.971679152000007, "status": "complete", "counts": {"StandardsEngine._evaluate": 2, "StandardsEngine._compiled_snapshot": 3, "SnapshotModule.load_content": 3, "StandardsEngine._compile": 6, "StandardsEngine._proposal_projection": 3, "LogicalAuthoringCompiler.compile": 3}, "inclusive_seconds": {"SnapshotModule.load_content": 1.8354917900001055, "StandardsEngine._compile": 1.1085796600000322, "StandardsEngine._compiled_snapshot": 2.3900821560002896, "LogicalAuthoringCompiler.compile": 2.9878946929998165, "StandardsEngine._proposal_projection": 3.783304616999658, "StandardsEngine._evaluate": 1.6029768969999623}} +{"corpus": {"files": 434, "source_bytes": 3733667, "content_id": "snapshot-content:sha256:b4bd401f3eec9938044b0971b0804c131de8b45fae3fbc764b92fa63ac446a35", "source_revision": "63338566110bf8de9d0a84fddf3322cc6bb6c0c9"}, "trial": 2, "operation": "propose_normative", "seconds": 3.8149101540000174, "cpu_seconds": 3.5624179100000077, "status": "needs-action", "counts": {"SnapshotModule.load_content": 3, "StandardsEngine._proposal_projection": 2, "StandardsEngine._compiled_snapshot": 2, "StandardsEngine._compile": 4, "LogicalAuthoringCompiler.compile": 2, "StandardsEngine._evaluate": 1}, "inclusive_seconds": {"SnapshotModule.load_content": 1.813759558000129, "StandardsEngine._compile": 0.8574134670000149, "StandardsEngine._compiled_snapshot": 1.698762914999861, "LogicalAuthoringCompiler.compile": 1.362276033000171, "StandardsEngine._proposal_projection": 2.271517584999856, "StandardsEngine._evaluate": 0.03060212299988052}} +{"corpus": {"files": 434, "source_bytes": 3733667, "content_id": "snapshot-content:sha256:b4bd401f3eec9938044b0971b0804c131de8b45fae3fbc764b92fa63ac446a35", "source_revision": "63338566110bf8de9d0a84fddf3322cc6bb6c0c9"}, "trial": 2, "operation": "resolve_workflow", "seconds": 3.283968767000033, "cpu_seconds": 3.034307608000006, "status": "complete", "counts": {"StandardsEngine._evaluate": 3, "StandardsEngine._compiled_snapshot": 2, "SnapshotModule.load_content": 2, "StandardsEngine._compile": 4, "StandardsEngine._proposal_projection": 2, "LogicalAuthoringCompiler.compile": 2}, "inclusive_seconds": {"SnapshotModule.load_content": 1.2243575010002132, "StandardsEngine._compile": 0.7571622290001869, "StandardsEngine._compiled_snapshot": 1.6013638349998018, "LogicalAuthoringCompiler.compile": 1.4336973810000018, "StandardsEngine._proposal_projection": 1.433719493999888, "StandardsEngine._evaluate": 1.6195170529999814}} diff --git a/docs/plans/purpose-separated-standards-engine/reports/performance-nested-increment/paired-candidate.jsonl b/docs/plans/purpose-separated-standards-engine/reports/performance-nested-increment/paired-candidate.jsonl new file mode 100644 index 00000000..498f0a03 --- /dev/null +++ b/docs/plans/purpose-separated-standards-engine/reports/performance-nested-increment/paired-candidate.jsonl @@ -0,0 +1,24 @@ +{"corpus": {"files": 434, "source_bytes": 3733667, "content_id": "snapshot-content:sha256:b4bd401f3eec9938044b0971b0804c131de8b45fae3fbc764b92fa63ac446a35", "source_revision": "63338566110bf8de9d0a84fddf3322cc6bb6c0c9"}, "trial": 0, "operation": "propose_reference", "seconds": 1.5947095950000403, "cpu_seconds": 1.4668859840000001, "status": "complete", "counts": {"StandardsEngine._compiled_snapshot": 1, "SnapshotModule.load_content": 1, "StandardsEngine._compile": 2, "StandardsEngine._proposal_projection": 1, "LogicalAuthoringCompiler.compile": 1, "StandardsEngine._evaluate": 1}, "inclusive_seconds": {"SnapshotModule.load_content": 0.5987072750001516, "StandardsEngine._compile": 0.3569479140001022, "StandardsEngine._compiled_snapshot": 0.7793707559999348, "LogicalAuthoringCompiler.compile": 0.6772562839998955, "StandardsEngine._proposal_projection": 0.6772735090000879, "StandardsEngine._evaluate": 0.029634336999833977}} +{"corpus": {"files": 434, "source_bytes": 3733667, "content_id": "snapshot-content:sha256:b4bd401f3eec9938044b0971b0804c131de8b45fae3fbc764b92fa63ac446a35", "source_revision": "63338566110bf8de9d0a84fddf3322cc6bb6c0c9"}, "trial": 0, "operation": "analyze_context", "seconds": 1.650389443999984, "cpu_seconds": 1.5242818620000005, "status": "complete", "counts": {"StandardsEngine._compiled_snapshot": 1, "SnapshotModule.load_content": 1, "StandardsEngine._compile": 2, "StandardsEngine._proposal_projection": 1, "LogicalAuthoringCompiler.compile": 1, "StandardsEngine._evaluate": 1}, "inclusive_seconds": {"SnapshotModule.load_content": 0.6010050390000288, "StandardsEngine._compile": 0.36440729200012356, "StandardsEngine._compiled_snapshot": 0.7835719740000968, "LogicalAuthoringCompiler.compile": 0.7131917329998032, "StandardsEngine._proposal_projection": 0.7132059749999371, "StandardsEngine._evaluate": 0.030349138000019593}} +{"corpus": {"files": 434, "source_bytes": 3733667, "content_id": "snapshot-content:sha256:b4bd401f3eec9938044b0971b0804c131de8b45fae3fbc764b92fa63ac446a35", "source_revision": "63338566110bf8de9d0a84fddf3322cc6bb6c0c9"}, "trial": 0, "operation": "analyze_proposal", "seconds": 1.6360473550000734, "cpu_seconds": 1.5095839080000006, "status": "complete", "counts": {"StandardsEngine._compiled_snapshot": 1, "SnapshotModule.load_content": 1, "StandardsEngine._compile": 2, "StandardsEngine._proposal_projection": 1, "LogicalAuthoringCompiler.compile": 1, "StandardsEngine._evaluate": 1}, "inclusive_seconds": {"SnapshotModule.load_content": 0.6502256139999645, "StandardsEngine._compile": 0.3962554720001208, "StandardsEngine._compiled_snapshot": 0.8434083889999329, "LogicalAuthoringCompiler.compile": 0.740233845000148, "StandardsEngine._proposal_projection": 0.7402464740000596, "StandardsEngine._evaluate": 0.03006322300007014}} +{"corpus": {"files": 434, "source_bytes": 3733667, "content_id": "snapshot-content:sha256:b4bd401f3eec9938044b0971b0804c131de8b45fae3fbc764b92fa63ac446a35", "source_revision": "63338566110bf8de9d0a84fddf3322cc6bb6c0c9"}, "trial": 0, "operation": "workflow_status", "seconds": 1.7386147489999075, "cpu_seconds": 1.6122864759999995, "status": "complete", "counts": {"StandardsEngine._compiled_snapshot": 1, "SnapshotModule.load_content": 1, "StandardsEngine._compile": 2, "StandardsEngine._proposal_projection": 1, "LogicalAuthoringCompiler.compile": 1, "StandardsEngine._evaluate": 1}, "inclusive_seconds": {"SnapshotModule.load_content": 0.6080628700001398, "StandardsEngine._compile": 0.5005020119999699, "StandardsEngine._compiled_snapshot": 0.9153793909999877, "LogicalAuthoringCompiler.compile": 0.7189959629999976, "StandardsEngine._proposal_projection": 0.7190071689999513, "StandardsEngine._evaluate": 0.029794555000080436}} +{"corpus": {"files": 434, "source_bytes": 3733667, "content_id": "snapshot-content:sha256:b4bd401f3eec9938044b0971b0804c131de8b45fae3fbc764b92fa63ac446a35", "source_revision": "63338566110bf8de9d0a84fddf3322cc6bb6c0c9"}, "trial": 0, "operation": "query_proposal", "seconds": 1.5256402469999557, "cpu_seconds": 1.3998650949999991, "status": "proposal-read-result", "counts": {"StandardsEngine._proposal_projection": 1, "StandardsEngine._compiled_snapshot": 1, "SnapshotModule.load_content": 1, "StandardsEngine._compile": 2, "LogicalAuthoringCompiler.compile": 1}, "inclusive_seconds": {"SnapshotModule.load_content": 0.5969189269999333, "StandardsEngine._compile": 0.4005569920000198, "StandardsEngine._compiled_snapshot": 0.7962184809998689, "LogicalAuthoringCompiler.compile": 0.7102675379999255, "StandardsEngine._proposal_projection": 1.5078574429999207}} +{"corpus": {"files": 434, "source_bytes": 3733667, "content_id": "snapshot-content:sha256:b4bd401f3eec9938044b0971b0804c131de8b45fae3fbc764b92fa63ac446a35", "source_revision": "63338566110bf8de9d0a84fddf3322cc6bb6c0c9"}, "trial": 0, "operation": "revise_reference", "seconds": 2.890247047999992, "cpu_seconds": 2.5203456089999996, "status": "complete", "counts": {"StandardsEngine._compiled_snapshot": 1, "SnapshotModule.load_content": 1, "StandardsEngine._compile": 3, "StandardsEngine._proposal_projection": 2, "LogicalAuthoringCompiler.compile": 2, "StandardsEngine._evaluate": 2}, "inclusive_seconds": {"SnapshotModule.load_content": 0.626706631999923, "StandardsEngine._compile": 0.559901716000013, "StandardsEngine._compiled_snapshot": 0.8209526980001556, "LogicalAuthoringCompiler.compile": 1.8302521130001423, "StandardsEngine._proposal_projection": 1.8302747469999758, "StandardsEngine._evaluate": 0.06071114500014119}} +{"corpus": {"files": 434, "source_bytes": 3733667, "content_id": "snapshot-content:sha256:b4bd401f3eec9938044b0971b0804c131de8b45fae3fbc764b92fa63ac446a35", "source_revision": "63338566110bf8de9d0a84fddf3322cc6bb6c0c9"}, "trial": 0, "operation": "propose_normative", "seconds": 1.620197017999999, "cpu_seconds": 1.4892852350000005, "status": "needs-action", "counts": {"StandardsEngine._compiled_snapshot": 1, "SnapshotModule.load_content": 1, "StandardsEngine._compile": 2, "StandardsEngine._proposal_projection": 1, "LogicalAuthoringCompiler.compile": 1, "StandardsEngine._evaluate": 1}, "inclusive_seconds": {"SnapshotModule.load_content": 0.6028529160000744, "StandardsEngine._compile": 0.3619380850000198, "StandardsEngine._compiled_snapshot": 0.7839714049998747, "LogicalAuthoringCompiler.compile": 0.6962210730000606, "StandardsEngine._proposal_projection": 0.696233981999967, "StandardsEngine._evaluate": 0.030812054000080025}} +{"corpus": {"files": 434, "source_bytes": 3733667, "content_id": "snapshot-content:sha256:b4bd401f3eec9938044b0971b0804c131de8b45fae3fbc764b92fa63ac446a35", "source_revision": "63338566110bf8de9d0a84fddf3322cc6bb6c0c9"}, "trial": 0, "operation": "resolve_workflow", "seconds": 1.7326738969998132, "cpu_seconds": 1.6066850899999991, "status": "complete", "counts": {"StandardsEngine._compiled_snapshot": 1, "SnapshotModule.load_content": 1, "StandardsEngine._compile": 2, "StandardsEngine._proposal_projection": 1, "LogicalAuthoringCompiler.compile": 1, "StandardsEngine._evaluate": 3}, "inclusive_seconds": {"SnapshotModule.load_content": 0.6041246700001466, "StandardsEngine._compile": 0.3729802350001137, "StandardsEngine._compiled_snapshot": 0.7989992600000733, "LogicalAuthoringCompiler.compile": 0.6976150950001738, "StandardsEngine._proposal_projection": 0.6976266020001276, "StandardsEngine._evaluate": 0.08692392999978438}} +{"corpus": {"files": 434, "source_bytes": 3733667, "content_id": "snapshot-content:sha256:b4bd401f3eec9938044b0971b0804c131de8b45fae3fbc764b92fa63ac446a35", "source_revision": "63338566110bf8de9d0a84fddf3322cc6bb6c0c9"}, "trial": 1, "operation": "propose_reference", "seconds": 1.5746108480000203, "cpu_seconds": 1.4473581230000008, "status": "complete", "counts": {"StandardsEngine._compiled_snapshot": 1, "SnapshotModule.load_content": 1, "StandardsEngine._compile": 2, "StandardsEngine._proposal_projection": 1, "LogicalAuthoringCompiler.compile": 1, "StandardsEngine._evaluate": 1}, "inclusive_seconds": {"SnapshotModule.load_content": 0.5912418860000344, "StandardsEngine._compile": 0.36088623499995265, "StandardsEngine._compiled_snapshot": 0.7769452080001429, "LogicalAuthoringCompiler.compile": 0.664586164999946, "StandardsEngine._proposal_projection": 0.6645975019998787, "StandardsEngine._evaluate": 0.028328820000069754}} +{"corpus": {"files": 434, "source_bytes": 3733667, "content_id": "snapshot-content:sha256:b4bd401f3eec9938044b0971b0804c131de8b45fae3fbc764b92fa63ac446a35", "source_revision": "63338566110bf8de9d0a84fddf3322cc6bb6c0c9"}, "trial": 1, "operation": "analyze_context", "seconds": 1.5886815350002053, "cpu_seconds": 1.4652448860000007, "status": "complete", "counts": {"StandardsEngine._compiled_snapshot": 1, "SnapshotModule.load_content": 1, "StandardsEngine._compile": 2, "StandardsEngine._proposal_projection": 1, "LogicalAuthoringCompiler.compile": 1, "StandardsEngine._evaluate": 1}, "inclusive_seconds": {"SnapshotModule.load_content": 0.5910198070000661, "StandardsEngine._compile": 0.35524662500006343, "StandardsEngine._compiled_snapshot": 0.7712550449998616, "LogicalAuthoringCompiler.compile": 0.6711413670000184, "StandardsEngine._proposal_projection": 0.6711536860000251, "StandardsEngine._evaluate": 0.029008616000055554}} +{"corpus": {"files": 434, "source_bytes": 3733667, "content_id": "snapshot-content:sha256:b4bd401f3eec9938044b0971b0804c131de8b45fae3fbc764b92fa63ac446a35", "source_revision": "63338566110bf8de9d0a84fddf3322cc6bb6c0c9"}, "trial": 1, "operation": "analyze_proposal", "seconds": 1.4919322009998268, "cpu_seconds": 1.3676050790000005, "status": "complete", "counts": {"StandardsEngine._compiled_snapshot": 1, "SnapshotModule.load_content": 1, "StandardsEngine._compile": 2, "StandardsEngine._proposal_projection": 1, "LogicalAuthoringCompiler.compile": 1, "StandardsEngine._evaluate": 1}, "inclusive_seconds": {"SnapshotModule.load_content": 0.5952209330000642, "StandardsEngine._compile": 0.3600708169999507, "StandardsEngine._compiled_snapshot": 0.7784786700001405, "LogicalAuthoringCompiler.compile": 0.6641657269999541, "StandardsEngine._proposal_projection": 0.664178376999871, "StandardsEngine._evaluate": 0.028674332000036884}} +{"corpus": {"files": 434, "source_bytes": 3733667, "content_id": "snapshot-content:sha256:b4bd401f3eec9938044b0971b0804c131de8b45fae3fbc764b92fa63ac446a35", "source_revision": "63338566110bf8de9d0a84fddf3322cc6bb6c0c9"}, "trial": 1, "operation": "workflow_status", "seconds": 1.543877928000029, "cpu_seconds": 1.419961807, "status": "complete", "counts": {"StandardsEngine._compiled_snapshot": 1, "SnapshotModule.load_content": 1, "StandardsEngine._compile": 2, "StandardsEngine._proposal_projection": 1, "LogicalAuthoringCompiler.compile": 1, "StandardsEngine._evaluate": 1}, "inclusive_seconds": {"SnapshotModule.load_content": 0.5918331160000889, "StandardsEngine._compile": 0.35877641599995513, "StandardsEngine._compiled_snapshot": 0.7728585919999205, "LogicalAuthoringCompiler.compile": 0.6734042539999336, "StandardsEngine._proposal_projection": 0.673414528999956, "StandardsEngine._evaluate": 0.028740428999981305}} +{"corpus": {"files": 434, "source_bytes": 3733667, "content_id": "snapshot-content:sha256:b4bd401f3eec9938044b0971b0804c131de8b45fae3fbc764b92fa63ac446a35", "source_revision": "63338566110bf8de9d0a84fddf3322cc6bb6c0c9"}, "trial": 1, "operation": "query_proposal", "seconds": 1.5677220319998924, "cpu_seconds": 1.4444836159999994, "status": "proposal-read-result", "counts": {"StandardsEngine._proposal_projection": 1, "StandardsEngine._compiled_snapshot": 1, "SnapshotModule.load_content": 1, "StandardsEngine._compile": 2, "LogicalAuthoringCompiler.compile": 1}, "inclusive_seconds": {"SnapshotModule.load_content": 0.5940494330000092, "StandardsEngine._compile": 0.46779541499995503, "StandardsEngine._compiled_snapshot": 0.8871050570000989, "LogicalAuthoringCompiler.compile": 0.6625592139998844, "StandardsEngine._proposal_projection": 1.5509813060000397}} +{"corpus": {"files": 434, "source_bytes": 3733667, "content_id": "snapshot-content:sha256:b4bd401f3eec9938044b0971b0804c131de8b45fae3fbc764b92fa63ac446a35", "source_revision": "63338566110bf8de9d0a84fddf3322cc6bb6c0c9"}, "trial": 1, "operation": "revise_reference", "seconds": 2.768210837999959, "cpu_seconds": 2.3925839559999993, "status": "complete", "counts": {"StandardsEngine._compiled_snapshot": 1, "SnapshotModule.load_content": 1, "StandardsEngine._compile": 3, "StandardsEngine._proposal_projection": 2, "LogicalAuthoringCompiler.compile": 2, "StandardsEngine._evaluate": 2}, "inclusive_seconds": {"SnapshotModule.load_content": 0.5929220589998749, "StandardsEngine._compile": 0.5370085489998928, "StandardsEngine._compiled_snapshot": 0.7737813730000198, "LogicalAuthoringCompiler.compile": 1.763030517000061, "StandardsEngine._proposal_projection": 1.7630524100002276, "StandardsEngine._evaluate": 0.05927951099988604}} +{"corpus": {"files": 434, "source_bytes": 3733667, "content_id": "snapshot-content:sha256:b4bd401f3eec9938044b0971b0804c131de8b45fae3fbc764b92fa63ac446a35", "source_revision": "63338566110bf8de9d0a84fddf3322cc6bb6c0c9"}, "trial": 1, "operation": "propose_normative", "seconds": 1.601183077000087, "cpu_seconds": 1.4730989019999967, "status": "needs-action", "counts": {"StandardsEngine._compiled_snapshot": 1, "SnapshotModule.load_content": 1, "StandardsEngine._compile": 2, "StandardsEngine._proposal_projection": 1, "LogicalAuthoringCompiler.compile": 1, "StandardsEngine._evaluate": 1}, "inclusive_seconds": {"SnapshotModule.load_content": 0.6050643000000946, "StandardsEngine._compile": 0.3623180060001232, "StandardsEngine._compiled_snapshot": 0.7887211430002026, "LogicalAuthoringCompiler.compile": 0.675223619999997, "StandardsEngine._proposal_projection": 0.6752365690001625, "StandardsEngine._evaluate": 0.028884673999982624}} +{"corpus": {"files": 434, "source_bytes": 3733667, "content_id": "snapshot-content:sha256:b4bd401f3eec9938044b0971b0804c131de8b45fae3fbc764b92fa63ac446a35", "source_revision": "63338566110bf8de9d0a84fddf3322cc6bb6c0c9"}, "trial": 1, "operation": "resolve_workflow", "seconds": 1.7569060900000295, "cpu_seconds": 1.630738155000003, "status": "complete", "counts": {"StandardsEngine._compiled_snapshot": 1, "SnapshotModule.load_content": 1, "StandardsEngine._compile": 2, "StandardsEngine._proposal_projection": 1, "LogicalAuthoringCompiler.compile": 1, "StandardsEngine._evaluate": 3}, "inclusive_seconds": {"SnapshotModule.load_content": 0.6063145990001431, "StandardsEngine._compile": 0.38906505899990407, "StandardsEngine._compiled_snapshot": 0.8001245729999482, "LogicalAuthoringCompiler.compile": 0.7026212279999982, "StandardsEngine._proposal_projection": 0.7026330270000472, "StandardsEngine._evaluate": 0.09814148099985687}} +{"corpus": {"files": 434, "source_bytes": 3733667, "content_id": "snapshot-content:sha256:b4bd401f3eec9938044b0971b0804c131de8b45fae3fbc764b92fa63ac446a35", "source_revision": "63338566110bf8de9d0a84fddf3322cc6bb6c0c9"}, "trial": 2, "operation": "propose_reference", "seconds": 1.6583738489998723, "cpu_seconds": 1.5313042229999994, "status": "complete", "counts": {"StandardsEngine._compiled_snapshot": 1, "SnapshotModule.load_content": 1, "StandardsEngine._compile": 2, "StandardsEngine._proposal_projection": 1, "LogicalAuthoringCompiler.compile": 1, "StandardsEngine._evaluate": 1}, "inclusive_seconds": {"SnapshotModule.load_content": 0.6209419959998286, "StandardsEngine._compile": 0.38234388000000763, "StandardsEngine._compiled_snapshot": 0.8068666649999159, "LogicalAuthoringCompiler.compile": 0.712158688999807, "StandardsEngine._proposal_projection": 0.7121704470000623, "StandardsEngine._evaluate": 0.02899136699988958}} +{"corpus": {"files": 434, "source_bytes": 3733667, "content_id": "snapshot-content:sha256:b4bd401f3eec9938044b0971b0804c131de8b45fae3fbc764b92fa63ac446a35", "source_revision": "63338566110bf8de9d0a84fddf3322cc6bb6c0c9"}, "trial": 2, "operation": "analyze_context", "seconds": 1.6621399299999666, "cpu_seconds": 1.5373179770000007, "status": "complete", "counts": {"StandardsEngine._compiled_snapshot": 1, "SnapshotModule.load_content": 1, "StandardsEngine._compile": 2, "StandardsEngine._proposal_projection": 1, "LogicalAuthoringCompiler.compile": 1, "StandardsEngine._evaluate": 1}, "inclusive_seconds": {"SnapshotModule.load_content": 0.6152473689999169, "StandardsEngine._compile": 0.3784402440001031, "StandardsEngine._compiled_snapshot": 0.8085333520000404, "LogicalAuthoringCompiler.compile": 0.7036976530000629, "StandardsEngine._proposal_projection": 0.7037082090000695, "StandardsEngine._evaluate": 0.029494442999975945}} +{"corpus": {"files": 434, "source_bytes": 3733667, "content_id": "snapshot-content:sha256:b4bd401f3eec9938044b0971b0804c131de8b45fae3fbc764b92fa63ac446a35", "source_revision": "63338566110bf8de9d0a84fddf3322cc6bb6c0c9"}, "trial": 2, "operation": "analyze_proposal", "seconds": 1.5251470459998018, "cpu_seconds": 1.4004275969999966, "status": "complete", "counts": {"StandardsEngine._compiled_snapshot": 1, "SnapshotModule.load_content": 1, "StandardsEngine._compile": 2, "StandardsEngine._proposal_projection": 1, "LogicalAuthoringCompiler.compile": 1, "StandardsEngine._evaluate": 1}, "inclusive_seconds": {"SnapshotModule.load_content": 0.6061303239998779, "StandardsEngine._compile": 0.37067842999977074, "StandardsEngine._compiled_snapshot": 0.7948615610000616, "LogicalAuthoringCompiler.compile": 0.6801714219998303, "StandardsEngine._proposal_projection": 0.6801824579999902, "StandardsEngine._evaluate": 0.02935913300007087}} +{"corpus": {"files": 434, "source_bytes": 3733667, "content_id": "snapshot-content:sha256:b4bd401f3eec9938044b0971b0804c131de8b45fae3fbc764b92fa63ac446a35", "source_revision": "63338566110bf8de9d0a84fddf3322cc6bb6c0c9"}, "trial": 2, "operation": "workflow_status", "seconds": 1.5904890079998495, "cpu_seconds": 1.4628392380000008, "status": "complete", "counts": {"StandardsEngine._compiled_snapshot": 1, "SnapshotModule.load_content": 1, "StandardsEngine._compile": 2, "StandardsEngine._proposal_projection": 1, "LogicalAuthoringCompiler.compile": 1, "StandardsEngine._evaluate": 1}, "inclusive_seconds": {"SnapshotModule.load_content": 0.6066869799999495, "StandardsEngine._compile": 0.366840035000223, "StandardsEngine._compiled_snapshot": 0.7902664040000218, "LogicalAuthoringCompiler.compile": 0.6995615569999245, "StandardsEngine._proposal_projection": 0.6995713899998464, "StandardsEngine._evaluate": 0.030059051999842268}} +{"corpus": {"files": 434, "source_bytes": 3733667, "content_id": "snapshot-content:sha256:b4bd401f3eec9938044b0971b0804c131de8b45fae3fbc764b92fa63ac446a35", "source_revision": "63338566110bf8de9d0a84fddf3322cc6bb6c0c9"}, "trial": 2, "operation": "query_proposal", "seconds": 1.6732436560000679, "cpu_seconds": 1.5487131539999979, "status": "proposal-read-result", "counts": {"StandardsEngine._proposal_projection": 1, "StandardsEngine._compiled_snapshot": 1, "SnapshotModule.load_content": 1, "StandardsEngine._compile": 2, "LogicalAuthoringCompiler.compile": 1}, "inclusive_seconds": {"SnapshotModule.load_content": 0.6205477099999825, "StandardsEngine._compile": 0.5131163680000554, "StandardsEngine._compiled_snapshot": 0.8122155159999238, "LogicalAuthoringCompiler.compile": 0.8421608300000116, "StandardsEngine._proposal_projection": 1.655835930999956}} +{"corpus": {"files": 434, "source_bytes": 3733667, "content_id": "snapshot-content:sha256:b4bd401f3eec9938044b0971b0804c131de8b45fae3fbc764b92fa63ac446a35", "source_revision": "63338566110bf8de9d0a84fddf3322cc6bb6c0c9"}, "trial": 2, "operation": "revise_reference", "seconds": 2.8782149990001926, "cpu_seconds": 2.504519189, "status": "complete", "counts": {"StandardsEngine._compiled_snapshot": 1, "SnapshotModule.load_content": 1, "StandardsEngine._compile": 3, "StandardsEngine._proposal_projection": 2, "LogicalAuthoringCompiler.compile": 2, "StandardsEngine._evaluate": 2}, "inclusive_seconds": {"SnapshotModule.load_content": 0.5926373279999098, "StandardsEngine._compile": 0.5445025750000241, "StandardsEngine._compiled_snapshot": 0.7768259270001181, "LogicalAuthoringCompiler.compile": 1.8537726839999777, "StandardsEngine._proposal_projection": 1.8537930640000013, "StandardsEngine._evaluate": 0.06224455799997486}} +{"corpus": {"files": 434, "source_bytes": 3733667, "content_id": "snapshot-content:sha256:b4bd401f3eec9938044b0971b0804c131de8b45fae3fbc764b92fa63ac446a35", "source_revision": "63338566110bf8de9d0a84fddf3322cc6bb6c0c9"}, "trial": 2, "operation": "propose_normative", "seconds": 1.6473141619999296, "cpu_seconds": 1.5180443069999967, "status": "needs-action", "counts": {"StandardsEngine._compiled_snapshot": 1, "SnapshotModule.load_content": 1, "StandardsEngine._compile": 2, "StandardsEngine._proposal_projection": 1, "LogicalAuthoringCompiler.compile": 1, "StandardsEngine._evaluate": 1}, "inclusive_seconds": {"SnapshotModule.load_content": 0.6352028930000415, "StandardsEngine._compile": 0.37391253000009783, "StandardsEngine._compiled_snapshot": 0.8247375789999296, "LogicalAuthoringCompiler.compile": 0.6855186020000019, "StandardsEngine._proposal_projection": 0.6855309610000404, "StandardsEngine._evaluate": 0.028071768000017983}} +{"corpus": {"files": 434, "source_bytes": 3733667, "content_id": "snapshot-content:sha256:b4bd401f3eec9938044b0971b0804c131de8b45fae3fbc764b92fa63ac446a35", "source_revision": "63338566110bf8de9d0a84fddf3322cc6bb6c0c9"}, "trial": 2, "operation": "resolve_workflow", "seconds": 1.739495591999912, "cpu_seconds": 1.614706218000002, "status": "complete", "counts": {"StandardsEngine._compiled_snapshot": 1, "SnapshotModule.load_content": 1, "StandardsEngine._compile": 2, "StandardsEngine._proposal_projection": 1, "LogicalAuthoringCompiler.compile": 1, "StandardsEngine._evaluate": 3}, "inclusive_seconds": {"SnapshotModule.load_content": 0.6073211279999668, "StandardsEngine._compile": 0.3820306850000179, "StandardsEngine._compiled_snapshot": 0.7919694130000607, "LogicalAuthoringCompiler.compile": 0.7040702649999275, "StandardsEngine._proposal_projection": 0.7040814619999765, "StandardsEngine._evaluate": 0.09044508500005577}} diff --git a/docs/plans/purpose-separated-standards-engine/reports/performance-nested-increment/paired-status.json b/docs/plans/purpose-separated-standards-engine/reports/performance-nested-increment/paired-status.json new file mode 100644 index 00000000..ee060803 --- /dev/null +++ b/docs/plans/purpose-separated-standards-engine/reports/performance-nested-increment/paired-status.json @@ -0,0 +1,36 @@ +[ + { + "side": "baseline", + "returncode": 0, + "seconds": 82.25928002899991, + "command": [ + "/opt/pyvenv/bin/python", + "/mnt/data/nested-reuse-work/repo/docs/plans/purpose-separated-standards-engine/reports/performance-nested-increment/measure_nested.py", + "--source", + "/mnt/data/nested-reuse-work/baseline-repo", + "--fixture-source", + "/mnt/data/nested-reuse-work/baseline-repo", + "--output", + "/mnt/data/nested-reuse-work/evidence/final-baseline.jsonl", + "--repeats", + "3" + ] + }, + { + "side": "candidate", + "returncode": 0, + "seconds": 56.43830427900002, + "command": [ + "/opt/pyvenv/bin/python", + "/mnt/data/nested-reuse-work/repo/docs/plans/purpose-separated-standards-engine/reports/performance-nested-increment/measure_nested.py", + "--source", + "/mnt/data/nested-reuse-work/repo", + "--fixture-source", + "/mnt/data/nested-reuse-work/baseline-repo", + "--output", + "/mnt/data/nested-reuse-work/evidence/final-candidate.jsonl", + "--repeats", + "3" + ] + } +] diff --git a/docs/plans/purpose-separated-standards-engine/reports/performance-nested-increment/source-binding.json b/docs/plans/purpose-separated-standards-engine/reports/performance-nested-increment/source-binding.json new file mode 100644 index 00000000..1bad685d --- /dev/null +++ b/docs/plans/purpose-separated-standards-engine/reports/performance-nested-increment/source-binding.json @@ -0,0 +1,41 @@ +{ + "qualification_candidate": "20f05cd5800a5a27feb69bd2df2f1bc5db9b5879", + "source_unchanged_since_test_start": true, + "python_files": [ + { + "path": "tools/standards_engine/standards_engine/agent_workflow.py", + "sha256": "c133d520bc82c951e6f9be3ee6e6b7ca2ecdc7cde4c38b8c4ee1a42533a494d9", + "python_3_11_grammar": "passed" + }, + { + "path": "tools/standards_engine/standards_engine/authoring.py", + "sha256": "6761c6b11a3904052b873c0db8d83127bb8080f0dc73fff3c6a2d26620bcd538", + "python_3_11_grammar": "passed" + }, + { + "path": "tools/standards_engine/standards_engine/engine.py", + "sha256": "1c40aeafc3b247b8acded59b4b9fd9bb99c8eb00d59b795f8b60cce03243a196", + "python_3_11_grammar": "passed" + }, + { + "path": "tools/standards_engine/standards_engine/operation_materials.py", + "sha256": "fff7a6cba434679b8d95f89d1eb17e25013b9887047c2dd7ab632d3b4d84a6fe", + "python_3_11_grammar": "passed" + }, + { + "path": "tools/standards_engine/tests/test_agent_workflow.py", + "sha256": "d429509a1fead84d65a885d098e9dd5d8b78ca8e975b2a4727c3041ae01c81f6", + "python_3_11_grammar": "passed" + }, + { + "path": "tools/standards_engine/tests/test_authoring.py", + "sha256": "7246399d408485f0f135b4f07b964bc9e2c6c1e0ff6d55a970d5e5aef0cd8d37", + "python_3_11_grammar": "passed" + }, + { + "path": "tools/standards_engine/tests/test_nested_materials.py", + "sha256": "ab107415318aba18acdef76bc5da969ff4343317beb3097872e7f7acf5901020", + "python_3_11_grammar": "passed" + } + ] +} diff --git a/docs/plans/purpose-separated-standards-engine/reports/performance-nested-increment/structural.json b/docs/plans/purpose-separated-standards-engine/reports/performance-nested-increment/structural.json new file mode 100644 index 00000000..5af0e32a --- /dev/null +++ b/docs/plans/purpose-separated-standards-engine/reports/performance-nested-increment/structural.json @@ -0,0 +1,14 @@ +{ + "scope": "Final staged implementation and evidence; production/test source hashes match the qualification candidate.", + "result": { + "kind": "verify-repository-result", + "refreshed_verification_inputs": true, + "verification": { + "passed": true, + "exit_code": 0, + "suites": 73, + "checks": 121, + "failures": [] + } + } +} diff --git a/docs/plans/purpose-separated-standards-engine/reports/performance-nested-increment/test-timings.csv b/docs/plans/purpose-separated-standards-engine/reports/performance-nested-increment/test-timings.csv new file mode 100644 index 00000000..52f600c2 --- /dev/null +++ b/docs/plans/purpose-separated-standards-engine/reports/performance-nested-increment/test-timings.csv @@ -0,0 +1,178 @@ +module,test,status,wall_s,cpu_s,setup,body,teardown +test_agent_navigation,test_agent_navigation.AgentNavigationTest.test_boolean_nullable_set_facts_aliases_and_multiple_causes,pass,0.8970749630000228,0.8971079589999995,1.8929999896499794e-06,0.8966879089999793,1.6629999208817026e-06 +test_agent_navigation,test_agent_navigation.AgentNavigationTest.test_capture_rejection_never_advances_to_query,pass,0.0006999180000093475,0.0007049390000002376,1.7830000160756754e-06,0.000492901000029633,7.220000952656846e-07 +test_agent_navigation,test_agent_navigation.AgentNavigationTest.test_compact_read_preserves_text_authority_and_full_detail,pass,1.9427712279999696,1.938471475,6.610000582440989e-07,1.942524441000046,1.4329999658002635e-06 +test_agent_navigation,test_agent_navigation.AgentNavigationTest.test_complete_explicit_facts_select_reviewed_modules,pass,1.6212897540000313,1.617537807999999,9.310000450568623e-07,1.618324252000093,1.712999960545858e-06 +test_agent_navigation,test_agent_navigation.AgentNavigationTest.test_focused_read_continuations_are_callable_against_exact_snapshot,pass,2.5763703999999734,2.5748651230000004,1.0219999921901035e-06,2.5761295930000188,1.301999986935698e-06 +test_agent_navigation,test_agent_navigation.AgentNavigationTest.test_invalid_inputs_cannot_create_snapshot,pass,0.0004682050000610616,0.0004923249999997381,8.909998996387003e-07,0.00032992000001286215,4.909999233859708e-07 +test_agent_navigation,test_agent_navigation.AgentNavigationTest.test_invalid_routing_values_do_not_become_negative_facts,pass,1.7062378990000298,1.7056988519999994,4.610000132743153e-07,1.7060197859999562,1.1619999895629007e-06 +test_agent_navigation,test_agent_navigation.AgentNavigationTest.test_optional_capture_matches_explicit_route_and_preserves_unresolved,pass,4.6926366659999985,3.742792466000001,9.220000265486306e-07,4.688716010000007,1.1319999657644075e-06 +test_agent_navigation,test_agent_navigation.AgentNavigationTest.test_related_matches_native_permissions_and_projection,pass,3.519996194999976,3.456307428999999,1.3619999208458466e-06,3.5176631739999493,1.2920000926897046e-06 +test_agent_navigation,test_agent_navigation.AgentNavigationTest.test_supplied_snapshot_never_captures_ambient_authority,pass,2.040131833000032,2.006654338999997,1.0720000318542589e-06,2.0398194100000637,1.5429999393745675e-06 +test_agent_navigation,test_agent_navigation.AgentNavigationTest.test_vocabulary_matches_router_and_questions_are_typed,pass,3.354931846999989,3.322348356999999,1.2119999155402184e-06,3.3546756060000007,1.662000045143941e-06 +test_agent_workflow,test_agent_workflow.AgentWorkflowTest.test_analysis_rejection_retains_the_created_revision,pass,1.6904861770000252,1.5612566970000001,1.8426999986331793e-05,1.6901741130000119,1.6120000054797856e-06 +test_agent_workflow,test_agent_workflow.AgentWorkflowTest.test_context_is_immutable_existing_identity_and_foreign_records_reject,pass,2.1027741430000333,1.9178035389999994,1.3929999340689392e-06,2.1025271369999246,1.9029999975828105e-06 +test_agent_workflow,test_agent_workflow.AgentWorkflowTest.test_normative_proposal_stops_at_real_pending_work,pass,10.467466005000006,9.308770094000002,8.609999895270448e-07,10.467264345999979,1.1110000741609838e-06 +test_agent_workflow,test_agent_workflow.AgentWorkflowTest.test_reference_proposal_composes_analysis_without_review_or_application,pass,6.895894394000038,6.068770058999998,8.410000873482204e-07,6.895656341999938,1.3720000424655154e-06 +test_agent_workflow,test_agent_workflow.AgentWorkflowTest.test_review_is_explicit_and_current_authorization_is_required,pass,10.889271344000008,9.388143079999999,1.32200000280136e-06,10.888987863000011,1.3720000424655154e-06 +test_agent_workflow,test_agent_workflow.AgentWorkflowTest.test_revision_advancement_does_not_retarget_old_context,pass,14.202072258000044,11.972041096000005,8.920000027501374e-07,14.201853634000031,1.2920000926897046e-06 +test_analysis,test_analysis.AnalysisWorkflowTest.test_apply_create_and_retire_owns_topology_and_commit,pass,88.20710699299991,24.412988698000003,1.511999926151475e-06,88.2067373540001,2.5239999104087474e-06 +test_analysis,test_analysis.AnalysisWorkflowTest.test_apply_proposal_composes_real_verification_and_cold_readback,pass,76.74340131100007,14.111452312999997,1.7119998574344208e-06,76.74309662899987,2.4640000901854364e-06 +test_analysis,test_analysis.AnalysisWorkflowTest.test_capture_compiles_live_and_frozen_sources_independently,pass,2.5287215230000584,1.6292043659999962,1.0409999049443286e-06,2.5285446509999474,1.953000037246966e-06 +test_analysis,test_analysis.AnalysisWorkflowTest.test_cold_load_rejects_obsolete_domain_contracts,pass,0.002896477000149389,0.002871175000002779,8.609999895270448e-07,0.0027218079999329348,9.819998467719415e-07 +test_analysis,test_analysis.AnalysisWorkflowTest.test_coverage_exclusions_require_exact_evidence_before_resolution,pass,2.8878999579999345,2.837839570000007,1.421999968442833e-06,2.887761694000119,1.5020000319054816e-06 +test_analysis,test_analysis.AnalysisWorkflowTest.test_current_authorization_is_not_reused_with_material,pass,2.5495065389998217,2.5475715379999997,9.810000847210176e-07,2.5492693869998675,1.7320001006737584e-06 +test_analysis,test_analysis.AnalysisWorkflowTest.test_distinct_snapshot_roots_retain_distinct_material_and_lifecycle,pass,4.664547291999952,4.663607243999998,9.320001481682993e-07,4.664304111000092,1.3019998732488602e-06 +test_analysis,test_analysis.AnalysisWorkflowTest.test_equal_transition_is_idempotent_and_different_evidence_branches,pass,3.4772277399999894,3.4744729319999976,9.410000529896934e-07,3.4746141430000534,1.7830000160756754e-06 +test_analysis,test_analysis.AnalysisWorkflowTest.test_lifecycle_change_during_authorization_blocks_post_submission_evaluation,pass,2.7915277399999923,2.7894816539999994,1.7120000848080963e-06,2.7912355560001743,1.2319999314058805e-06 +test_analysis,test_analysis.AnalysisWorkflowTest.test_policy_free_standard_creation_enters_public_analysis,pass,3.868286537000131,3.487777347000005,8.81000005392707e-07,3.864903497999876,2.0229999790899456e-06 +test_analysis,test_analysis.AnalysisWorkflowTest.test_prepare_persists_parent_bound_public_work,pass,0.9254440260001502,0.8993878109999969,1.261999841517536e-06,0.9251896590001252,1.0609999208099907e-06 +test_analysis,test_analysis.AnalysisWorkflowTest.test_prior_analysis_reuses_the_same_valid_decision,pass,2.6135019850000845,2.6091831340000056,8.619999789516442e-07,2.6132842019999316,1.5619998521287926e-06 +test_analysis,test_analysis.AnalysisWorkflowTest.test_prior_decisions_reuse_material_but_recheck_each_decision,pass,2.6317693930000132,2.631693908999992,9.509999472356867e-07,2.6314487820000068,1.2420000530255493e-06 +test_analysis,test_analysis.AnalysisWorkflowTest.test_proposal_analysis_derives_inputs_and_replays_exact_revision,pass,12.16285227100002,10.831673194000004,1.1019999419659143e-06,12.162696679999954,1.4420002116821706e-06 +test_analysis,test_analysis.AnalysisWorkflowTest.test_proposal_analysis_uses_one_projection_and_one_verified_base,pass,4.042590473000018,3.6926921179999965,1.1110000741609838e-06,4.042360242000086,1.421999968442833e-06 +test_analysis,test_analysis.AnalysisWorkflowTest.test_relationship_only_proposals_enter_a1c_and_replay_cold,pass,21.28736951199994,18.786853049,8.819999948173063e-07,21.286169671999914,1.7919999208970694e-06 +test_analysis,test_analysis.AnalysisWorkflowTest.test_resolved_parent_work_is_not_applicable_to_child,pass,2.557762034999996,2.5314751779999938,1.1419999736972386e-06,2.5574501210001017,1.8519999684940558e-06 +test_analysis,test_analysis.AnalysisWorkflowTest.test_review_composition_publishes_readiness_for_complete_analysis,pass,27.249843300000066,24.311230057999992,1.0610001481836662e-06,27.24964146000002,1.9130000055156415e-06 +test_analysis,test_analysis.AnalysisWorkflowTest.test_same_snapshot_material_is_loaded_once_per_decision_operation,pass,2.780119033000119,2.6929247190000183,1.002000090011279e-06,2.7777941340000325,1.021000116452342e-06 +test_analysis,test_analysis.AnalysisWorkflowTest.test_snapshot_creation_rejects_changed_replay_path_closure,pass,0.023477471999967747,0.006871265999990328,1.202000021294225e-06,0.023251316000141742,1.5430000530614052e-06 +test_analysis,test_analysis.AnalysisWorkflowTest.test_state_and_children_are_inspectable_in_a_fresh_process,pass,3.9345606089998455,1.8748971299999937,9.719999525259482e-07,3.9343979069999477,1.4720001217938261e-06 +test_applicability_contract,test_applicability_contract.ApplicabilityContractTest.test_former_applicability_implementations_are_not_fallbacks,pass,0.00048476899996785505,0.0005213689999999938,1.712999960545858e-06,0.00014717800002017611,1.301999986935698e-06 +test_applicability_contract,test_applicability_contract.ApplicabilityContractTest.test_runtime_domains_cover_the_public_serialized_applicability_shapes,pass,0.0015554870000187293,0.0016118770000000948,1.311999994868529e-06,0.001391213000033531,1.2419999393387116e-06 +test_authoring,test_authoring.AuthoringTests.test_application_intent_is_current_head_guarded_and_records_applied,pass,0.04920949200004543,0.04428593000000003,1.5220000477711437e-06,0.043950610000024426,1.8529999579186551e-06 +test_authoring,test_authoring.AuthoringTests.test_create_and_find_are_durable_through_the_public_facade,pass,2.9040293740000607,0.2933257519999999,1.2909999895782676e-06,2.9038169289999587,1.762000010785414e-06 +test_authoring,test_authoring.AuthoringTests.test_create_rejects_duplicate_facets_and_validator_failure_is_atomic,pass,0.0035054600000421487,0.003514526000000018,1.000999986899842e-06,0.0033449219999965862,8.719999868844752e-07 +test_authoring,test_authoring.AuthoringTests.test_create_translates_invalid_change_set_unicode_to_a_typed_rejection,pass,0.2715864030000148,0.27107815900000043,5.709999868486193e-07,0.271151482999926,1.102000055652752e-06 +test_authoring,test_authoring.AuthoringTests.test_discovery_rejects_a_revision_without_content_bound_authority,pass,0.004972818000055668,0.004801275999999799,1.2420000530255493e-06,0.004785078999930192,1.2720000768240425e-06 +test_authoring,test_authoring.AuthoringTests.test_discovery_rejects_the_old_revision_contract_as_unsupported,pass,0.3220788790000597,0.3219457290000003,1.1519999816300697e-06,0.32191120099992077,1.1519999816300697e-06 +test_authoring,test_authoring.AuthoringTests.test_proposal_discovery_uses_opaque_keyset_continuations,pass,0.0054186979999713,0.005448175999999805,8.709999974598759e-07,0.005247965000080512,6.809999604229233e-07 +test_authoring,test_authoring.AuthoringTests.test_proposals_follow_snapshot_quarantine_and_purge_lifecycle,pass,0.0061891619999414615,0.005886457999999983,7.410000080199097e-07,0.006062133000000358,7.720000212430023e-07 +test_authoring,test_authoring.AuthoringTests.test_readiness_is_content_bound_durable_and_current_head_guarded,pass,0.020573851999984072,0.020545314000000037,6.709999524900923e-07,0.020397730000013325,9.51999936660286e-07 +test_authoring,test_authoring.AuthoringTests.test_readiness_rejects_incomplete_decisions_without_persistence,pass,0.0038419190000240633,0.0038491230000001764,8.609999895270448e-07,0.0037063280000211307,7.919999234218267e-07 +test_authoring,test_authoring.AuthoringTests.test_readiness_rejects_invalid_proposal_commit_material,pass,0.004136856999934935,0.004132562000000117,6.310000344456057e-07,0.00401581799997075,1.090999944608484e-06 +test_authoring,test_authoring.AuthoringTests.test_revise_is_durable_and_stale_writes_leave_no_partial_record,pass,0.5724490339999875,0.5710395200000002,5.30999955117295e-07,0.572257379000007,1.973000053112628e-06 +test_authoring,test_authoring.AuthoringTests.test_stale_readiness_cannot_publish_application_intent,pass,0.009765417000039633,0.009763275000000071,9.8099997103418e-07,0.009585760000049959,1.0720000318542589e-06 +test_coverage_publication,test_coverage_publication.EngineAuditPublicationTest.test_review_verify_apply_recover_and_read_without_original_database,pass,135.70514092300004,41.031974003,1.531999942017137e-06,135.70438256800003,2.182999878641567e-06 +test_evidence_maintenance,test_evidence_maintenance.EvidenceMaintenanceInterfaceTest.test_preview_and_overlap_preserve_working_tree_then_apply_retires,pass,113.87476298299987,16.529338626,1.3320000107341912e-06,113.87439405500004,1.6530000266357092e-06 +test_evidence_maintenance,test_evidence_maintenance.EvidenceMaintenanceTest.test_consumer_registration_enters_existing_policy_owner,pass,0.0007439129999511351,0.0007651909999992768,1.6320000213454477e-06,0.0006002309999075806,1.0520000159885967e-06 +test_evidence_maintenance,test_evidence_maintenance.EvidenceMaintenanceTest.test_pruning_preserves_current_claims_and_removes_stale_receipts,pass,0.0007763820001400745,0.0007944890000004534,5.110000529384706e-07,0.0006454169999869919,6.30999920758768e-07 +test_evidence_maintenance,test_evidence_maintenance.EvidenceMaintenanceTest.test_registered_checker_retirement_removes_its_graph_edges,pass,0.0007485910000468721,0.0006537150000021086,4.3000000005122274e-07,0.0005499960000179271,4.500000159168849e-07 +test_evidence_maintenance,test_evidence_maintenance.EvidenceMaintenanceTest.test_retirement_preserves_real_dependencies_and_normative_consumers,pass,0.0005024659999435244,0.0005082590000000664,5.20999947184464e-07,0.0004157560001658567,4.7100002120714635e-07 +test_evidence_maintenance,test_evidence_maintenance.EvidenceMaintenanceTest.test_subject_unregistration_preserves_guidance_and_retained_units,pass,0.0008257409999714582,0.0009147479999995767,1.2220000371598871e-06,0.0005743919998622005,5.409999630501261e-07 +test_evidence_maintenance,test_evidence_maintenance.EvidenceMaintenanceTest.test_unknown_retirement_does_not_mutate_authority,pass,0.00029707099997722253,0.00031033999999863227,6.81000074109761e-07,0.00017961699995794334,4.910000370728085e-07 +test_generated_contract,test_generated_contract.GeneratedContractTest.test_agent_tools_are_the_exact_compiler_projection,pass,0.3142727899999045,0.314087985,1.1820000054285629e-06,0.3136741829998755,1.6520000372111099e-06 +test_generated_contract,test_generated_contract.GeneratedContractTest.test_authored_examples_satisfy_the_public_contract,pass,0.257534355999951,0.2572345810000001,1.1920001270482317e-06,0.25701405400013755,1.4919999102858128e-06 +test_generated_contract,test_generated_contract.GeneratedContractTest.test_compiler_owns_the_complete_public_definition_closure,pass,0.5542548419998639,0.554222159,8.519998573319754e-07,0.5540691060000427,1.1920001270482317e-06 +test_generated_contract,test_generated_contract.GeneratedContractTest.test_coverage_read_is_scoped_optional_and_uses_repository_authority,pass,3.9544089360001635,2.893926291,1.1019999419659143e-06,3.9542448629999853,1.2620000688912114e-06 +test_generated_contract,test_generated_contract.GeneratedContractTest.test_generated_contract_projections_are_current,pass,1.9022756760000448,0.0008656939999998059,8.819999948173063e-07,1.9020695500000784,1.3819999367115088e-06 +test_generated_contract,test_generated_contract.GeneratedContractTest.test_generated_native_models_decode_complete_v20_values,pass,0.0009606849998817779,0.0009589889999999102,9.619998309062794e-07,0.0008094099998743332,6.709999524900923e-07 +test_generated_contract,test_generated_contract.GeneratedContractTest.test_identity_fixtures_use_valid_public_handle_versions,pass,0.26798878100021284,0.2679218900000002,1.041999894368928e-06,0.2677997499999947,1.4920001376594882e-06 +test_generated_contract,test_generated_contract.GeneratedContractTest.test_interface_operations_bind_generated_calls_results_and_facade,pass,0.26952813399998377,0.26953206299999977,1.0310000106983352e-06,0.26933646000020417,1.2909999895782676e-06 +test_generated_contract,test_generated_contract.GeneratedContractTest.test_local_evidence_rejects_missing_files_and_wrong_digests,pass,0.0005524290002085763,0.0005848930000000863,1.4120000741968397e-06,0.000413713999932952,6.30999920758768e-07 +test_generated_contract,test_generated_contract.GeneratedContractTest.test_local_facade_binds_always_allow_authorization,pass,0.2731736429998364,0.2731283609999995,8.50999867907376e-07,0.2729115639999691,1.5919999896141235e-06 +test_generated_contract,test_generated_contract.GeneratedContractTest.test_missing_verification_input_returns_a_typed_rejection,pass,0.26869220399998994,0.26854663099999954,1.202000021294225e-06,0.2684691629999634,1.4020001799508464e-06 +test_generated_contract,test_generated_contract.GeneratedContractTest.test_prepare_facade_passes_the_complete_generated_call,pass,0.3049802440000349,0.3049850620000001,9.910002063406864e-07,0.3047383949999585,1.7120000848080963e-06 +test_generated_contract,test_generated_contract.GeneratedContractTest.test_review_call_requires_exactly_three_decisions,pass,0.0011613229999056784,0.0011999400000002325,1.0620001376082655e-06,0.0010001240000292455,7.31999989511678e-07 +test_generated_contract,test_generated_contract.GeneratedContractTest.test_router_read_exposes_editable_definitions_only_when_requested,pass,8.976230522999913,7.538763919000001,7.709998044447275e-07,8.975966651999897,1.4519998785544885e-06 +test_generated_contract,test_generated_contract.GeneratedContractTest.test_verification_is_exposed_without_publication_and_refresh_is_explicit,pass,0.26726785600021685,0.2671797160000011,1.0009998732130043e-06,0.2670244339999499,1.1219999578315765e-06 +test_logical_authoring,test_logical_authoring.LogicalAuthoringTests.test_change_set_is_immutable_and_normalized_before_compilation,pass,0.0019827610001357243,0.0019912559999997193,1.7920001482707448e-06,0.0017087749999973312,1.261999841517536e-06 +test_logical_authoring,test_logical_authoring.LogicalAuthoringTests.test_compiler_projects_module_relationships_through_current_owners,pass,0.9991668290001599,0.8713405920000001,7.109999842214165e-07,0.9989825549998841,2.103000042552594e-06 +test_logical_authoring,test_logical_authoring.LogicalAuthoringTests.test_compiler_revises_one_registered_policy_and_derives_analysis_input,pass,0.9597431859999688,0.7808381140000002,7.809999260643963e-07,0.9595491279999351,1.7320001006737584e-06 +test_logical_authoring,test_logical_authoring.LogicalAuthoringTests.test_create_nested_standard_and_route_atomically,pass,1.3170523030000822,1.0689795339999995,9.120001323026372e-07,1.3168407399998614,1.7130000742326956e-06 +test_logical_authoring,test_logical_authoring.LogicalAuthoringTests.test_create_standard_hides_all_required_repository_projections,pass,2.537636483000142,2.0602027629999995,1.0220001058769412e-06,2.537407984000083,1.6320000213454477e-06 +test_logical_authoring,test_logical_authoring.LogicalAuthoringTests.test_created_standard_can_be_retired_with_complete_explicit_closure,pass,4.312376408999853,3.3537317719999997,9.109999155043624e-07,4.312148890999879,2.5629999527154723e-06 +test_logical_authoring,test_logical_authoring.LogicalAuthoringTests.test_duplicate_route_target_rejected,pass,0.22434784400002172,0.22434611600000132,1.3619999208458466e-06,0.22411670100018455,1.7520001165394206e-06 +test_logical_authoring,test_logical_authoring.LogicalAuthoringTests.test_fact_presentation_and_value_order_preserve_semantic_revision,pass,0.9718433929999719,0.793967554,1.0720000318542589e-06,0.9716203819998555,2.0929999209329253e-06 +test_logical_authoring,test_logical_authoring.LogicalAuthoringTests.test_fact_revision_and_referenced_removal_are_validated,pass,2.040838542000074,1.7332123799999994,8.519998573319754e-07,2.03881059299988,1.633000010770047e-06 +test_logical_authoring,test_logical_authoring.LogicalAuthoringTests.test_move_preserves_identity_and_relocates_relationship_authority,pass,1.8150510890000078,1.4583616670000001,1.2310001693549566e-06,1.814740638000103,4.185999841865851e-06 +test_logical_authoring,test_logical_authoring.LogicalAuthoringTests.test_new_fact_and_rule_compile_together_and_unused_fact_can_be_removed,pass,1.9252057950000108,1.6259647089999998,1.2519999472715426e-06,1.9249372660001427,1.6619999314571032e-06 +test_logical_authoring,test_logical_authoring.LogicalAuthoringTests.test_noop_and_cyclic_relationship_changes_are_typed,pass,1.119095666000021,0.8935767779999999,1.0609999208099907e-06,1.118805765999923,1.7830000160756754e-06 +test_logical_authoring,test_logical_authoring.LogicalAuthoringTests.test_null_applicability_is_unsupported_by_toml_authority,pass,0.0002471269999659853,0.00030075200000112545,1.0909998309216462e-06,0.00011312700007692911,4.309999894758221e-07 +test_logical_authoring,test_logical_authoring.LogicalAuthoringTests.test_opaque_consumer_handle_is_snapshot_bound,pass,1.0067364179999458,0.8291816290000007,4.70000031782547e-07,1.0065043629999764,1.641999915591441e-06 +test_logical_authoring,test_logical_authoring.LogicalAuthoringTests.test_policy_relationship_put_and_remove_replay_cumulatively,pass,5.151661584000067,4.07815072,9.509999472356867e-07,5.151400105999983,1.4320000900625018e-06 +test_logical_authoring,test_logical_authoring.LogicalAuthoringTests.test_retired_standard_successor_must_survive_the_final_program,pass,3.84537093799986,3.0652787649999986,1.0310000106983352e-06,3.8450224020000405,1.4720001217938261e-06 +test_logical_authoring,test_logical_authoring.LogicalAuthoringTests.test_retirement_requires_and_applies_complete_relationship_dispositions,pass,2.6206520250000267,2.138826218000002,1.1019999419659143e-06,2.6174721569998383,1.6920000689424342e-06 +test_logical_authoring,test_logical_authoring.LogicalAuthoringTests.test_route_targets_can_be_swapped_in_one_atomic_change,pass,1.0851298300001417,0.8980270949999998,1.4620000001741573e-06,1.0848586380000143,1.8729999737843173e-06 +test_logical_authoring,test_logical_authoring.LogicalAuthoringTests.test_rule_update_and_removal_keep_readable_and_executable_routes_in_sync,pass,1.879370549999976,1.5834740769999982,1.8220000583824003e-06,1.8790527579999434,1.7919999208970694e-06 +test_logical_authoring,test_logical_authoring.LogicalAuthoringTests.test_supporting_records_and_withdrawal_use_the_final_candidate,pass,4.1909217179997995,3.4425691889999968,1.0520000159885967e-06,4.190671197000029,1.8730002011579927e-06 +test_logical_authoring,test_logical_authoring.LogicalAuthoringTests.test_unknown_route_fact_is_rejected_without_changing_base,pass,0.9845392559998345,0.7604841300000018,9.320001481682993e-07,0.9840417590000925,1.8129999261873309e-06 +test_logical_authoring,test_logical_authoring.LogicalAuthoringTests.test_verified_compiled_base_is_reused_but_candidate_compiles,pass,1.848047847000089,1.4947553239999962,1.021000116452342e-06,1.8477646569999706,2.0429999949556077e-06 +test_logical_authoring,test_logical_authoring.LogicalAuthoringTests.test_whole_module_rescope_preserves_identity_and_explicit_meaning,pass,1.1881429679999655,1.0601886600000014,8.81000005392707e-07,1.1879043639999054,1.5420000636368059e-06 +test_logical_authoring,test_logical_authoring.LogicalAuthoringTests.test_whole_standard_revision_requires_companion_policy_semantics,pass,2.2416253779999806,1.7690954959999985,8.81000005392707e-07,2.2413883960000476,1.5120001535251504e-06 +test_mcp,test_mcp.MCPTest.test_application_failure_diagnostic_omits_private_exception,pass,0.00212848799992571,0.0021838409999999087,1.3720000424655154e-06,0.001803084999892235,1.3820001640851842e-06 +test_mcp,test_mcp.MCPTest.test_authoring_description_carries_exact_contract_without_type_rendering,pass,0.18379554099988127,0.1837759000000001,6.709999524900923e-07,0.18357022700001835,1.9029998838959727e-06 +test_mcp,test_mcp.MCPTest.test_authoring_inputs_expose_structure_and_preserve_recursive_validation,pass,0.015156506000039371,0.015157192000000208,9.510001746093621e-07,0.01494327900013559,1.0710000424296595e-06 +test_mcp,test_mcp.MCPTest.test_catalog_schemas_validate_authored_examples_and_resolve_refs,pass,1.8310224480001125,1.8292921030000002,1.0119999842572724e-06,1.8308008090000385,1.9430001430009725e-06 +test_mcp,test_mcp.MCPTest.test_default_catalog_focuses_navigation_and_workflows,pass,0.014576864999980899,0.014597264999999915,1.021000116452342e-06,0.014408365000008416,1.2719999631372048e-06 +test_mcp,test_mcp.MCPTest.test_default_guidance_uses_available_recovery_tools,pass,0.015112484999917797,0.015126540999999882,1.0109999948326731e-06,0.014938407000045117,1.7519998891657451e-06 +test_mcp,test_mcp.MCPTest.test_input_projection_preserves_reference_siblings,pass,0.00027569899998525216,0.0002905069999998844,9.51999936660286e-07,0.00016517499989276985,7.310000000870787e-07 +test_mcp,test_mcp.MCPTest.test_internal_failure_is_tool_error_without_retry,pass,0.030525896999961333,0.03051949399999998,3.8100006349850446e-07,0.030369935999942754,1.5819998679944547e-06 +test_mcp,test_mcp.MCPTest.test_lifecycle_and_protocol_errors_never_open_engine,pass,0.015984955000021728,0.016011896000000192,1.1219999578315765e-06,0.015769314999943163,1.3920000583311776e-06 +test_mcp,test_mcp.MCPTest.test_module_stdio_launch_from_unrelated_working_directory,pass,2.1317689659999814,0.007098026000000424,1.1320000794512453e-06,2.131571453000106,1.722999968478689e-06 +test_mcp,test_mcp.MCPTest.test_parse_errors_and_notifications_keep_stream_synchronized,pass,0.02194328299992776,0.021918834000000054,1.171999883808894e-06,0.02060654000001705,1.3419999049801845e-06 +test_mcp,test_mcp.MCPTest.test_preserves_typed_outcomes_and_never_retries,pass,0.014845813999954771,0.01485385600000022,1.1920001270482317e-06,0.01440628199998173,1.0910000582953217e-06 +test_mcp,test_mcp.MCPTest.test_real_snapshot_read_and_validation_through_server,pass,3.9437399869998444,3.0575216960000002,9.210000371240312e-07,3.9435453690000486,1.3320000107341912e-06 +test_navigation,test_navigation.NavigationTest.test_development_proportionality_routes_directly_and_before_planning,pass,1.6570428300001367,1.6539386560000002,1.9330000213813037e-06,1.6536061419999442,2.514000016162754e-06 +test_navigation,test_navigation.NavigationTest.test_live_worktree_mutation_cannot_change_snapshot_reads,pass,4.714864933000172,3.330705517,1.210999926115619e-06,4.714657265000142,1.9830001747322967e-06 +test_navigation,test_navigation.NavigationTest.test_proposal_creation_returns_typed_failure_for_invalid_projected_content,pass,1.8948642439997911,1.7637041920000005,8.720001005713129e-07,1.8946487429998342,2.083000026686932e-06 +test_navigation,test_navigation.NavigationTest.test_proposal_query_projects_every_request_from_an_exact_revision,pass,14.557992547999902,12.914600420000001,9.620000582799548e-07,14.557771569999886,1.2220000371598871e-06 +test_navigation,test_navigation.NavigationTest.test_read_related_and_inspect_share_the_snapshot_root,pass,3.395930055000008,3.327075581999999,9.719999525259482e-07,3.391749473000118,1.421999968442833e-06 +test_navigation,test_navigation.NavigationTest.test_route_selects_direct_modules_and_required_closure,pass,0.8142107959999976,0.8002821570000016,9.709999631013488e-07,0.8139830979998806,1.7120000848080963e-06 +test_navigation,test_navigation.NavigationTest.test_unknown_and_invalid_route_facts_have_typed_results,pass,1.6231002879999323,1.5930936019999997,1.0720000318542589e-06,1.622870556999942,1.2509999578469433e-06 +test_navigation_indexes,test_navigation_indexes.NavigationIndexAuthorityTest.test_absent_catalog_exposes_no_authoring_capability,pass,0.0004982699999800388,0.00036186600000043256,1.3920000583311776e-06,4.892299989478488e-05,9.020000106829684e-07 +test_navigation_indexes,test_navigation_indexes.NavigationIndexAuthorityTest.test_bad_catalog_and_non_utf8_content_are_typed_rejections,pass,0.0005521690000023227,0.0005686090000001087,6.81000074109761e-07,0.0003959470000154397,6.10000142842182e-07 +test_navigation_indexes,test_navigation_indexes.NavigationIndexAuthorityTest.test_declared_routes_bind_their_owner_content_and_exact_declarations,pass,0.0006624619998092385,0.0006837299999999935,5.410001904238015e-07,0.0005613719999928435,5.609999789157882e-07 +test_navigation_indexes,test_navigation_indexes.NavigationIndexAuthorityTest.test_old_captured_index_without_route_inventory_remains_readable,pass,0.0002331260000119073,0.00023390200000017458,4.309999894758221e-07,0.00012353299985079502,4.309999894758221e-07 +test_navigation_indexes,test_navigation_indexes.NavigationIndexAuthorityTest.test_registration_cannot_make_a_normative_standard_writable,pass,0.00015342699998655007,0.00015850000000039444,4.910000370728085e-07,7.340899992414052e-05,3.410000317671802e-07 +test_navigation_indexes,test_navigation_indexes.NavigationIndexAuthorityTest.test_review_fingerprint_binds_destination_authority_without_inventing_policy_changes,pass,0.0003712710001764208,0.0003653570000001771,3.60000058208243e-07,0.00029228300013528496,3.309999101475114e-07 +test_navigation_indexes,test_navigation_indexes.NavigationIndexWorkflowTest.test_cross_snapshot_handle_is_not_an_authorization_to_retarget,pass,5.758464351000157,4.495240312000001,1.5720002011221368e-06,5.758135292999896,1.6819999473227654e-06 +test_navigation_indexes,test_navigation_indexes.NavigationIndexWorkflowTest.test_discovery_captures_exact_content_without_claiming_policy_authority,pass,1.6063066809999782,1.606142964,1.202000021294225e-06,1.606040435000068,1.4319998626888264e-06 +test_navigation_indexes,test_navigation_indexes.NavigationIndexWorkflowTest.test_fresh_mcp_process_exposes_snapshot_bound_navigation,pass,3.084954175999883,0.005633430999999689,1.3320000107341912e-06,3.0847608290000608,2.1630000901495805e-06 +test_navigation_indexes,test_navigation_indexes.NavigationIndexWorkflowTest.test_invalid_selections_do_not_create_an_applicable_candidate,pass,3.6985013149999304,3.090435020000001,1.582999857419054e-06,3.6982767819999935,1.311999994868529e-06 +test_navigation_indexes,test_navigation_indexes.NavigationIndexWorkflowTest.test_retarget_dispositions_cannot_remove_unrelated_assertions,pass,3.6403088140000364,3.142665776000001,1.802999804567662e-06,3.6400468249998994,1.3820001640851842e-06 +test_navigation_indexes,test_navigation_indexes.NavigationIndexWorkflowTest.test_z_exact_index_proposal_requires_review_and_applies_through_engine,pass,92.80852753900012,32.581903972999996,1.1219999578315765e-06,92.80636240700005,1.8129999261873309e-06 +test_navigation_indexes,test_navigation_indexes.ProtectedNavigationIndexTest.test_declared_routes_reject_omitted_owners_and_unsupported_artifacts,pass,3.4976513849999264,2.920706138,1.5229998098220676e-06,3.4972981509999954,1.7729998944560066e-06 +test_navigation_indexes,test_navigation_indexes.ProtectedNavigationIndexTest.test_z_declared_sections_survive_verified_index_application,pass,51.00172072300006,19.798349065000004,1.2719999631372048e-06,51.00151769200011,1.503000021330081e-06 +test_nested_materials,test_nested_materials.NestedMaterialTests.test_analyze_and_query_each_start_with_fresh_material,pass,5.6534885449998455,4.829130649,1.8929999896499794e-06,5.65018536499997,1.722999968478689e-06 +test_nested_materials,test_nested_materials.NestedMaterialTests.test_bad_evidence_is_rejected_and_next_call_observes_new_evidence,pass,6.294014957999934,5.472118543999999,2.4729999950068304e-06,6.293671599000163,1.962999931492959e-06 +test_nested_materials,test_nested_materials.NestedMaterialTests.test_head_change_after_preflight_still_rejects_stale_revision,pass,7.808644507000054,6.552288219999999,9.709999631013488e-07,7.808125587999939,1.962999931492959e-06 +test_nested_materials,test_nested_materials.NestedMaterialTests.test_implicit_capture_keeps_independent_record_and_replay_passes,pass,4.666794941000035,3.346599831999999,1.002000090011279e-06,4.666647062000038,1.37199981509184e-06 +test_nested_materials,test_nested_materials.NestedMaterialTests.test_nested_public_reentry_has_independent_operation_material,pass,7.813572998000154,6.863671629999999,1.0910000582953217e-06,7.81321316399999,1.6020001112337923e-06 +test_nested_materials,test_nested_materials.NestedMaterialTests.test_propose_shares_validation_and_analysis_material,pass,3.6009691759998077,3.116053752999999,1.2820000847568735e-06,3.600738002999833,1.3520000265998533e-06 +test_nested_materials,test_nested_materials.NestedMaterialTests.test_public_application_cannot_reach_authoring_reuse,pass,0.2754879480000909,0.27130546500000463,1.4320000900625018e-06,0.2713281370001823,1.452000105928164e-06 +test_nested_materials,test_nested_materials.NestedMaterialTests.test_quarantine_during_authorization_blocks_reused_material,pass,5.728217549999954,4.899801424000003,9.420000424142927e-07,5.72797942599982,1.6520000372111099e-06 +test_nested_materials,test_nested_materials.NestedMaterialTests.test_resolution_reuses_material_with_three_fresh_evaluations,pass,3.7410288200001105,3.239232788999999,1.252000174645218e-06,3.7407509470001514,1.5320001693908125e-06 +test_nested_materials,test_nested_materials.NestedMaterialTests.test_revise_compiles_only_old_and_new_projections,pass,11.926493033000042,9.821538299000004,1.100999952541315e-06,11.924026794999918,1.0820001534739276e-06 +test_nested_materials,test_nested_materials.NestedMaterialTests.test_scope_releases_material_after_success_and_exception,pass,2.7498833600000125,2.501670115000003,1.0219998785032658e-06,2.749622905000024,1.452000105928164e-06 +test_platform_harness,test_platform_harness.PlatformHarnessTest.test_closed_store_round_trip_uses_public_operations,pass,12.131437046999963,8.0957652,1.261999841517536e-06,12.130861383000138,1.9829999473586213e-06 +test_platform_harness,test_platform_harness.PlatformHarnessTest.test_concurrent_probe_rejects_mismatched_content,pass,0.0010818949999702454,0.0011148649999999094,1.3819999367115088e-06,0.000912473999960639,8.209999577957205e-07 +test_platform_harness,test_platform_harness.PlatformHarnessTest.test_consume_rejects_changed_store_before_open,pass,0.001551882000057958,0.0015688950000001256,6.010000106471125e-07,0.0014227809999738383,7.109999842214165e-07 +test_purpose_projection,test_purpose_projection.PurposeProjectionTest.test_authoring_read_retrieves_reasoning_and_exposure_state,pass,1.94186385099988,1.941189177,2.052999889201601e-06,1.941440393999983,1.6930000583670335e-06 +test_purpose_projection,test_purpose_projection.PurposeProjectionTest.test_catalog_has_no_authoring_schema_closure,pass,0.005633017000036489,0.00562357599999963,1.3520000265998533e-06,0.0054578669999045815,9.619998309062794e-07 +test_purpose_projection,test_purpose_projection.PurposeProjectionTest.test_direct_hidden_read_and_privileged_request_are_bounded,pass,0.7971273390000988,0.7968619769999998,1.092000047719921e-06,0.7969183380000686,1.0320000001229346e-06 +test_purpose_projection,test_purpose_projection.PurposeProjectionTest.test_domain_and_facade_admit_only_application_operations_before_work,pass,0.2610081479999735,0.26097167700000057,1.2519999472715426e-06,0.2607832840001265,1.2219998097862117e-06 +test_purpose_projection,test_purpose_projection.PurposeProjectionTest.test_hidden_intermediate_cannot_bridge_a_permitted_traversal,pass,0.0009259240000574209,0.0009648419999992441,1.1120000635855831e-06,0.0007588959999793587,8.409999736613827e-07 +test_purpose_projection,test_purpose_projection.PurposeProjectionTest.test_invalid_host_purpose_creates_no_store,pass,0.0005521390000922111,0.000573987000000109,6.909999683557544e-07,0.0004339540000728448,6.509999366244301e-07 +test_purpose_projection,test_purpose_projection.PurposeProjectionTest.test_material_change_requires_new_exposure_but_rationale_change_does_not,pass,0.40373259400007555,0.4037379149999998,6.410000423784368e-07,0.40356719800001883,1.7920001482707448e-06 +test_purpose_projection,test_purpose_projection.PurposeProjectionTest.test_native_query_and_handle_inspection_use_the_same_boundary,pass,2.554801858000019,2.5537027130000007,1.0219998785032658e-06,2.554590855000015,1.3020001006225357e-06 +test_purpose_projection,test_purpose_projection.PurposeProjectionTest.test_read_has_exact_reviewed_content_and_explicit_permitted_fields,pass,1.7107932490000621,1.6534292219999998,1.2719999631372048e-06,1.7070863799999643,1.663000148255378e-06 +test_purpose_projection,test_purpose_projection.PurposeProjectionTest.test_router_presentation_change_requires_explicit_renewal,pass,0.28390964100003657,0.2766032780000014,1.8829998680303106e-06,0.2763614929999676,1.7930001376953442e-06 +test_purpose_projection,test_purpose_projection.PurposeProjectionTest.test_routing_retains_unknown_facts_and_blocks_missing_required_content,pass,2.5009494280000126,2.471869764999999,1.6320000213454477e-06,2.5007299829999283,1.6619999314571032e-06 +test_purpose_projection,test_purpose_projection.PurposeProjectionTest.test_unexpected_observation_failure_returns_no_private_context,pass,0.7863933179999094,0.774083289,1.3020001006225357e-06,0.7861986790001083,1.4120000741968397e-06 +test_purpose_projection,test_purpose_projection.PurposeProjectionTest.test_unsupported_capture_is_preserved_and_classified,pass,2.479537531999995,2.415809843,1.4519998785544885e-06,2.47928495799988,2.9039999844826525e-06 +test_purpose_projection,test_purpose_projection.PurposeProjectionTest.test_whole_module_discovers_references_owned_by_its_policy_units,pass,0.00209225300000071,0.0020930809999981648,1.2620000688912114e-06,0.0018948309998449986,5.310000688041328e-07 +test_purpose_transport,test_purpose_transport.PurposeTransportTest.test_actual_stdio_has_qualified_catalog_and_identical_result_encodings,pass,4.521052903000054,0.0024091710000000433,2.1440000637085177e-06,4.5176576259998455,2.1230000584182562e-06 +test_purpose_transport,test_purpose_transport.PurposeTransportTest.test_cli_catalog_schema_example_and_denial_share_the_purpose,pass,8.955715043000055,0.0033304720000000287,1.4929998997104121e-06,8.95433963299979,1.8429998362989863e-06 +test_purpose_transport,test_purpose_transport.PurposeTransportTest.test_default_capture_reads_accepted_main_instead_of_unpublished_head,pass,4.052448046000109,2.77477297,2.083000026686932e-06,4.052248430999953,2.113000164172263e-06 +test_purpose_transport,test_purpose_transport.PurposeTransportTest.test_two_cold_processes_preserve_exact_application_read,pass,9.647323080999968,0.002961305999999553,8.619999789516442e-07,9.64369749299999,1.6320000213454477e-06 +test_rendering,test_rendering.TextRenderingTest.test_application_purpose_is_distinct_from_authoring_publication,pass,0.000614230999872234,0.0005901059999997571,1.3619999208458466e-06,0.0003330940000978444,9.309999313700246e-07 +test_rendering,test_rendering.TextRenderingTest.test_coverage_projection_preserves_subject_and_status,pass,0.0030914559999928315,0.00011024299999995435,6.210000265127746e-07,5.422000003818539e-05,4.0000008993956726e-07 +test_rendering,test_rendering.TextRenderingTest.test_navigation_indexes_preserve_authority_and_exact_content,pass,7.664399981877068e-05,6.740999999976793e-05,6.709999524900923e-07,1.3249999938125256e-05,3.309999101475114e-07 +test_rendering,test_rendering.TextRenderingTest.test_pending_projection_is_deterministic_and_work_focused,pass,9.384899999531626e-05,8.885199999975057e-05,4.0099985199049115e-07,3.029499998774554e-05,3.610000476328423e-07 +test_rendering,test_rendering.TextRenderingTest.test_projected_navigation_renders_revision_authority,pass,4.647800005841418e-05,4.3214999999818815e-05,2.599999788799323e-07,1.1256999869146966e-05,2.3000006876827683e-07 +test_rendering,test_rendering.TextRenderingTest.test_proposal_projection_exposes_only_opaque_handles,pass,3.767599991988391e-05,3.4741999999976514e-05,2.0999982552893925e-07,7.1710001066094264e-06,2.0100014808122069e-07 +test_rendering,test_rendering.TextRenderingTest.test_proposal_review_renders_only_opaque_authority,pass,3.310900001451955e-05,3.0414999999894832e-05,2.3000006876827683e-07,4.687000000558328e-06,2.1100004232721403e-07 +test_rendering,test_rendering.TextRenderingTest.test_rejection_projection_accepts_the_generated_result_type,pass,0.000297582000030161,0.0002901409999997995,2.4100017981254496e-07,0.0002560400000675145,3.200000264769187e-07 +test_rendering,test_rendering.TextRenderingTest.test_unknown_result_variant_is_a_programming_error,pass,0.0001406290000431909,0.00013599200000014022,3.110001216555247e-07,9.553199993206363e-05,3.609998202591669e-07 +test_rendering,test_rendering.TextRenderingTest.test_verification_projection_preserves_revision_and_diagnostic_identity,pass,6.579799992323387e-05,6.21030000003131e-05,3.010000000358559e-07,2.1792999859826523e-05,3.100001322309254e-07 +test_supporting_workflow,test_supporting_workflow.SupportingWorkflowTest.test_coordinated_publication_and_provenance_only_revision,pass,152.53064915999994,80.913438186,2.0939999103575246e-06,152.53016240800002,1.7919999208970694e-06 diff --git a/docs/plans/purpose-separated-standards-engine/reports/performance-nested-increment/verification.json b/docs/plans/purpose-separated-standards-engine/reports/performance-nested-increment/verification.json new file mode 100644 index 00000000..1a0fc61b --- /dev/null +++ b/docs/plans/purpose-separated-standards-engine/reports/performance-nested-increment/verification.json @@ -0,0 +1,258 @@ +{ + "engine": { + "run": 177, + "passed": 177, + "modules": 18, + "method": "Every discovered Engine test executed once, partitioned by module into independent Python processes (maximum three concurrent), each owning separate fixture repositories and stores. These durations are diagnostics under contention, not performance comparison measurements.", + "module_results": [ + { + "module": "test_agent_navigation", + "event": "summary", + "total_s": 26.854922888000033, + "run": 11, + "errors": 0, + "failures": 0, + "skips": 0 + }, + { + "module": "test_agent_workflow", + "event": "summary", + "total_s": 51.224152735000075, + "run": 6, + "errors": 0, + "failures": 0, + "skips": 0 + }, + { + "module": "test_analysis", + "event": "summary", + "total_s": 272.28598574399996, + "run": 21, + "errors": 0, + "failures": 0, + "skips": 0 + }, + { + "module": "test_applicability_contract", + "event": "summary", + "total_s": 0.013502866999942853, + "run": 2, + "errors": 0, + "failures": 0, + "skips": 0 + }, + { + "module": "test_authoring", + "event": "summary", + "total_s": 5.592279137999981, + "run": 13, + "errors": 0, + "failures": 0, + "skips": 0 + }, + { + "module": "test_coverage_publication", + "event": "summary", + "total_s": 136.94765947099995, + "run": 1, + "errors": 0, + "failures": 0, + "skips": 0 + }, + { + "module": "test_evidence_maintenance", + "event": "summary", + "total_s": 115.15308697700004, + "run": 7, + "errors": 0, + "failures": 0, + "skips": 0 + }, + { + "module": "test_generated_contract", + "event": "summary", + "total_s": 19.00209792999999, + "run": 15, + "errors": 0, + "failures": 0, + "skips": 0 + }, + { + "module": "test_logical_authoring", + "event": "summary", + "total_s": 46.10942760100011, + "run": 24, + "errors": 0, + "failures": 0, + "skips": 0 + }, + { + "module": "test_mcp", + "event": "summary", + "total_s": 9.569270881999955, + "run": 13, + "errors": 0, + "failures": 0, + "skips": 0 + }, + { + "module": "test_navigation", + "event": "summary", + "total_s": 32.54248474500014, + "run": 7, + "errors": 0, + "failures": 0, + "skips": 0 + }, + { + "module": "test_navigation_indexes", + "event": "summary", + "total_s": 234.0338583959999, + "run": 14, + "errors": 0, + "failures": 0, + "skips": 0 + }, + { + "module": "test_nested_materials", + "event": "summary", + "total_s": 64.82805385899997, + "run": 11, + "errors": 0, + "failures": 0, + "skips": 0 + }, + { + "module": "test_platform_harness", + "event": "summary", + "total_s": 13.411782038000183, + "run": 3, + "errors": 0, + "failures": 0, + "skips": 0 + }, + { + "module": "test_purpose_projection", + "event": "summary", + "total_s": 16.809572077999974, + "run": 14, + "errors": 0, + "failures": 0, + "skips": 0 + }, + { + "module": "test_purpose_transport", + "event": "summary", + "total_s": 31.107008182000072, + "run": 4, + "errors": 0, + "failures": 0, + "skips": 0 + }, + { + "module": "test_rendering", + "event": "summary", + "total_s": 1.341686966999987, + "run": 10, + "errors": 0, + "failures": 0, + "skips": 0 + }, + { + "module": "test_supporting_workflow", + "event": "summary", + "total_s": 154.50078991099986, + "run": 1, + "errors": 0, + "failures": 0, + "skips": 0 + } + ] + }, + "supporting": { + "run": 421, + "skipped": 1, + "packages": [ + { + "package": "graph_engine", + "run": 37, + "duration_s": 0.212, + "skipped": 0 + }, + { + "package": "repository_git", + "run": 16, + "duration_s": 1.648, + "skipped": 0 + }, + { + "package": "standards_analysis", + "run": 100, + "duration_s": 0.704, + "skipped": 0 + }, + { + "package": "standards_applicability", + "run": 12, + "duration_s": 0.01, + "skipped": 0 + }, + { + "package": "standards_contracts", + "run": 23, + "duration_s": 22.749, + "skipped": 1 + }, + { + "package": "standards_graph", + "run": 2, + "duration_s": 0.073, + "skipped": 0 + }, + { + "package": "standards_identity", + "run": 11, + "duration_s": 0.02, + "skipped": 0 + }, + { + "package": "standards_metadata", + "run": 31, + "duration_s": 0.311, + "skipped": 0 + }, + { + "package": "standards_policy_impact", + "run": 10, + "duration_s": 0.392, + "skipped": 0 + }, + { + "package": "standards_snapshots", + "run": 23, + "duration_s": 0.085, + "skipped": 0 + }, + { + "package": "standards_verifier", + "run": 156, + "duration_s": 23.823, + "skipped": 0 + } + ] + }, + "qualification_candidate": { + "candidate": "20f05cd5800a5a27feb69bd2df2f1bc5db9b5879", + "base": "63338566110bf8de9d0a84fddf3322cc6bb6c0c9", + "source_hashes": { + "tools/standards_engine/PURPOSE-SEPARATION.md": "3a2e7d6ebeb5876b49f89859062aad3191199e8ad7726833ee3f35883b23279e", + "tools/standards_engine/standards_engine/agent_workflow.py": "c133d520bc82c951e6f9be3ee6e6b7ca2ecdc7cde4c38b8c4ee1a42533a494d9", + "tools/standards_engine/standards_engine/authoring.py": "6761c6b11a3904052b873c0db8d83127bb8080f0dc73fff3c6a2d26620bcd538", + "tools/standards_engine/standards_engine/engine.py": "1c40aeafc3b247b8acded59b4b9fd9bb99c8eb00d59b795f8b60cce03243a196", + "tools/standards_engine/standards_engine/operation_materials.py": "fff7a6cba434679b8d95f89d1eb17e25013b9887047c2dd7ab632d3b4d84a6fe", + "tools/standards_engine/tests/test_agent_workflow.py": "d429509a1fead84d65a885d098e9dd5d8b78ca8e975b2a4727c3041ae01c81f6", + "tools/standards_engine/tests/test_authoring.py": "7246399d408485f0f135b4f07b964bc9e2c6c1e0ff6d55a970d5e5aef0cd8d37", + "tools/standards_engine/tests/test_nested_materials.py": "ab107415318aba18acdef76bc5da969ff4343317beb3097872e7f7acf5901020" + } + } +} diff --git a/evaluation/standards-effectiveness/generated/suite-inputs.json b/evaluation/standards-effectiveness/generated/suite-inputs.json index 087c18fa..0ca0e4b3 100644 --- a/evaluation/standards-effectiveness/generated/suite-inputs.json +++ b/evaluation/standards-effectiveness/generated/suite-inputs.json @@ -7029,7 +7029,7 @@ ] }, { - "digest": "sha256:cb143a833e9eff04624e7d4343107fbc4e23c09e471777f3c65644ec3ab9c1d4", + "digest": "sha256:c133d520bc82c951e6f9be3ee6e6b7ca2ecdc7cde4c38b8c4ee1a42533a494d9", "path": "tools/standards_engine/standards_engine/agent_workflow.py", "state": "present", "uses": [ @@ -7041,7 +7041,7 @@ ] }, { - "digest": "sha256:20052ac23cc68680ceead0b9c822bc05494ea6cbb3b139fc7903d861d113bda7", + "digest": "sha256:6761c6b11a3904052b873c0db8d83127bb8080f0dc73fff3c6a2d26620bcd538", "path": "tools/standards_engine/standards_engine/authoring.py", "state": "present", "uses": [ @@ -7065,7 +7065,7 @@ ] }, { - "digest": "sha256:c934cec565312dfcf92351d7fb042091dc641e60591e1bdb98ba32faf4dd5ea4", + "digest": "sha256:1c40aeafc3b247b8acded59b4b9fd9bb99c8eb00d59b795f8b60cce03243a196", "path": "tools/standards_engine/standards_engine/engine.py", "state": "present", "uses": [ @@ -7134,6 +7134,18 @@ } ] }, + { + "digest": "sha256:fff7a6cba434679b8d95f89d1eb17e25013b9887047c2dd7ab632d3b4d84a6fe", + "path": "tools/standards_engine/standards_engine/operation_materials.py", + "state": "present", + "uses": [ + { + "check": "python-package-contract", + "role": "package-contract-input", + "suite": "a1c-public-cutover" + } + ] + }, { "digest": "sha256:9e7f316e15d9af14228558dc7ed2bb48ab28605204c7d4c22ce9857671546fd4", "path": "tools/standards_engine/standards_engine/rendering.py", @@ -13254,7 +13266,7 @@ "path": "evaluation/standards-effectiveness/suite-registry.toml" }, "repository_index": { - "digest": "sha256:8d4d7663b51117f0cadb45bb83fb9da288e200c485dc59af2f92d1b1edbb2c8a", + "digest": "sha256:c78cf869a7d3432df7de066412b97a860d9f07c25d333186129e5f0b1dd25c19", "uses": [ { "check": "python-package-contract", diff --git a/tools/standards_engine/PURPOSE-SEPARATION.md b/tools/standards_engine/PURPOSE-SEPARATION.md index 68d58adf..e30c6663 100644 --- a/tools/standards_engine/PURPOSE-SEPARATION.md +++ b/tools/standards_engine/PURPOSE-SEPARATION.md @@ -64,13 +64,20 @@ Both the requested-path closure and semantic signature still have to agree. The selected accepted-main revision stays fixed throughout that capture. Analysis preparation and resolution borrow verified immutable inputs for the -current native operation. Identical snapshot roles share one material value; -distinct roots keep independent lifecycle and content observations. Exact -proposal projections carry their already-compiled base into logical authoring, -while changed candidates take the complete compiler path. Retained-decision -and pre-/post-submission evaluations still run independently, with current -lifecycle, revision and authorization observations at their existing boundaries. -The immutable material does not retain provider outcomes or evaluation results. +current operation. Identical snapshot roles share one material value; distinct +roots keep independent lifecycle and content observations. Focused proposal +creation, revision, analysis and resolution pass one explicit proposal-material +scope through preflight, prospective validation and native analysis. It retains +one verified base and only the most recent exact projection; changing revisions +replaces that projection. Authoring receives its pure preparation dependency +per invocation while retaining ownership of durable roots and conditional writes. + +Each material access checks current snapshot lifecycle. Stored revisions, heads, +authorization and pre-/post-submission decisions retain their independent checks. +Changed candidates take the complete compiler path; capture's two passes remain +independent. Scope cleanup releases retained references on success or failure. +The scope contains no provider outcomes or evaluation results. Nested public +re-entry constructs its own scope, and public request shapes remain unchanged. Each subsequent operation loads and verifies its own captured bytes. Publication verification, target compare-and-swap and recovery obtain fresh observations; diff --git a/tools/standards_engine/standards_engine/agent_workflow.py b/tools/standards_engine/standards_engine/agent_workflow.py index e1d9b05f..5e2ac26f 100644 --- a/tools/standards_engine/standards_engine/agent_workflow.py +++ b/tools/standards_engine/standards_engine/agent_workflow.py @@ -23,6 +23,7 @@ if TYPE_CHECKING: from .engine import StandardsEngine + from .operation_materials import ProposalMaterials ACTIONS = { @@ -94,7 +95,7 @@ def bind(engine: StandardsEngine, context: c.WorkflowContext) -> BoundWorkflow: return BoundWorkflow(context, revision, analysis, readiness) -def view(engine, bound, outcome=None): +def view(engine, bound, outcome=None, materials: ProposalMaterials | None = None): context = bound.context.as_contract() status = "draft" if isinstance(outcome, c.ApplicationRecoveryRequiredResult): @@ -120,7 +121,11 @@ def view(engine, bound, outcome=None): ) elif bound.analysis is not None: if not isinstance(outcome, (c.PendingResult, c.CompleteResult)): - outcome = engine._analysis_result(engine._evaluate(bound.analysis)) + inputs = ( + None if materials is None + else engine._evaluation_materials(bound.analysis, materials) + ) + outcome = engine._analysis_result(engine._evaluate(bound.analysis, inputs)) status = "needs-action" if isinstance(outcome, c.PendingResult) else "complete" if status == "complete" and engine._review_requires_change(bound.analysis): status = "requires-change" @@ -148,17 +153,17 @@ def view(engine, bound, outcome=None): return c.WorkflowResult.from_value(result) -def analyze_revision(engine, revision): - result = engine.analyze_proposal(c.AnalyzeProposalCall(revision)) +def analyze_revision(engine, revision, materials: ProposalMaterials): + result = engine._analyze_proposal(c.AnalyzeProposalCall(revision), materials) context = ( result.handle if isinstance(result, (c.PendingResult, c.CompleteResult)) else revision ) - return view(engine, bind(engine, context), result) + return view(engine, bind(engine, context), result, materials) -def propose(engine, call): +def propose(engine, call, materials: ProposalMaterials): try: arguments = call.as_contract() snapshot = arguments.get("snapshot") @@ -169,28 +174,29 @@ def propose(engine, call): if isinstance(captured, c.RejectedResult): return captured snapshot = captured.as_contract()["snapshot"]["snapshot"] - result = engine.create_proposal( + result = engine._create_proposal( c.CreateProposalCall.from_value( { "kind": "create-proposal", "base_snapshot": snapshot, "change_set": arguments["change_set"], } - ) + ), + materials, ) if isinstance(result, c.RejectedResult): return result - return analyze_revision(engine, result.revision) + return analyze_revision(engine, result.revision, materials) except engine._domain_errors() as error: return engine._domain_rejection(error) -def advance(engine, operation, call): +def advance(engine, operation, call, materials: ProposalMaterials | None = None): try: bound = bind(engine, call.context) if operation == "workflow_status": - return view(engine, bound) - current = view(engine, bound) + return view(engine, bound, materials=materials) + current = view(engine, bound, materials=materials) if operation == "resume" and current.status not in ( "applied", "recovery-required", @@ -210,28 +216,32 @@ def advance(engine, operation, call): revision = current.revision arguments = call.as_contract() if operation == "revise": - result = engine.revise_proposal( + assert materials is not None + result = engine._revise_proposal( c.ReviseProposalCall.from_value( { "kind": "revise-proposal", "expected_revision": revision.as_contract(), "change_set": arguments["change_set"], } - ) + ), + materials, ) if isinstance(result, c.RejectedResult): - return view(engine, bound, result) - return analyze_revision(engine, result.revision) + return view(engine, bound, result, materials) + return analyze_revision(engine, result.revision, materials) if operation == "analyze": - return analyze_revision(engine, revision) + assert materials is not None + return analyze_revision(engine, revision, materials) if operation == "resolve_workflow": - result = engine.resolve( + result = engine._resolve( c.ResolveCall.from_value( { "analysis": engine._analysis_handle(bound.analysis.analysis_id), "submission": arguments["submission"], } - ) + ), + materials, ) context = ( result.handle @@ -275,7 +285,7 @@ def advance(engine, operation, call): "WORKFLOW.OPERATION_INVALID", "Unsupported workflow operation." ) return view( - engine, bound if context == call.context else bind(engine, context), result + engine, bound if context == call.context else bind(engine, context), result, materials ) except engine._domain_errors() as error: return engine._domain_rejection(error) diff --git a/tools/standards_engine/standards_engine/authoring.py b/tools/standards_engine/standards_engine/authoring.py index 945f5cd4..db8ebacf 100644 --- a/tools/standards_engine/standards_engine/authoring.py +++ b/tools/standards_engine/standards_engine/authoring.py @@ -6,7 +6,7 @@ import uuid from collections.abc import Callable, Iterable, Mapping, Sequence from dataclasses import dataclass -from typing import TYPE_CHECKING, Literal +from typing import TYPE_CHECKING, Literal, Protocol from tools.repository_git.repository_git import ( CandidateCommitMessage, @@ -627,6 +627,14 @@ class ProposalPage: continuation: ProposalId | None +class ProposalPreparation(Protocol): + """Operation-owned pure preparation; publication remains Authoring-owned.""" + + def repository_paths(self, snapshot: SnapshotId) -> Iterable[str]: ... + + def validate_revision(self, revision: ProposalRevision) -> None: ... + + class AuthoringModule: """Owns immutable proposal material and proposal-head coordination.""" @@ -634,24 +642,10 @@ def __init__( self, snapshots: SnapshotModule, *, - validate_revision: Callable[[ProposalRevision], None], - observe_repository_paths: Callable[[SnapshotId], Iterable[str]], now: Callable[[], int] | None = None, proposal_id_factory: Callable[[], ProposalId] | None = None, ) -> None: self._snapshots = snapshots - if not callable(validate_revision): - raise _invalid( - "AUTHORING.INVALID_REVISION_VALIDATOR", - "Authoring requires one prospective revision validator", - ) - self._validate_revision = validate_revision - if not callable(observe_repository_paths): - raise _invalid( - "AUTHORING.INVALID_PATH_OBSERVER", - "Authoring requires one base-revision path observer", - ) - self._observe_repository_paths = observe_repository_paths self._now = now or (lambda: int(time.time())) self._proposal_id_factory = proposal_id_factory or ( lambda: ProposalId.from_uuid(uuid.uuid4()) @@ -661,6 +655,8 @@ def create_proposal( self, base_snapshot: SnapshotId, change_set: StandardsChangeSet, + *, + preparation: ProposalPreparation, ) -> tuple[ProposalSummary, ProposalRevision]: proposal = self._proposal_id_factory() if type(proposal) is not ProposalId: @@ -672,10 +668,10 @@ def create_proposal( proposal, 1, base_snapshot, - self._observe_repository_paths(base_snapshot), + preparation.repository_paths(base_snapshot), (change_set,), ) - self._validate_revision(revision) + preparation.validate_revision(revision) root = AggregateRoot( str(proposal), PROPOSAL_KIND, @@ -721,6 +717,8 @@ def revise_proposal( self, expected_revision: str, change_set: StandardsChangeSet, + *, + preparation: ProposalPreparation, ) -> tuple[ProposalSummary, ProposalRevision]: expected = self.read_revision(expected_revision) root = self._snapshots.load_aggregate_root(str(expected.proposal)) @@ -736,7 +734,7 @@ def revise_proposal( expected.base_repository_paths, (*expected.change_sets, change_set), ) - self._validate_revision(revision) + preparation.validate_revision(revision) advanced = self._snapshots.advance_aggregate_root( str(expected.proposal), expected_revision, revision.aggregate() ) @@ -1592,6 +1590,7 @@ def _digest_id(value: object, prefix: str) -> bool: "ProposalApplicationSelection", "ProposalId", "ProposalPage", + "ProposalPreparation", "ProposalReadiness", "ProposalRevision", "ProposalSummary", diff --git a/tools/standards_engine/standards_engine/engine.py b/tools/standards_engine/standards_engine/engine.py index ff143586..9dff5bcf 100644 --- a/tools/standards_engine/standards_engine/engine.py +++ b/tools/standards_engine/standards_engine/engine.py @@ -219,6 +219,7 @@ authoring_target_id, ) from .navigation_indexes import NavigationIndex +from .operation_materials import ProposalMaterials from .context_projection import Purpose, public_operation @@ -447,11 +448,7 @@ def __init__( self._repository = repository self._snapshots = snapshots self._logical_authoring = LogicalAuthoringCompiler(self._compile) - self._authoring = AuthoringModule( - snapshots, - validate_revision=self._validate_logical_revision, - observe_repository_paths=self._repository_paths_for_snapshot, - ) + self._authoring = AuthoringModule(snapshots) self._execution_context = execution_context or AnalysisExecutionContext() self._application_verifier = run_complete_verification self._temporary_store = temporary_store @@ -840,11 +837,18 @@ def find_snapshots( @public_operation def create_proposal( self, call: CreateProposalCall + ) -> CreateProposalResult | RejectedResult: + with ProposalMaterials(self) as materials: + return self._create_proposal(call, materials) + + def _create_proposal( + self, call: CreateProposalCall, materials: ProposalMaterials ) -> CreateProposalResult | RejectedResult: try: summary, revision = self._authoring.create_proposal( self._snapshot_id(call.base_snapshot), StandardsChangeSet.from_mapping(call.change_set.as_contract()), + preparation=materials, ) return CreateProposalResult.from_value( { @@ -881,11 +885,18 @@ def find_proposals( @public_operation def revise_proposal( self, call: ReviseProposalCall + ) -> ReviseProposalResult | RejectedResult: + with ProposalMaterials(self) as materials: + return self._revise_proposal(call, materials) + + def _revise_proposal( + self, call: ReviseProposalCall, materials: ProposalMaterials ) -> ReviseProposalResult | RejectedResult: try: summary, revision = self._authoring.revise_proposal( call.expected_revision.id, StandardsChangeSet.from_mapping(call.change_set.as_contract()), + preparation=materials, ) return ReviseProposalResult.from_value( { @@ -931,25 +942,29 @@ def undelete_snapshot( def propose(self, call: ProposeCall) -> WorkflowResult | RejectedResult: from .agent_workflow import propose - return propose(self, call) + with ProposalMaterials(self) as materials: + return propose(self, call, materials) @public_operation def revise(self, call: ReviseCall) -> WorkflowResult | RejectedResult: from .agent_workflow import advance - return advance(self, "revise", call) + with ProposalMaterials(self) as materials: + return advance(self, "revise", call, materials) @public_operation def analyze(self, call: AnalyzeCall) -> WorkflowResult | RejectedResult: from .agent_workflow import advance - return advance(self, "analyze", call) + with ProposalMaterials(self) as materials: + return advance(self, "analyze", call, materials) @public_operation def resolve_workflow(self, call: ResolveWorkflowCall) -> WorkflowResult | RejectedResult: from .agent_workflow import advance - return advance(self, "resolve_workflow", call) + with ProposalMaterials(self) as materials: + return advance(self, "resolve_workflow", call, materials) @public_operation def review(self, call: ReviewCall) -> WorkflowResult | RejectedResult: @@ -973,7 +988,8 @@ def recover(self, call: RecoverCall) -> WorkflowResult | RejectedResult: def workflow_status(self, call: WorkflowStatusCall) -> WorkflowResult | RejectedResult: from .agent_workflow import advance - return advance(self, "workflow_status", call) + with ProposalMaterials(self) as materials: + return advance(self, "workflow_status", call, materials) @public_operation def resume(self, call: ResumeCall) -> WorkflowResult | RejectedResult: @@ -1071,11 +1087,17 @@ def query_proposal( @public_operation def analyze_proposal( self, call: AnalyzeProposalCall + ) -> PendingResult | CompleteResult | RejectedResult: + with ProposalMaterials(self) as materials: + return self._analyze_proposal(call, materials) + + def _analyze_proposal( + self, call: AnalyzeProposalCall, materials: ProposalMaterials ) -> PendingResult | CompleteResult | RejectedResult: try: revision = self._authoring.read_revision(call.revision.id) - accepted = self._compiled_snapshot(revision.base_snapshot) - projection = self._proposal_projection(revision, accepted) + accepted = materials.compiled(revision.base_snapshot) + projection = materials.projection(revision) proposed = projection.compiled semantic_proposals = projection.semantic_proposals affected_policy_ids = set(projection.analysis_policy_ids) @@ -1637,10 +1659,15 @@ def prepare( @public_operation def resolve( self, call: ResolveCall + ) -> PendingResult | CompleteResult | RejectedResult: + return self._resolve(call) + + def _resolve( + self, call: ResolveCall, operation: ProposalMaterials | None = None ) -> PendingResult | CompleteResult | RejectedResult: try: state = self._load_analysis(call.analysis) - materials = self._evaluation_materials(state) + materials = self._evaluation_materials(state, operation) successor = self._apply_submission(self._evaluate(state, materials), call) return self._evaluate_publish_project(successor, materials) except self._domain_errors() as error: @@ -1721,14 +1748,6 @@ def _proposal_projection( compiled_base=accepted, ) - def _validate_logical_revision(self, revision: ProposalRevision) -> None: - self._proposal_projection(revision) - - def _repository_paths_for_snapshot(self, snapshot: SnapshotId) -> tuple[str, ...]: - capture = self._snapshots.load_content(snapshot) - revision = RepositoryRevision(capture.source_revision) - return tuple(str(path) for path in self._repository.revision_paths(revision)) - @staticmethod def _compile(source: ContentSource) -> CompiledSnapshot: from .navigation_indexes import load_indexes @@ -1789,8 +1808,13 @@ def _repository_decisions( tuple(authorizations[key] for key in sorted(authorizations)), ) - def _evaluation_materials(self, state: DomainAnalysisState) -> _EvaluationMaterials: - accepted = self._compiled_snapshot(state.base_snapshot) + def _evaluation_materials( + self, state: DomainAnalysisState, operation: ProposalMaterials | None = None + ) -> _EvaluationMaterials: + accepted = ( + self._compiled_snapshot(state.base_snapshot) + if operation is None else operation.compiled(state.base_snapshot) + ) proposed_ref = state.proposed_material if isinstance(proposed_ref, SnapshotMaterialRef): proposed = ( @@ -1810,7 +1834,10 @@ def _evaluation_materials(self, state: DomainAnalysisState) -> _EvaluationMateri "Proposal revision and analysis base snapshots differ.", ) ) - projection = self._proposal_projection(revision, accepted) + projection = ( + self._proposal_projection(revision, accepted) + if operation is None else operation.projection(revision) + ) return _EvaluationMaterials( state.base_snapshot, proposed_ref, diff --git a/tools/standards_engine/standards_engine/operation_materials.py b/tools/standards_engine/standards_engine/operation_materials.py new file mode 100644 index 00000000..dd712a37 --- /dev/null +++ b/tools/standards_engine/standards_engine/operation_materials.py @@ -0,0 +1,71 @@ +"""Pure proposal inputs retained for one explicitly composed authoring operation.""" +from __future__ import annotations + +from typing import TYPE_CHECKING + +from tools.repository_git.repository_git import RepositoryRevision +from tools.standards_analysis.standards_analysis import AnalysisError, AnalysisFailure +from tools.standards_snapshots.standards_snapshots import SnapshotId + +if TYPE_CHECKING: + from .authoring import ProposalRevision + from .engine import CompiledSnapshot, StandardsEngine + from .logical_authoring import LogicalProjection + + +class ProposalMaterials: + """Borrow one verified base and the most recent exact proposal projection. + + Focused composition passes this value explicitly through preflight, revision + validation and analysis. Each access observes current snapshot lifecycle; + callers still read current revisions, heads and authorization independently. + No entry survives the operation or supplies publication/recovery authority. + """ + + def __init__(self, engine: StandardsEngine) -> None: + self._engine = engine + self._base: tuple[SnapshotId, CompiledSnapshot] | None = None + self._projection: tuple[ProposalRevision, LogicalProjection] | None = None + + def __enter__(self) -> ProposalMaterials: + return self + + def __exit__(self, *_: object) -> None: + self._base = None + self._projection = None + + def compiled(self, snapshot: SnapshotId) -> CompiledSnapshot: + if self._base is None: + compiled = self._engine._compiled_snapshot(snapshot) + self._base = (snapshot, compiled) + elif self._base[0] != snapshot: + raise AnalysisError( + AnalysisFailure( + "ANALYSIS.MATERIAL_INPUT_MISMATCH", "invalid", + "Operation material belongs to a different base snapshot.", + ) + ) + else: + self._engine._snapshots.snapshot(snapshot) + return self._base[1] + + def repository_paths(self, snapshot: SnapshotId) -> tuple[str, ...]: + # Verify captured bytes before using this root's source-revision fact. + self.compiled(snapshot) + summary = self._engine._snapshots.snapshot(snapshot) + paths = self._engine._repository.revision_paths( + RepositoryRevision(summary.source_revision) + ) + return tuple(str(path) for path in paths) + + def projection(self, revision: ProposalRevision) -> LogicalProjection: + accepted = self.compiled(revision.base_snapshot) + if self._projection is not None and self._projection[0] == revision: + return self._projection[1] + projection = self._engine._proposal_projection(revision, accepted) + # A revision change replaces, rather than accumulates, retained output. + self._projection = (revision, projection) + return projection + + def validate_revision(self, revision: ProposalRevision) -> None: + self.projection(revision) diff --git a/tools/standards_engine/tests/test_agent_workflow.py b/tools/standards_engine/tests/test_agent_workflow.py index 338ac2e9..1ebd5d50 100644 --- a/tools/standards_engine/tests/test_agent_workflow.py +++ b/tools/standards_engine/tests/test_agent_workflow.py @@ -275,7 +275,7 @@ def test_analysis_rejection_retains_the_created_revision(self): "next_operations": [], } ) - with patch.object(self.engine, "analyze_proposal", return_value=failure): + with patch.object(self.engine, "_analyze_proposal", return_value=failure): result = self.facade.propose( { "snapshot": self.snapshot, diff --git a/tools/standards_engine/tests/test_authoring.py b/tools/standards_engine/tests/test_authoring.py index e9ddd7e4..eddb2300 100644 --- a/tools/standards_engine/tests/test_authoring.py +++ b/tools/standards_engine/tests/test_authoring.py @@ -92,11 +92,41 @@ def _change_set_contract( } +class _FixturePreparation: + """Supply the synthetic corpus/validator used by coordination-only tests.""" + + def __init__(self, validate_revision, observe_repository_paths): + self.validate_revision = validate_revision + self.repository_paths = observe_repository_paths + + +class _FixtureAuthoring(AuthoringModule): + """Run real durable coordination with explicitly fixture-owned preparation. + + Engine integration tests elsewhere use real ProposalMaterials. These tests + exercise a two-file synthetic corpus and injected validation failures. + """ + + def __init__(self, snapshots, *, validate_revision, observe_repository_paths, **options): + super().__init__(snapshots, **options) + self.preparation = _FixturePreparation(validate_revision, observe_repository_paths) + + def create_proposal(self, base_snapshot, change_set, *, preparation=None): + return super().create_proposal( + base_snapshot, change_set, preparation=self.preparation + ) + + def revise_proposal(self, expected_revision, change_set, *, preparation=None): + return super().revise_proposal( + expected_revision, change_set, preparation=self.preparation + ) + + def _authoring( snapshots: SnapshotModule, **options: object, ) -> AuthoringModule: - return AuthoringModule( + return _FixtureAuthoring( snapshots, validate_revision=lambda _revision: None, observe_repository_paths=lambda snapshot: ( @@ -674,7 +704,7 @@ def validate_revision(revision: object) -> None: ) ) - engine._authoring = AuthoringModule( + engine._authoring = _FixtureAuthoring( snapshots, validate_revision=validate_revision, observe_repository_paths=lambda snapshot: ( @@ -804,7 +834,7 @@ def reject_unavailable(_revision: object) -> None: ) ) - authoring = AuthoringModule( + authoring = _FixtureAuthoring( snapshots, validate_revision=reject_unavailable, observe_repository_paths=lambda snapshot: ( @@ -945,7 +975,7 @@ def test_proposals_follow_snapshot_quarantine_and_purge_lifecycle(self) -> None: proposal_id = ProposalId.from_uuid( uuid.UUID("00000000-0000-4000-8000-000000000001") ) - authoring = AuthoringModule( + authoring = _FixtureAuthoring( snapshots, validate_revision=lambda _revision: None, observe_repository_paths=lambda snapshot: ( @@ -999,7 +1029,7 @@ def test_proposal_discovery_uses_opaque_keyset_continuations(self) -> None: ) ) now = [2_000_000_000] - authoring = AuthoringModule( + authoring = _FixtureAuthoring( snapshots, validate_revision=lambda _revision: None, observe_repository_paths=lambda snapshot: ( diff --git a/tools/standards_engine/tests/test_nested_materials.py b/tools/standards_engine/tests/test_nested_materials.py new file mode 100644 index 00000000..247d0f8c --- /dev/null +++ b/tools/standards_engine/tests/test_nested_materials.py @@ -0,0 +1,243 @@ +"""Real proposal composition with operation-scoped immutable material reuse.""" +from __future__ import annotations + +from contextlib import contextmanager +from pathlib import Path +import tempfile +import unittest +from unittest.mock import patch + +from tools.standards_analysis.standards_analysis import AnalysisExecutionContext +from tools.standards_engine.standards_engine import AgentToolFacade, StandardsEngine +from tools.standards_engine.standards_engine import _generated_contract as c +from tools.standards_engine.standards_engine.logical_authoring import StandardsChangeSet +from tools.standards_engine.standards_engine.operation_materials import ProposalMaterials +from tools.standards_engine.standards_engine.tools import LocalAlwaysAllowAuthorizer, _contracts +from tools.standards_engine.tests.test_agent_workflow import ( + evidence, prepare_repository, reference_change, +) +from tools.standards_metadata.standards_metadata import RecordingContentSource + + +class NestedMaterialTests(unittest.TestCase): + @classmethod + def setUpClass(cls): + cls.temporary = tempfile.TemporaryDirectory(prefix="standards-nested-") + cls.root = Path(cls.temporary.name) / "repository" + prepare_repository(cls.root) + cls.engine = StandardsEngine.open_repository( + cls.root, purpose="authoring", + execution_context=AnalysisExecutionContext(LocalAlwaysAllowAuthorizer(cls.root)), + ) + cls.facade = AgentToolFacade(cls.engine, _contracts(cls.root)) + captured = cls.facade.create_snapshot({"kind": "create-snapshot"}) + assert captured["kind"] == "create-snapshot-result", captured + cls.snapshot = captured["snapshot"]["snapshot"] + + @classmethod + def tearDownClass(cls): + cls.engine.close() + cls.temporary.cleanup() + + def change(self, suffix="", *, revision=False, normative=False): + label = self._testMethodName.removeprefix("test_").replace("_", "-") + suffix + value = reference_change(self.root, label, revision=revision) + if normative: + value["edits"][0]["standard"].update( + id="topic." + label, role="topic", level="MUST", + body="This isolated normative fixture has an explicit impact decision.\n", + ) + return value + + def propose(self, *, suffix="", normative=False): + result = self.facade.propose({ + "snapshot": self.snapshot, "change_set": self.change(suffix, normative=normative), + }) + self.assertEqual(result["status"], "needs-action" if normative else "complete", result) + return result + + def submission(self, proposed): + obligation = proposed["outcome"]["obligations"][0] + return { + "kind": "impact-disposition", "obligation": obligation["handle"], + "result": "confirmed", "rationale": "The isolated scope was reviewed.", + "evidence": [evidence(self.root)], "fingerprint": obligation["fingerprint"], + } + + @contextmanager + def counts(self): + with ( + patch.object(self.engine._snapshots, "load_content", wraps=self.engine._snapshots.load_content) as load, + patch.object(self.engine, "_compiled_snapshot", wraps=self.engine._compiled_snapshot) as compiled, + patch.object(self.engine, "_proposal_projection", wraps=self.engine._proposal_projection) as project, + patch.object(self.engine, "_evaluate", wraps=self.engine._evaluate) as evaluate, + ): + yield load, compiled, project, evaluate + + def assert_counts(self, counts, *, projections=1, evaluations=1): + load, compiled, project, evaluate = counts + self.assertEqual(load.call_count, 1) + self.assertEqual(compiled.call_count, 1) + self.assertEqual(project.call_count, projections) + self.assertEqual(evaluate.call_count, evaluations) + + def test_propose_shares_validation_and_analysis_material(self): + with self.counts() as counts: + proposed = self.propose() + self.assert_counts(counts) + self.assertEqual(proposed["context"], proposed["outcome"]["handle"]) + self.assertEqual(self.facade.workflow_status({"context": proposed["context"]}), proposed) + + def test_revise_compiles_only_old_and_new_projections(self): + proposed = self.propose() + with self.counts() as counts: + revised = self.facade.revise({ + "context": proposed["context"], "change_set": self.change(revision=True), + }) + self.assertEqual(revised["status"], "complete", revised) + self.assert_counts(counts, projections=2, evaluations=2) + self.assertNotEqual(revised["revision"], proposed["revision"]) + self.assertEqual(self.facade.workflow_status({"context": proposed["context"]})["status"], "stale") + target = self.change()["edits"][0]["standard"]["id"] + old = self.facade.query_proposal({"revision": proposed["revision"], "request": {"kind": "read", "target": target}}) + new = self.facade.query_proposal({"revision": revised["revision"], "request": {"kind": "read", "target": target}}) + self.assertNotIn("Revised fixture text.", old["content"]) + self.assertIn("Revised fixture text.", new["content"]) + + def test_resolution_reuses_material_with_three_fresh_evaluations(self): + proposed = self.propose(normative=True) + with self.counts() as counts: + resolved = self.facade.resolve_workflow({ + "context": proposed["context"], "submission": self.submission(proposed), + }) + self.assertEqual(resolved["status"], "complete", resolved) + self.assert_counts(counts, evaluations=3) + self.assertNotEqual(resolved["context"], proposed["context"]) + + def test_bad_evidence_is_rejected_and_next_call_observes_new_evidence(self): + proposed = self.propose(normative=True) + submission = self.submission(proposed) + bad = {**submission, "evidence": [{**evidence(self.root), "digest": "sha256:" + "0" * 64}]} + with self.counts() as counts: + rejected = self.facade.resolve_workflow({"context": proposed["context"], "submission": bad}) + self.assertEqual(rejected["outcome"]["kind"], "rejected-result", rejected) + self.assertEqual(rejected["context"], proposed["context"]) + self.assert_counts(counts, evaluations=2) + with self.counts() as fresh: + resolved = self.facade.resolve_workflow({"context": proposed["context"], "submission": submission}) + self.assertEqual(resolved["status"], "complete", resolved) + self.assert_counts(fresh, evaluations=3) + + def test_quarantine_during_authorization_blocks_reused_material(self): + proposed = self.propose(normative=True) + authorize = self.engine._execution_context.authorization.authorize + snapshot = self.engine._snapshot_id(c.SnapshotHandle.from_value(self.snapshot)) + + def quarantine(request): + decision = authorize(request) + self.engine._snapshots.delete_snapshot(snapshot) + return decision + + try: + with patch.object(self.engine._execution_context.authorization, "authorize", side_effect=quarantine): + result = self.facade.resolve_workflow({ + "context": proposed["context"], "submission": self.submission(proposed), + }) + outcome = result.get("outcome", result) + self.assertEqual(outcome["kind"], "rejected-result", result) + self.assertEqual(outcome["outcome"], "unavailable") + finally: + self.engine._snapshots.undelete_snapshot(snapshot) + self.assertEqual(self.facade.workflow_status({"context": proposed["context"]})["status"], "needs-action") + + def test_head_change_after_preflight_still_rejects_stale_revision(self): + proposed = self.propose() + revise = self.engine._authoring.revise_proposal + competitor = self.change(revision=True) + competitor["edits"][0]["standard"]["body"] += "Competing revision.\n" + + def advance_head(expected, change_set, *, preparation): + revise(expected, StandardsChangeSet.from_mapping(competitor), preparation=preparation) + return revise(expected, change_set, preparation=preparation) + + with patch.object(self.engine._authoring, "revise_proposal", side_effect=advance_head): + result = self.facade.revise({"context": proposed["context"], "change_set": self.change(revision=True)}) + self.assertEqual(result["outcome"]["code"], "AUTHORING.REVISION_STALE", result) + self.assertEqual(self.facade.workflow_status({"context": proposed["context"]})["status"], "stale") + + def test_analyze_and_query_each_start_with_fresh_material(self): + proposed = self.propose() + with self.counts() as counts: + analyzed = self.facade.analyze({"context": proposed["revision"]}) + self.assertEqual(analyzed["context"], proposed["context"]) + self.assert_counts(counts) + with self.counts() as fresh: + queried = self.facade.query_proposal({ + "revision": proposed["revision"], + "request": {"kind": "read", "target": self.change()["edits"][0]["standard"]["id"]}, + }) + self.assertEqual(queried["kind"], "proposal-read-result", queried) + self.assert_counts(fresh, evaluations=0) + + def test_nested_public_reentry_has_independent_operation_material(self): + first = self.propose(suffix="-first") + second = self.propose(suffix="-second") + project = self.engine._proposal_projection + nested = [] + entered = False + + def reenter(revision, accepted=None): + nonlocal entered + if not entered: + entered = True + nested.append(self.facade.analyze_proposal({"revision": second["revision"]})) + return project(revision, accepted) + + with patch.object(self.engine._snapshots, "load_content", wraps=self.engine._snapshots.load_content) as loads: + with patch.object(self.engine, "_proposal_projection", side_effect=reenter): + outer = self.facade.analyze({"context": first["revision"]}) + self.assertEqual(loads.call_count, 2) + self.assertEqual(outer["context"], first["context"]) + self.assertEqual(nested[0]["handle"], second["context"]) + + def test_scope_releases_material_after_success_and_exception(self): + exited = [] + exit_scope = ProposalMaterials.__exit__ + + def observe(scope, *args): + exit_scope(scope, *args) + exited.append((scope._base, scope._projection)) + + with patch.object(ProposalMaterials, "__exit__", observe): + with patch.object(self.engine, "_proposal_projection", side_effect=RuntimeError("compiler fixture")): + with self.assertRaisesRegex(RuntimeError, "compiler fixture"): + self.propose(suffix="-failed") + self.propose(suffix="-success") + self.assertEqual(exited, [(None, None), (None, None)]) + + def test_implicit_capture_keeps_independent_record_and_replay_passes(self): + sources = [] + compile_source = self.engine._compile + + def compile(source): + sources.append(source) + return compile_source(source) + + with patch.object(self.engine, "_compile", side_effect=compile): + result = self.facade.propose({"change_set": self.change()}) + self.assertEqual(result["status"], "complete", result) + recorders = [source for source in sources if isinstance(source, RecordingContentSource)] + self.assertEqual(len(recorders), 2) + self.assertIsNot(recorders[0], recorders[1]) + self.assertEqual(recorders[0].requested_paths, recorders[1].requested_paths) + + def test_public_application_cannot_reach_authoring_reuse(self): + with StandardsEngine.open_repository(self.root, purpose="application") as application: + facade = AgentToolFacade(application, _contracts(self.root)) + with patch.object(ProposalMaterials, "__init__", side_effect=AssertionError("authoring preparation")): + denied = facade.propose({"snapshot": self.snapshot, "change_set": self.change()}) + self.assertEqual(denied["kind"], "application-rejected-result", denied) + + +if __name__ == "__main__": + unittest.main() From 3c1c9c279ac001a285b73dc2721fa7f4079114d8 Mon Sep 17 00:00:00 2001 From: ChatGPT Date: Thu, 24 Sep 2026 01:42:02 +0000 Subject: [PATCH 09/26] perf(engine): compact byte identities and compile manifests from captured inputs Keep Identity-v2 preimages and full integrity checks while using compact exact-byte storage. Separate authoritative input discovery from filesystem check execution so logical proposals derive the same manifest without temporary repositories or guessed file content. Reuse explicit test snapshots only within an accepted revision. Preserve actual candidate verification, publication, purpose, and recovery boundaries. Focused Identity and Verifier regressions, full-corpus manifest equivalence, paired source measurements, and the 73-suite/121-check structural checkpoint passed locally. Full committed-candidate qualification and retained measurement evidence follow separately. --- .../generated/suite-inputs.json | 56 +++--- .../standards_engine/logical_authoring.py | 29 +-- .../tests/test_logical_authoring.py | 14 ++ .../tests/test_supporting_workflow.py | 14 +- tools/standards_identity/README.md | 8 + .../standards_identity/encoding.py | 50 ++++- .../tests/test_compact_bytes.py | 94 ++++++++++ tools/standards_verifier/README.md | 15 ++ .../standards_verifier/__init__.py | 7 +- .../checks/contract_projection.py | 4 +- .../checks/markdown_link_coverage.py | 4 +- .../checks/markdown_links.py | 63 ++----- .../checks/markdown_targets.py | 4 +- .../standards_verifier/checks/metadata.py | 4 +- .../checks/metadata_route.py | 6 +- .../checks/plan_contract.py | 4 +- .../checks/policy_impact.py | 8 +- .../checks/python_package_contract.py | 5 +- .../standards_verifier/checks/table.py | 15 +- .../standards_verifier/config.py | 28 ++- .../standards_verifier/graph_adapters.py | 7 +- .../standards_verifier/input_sources.py | 137 ++++++++++++++ .../standards_verifier/model.py | 14 +- .../standards_verifier/policy_impact.py | 11 +- .../standards_verifier/python_packages.py | 16 +- .../standards_verifier/suite_inputs.py | 75 +++----- .../tests/test_frozen_suite_inputs.py | 173 ++++++++++++++++++ 27 files changed, 656 insertions(+), 209 deletions(-) create mode 100644 tools/standards_identity/tests/test_compact_bytes.py create mode 100644 tools/standards_verifier/standards_verifier/input_sources.py create mode 100644 tools/standards_verifier/tests/test_frozen_suite_inputs.py diff --git a/evaluation/standards-effectiveness/generated/suite-inputs.json b/evaluation/standards-effectiveness/generated/suite-inputs.json index 0ca0e4b3..519d1d26 100644 --- a/evaluation/standards-effectiveness/generated/suite-inputs.json +++ b/evaluation/standards-effectiveness/generated/suite-inputs.json @@ -7099,7 +7099,7 @@ ] }, { - "digest": "sha256:6f4eb0303a5a9bf44d28457e5829bb9e3b3d7b67bd13db7dc43f7202758fca53", + "digest": "sha256:f9471723773b3a23e50548e459c2965a67bc769d6504000b524e1ef05863f36a", "path": "tools/standards_engine/standards_engine/logical_authoring.py", "state": "present", "uses": [ @@ -7316,7 +7316,7 @@ ] }, { - "digest": "sha256:d1031886e125b743e5fa71e17d502aeddebe3a8184c76ee0976676fc5fc09a1f", + "digest": "sha256:1838ceb220964296fe1af9f0e25ea91b076972a8ee452c684da13e0f6db86709", "path": "tools/standards_identity/README.md", "state": "present", "uses": [ @@ -7362,7 +7362,7 @@ ] }, { - "digest": "sha256:4c69fdefc956148e3628ea56dbbe2cb3c3a7860b20aa3a27bb8593d6d54ee84e", + "digest": "sha256:611655e641a65b8e7d0986f0af34a792b4b8a977523bee683553f8e0e48804f1", "path": "tools/standards_identity/standards_identity/encoding.py", "state": "present", "uses": [ @@ -7800,7 +7800,7 @@ ] }, { - "digest": "sha256:a35c3a8ab48c2693c481cfe101790096193d0358e5d7d8ff01142c0599282da0", + "digest": "sha256:32b8f1d3c681bcc9cbcb81fc68a57d668653a266b2abb7d8b8ac28a815f95ef1", "path": "tools/standards_verifier/README.md", "state": "present", "uses": [ @@ -7829,7 +7829,7 @@ ] }, { - "digest": "sha256:3eb159c0cee572e4d2d90adc5660f5fe4fbb6b0da7f3705d7c83ee992e5c40e5", + "digest": "sha256:df0fe1fded4e6acfa85c0342285064016cf70f7aeb6e351ae7cf4c26f81b2c0f", "path": "tools/standards_verifier/standards_verifier/__init__.py", "state": "present", "uses": [ @@ -7863,7 +7863,7 @@ ] }, { - "digest": "sha256:2d11fc002cb956e3eb82e15f3e3bda01a36d71816e318a2f199383452f38f9cd", + "digest": "sha256:84eeaaaadec2526b56e1d17efac213ff4fd30dfc44bc3e4fb5776486a5c32b64", "path": "tools/standards_verifier/standards_verifier/checks/contract_projection.py", "state": "present", "uses": [ @@ -7904,7 +7904,7 @@ ] }, { - "digest": "sha256:6960efd3b3d28ef8a48568a47664a00eb935d483f66cc52860cd5c0cb28a6dd4", + "digest": "sha256:56caef06f81ab095f10a5a174022f9ea7c1a362cdb9c4b50fd45a4ee054cdf15", "path": "tools/standards_verifier/standards_verifier/checks/markdown_link_coverage.py", "state": "present", "uses": [ @@ -7921,7 +7921,7 @@ ] }, { - "digest": "sha256:71f7e3097e33f7280843f1aa4b76efd364e4f0fb37d55c88ae673996417b007a", + "digest": "sha256:2a594dda5c4cb718a16e0cd09ed04df4b16f841004a170442c3bb4c36864ab3c", "path": "tools/standards_verifier/standards_verifier/checks/markdown_links.py", "state": "present", "uses": [ @@ -7938,7 +7938,7 @@ ] }, { - "digest": "sha256:8e8e2ff5c47360b2f2c38edb81424d4e79fc23fe477248102d5a8e83ca3e8471", + "digest": "sha256:4973ad8da5931d0905096ef51b420c8276a9171cc5c568ce3a003db4476ba136", "path": "tools/standards_verifier/standards_verifier/checks/markdown_targets.py", "state": "present", "uses": [ @@ -7950,7 +7950,7 @@ ] }, { - "digest": "sha256:f6d3d63013659308e52a6d721d1d4ff92df40754f3167b5d23e5953176e34c73", + "digest": "sha256:dea89749eea74df0b1194907d5507d6dc74cf1e74c18e1861e4a5e3c99613dcd", "path": "tools/standards_verifier/standards_verifier/checks/metadata.py", "state": "present", "uses": [ @@ -7967,7 +7967,7 @@ ] }, { - "digest": "sha256:851911aac82981be25f52c9bad00a8f7a05ad0c048c8fef20320dfe72a8ed69d", + "digest": "sha256:42a7223e6aad21bf6bf4239c0e37751b6c0f5499db78e2b3725d0cec95525812", "path": "tools/standards_verifier/standards_verifier/checks/metadata_route.py", "state": "present", "uses": [ @@ -7984,7 +7984,7 @@ ] }, { - "digest": "sha256:c30aca2b9009746a5427013c8d6904c345d9e4a963d2ff5d1d70cc5358d08ac8", + "digest": "sha256:c7266c0564b9ee02944fc4eb12d66cc20d604fd4ddb7f051ed77d01e9fe4466e", "path": "tools/standards_verifier/standards_verifier/checks/plan_contract.py", "state": "present", "uses": [ @@ -7996,7 +7996,7 @@ ] }, { - "digest": "sha256:20922eebbb39c5f2638379c226fc599af35c27193c891259b3ca554cb6a60a06", + "digest": "sha256:e28442711d42d69bdb9348ec01923daefd49cec2be8850239c9489fb6cb71dc9", "path": "tools/standards_verifier/standards_verifier/checks/policy_impact.py", "state": "present", "uses": [ @@ -8025,7 +8025,7 @@ ] }, { - "digest": "sha256:ac32e996f52a566e7f43c2ff8915895880a9c2331ab2a59ffeeb913232f1d0ca", + "digest": "sha256:a292b6d7aa44f3cbc2b1876ca46935aa7c1edf602b49fddf47308eba5ec7dca5", "path": "tools/standards_verifier/standards_verifier/checks/python_package_contract.py", "state": "present", "uses": [ @@ -8042,7 +8042,7 @@ ] }, { - "digest": "sha256:74dcf361fd2edc4f10f4a3e54494d54b19fad403972178002b9db56c437857f0", + "digest": "sha256:439b9ee8fe5cdd890cf8a7b3b43a6f19293c9e456579c68b5fab556543a65fe8", "path": "tools/standards_verifier/standards_verifier/checks/table.py", "state": "present", "uses": [ @@ -8071,7 +8071,7 @@ ] }, { - "digest": "sha256:e332ea621d15ab9bad13ccf4d45b02a0ee1438f0565c4fd904bec352706024b1", + "digest": "sha256:45e5a3af333253b2a93d5c0f3802b803be3603b37a61c557a0794a2459b7c8f6", "path": "tools/standards_verifier/standards_verifier/config.py", "state": "present", "uses": [ @@ -8141,7 +8141,7 @@ ] }, { - "digest": "sha256:0c69936169e0fd48fd39e8a17d1b29a8820903455a793b3ac7c023d44f974ac7", + "digest": "sha256:a2daac9fcba96192e64bd0161c9af3f3878e6f833078415700eddc30698c2aec", "path": "tools/standards_verifier/standards_verifier/graph_adapters.py", "state": "present", "uses": [ @@ -8153,7 +8153,19 @@ ] }, { - "digest": "sha256:53e0107d7cb1157e932e44ee3f57aa939fd36c935874f01404c857400d49441d", + "digest": "sha256:c54c8c8967dec15675b3a9dfc5c0bcca118a63edf0eec0f99038221cda134ca7", + "path": "tools/standards_verifier/standards_verifier/input_sources.py", + "state": "present", + "uses": [ + { + "check": "python-package-contract", + "role": "package-contract-input", + "suite": "a1c-public-cutover" + } + ] + }, + { + "digest": "sha256:5b5b87b7eee4dfa98776459ac50e02af29b62eb602842e0b547a190b74acbe02", "path": "tools/standards_verifier/standards_verifier/model.py", "state": "present", "uses": [ @@ -8182,7 +8194,7 @@ ] }, { - "digest": "sha256:2420957b12eeeb4f3798323673721b9cd0d405e645244f5ecb4243b1b495726d", + "digest": "sha256:d2505473e3c78783c7c3f50f4072e4830c80ae9d91cbb2b09ece8aa85b68612e", "path": "tools/standards_verifier/standards_verifier/policy_impact.py", "state": "present", "uses": [ @@ -8199,7 +8211,7 @@ ] }, { - "digest": "sha256:18c266b532daaeefc6b44357eba6641337c18cd6c3830c5ca1281834848dfc89", + "digest": "sha256:717bc3fe807cd00a6da5b147a0a7923c009ac594157a76ed43e18feabb8413d7", "path": "tools/standards_verifier/standards_verifier/python_packages.py", "state": "present", "uses": [ @@ -8233,7 +8245,7 @@ ] }, { - "digest": "sha256:282995be0fa59b57588e153ea8eae5007e6e31d5b72970d1fb44c11d18f2f21b", + "digest": "sha256:9c2e21a210ce0ad4ca076e9ed73645ca34b929abbdfae4a822dc31bd0b266cae", "path": "tools/standards_verifier/standards_verifier/suite_inputs.py", "state": "present", "uses": [ @@ -13266,7 +13278,7 @@ "path": "evaluation/standards-effectiveness/suite-registry.toml" }, "repository_index": { - "digest": "sha256:c78cf869a7d3432df7de066412b97a860d9f07c25d333186129e5f0b1dd25c19", + "digest": "sha256:d39d6edf3f798f07bfdd360876a1361a025c9492615f6e49ca19f44fa79d6aa0", "uses": [ { "check": "python-package-contract", diff --git a/tools/standards_engine/standards_engine/logical_authoring.py b/tools/standards_engine/standards_engine/logical_authoring.py index 8ce0fb38..37e5123e 100644 --- a/tools/standards_engine/standards_engine/logical_authoring.py +++ b/tools/standards_engine/standards_engine/logical_authoring.py @@ -3,7 +3,6 @@ import hashlib import json import re -import tempfile import tomllib from collections.abc import Callable, Iterable, Mapping from dataclasses import dataclass @@ -16,7 +15,6 @@ from tools.repository_git.repository_git import ( GitRepositoryError, RepositoryPath, - git_output, ) from tools.standards_metadata.standards_metadata import ( CANONICAL_MODULE_CORPUS, @@ -33,7 +31,7 @@ ) from tools.standards_verifier.standards_verifier import ( EngineError, - suite_input_projection_bytes, + suite_input_projection_bytes_from_content, ) from .authoring import AuthoringError, AuthoringFailure @@ -2436,26 +2434,9 @@ def _refresh_suite_input_projection( | (current_paths - base_file_paths) ) ) - with tempfile.TemporaryDirectory( - prefix="coding-standards-logical-authoring-" - ) as temporary: - root = Path(temporary) - for raw_path in proposed_paths: - path = RepositoryPath.parse(raw_path) - destination = root.joinpath(*path.components) - destination.parent.mkdir(parents=True, exist_ok=True) - destination.touch() - for raw_path, content in files.items(): - path = RepositoryPath.parse(raw_path) - destination = root.joinpath(*path.components) - destination.parent.mkdir(parents=True, exist_ok=True) - destination.write_bytes(content) - git_output(root, ("init", "--quiet")) - git_output(root, ("add", "--force", "--all", "--")) - files[_SUITE_INPUTS] = suite_input_projection_bytes( - root, - repository_paths=proposed_paths, - ) + files[_SUITE_INPUTS] = suite_input_projection_bytes_from_content( + FrozenContentSource(files), repository_paths=proposed_paths, + ) return proposed_paths except AuthoringError: raise @@ -2475,7 +2456,7 @@ def _refresh_suite_input_projection( raise _error( "AUTHORING.PROJECTION_UNAVAILABLE", "unavailable", - "canonical suite-input projection could not be materialized", + "canonical suite-input projection could not be compiled", ) from error diff --git a/tools/standards_engine/tests/test_logical_authoring.py b/tools/standards_engine/tests/test_logical_authoring.py index 88370ddc..4ebc2695 100644 --- a/tools/standards_engine/tests/test_logical_authoring.py +++ b/tools/standards_engine/tests/test_logical_authoring.py @@ -92,6 +92,20 @@ def test_verified_compiled_base_is_reused_but_candidate_compiles(self) -> None: base_repository_paths=self.repository_paths, compiled_base=self.compiled) self.assertEqual(raised.exception.failure.code, "AUTHORING.COMPILED_BASE_MISMATCH") + def test_manifest_projection_uses_captured_inputs_without_staging(self) -> None: + program = LogicalProgram((self.change_set([self.new_standard_edit()]),)) + compiler = LogicalAuthoringCompiler(StandardsEngine._compile) + with mock.patch("tempfile.TemporaryDirectory", side_effect=AssertionError("temporary staging")), \ + mock.patch("subprocess.run", side_effect=AssertionError("Git staging")): + projection = compiler.compile( + self.base, program, base_repository_paths=self.repository_paths, + compiled_base=self.compiled, + ) + self.assertNotEqual(projection.source.files, self.base.files) + self.assertTrue(projection.source.read_bytes( + "evaluation/standards-effectiveness/generated/suite-inputs.json" + )) + def change_set(self, edits: list[dict[str, object]]) -> StandardsChangeSet: return StandardsChangeSet.from_mapping( { diff --git a/tools/standards_engine/tests/test_supporting_workflow.py b/tools/standards_engine/tests/test_supporting_workflow.py index 94a816a5..133fbc27 100644 --- a/tools/standards_engine/tests/test_supporting_workflow.py +++ b/tools/standards_engine/tests/test_supporting_workflow.py @@ -107,16 +107,19 @@ def test_coordinated_publication_and_provenance_only_revision(self): self.assertEqual(first["kind"], "application-read-result", first) self.assertIn(PUBLIC, first["content"]) self.assertNotIn(PRIVATE, json.dumps(first)) - self.assertEqual(self.app.read({"target": REFERENCE})["kind"], "application-read-result") + # Reads in this interval observe the same accepted publication. + published_snapshot = first["snapshot"] + self.assertNotEqual(published_snapshot, snapshot) + self.assertEqual(self.app.read({"snapshot": published_snapshot, "target": REFERENCE})["kind"], "application-read-result") for aid in aids: - exposed = self.app.read({"target": aid["canonical_id"]}) + exposed = self.app.read({"snapshot": published_snapshot, "target": aid["canonical_id"]}) self.assertEqual(exposed["kind"], "application-read-result", exposed) self.assertIn(PUBLIC, exposed["content"]) before = subprocess.check_output(["git", "show", "main:topics/purpose-fixture.md"], cwd=self.root) revisions_before = {unit.id: unit.semantic_revision for unit in load_canonical_standards_corpus(self.root).policy_units} old_snapshot = first["snapshot"] - next_change = self.author.propose({"change_set": self.change([ + next_change = self.author.propose({"snapshot": published_snapshot, "change_set": self.change([ {"kind": "put-provenance", "record": {**record, "rationale": PRIVATE + "_REVISED"}}, ])}) self.assertEqual(len(next_change["outcome"]["obligations"]), 1, next_change) @@ -130,5 +133,6 @@ def test_coordinated_publication_and_provenance_only_revision(self): current = self.author.read({"target": REASON}) self.assertEqual(historical["record"]["rationale"], PRIVATE) self.assertEqual(current["record"]["rationale"], PRIVATE + "_REVISED") - self.assertEqual(self.app.read({"target": RULE})["content"], first["content"]) - self.assertEqual(self.app.read({"target": REASON})["kind"], "application-rejected-result") + self.assertNotEqual(current["snapshot"], old_snapshot) + self.assertEqual(self.app.read({"snapshot": current["snapshot"], "target": RULE})["content"], first["content"]) + self.assertEqual(self.app.read({"snapshot": current["snapshot"], "target": REASON})["kind"], "application-rejected-result") diff --git a/tools/standards_identity/README.md b/tools/standards_identity/README.md index 2b3faf30..d705ee46 100644 --- a/tools/standards_identity/README.md +++ b/tools/standards_identity/README.md @@ -37,3 +37,11 @@ encoding batches ordinary spans. Path-byte-set framing retains each validated frame once. These are implementation optimizations, with no identity version, public representation, digest or supported-domain change. The differential preimage tests remain a small independent oracle for future encoder changes. + +Exact `bytes` passed to `IdentityArray` remain compact immutable storage. Its +`values`, equality, hashing and encoding still describe the same integer sequence; +other iterables retain element validation and an owned tuple. Encoding consumes +byte storage directly in 64 KiB chunks, bounding temporary per-byte join indexes +while preserving the complete identity-v2 preimage. Inspecting `values` explicitly +materializes a tuple; ordinary hashing and encoding do not request that view. +The chunk size is local scratch-space tuning, not an input limit or wire field. diff --git a/tools/standards_identity/standards_identity/encoding.py b/tools/standards_identity/standards_identity/encoding.py index 2d6248f7..88ea3762 100644 --- a/tools/standards_identity/standards_identity/encoding.py +++ b/tools/standards_identity/standards_identity/encoding.py @@ -16,6 +16,8 @@ # Exact decimal tokens for the byte domain; larger integers retain the # arbitrary-precision encoder and its independence from Python's digit limit. _BYTE_TOKENS = tuple(str(value).encode("ascii") for value in range(256)) +# Bound the temporary join index for large byte arrays; encoded output remains exact. +_BYTE_CHUNK_SIZE = 64 * 1024 _SURROGATE = re.compile(r"[\ud800-\udfff]") _ESCAPED_CHARACTER = re.compile(r'["\\\x00-\x1f]') _STRING_ESCAPES = { @@ -25,15 +27,38 @@ } -@dataclass(frozen=True, slots=True, init=False) +@dataclass(frozen=True, slots=True, init=False, eq=False, repr=False) class IdentityArray: - values: tuple[IdentityValue, ...] + # Exact bytes already prove the element domain and immutable ownership. + # Other iterables retain the existing validated tuple representation. + _values: tuple[IdentityValue, ...] | bytes def __init__(self, values: Iterable[IdentityValue]) -> None: - immutable = tuple(values) - for value in immutable: - _validate_value(value) - object.__setattr__(self, "values", immutable) + if type(values) is bytes: + immutable = values + else: + immutable = tuple(values) + for value in immutable: + _validate_value(value) + object.__setattr__(self, "_values", immutable) + + @property + def values(self) -> tuple[IdentityValue, ...]: + """Expose the same immutable element sequence for either storage form.""" + return tuple(self._values) + + def __eq__(self, other: object) -> bool: + if type(other) is not type(self): + return NotImplemented + if type(self._values) is type(other._values): + return self._values == other._values + return self.values == other.values + + def __hash__(self) -> int: + return hash((self.values,)) + + def __repr__(self) -> str: + return f"IdentityArray(values={self.values!r})" @dataclass(frozen=True, slots=True, init=False) @@ -195,7 +220,9 @@ def _encode(value: IdentityValue) -> bytes: if value_type is str: return _encode_string(value) if value_type is IdentityArray: - return b"[" + b",".join(_encode(item) for item in value.values) + b"]" + if type(value._values) is bytes: + return _encode_byte_array(value._values) + return b"[" + b",".join(_encode(item) for item in value._values) + b"]" if value_type is IdentityObject: encoded_members = ( _encode_string(key) + b":" + _encode(member_value) @@ -205,6 +232,15 @@ def _encode(value: IdentityValue) -> bytes: raise AssertionError("validated identity value has an unknown type") +def _encode_byte_array(value: bytes) -> bytes: + """Emit identity-v2 integer-array syntax with bounded per-byte join scratch.""" + chunks = ( + b",".join(map(_BYTE_TOKENS.__getitem__, value[start : start + _BYTE_CHUNK_SIZE])) + for start in range(0, len(value), _BYTE_CHUNK_SIZE) + ) + return b"[" + b",".join(chunks) + b"]" + + def _encode_integer(value: int) -> bytes: if value == 0: return b"0" diff --git a/tools/standards_identity/tests/test_compact_bytes.py b/tools/standards_identity/tests/test_compact_bytes.py new file mode 100644 index 00000000..1ad38769 --- /dev/null +++ b/tools/standards_identity/tests/test_compact_bytes.py @@ -0,0 +1,94 @@ +"""Exact identity-v2 byte-array behavior, independent of the compact encoder.""" +from __future__ import annotations + +import hashlib +import random +import struct +import unittest +from dataclasses import FrozenInstanceError +from unittest import mock + +from tools.standards_identity.standards_identity import ( + IdentityArray, IdentityError, IdentityObject, encode_identity_value, + frame_path_byte_set, frame_path_bytes, hash_identity, +) +from tools.standards_identity.standards_identity import encoding + + +class CompactByteEncodingTest(unittest.TestCase): + def test_exact_preimages_and_hashes_across_chunk_boundaries(self): + rng = random.Random(73129) + cases = [b"", bytes(range(256)), b"\x00", b"\xff"] + for size in (65535, 65536, 65537, 131072, 131073): + cases.append(rng.randbytes(size)) + for content in cases: + with self.subTest(length=len(content)): + expected = b"[" + b",".join(str(byte).encode("ascii") for byte in content) + b"]" + compact = IdentityArray(content) + self.assertEqual(encode_identity_value(compact), expected) + domain, prefix = b"test.bytes", b"bytes" + frame = (b"coding-standards:identity:v2\0" + + struct.pack(">I", len(domain)) + domain + + struct.pack(">I", len(prefix)) + prefix + + struct.pack(">Q", len(expected)) + expected) + self.assertEqual(hash_identity("test.bytes", "bytes", compact), + "bytes:sha256:" + hashlib.sha256(frame).hexdigest()) + + def test_observation_equality_and_hash_remain_sequence_based(self): + content = bytes(range(256)) + compact = IdentityArray(content) + ordinary = IdentityArray(tuple(content)) + self.assertEqual(compact, ordinary) + self.assertEqual(ordinary, compact) + self.assertEqual(compact.values, tuple(content)) + self.assertIs(type(compact.values), tuple) + self.assertEqual(hash(compact), hash(ordinary)) + self.assertEqual(repr(compact), repr(ordinary)) + self.assertNotEqual(compact, IdentityArray(content[::-1])) + with self.assertRaises((FrozenInstanceError, TypeError, AttributeError)): + compact.values = () + + def test_mutable_and_subclass_iterables_retain_validation(self): + mutable = bytearray(b"abc") + selected = IdentityArray(mutable) + mutable[0] = 0 + self.assertEqual(encode_identity_value(selected), b"[97,98,99]") + + class InvalidBytes(bytes): + def __iter__(self): + return iter((0.5,)) + + with self.assertRaises(IdentityError) as caught: + IdentityArray(InvalidBytes(b"abc")) + self.assertEqual(caught.exception.failure.code, "IDENTITY.INVALID_VALUE") + for value in (mutable, memoryview(b"abc"), InvalidBytes(b"abc")): + with self.assertRaises(IdentityError) as caught: + frame_path_bytes(("file",), value) + self.assertEqual(caught.exception.failure.code, "IDENTITY.INVALID_BYTES_FRAME") + with self.assertRaises(IdentityError) as caught: + encode_identity_value(b"abc") + self.assertEqual(caught.exception.failure.code, "IDENTITY.INVALID_VALUE") + + def test_path_framing_keeps_order_unicode_and_arbitrary_integer_behavior(self): + entries = [(("é", "a"), b"\xff"), (("e\u0301",), b"\x00"), (("a",), b"")] + frames = frame_path_byte_set(entries) + ordinary = IdentityArray( + IdentityObject((("path", IdentityArray(path)), ("bytes", IdentityArray(tuple(content))))) + for path, content in sorted(entries) + ) + self.assertEqual(frames, ordinary) + self.assertEqual(encode_identity_value(frames), encode_identity_value(ordinary)) + huge = 10**5000 + mixed = IdentityArray((IdentityArray(b"\x00\xff"), True, huge, -huge)) + number = b"1" + b"0" * 5000 + self.assertEqual(encode_identity_value(mixed), b"[[0,255],true," + number + b",-" + number + b"]") + + def test_byte_input_avoids_per_element_validation_and_dispatch(self): + payload = bytes(range(256)) * 1024 + with mock.patch.object(encoding, "_validate_value", wraps=encoding._validate_value) as validation: + value = frame_path_bytes(("payload",), payload) + self.assertLess(validation.call_count, 10) + with mock.patch.object(encoding, "_encode", wraps=encoding._encode) as encode: + result = encode_identity_value(value) + self.assertLess(encode.call_count, 10) + self.assertTrue(result.endswith(b',"path":["payload"]}')) diff --git a/tools/standards_verifier/README.md b/tools/standards_verifier/README.md index 4491e756..5329b37d 100644 --- a/tools/standards_verifier/README.md +++ b/tools/standards_verifier/README.md @@ -61,3 +61,18 @@ and arbitrary document budgets have been retired. Git history and captured snapshots preserve historical observations; the current runner no longer executes those retired check kinds. Shared TSV projections remain where navigation and routing checks consume real inventories. + +## Suite-input authority + +The canonical manifest compiler consumes check-owned declarations through a +`CheckInputContext`, separately from filesystem check execution. Directory inputs +retain physical containment and symlink checks. Frozen inputs carry exact bytes +plus explicit regular-file repository membership; an indexed file whose bytes +were not captured is unavailable, rather than empty. Both adapters use the same +registry parsing, declarations, hashing and manifest serializer. + +Engine logical authoring calls `suite_input_projection_bytes_from_content` with +its frozen candidate and computed path population. It creates no temporary Git +repository for that derivation. Full verification and publication continue to +execute against the actual candidate checkout, including safe-path package and +entrypoint processes. The manifest representation and schema version are unchanged. diff --git a/tools/standards_verifier/standards_verifier/__init__.py b/tools/standards_verifier/standards_verifier/__init__.py index c05e9c55..7dc7025f 100644 --- a/tools/standards_verifier/standards_verifier/__init__.py +++ b/tools/standards_verifier/standards_verifier/__init__.py @@ -3,7 +3,11 @@ from .cli import run_complete_verification from .diagnostics import EngineError from .model import CompleteVerificationResult -from .suite_inputs import suite_input_projection_bytes, write_suite_input_projection +from .suite_inputs import ( + suite_input_projection_bytes, + suite_input_projection_bytes_from_content, + write_suite_input_projection, +) from .entrypoints import ( git_reachability_main, @@ -18,6 +22,7 @@ "repository_graph_main", "run_complete_verification", "suite_input_projection_bytes", + "suite_input_projection_bytes_from_content", "verifier_main", "write_suite_input_projection", ) diff --git a/tools/standards_verifier/standards_verifier/checks/contract_projection.py b/tools/standards_verifier/standards_verifier/checks/contract_projection.py index c3180a96..bca0ffcb 100644 --- a/tools/standards_verifier/standards_verifier/checks/contract_projection.py +++ b/tools/standards_verifier/standards_verifier/checks/contract_projection.py @@ -11,7 +11,7 @@ ) from ..diagnostics import Diagnostic, EngineError -from ..model import CheckAuthorityInput, CheckContext, present_inputs +from ..model import CheckAuthorityInput, CheckContext, CheckInputContext, present_inputs from ..paths import contained_file @@ -25,7 +25,7 @@ class ContractProjectionCheck: examples: str def authority_inputs( - self, context: CheckContext + self, context: CheckInputContext ) -> tuple[CheckAuthorityInput, ...]: return ( *present_inputs("schema", self.schema), diff --git a/tools/standards_verifier/standards_verifier/checks/markdown_link_coverage.py b/tools/standards_verifier/standards_verifier/checks/markdown_link_coverage.py index 47f37d47..e931c098 100644 --- a/tools/standards_verifier/standards_verifier/checks/markdown_link_coverage.py +++ b/tools/standards_verifier/standards_verifier/checks/markdown_link_coverage.py @@ -4,7 +4,7 @@ from typing import Any from ..diagnostics import Diagnostic, EngineError -from ..model import CheckAuthorityInput, CheckContext, present_inputs +from ..model import CheckAuthorityInput, CheckContext, CheckInputContext, present_inputs from ..paths import contained_file from .markdown_links import local_markdown_targets from .table import ( @@ -22,7 +22,7 @@ class MarkdownLinkCoverageCheck: members: ProjectedTableSource def authority_inputs( - self, context: CheckContext + self, context: CheckInputContext ) -> tuple[CheckAuthorityInput, ...]: projected = read_projected_table_rows(context, self.id, self.members) members = tuple(value.partition("#")[0] for (value,) in projected if value) diff --git a/tools/standards_verifier/standards_verifier/checks/markdown_links.py b/tools/standards_verifier/standards_verifier/checks/markdown_links.py index 2a359a88..76b32329 100644 --- a/tools/standards_verifier/standards_verifier/checks/markdown_links.py +++ b/tools/standards_verifier/standards_verifier/checks/markdown_links.py @@ -2,12 +2,10 @@ import re from dataclasses import dataclass -from pathlib import Path, PurePosixPath from typing import Any from ..diagnostics import Diagnostic, EngineError -from ..model import CheckAuthorityInput, CheckContext, present_inputs -from ..paths import contained_file +from ..model import CheckAuthorityInput, CheckContext, CheckInputContext, present_inputs from .table import ( ProjectedTableSource, parse_projected_table_source, @@ -43,23 +41,19 @@ def _paths(value: Any, suite: str, check: str) -> tuple[str, ...]: class LocalMarkdownTarget: destination: str repository_path: str - resolved_path: Path def local_markdown_targets( - context: CheckContext, + context: CheckContext | CheckInputContext, check_id: str, display_path: str, ) -> tuple[LocalMarkdownTarget, ...]: - root = context.repo_root.resolve() - source = contained_file( - root, - display_path, - suite=context.suite_id, - check=check_id, - ) + inputs = context.inputs + raw = inputs.read_bytes(display_path, suite=context.suite_id, check=check_id) try: - content = source.read_text(encoding="utf-8") + # Preserve the universal-newline text semantics of the filesystem reader. + # Manifest digests still bind the original bytes, not this parsing view. + content = raw.decode("utf-8").replace("\r\n", "\n").replace("\r", "\n") except UnicodeDecodeError as error: raise EngineError( Diagnostic( @@ -79,41 +73,14 @@ def local_markdown_targets( continue target = destination.split("#", 1)[0] - if not target: - candidate = source - else: - relative = PurePosixPath(target) - if relative.is_absolute(): - raise EngineError( - Diagnostic( - "PATH.LINK_OUTSIDE_REPOSITORY", - "invalid", - "Markdown link target must be repository-relative", - suite=context.suite_id, - check=check_id, - path=display_path, - observed=destination, - ) - ) - candidate = (source.parent / Path(*relative.parts)).resolve(strict=False) - - if not candidate.is_relative_to(root): - raise EngineError( - Diagnostic( - "PATH.LINK_OUTSIDE_REPOSITORY", - "invalid", - "Markdown link target escapes the repository root", - suite=context.suite_id, - check=check_id, - path=display_path, - observed=destination, - ) - ) + candidate = inputs.link_target( + display_path, target, suite=context.suite_id, check=check_id, + destination=destination, + ) targets.append( LocalMarkdownTarget( destination=destination, - repository_path=candidate.relative_to(root).as_posix(), - resolved_path=candidate, + repository_path=candidate, ) ) return tuple(targets) @@ -125,7 +92,7 @@ class MarkdownLinksCheck: paths: tuple[str, ...] | None members: ProjectedTableSource | None - def _selected_paths(self, context: CheckContext) -> tuple[str, ...]: + def _selected_paths(self, context: CheckContext | CheckInputContext) -> tuple[str, ...]: if self.members is None: if self.paths is None: raise TypeError("Markdown link paths or members are required") @@ -134,7 +101,7 @@ def _selected_paths(self, context: CheckContext) -> tuple[str, ...]: return tuple(value for (value,) in projected) def authority_inputs( - self, context: CheckContext + self, context: CheckInputContext ) -> tuple[CheckAuthorityInput, ...]: paths = self._selected_paths(context) target_paths = tuple( @@ -168,7 +135,7 @@ def run(self, context: CheckContext) -> list[Diagnostic]: ] for display_path in paths: for target in local_markdown_targets(context, self.id, display_path): - if not target.resolved_path.exists(): + if not context.inputs.exists(target.repository_path): raise EngineError( Diagnostic( "INPUT.LINK_TARGET_UNAVAILABLE", diff --git a/tools/standards_verifier/standards_verifier/checks/markdown_targets.py b/tools/standards_verifier/standards_verifier/checks/markdown_targets.py index 7593e47c..b9fbb5d9 100644 --- a/tools/standards_verifier/standards_verifier/checks/markdown_targets.py +++ b/tools/standards_verifier/standards_verifier/checks/markdown_targets.py @@ -4,7 +4,7 @@ from typing import Any from ..diagnostics import Diagnostic, EngineError -from ..model import CheckAuthorityInput, CheckContext, present_inputs +from ..model import CheckAuthorityInput, CheckContext, CheckInputContext, present_inputs from ..paths import contained_file from .markdown_links import local_markdown_targets @@ -18,7 +18,7 @@ class MarkdownTargetsCheck: required: tuple[str, ...] def authority_inputs( - self, context: CheckContext + self, context: CheckInputContext ) -> tuple[CheckAuthorityInput, ...]: return present_inputs("markdown", self.path) + present_inputs( "target", *self.required diff --git a/tools/standards_verifier/standards_verifier/checks/metadata.py b/tools/standards_verifier/standards_verifier/checks/metadata.py index 0a503d7c..1e120f3e 100644 --- a/tools/standards_verifier/standards_verifier/checks/metadata.py +++ b/tools/standards_verifier/standards_verifier/checks/metadata.py @@ -9,7 +9,7 @@ ) from ..diagnostics import Diagnostic, EngineError -from ..model import CheckAuthorityInput, CheckContext, present_inputs +from ..model import CheckAuthorityInput, CheckContext, CheckInputContext, present_inputs @dataclass(frozen=True, slots=True) @@ -26,7 +26,7 @@ class MetadataGraphCheck: cases: tuple[MetadataCase, ...] | None def authority_inputs( - self, context: CheckContext + self, context: CheckInputContext ) -> tuple[CheckAuthorityInput, ...]: paths = self.paths or tuple( path for case in self.cases or () for path in case.paths diff --git a/tools/standards_verifier/standards_verifier/checks/metadata_route.py b/tools/standards_verifier/standards_verifier/checks/metadata_route.py index a813544a..01a5d117 100644 --- a/tools/standards_verifier/standards_verifier/checks/metadata_route.py +++ b/tools/standards_verifier/standards_verifier/checks/metadata_route.py @@ -13,7 +13,7 @@ METADATA_REQUIRES, metadata_dependency_registry, ) -from ..model import CheckAuthorityInput, CheckContext, present_inputs +from ..model import CheckAuthorityInput, CheckContext, CheckInputContext, present_inputs from .table import read_table_rows @@ -41,9 +41,9 @@ class MetadataRouteCheck: selections: tuple[RouteSelection, ...] def authority_inputs( - self, context: CheckContext + self, context: CheckInputContext ) -> tuple[CheckAuthorityInput, ...]: - corpus = load_canonical_module_corpus(context.repo_root) + corpus = load_canonical_module_corpus(context.inputs) return ( *present_inputs("routing-cases", self.path), *present_inputs("routing-expectations", self.expectations_path), diff --git a/tools/standards_verifier/standards_verifier/checks/plan_contract.py b/tools/standards_verifier/standards_verifier/checks/plan_contract.py index 28b30476..5eea8ad6 100644 --- a/tools/standards_verifier/standards_verifier/checks/plan_contract.py +++ b/tools/standards_verifier/standards_verifier/checks/plan_contract.py @@ -5,7 +5,7 @@ from typing import Any from ..diagnostics import Diagnostic, EngineError -from ..model import CheckAuthorityInput, CheckContext, present_inputs +from ..model import CheckAuthorityInput, CheckContext, CheckInputContext, present_inputs from ..paths import contained_file @@ -239,7 +239,7 @@ class PlanContractCheck: message: str | None def authority_inputs( - self, context: CheckContext + self, context: CheckInputContext ) -> tuple[CheckAuthorityInput, ...]: return present_inputs("plan-contract", self.path) diff --git a/tools/standards_verifier/standards_verifier/checks/policy_impact.py b/tools/standards_verifier/standards_verifier/checks/policy_impact.py index 9b465945..6e2cccde 100644 --- a/tools/standards_verifier/standards_verifier/checks/policy_impact.py +++ b/tools/standards_verifier/standards_verifier/checks/policy_impact.py @@ -4,7 +4,7 @@ from typing import Any from ..diagnostics import Diagnostic, EngineError -from ..model import CheckAuthorityInput, CheckContext, present_inputs +from ..model import CheckAuthorityInput, CheckContext, CheckInputContext, present_inputs from ..policy_impact import ( canonical_policy_impact_inputs, load_policy_impact, @@ -27,13 +27,13 @@ class PolicyImpactCheck: cases: tuple[PolicyImpactCase, ...] | None def authority_inputs( - self, context: CheckContext + self, context: CheckInputContext ) -> tuple[CheckAuthorityInput, ...]: if self.source_registry is not None: return present_inputs( "registered-policy-impact", *registered_policy_impact_inputs( - context.repo_root, + context.inputs, self.source_registry, dict(context.catalog.suite_paths), ), @@ -41,7 +41,7 @@ def authority_inputs( return ( *present_inputs( "canonical-policy-impact", - *canonical_policy_impact_inputs(context.repo_root), + *canonical_policy_impact_inputs(context.inputs), ), *present_inputs( "fixture-manifest", *(case.manifest for case in self.cases or ()) diff --git a/tools/standards_verifier/standards_verifier/checks/python_package_contract.py b/tools/standards_verifier/standards_verifier/checks/python_package_contract.py index f47bc072..48e28fed 100644 --- a/tools/standards_verifier/standards_verifier/checks/python_package_contract.py +++ b/tools/standards_verifier/standards_verifier/checks/python_package_contract.py @@ -11,6 +11,7 @@ from ..model import ( CheckAuthorityInput, CheckContext, + CheckInputContext, CheckRepositoryIndexInput, present_inputs, ) @@ -29,13 +30,13 @@ class PythonPackageContractCheck: fixtures: str def authority_inputs( - self, context: CheckContext + self, context: CheckInputContext ) -> tuple[CheckAuthorityInput, ...]: return ( *present_inputs("package-fixtures", self.fixtures), *present_inputs( "package-contract-input", - *python_package_authority_paths(context.repo_root), + *python_package_authority_paths(context.inputs), ), CheckRepositoryIndexInput("package-source-membership"), ) diff --git a/tools/standards_verifier/standards_verifier/checks/table.py b/tools/standards_verifier/standards_verifier/checks/table.py index 98fe8e1e..d9045482 100644 --- a/tools/standards_verifier/standards_verifier/checks/table.py +++ b/tools/standards_verifier/standards_verifier/checks/table.py @@ -1,13 +1,14 @@ from __future__ import annotations import csv +import io from dataclasses import dataclass from pathlib import Path from typing import Any from ..diagnostics import Diagnostic, EngineError -from ..model import CheckContext -from ..paths import contained_file +from ..model import CheckContext, CheckInputContext +from ..input_sources import SuiteInputSource, input_source from .predicates import Predicate, parse_predicate @@ -49,16 +50,16 @@ class ProjectedTableSource: def read_table_rows( - root: Path, + root: Path | SuiteInputSource, path: str, header: tuple[str, ...], *, suite: str, check: str, ) -> list[dict[str, str]]: - source = contained_file(root, path, suite=suite, check=check) + content = input_source(root).read_bytes(path, suite=suite, check=check) try: - with source.open("r", encoding="utf-8", newline="") as handle: + with io.StringIO(content.decode("utf-8"), newline="") as handle: values = list(csv.reader(handle, delimiter="\t")) except UnicodeDecodeError as error: raise EngineError( @@ -139,12 +140,12 @@ def project_table_rows( def read_projected_table_rows( - context: CheckContext, + context: CheckContext | CheckInputContext, check: str, source: ProjectedTableSource, ) -> tuple[tuple[str, ...], ...]: rows = read_table_rows( - context.repo_root, + context.inputs, source.path, source.header, suite=context.suite_id, diff --git a/tools/standards_verifier/standards_verifier/config.py b/tools/standards_verifier/standards_verifier/config.py index 89a6c1d0..2ac3b6a1 100644 --- a/tools/standards_verifier/standards_verifier/config.py +++ b/tools/standards_verifier/standards_verifier/config.py @@ -9,13 +9,12 @@ from .diagnostics import Diagnostic, EngineError from .graph_adapters import SUITE_DEPENDENCIES, suite_dependency_registry from .model import RegistryEntry, Suite, SuiteCatalog -from .paths import contained_file +from .input_sources import SuiteInputSource, input_source -def _load_toml(path: Path, display_path: str) -> dict[str, Any]: +def _load_toml(content: bytes, display_path: str) -> dict[str, Any]: try: - with path.open("rb") as handle: - value = tomllib.load(handle) + value = tomllib.loads(content.decode("utf-8")) except tomllib.TOMLDecodeError as error: raise EngineError(Diagnostic("CONFIG.INVALID_TOML", "invalid", str(error), path=display_path)) from error if not isinstance(value, dict): @@ -23,9 +22,8 @@ def _load_toml(path: Path, display_path: str) -> dict[str, Any]: return value -def load_registry(root: Path, registry_path: str) -> tuple[RegistryEntry, ...]: - path = contained_file(root, registry_path) - raw = _load_toml(path, registry_path) +def load_registry(root: Path | SuiteInputSource, registry_path: str) -> tuple[RegistryEntry, ...]: + raw = _load_toml(input_source(root).read_bytes(registry_path), registry_path) if set(raw) != {"schema_version", "suites"}: unknown = sorted(set(raw) - {"schema_version", "suites"}) raise EngineError(Diagnostic("CONFIG.REGISTRY_FIELDS", "invalid", "registry requires exactly schema_version and suites", path=registry_path, field=unknown[0] if unknown else None)) @@ -59,15 +57,16 @@ def load_registry(root: Path, registry_path: str) -> tuple[RegistryEntry, ...]: raise EngineError(Diagnostic("CONFIG.SELF_DEPENDENCY", "invalid", "suite cannot depend on itself", suite=entry.id, path=registry_path)) if dependency not in known: raise EngineError(Diagnostic("CONFIG.UNKNOWN_DEPENDENCY", "unavailable", "suite dependency is not registered", suite=entry.id, path=registry_path, observed=dependency)) - _validate_acyclic(root, entries, registry_path) + _validate_acyclic(entries, registry_path) return tuple(entries) def _validate_acyclic( - root: Path, entries: list[RegistryEntry], registry_path: str + entries: list[RegistryEntry], registry_path: str ) -> None: + # This graph contains symbolic suite IDs only; its coordinate root is not read. graph = suite_dependency_registry( - root, + Path("/"), entries, registry_path, include_path_aliases=False, @@ -86,9 +85,8 @@ def _validate_acyclic( ) -def load_suite(root: Path, entry: RegistryEntry) -> Suite: - path = contained_file(root, entry.path, suite=entry.id) - raw = _load_toml(path, entry.path) +def load_suite(root: Path | SuiteInputSource, entry: RegistryEntry) -> Suite: + raw = _load_toml(input_source(root).read_bytes(entry.path, suite=entry.id), entry.path) allowed = {"schema_version", "id", "owner", "description", "checks"} if set(raw) != allowed: unknown = sorted(set(raw) - allowed) @@ -112,12 +110,12 @@ def load_suite(root: Path, entry: RegistryEntry) -> Suite: return Suite(entry.id, owner, description, checks) -def load_registry_catalog(root: Path, registry_path: str) -> SuiteCatalog: +def load_registry_catalog(root: Path | SuiteInputSource, registry_path: str) -> SuiteCatalog: return SuiteCatalog(registry_path, load_registry(root, registry_path), ()) def extend_catalog( - root: Path, + root: Path | SuiteInputSource, catalog: SuiteCatalog, suite_ids: Iterable[str], ) -> SuiteCatalog: diff --git a/tools/standards_verifier/standards_verifier/graph_adapters.py b/tools/standards_verifier/standards_verifier/graph_adapters.py index 6ff2730a..8fb457e2 100644 --- a/tools/standards_verifier/standards_verifier/graph_adapters.py +++ b/tools/standards_verifier/standards_verifier/graph_adapters.py @@ -46,7 +46,12 @@ def suite_dependency_registry( registry_path, include_path_aliases=include_path_aliases, ) - return EdgeRegistry(root, (source,)) + # Declaration-only cycle validation has symbolic IDs, not ambient aliases. + # Executable catalogs retain physical aliases for their selected checkout. + return EdgeRegistry( + root, (source,), + logical_artifacts=None if include_path_aliases else (), + ) def suite_dependency_source( diff --git a/tools/standards_verifier/standards_verifier/input_sources.py b/tools/standards_verifier/standards_verifier/input_sources.py new file mode 100644 index 00000000..492af7d6 --- /dev/null +++ b/tools/standards_verifier/standards_verifier/input_sources.py @@ -0,0 +1,137 @@ +"""Authoritative inputs for declaration discovery and suite-manifest compilation. + +Executing checks remains filesystem-owned. Frozen proposal input reads expose +only explicit membership and supplied bytes; membership alone never supplies data. +""" +from __future__ import annotations + +from pathlib import Path, PurePosixPath +from typing import Protocol, Sequence + +from tools.repository_git.repository_git import GitRepositoryError, RepositoryPath, indexed_paths +from tools.standards_metadata.standards_metadata import FrozenContentSource, MetadataError + +from .diagnostics import Diagnostic, EngineError +from .paths import contained_file, contained_path, repository_path + + +class SuiteInputSource(Protocol): + def read_bytes(self, path: str, *, suite: str | None = None, check: str | None = None) -> bytes: ... + def exists(self, path: str) -> bool: ... + def indexed_paths(self) -> tuple[str, ...]: ... + def link_target(self, source: str, target: str, *, suite: str, check: str, destination: str) -> str: ... + + +def repository_path_observation(paths: Sequence[str]) -> tuple[str, ...]: + try: + selected = tuple(sorted(str(RepositoryPath.parse(path)) for path in paths if type(path) is str)) + except GitRepositoryError as error: + raise EngineError(Diagnostic( + "INPUT.INVALID_REPOSITORY_PATH", "invalid", + "explicit repository path observation is invalid", + )) from error + if len(selected) != len(paths) or len(set(selected)) != len(selected): + raise EngineError(Diagnostic( + "INPUT.INVALID_REPOSITORY_PATHS", "invalid", + "explicit repository path observation must contain unique strings", + )) + return selected + + +def _link_escape(source: str, destination: str, suite: str, check: str, *, absolute: bool = False) -> EngineError: + return EngineError(Diagnostic( + "PATH.LINK_OUTSIDE_REPOSITORY", "invalid", + "Markdown link target must be repository-relative" if absolute else "Markdown link target escapes the repository root", + suite=suite, check=check, path=source, observed=destination, + )) + + +class DirectoryInputs: + """Read actual candidate files with the verifier's existing containment checks.""" + def __init__(self, root: Path, repository_paths: Sequence[str] | None = None) -> None: + self.root = root.resolve() + self._paths = None if repository_paths is None else repository_path_observation(repository_paths) + + def read_bytes(self, path: str, *, suite: str | None = None, check: str | None = None) -> bytes: + return contained_file(self.root, path, suite=suite, check=check).read_bytes() + + def exists(self, path: str) -> bool: + candidate = contained_path(self.root, path) + return candidate.exists() or candidate.is_symlink() + + def indexed_paths(self) -> tuple[str, ...]: + return indexed_paths(self.root) if self._paths is None else self._paths + + def link_target(self, source: str, target: str, *, suite: str, check: str, destination: str) -> str: + original = contained_file(self.root, source, suite=suite, check=check) + relative = PurePosixPath(target) + if relative.is_absolute(): + raise _link_escape(source, destination, suite, check, absolute=True) + candidate = (original.parent / Path(*relative.parts)).resolve(strict=False) if target else original + if not candidate.is_relative_to(self.root): + raise _link_escape(source, destination, suite, check) + return candidate.relative_to(self.root).as_posix() + + +class FrozenInputs: + """One exact regular-file population and its captured byte source.""" + def __init__(self, source: FrozenContentSource, repository_paths: Sequence[str]) -> None: + self._source = source + self._paths = repository_path_observation(repository_paths) + self._files = frozenset(self._paths) + self._directories = frozenset( + str(parent) for path in self._paths for parent in PurePosixPath(path).parents + ) + if self._files & self._directories or not {path for path, _ in source.files} <= self._files: + raise EngineError(Diagnostic( + "INPUT.CONTRADICTORY_MEMBERSHIP", "invalid", + "captured bytes and regular-file repository membership disagree", + )) + + def read_bytes(self, path: str, *, suite: str | None = None, check: str | None = None) -> bytes: + selected = str(repository_path(path, suite=suite, check=check)) + if selected in self._directories: + raise EngineError(Diagnostic( + "INPUT.NOT_FILE", "invalid", "required input is not a regular file", + suite=suite, check=check, path=path, + )) + if selected not in self._files: + raise EngineError(Diagnostic( + "INPUT.UNAVAILABLE", "unavailable", "required input does not exist", + suite=suite, check=check, path=path, + )) + try: + return self._source.read_bytes(selected) + except MetadataError as error: + if error.failure.code != "INPUT.UNAVAILABLE": + raise + raise EngineError(Diagnostic( + "INPUT.UNAVAILABLE", "unavailable", "required input bytes were not captured", + suite=suite, check=check, path=path, + )) from error + + def exists(self, path: str) -> bool: + selected = str(repository_path(path)) + return selected in self._files or selected in self._directories + + def indexed_paths(self) -> tuple[str, ...]: + return self._paths + + def link_target(self, source: str, target: str, *, suite: str, check: str, destination: str) -> str: + selected = repository_path(source, suite=suite, check=check) + relative = PurePosixPath(target) + if relative.is_absolute(): + raise _link_escape(source, destination, suite, check, absolute=True) + parts = list(selected.parent.parts) if target else list(selected.parts) + for component in relative.parts if target else (): + if component == "..": + if not parts: + raise _link_escape(source, destination, suite, check) + parts.pop() + else: + parts.append(component) + return str(PurePosixPath(*parts)) + + +def input_source(value: Path | SuiteInputSource) -> SuiteInputSource: + return DirectoryInputs(value) if isinstance(value, Path) else value diff --git a/tools/standards_verifier/standards_verifier/model.py b/tools/standards_verifier/standards_verifier/model.py index a7056655..70b1d80c 100644 --- a/tools/standards_verifier/standards_verifier/model.py +++ b/tools/standards_verifier/standards_verifier/model.py @@ -5,6 +5,7 @@ from typing import Literal, Protocol, TypeAlias from .diagnostics import Diagnostic +from .input_sources import DirectoryInputs, SuiteInputSource class Check(Protocol): @@ -13,7 +14,7 @@ class Check(Protocol): def run(self, context: "CheckContext") -> list[Diagnostic]: ... def authority_inputs( - self, context: "CheckContext" + self, context: "CheckInputContext" ) -> tuple["CheckAuthorityInput", ...]: ... @@ -102,6 +103,17 @@ class CheckContext: suite_id: str catalog: SuiteCatalog + @property + def inputs(self) -> SuiteInputSource: + return DirectoryInputs(self.repo_root) + + +@dataclass(frozen=True, slots=True) +class CheckInputContext: + inputs: SuiteInputSource + suite_id: str + catalog: SuiteCatalog + @dataclass(slots=True) class SuiteResult: diff --git a/tools/standards_verifier/standards_verifier/policy_impact.py b/tools/standards_verifier/standards_verifier/policy_impact.py index 748dc635..2e83884c 100644 --- a/tools/standards_verifier/standards_verifier/policy_impact.py +++ b/tools/standards_verifier/standards_verifier/policy_impact.py @@ -29,6 +29,7 @@ from .diagnostics import Diagnostic, EngineError from .paths import contained_file +from .input_sources import SuiteInputSource, input_source POLICY_GROUP = "policy-impact" @@ -306,7 +307,7 @@ def load_registered_policy_impact( from .repository_graph import load_repository_registry try: - corpus = load_canonical_standards_corpus(root.resolve()) + corpus = load_canonical_standards_corpus(input_source(root)) compiled = compile_policy_impact( root.resolve(), corpus, DEFAULT_POLICY_REGISTRY ) @@ -383,8 +384,8 @@ def _adapter_input_sources( ) -def canonical_policy_impact_inputs(root: Path) -> tuple[str, ...]: - corpus = load_canonical_standards_corpus(root.resolve()) +def canonical_policy_impact_inputs(root: Path | SuiteInputSource) -> tuple[str, ...]: + corpus = load_canonical_standards_corpus(input_source(root)) return tuple( sorted( { @@ -398,11 +399,11 @@ def canonical_policy_impact_inputs(root: Path) -> tuple[str, ...]: def registered_policy_impact_inputs( - root: Path, + root: Path | SuiteInputSource, source_registry_path: str, suite_paths: Mapping[str, str], ) -> tuple[str, ...]: - repository = root.resolve() + repository = input_source(root) corpus = load_canonical_standards_corpus(repository) compiled = compile_policy_impact(repository, corpus, DEFAULT_POLICY_REGISTRY) return _adapter_input_sources( diff --git a/tools/standards_verifier/standards_verifier/python_packages.py b/tools/standards_verifier/standards_verifier/python_packages.py index 3f5a2a4d..6696a3aa 100644 --- a/tools/standards_verifier/standards_verifier/python_packages.py +++ b/tools/standards_verifier/standards_verifier/python_packages.py @@ -19,6 +19,9 @@ ) +from .input_sources import SuiteInputSource, input_source +from .diagnostics import EngineError + _PYTHON_RANGE = ">=3.11,<3.13" _DEPENDENCY_NAME = re.compile(r"[A-Za-z0-9][A-Za-z0-9._-]*") _IMPORT_MACHINERY_ROOTS = frozenset( @@ -90,14 +93,13 @@ def _dependency_name(requirement: str) -> str: def _load_contract( - root: Path, + root: Path | SuiteInputSource, manifest: str, ) -> tuple[PythonPackageContract | None, list[PythonPackageFinding]]: findings: list[PythonPackageFinding] = [] try: - with (root / manifest).open("rb") as source: - raw = tomllib.load(source) - except (OSError, tomllib.TOMLDecodeError) as error: + raw = tomllib.loads(input_source(root).read_bytes(manifest).decode("utf-8")) + except (OSError, tomllib.TOMLDecodeError, EngineError) as error: return None, [ PythonPackageFinding( "PYTHON_PACKAGE.MANIFEST_UNAVAILABLE", @@ -1219,9 +1221,9 @@ def audit_python_packages(root: Path) -> tuple[PythonPackageFinding, ...]: return tuple(findings) -def python_package_authority_paths(root: Path) -> tuple[str, ...]: - repository = root.resolve() - indexed = indexed_paths(repository) +def python_package_authority_paths(root: Path | SuiteInputSource) -> tuple[str, ...]: + repository = input_source(root) + indexed = repository.indexed_paths() selected = { path for path in indexed diff --git a/tools/standards_verifier/standards_verifier/suite_inputs.py b/tools/standards_verifier/standards_verifier/suite_inputs.py index a97a4a14..f1115e74 100644 --- a/tools/standards_verifier/standards_verifier/suite_inputs.py +++ b/tools/standards_verifier/standards_verifier/suite_inputs.py @@ -4,17 +4,13 @@ from pathlib import Path from typing import Sequence -from tools.repository_git.repository_git import ( - GitRepositoryError, - RepositoryPath, - indexed_paths, -) from tools.standards_identity.standards_identity import ( IdentityArray, IdentityObject, encode_identity_value, ) from tools.standards_metadata.standards_metadata import ( + FrozenContentSource, SUITE_INPUT_CONTRACT, SUITE_INPUT_SCHEMA_VERSION, RepositoryIndexObservation, @@ -28,8 +24,8 @@ from .config import extend_catalog, load_registry_catalog from .diagnostics import Diagnostic, EngineError -from .model import CheckContext, CheckFileInput, CheckRepositoryIndexInput -from .paths import contained_file, contained_path +from .model import CheckInputContext, CheckFileInput, CheckRepositoryIndexInput +from .input_sources import DirectoryInputs, FrozenInputs, SuiteInputSource DEFAULT_REGISTRY = "evaluation/standards-effectiveness/suite-registry.toml" @@ -56,13 +52,19 @@ def compile_suite_input_manifest( *, repository_paths: Sequence[str] | None = None, ) -> SuiteInputManifest: - repo_root = root.resolve() - catalog = load_registry_catalog(repo_root, registry_path) - catalog = extend_catalog(repo_root, catalog, catalog.suite_ids) + return _compile_suite_input_manifest(DirectoryInputs(root, repository_paths), registry_path) + + +def _compile_suite_input_manifest( + inputs: SuiteInputSource, + registry_path: str, +) -> SuiteInputManifest: + catalog = load_registry_catalog(inputs, registry_path) + catalog = extend_catalog(inputs, catalog, catalog.suite_ids) file_uses: dict[tuple[str, str], set[SuiteInputUse]] = {} index_uses: set[SuiteInputUse] = set() for suite in catalog.suites: - context = CheckContext(repo_root, suite.id, catalog) + context = CheckInputContext(inputs, suite.id, catalog) for check in suite.checks: for declaration in check.authority_inputs(context): use = SuiteInputUse(suite.id, check.id, declaration.role) @@ -96,11 +98,9 @@ def compile_suite_input_manifest( files = [] for (path, state), uses in sorted(file_uses.items()): if state == "present": - source = contained_file(repo_root, path) - digest: str | None = file_digest(source.read_bytes()) + digest: str | None = file_digest(inputs.read_bytes(path)) else: - candidate = contained_path(repo_root, path) - if candidate.exists() or candidate.is_symlink(): + if inputs.exists(path): raise EngineError( Diagnostic( "INPUT.EXPECTED_ABSENT", @@ -112,30 +112,26 @@ def compile_suite_input_manifest( digest = None files.append(SuiteFileInput(path, state, digest, tuple(sorted(uses)))) - registry = contained_file(repo_root, registry_path) + registry = inputs.read_bytes(registry_path) suites = tuple( SuiteDefinitionInput( entry.id, entry.path, - file_digest(contained_file(repo_root, entry.path).read_bytes()), + file_digest(inputs.read_bytes(entry.path)), entry.requires, ) for entry in catalog.entries ) index = None if index_uses: - observed_paths = ( - indexed_paths(repo_root) - if repository_paths is None - else _repository_path_observation(repository_paths) - ) + observed_paths = inputs.indexed_paths() index = RepositoryIndexObservation( repository_index_digest(observed_paths), tuple(sorted(index_uses)), ) return SuiteInputManifest( registry_path, - file_digest(registry.read_bytes()), + file_digest(registry), suites, tuple(files), index, @@ -163,30 +159,15 @@ def suite_input_projection_bytes( ) -def _repository_path_observation(paths: Sequence[str]) -> tuple[str, ...]: - try: - selected = tuple( - sorted( - str(RepositoryPath.parse(path)) for path in paths if type(path) is str - ) - ) - except GitRepositoryError as error: - raise EngineError( - Diagnostic( - "INPUT.INVALID_REPOSITORY_PATH", - "invalid", - "explicit repository path observation is invalid", - ) - ) from error - if len(selected) != len(paths) or len(set(selected)) != len(selected): - raise EngineError( - Diagnostic( - "INPUT.INVALID_REPOSITORY_PATHS", - "invalid", - "explicit repository path observation must contain unique strings", - ) - ) - return selected +def suite_input_projection_bytes_from_content( + source: FrozenContentSource, + *, + repository_paths: Sequence[str], +) -> bytes: + """Compile the exact manifest from captured bytes and explicit membership.""" + return suite_input_manifest_bytes( + _compile_suite_input_manifest(FrozenInputs(source, repository_paths), DEFAULT_REGISTRY) + ) def check_suite_input_projection( diff --git a/tools/standards_verifier/tests/test_frozen_suite_inputs.py b/tools/standards_verifier/tests/test_frozen_suite_inputs.py new file mode 100644 index 00000000..78736609 --- /dev/null +++ b/tools/standards_verifier/tests/test_frozen_suite_inputs.py @@ -0,0 +1,173 @@ +"""Filesystem/frozen input parity at the canonical manifest compiler boundary.""" +from __future__ import annotations + +import json +from pathlib import Path +import subprocess +import tempfile +import unittest +from unittest.mock import patch + +from tools.standards_metadata.standards_metadata import FrozenContentSource +from standards_verifier.diagnostics import EngineError +from standards_verifier.model import absent_inputs, present_inputs +from standards_verifier.suite_inputs import ( + suite_input_projection_bytes, + suite_input_projection_bytes_from_content, +) + +REGISTRY = "evaluation/standards-effectiveness/suite-registry.toml" +SUITE = "evaluation/standards-effectiveness/suites/example.toml" + + +class FrozenSuiteInputsTest(unittest.TestCase): + def setUp(self): + self.temp = tempfile.TemporaryDirectory() + self.addCleanup(self.temp.cleanup) + self.root = Path(self.temp.name) + self.write(REGISTRY, f'schema_version = 1\n[[suites]]\nid="example"\npath="{SUITE}"\nrequires=[]\n') + self.write(SUITE, 'schema_version=1\nid="example"\nowner="test"\ndescription="fixture"\n' + '[[checks]]\nid="links"\ntype="markdown_links"\npaths=["docs/readme.md"]\n') + self.write("docs/readme.md", "[Target](../target.md#part)\n[Local](#heading)\n") + self.write("target.md", "# Part\n") + self.write("uncaptured.txt", "Membership is distinct from input content.\n") + subprocess.run(["git", "init", "-q"], cwd=self.root, check=True) + subprocess.run(["git", "add", "--all"], cwd=self.root, check=True) + + def write(self, path, content): + target = self.root / path + target.parent.mkdir(parents=True, exist_ok=True) + target.write_bytes(content.encode() if isinstance(content, str) else content) + + def population(self): + return tuple(subprocess.check_output(["git", "ls-files", "-z"], cwd=self.root).decode().rstrip("\0").split("\0")) + + def files(self): + return {p: (self.root / p).read_bytes() for p in self.population() if (self.root / p).is_file()} + + def frozen(self, files=None, paths=None): + return suite_input_projection_bytes_from_content( + FrozenContentSource(self.files() if files is None else files), + repository_paths=self.population() if paths is None else paths, + ) + + def failure(self, action): + with self.assertRaises(EngineError) as caught: + action() + return caught.exception.diagnostic + + def test_filesystem_and_frozen_have_exact_bytes_without_filesystem_work(self): + expected = suite_input_projection_bytes(self.root) + files = self.files() + # The indexed but unused file is genuinely absent from captured content. + files.pop("uncaptured.txt") + source = FrozenContentSource(files) + paths = self.population() + with patch("pathlib.Path.read_bytes", side_effect=AssertionError("filesystem read")), \ + patch("subprocess.run", side_effect=AssertionError("child process")), \ + patch("pathlib.Path.exists", side_effect=AssertionError("ambient membership")), \ + patch("tempfile.TemporaryDirectory", side_effect=AssertionError("staging")): + actual = suite_input_projection_bytes_from_content(source, repository_paths=paths) + self.assertEqual(actual, expected) + + def test_repository_corpus_covers_all_real_check_declarations(self): + root = Path(__file__).resolve().parents[3] + expected = suite_input_projection_bytes(root) + projection = json.loads(expected) + paths = tuple(subprocess.check_output(["git", "ls-files", "-z"], cwd=root).decode().rstrip("\0").split("\0")) + required = {projection["registry"]["path"], *(x["path"] for x in projection["suites"]), + *(x["path"] for x in projection["files"] if x["state"] == "present")} + files = {p: (root / p).read_bytes() for p in required} + actual = suite_input_projection_bytes_from_content(FrozenContentSource(files), repository_paths=paths) + self.assertEqual(actual, expected) + + def test_index_membership_does_not_supply_missing_content(self): + files = self.files() + files.pop("target.md") + diagnostic = self.failure(lambda: self.frozen(files)) + self.assertEqual((diagnostic.code, diagnostic.outcome, diagnostic.path), + ("INPUT.UNAVAILABLE", "unavailable", "target.md")) + self.assertIn("not captured", diagnostic.message) + + def test_empty_content_remains_present_and_hashed(self): + self.write("target.md", b"") + result = json.loads(self.frozen()) + target = next(x for x in result["files"] if x["path"] == "target.md") + self.assertEqual(target["digest"], "sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855") + self.assertEqual(self.frozen(), suite_input_projection_bytes(self.root)) + + def test_invalid_configuration_preserves_diagnostic(self): + for content, code in (("broken = [", "CONFIG.INVALID_TOML"), + ('schema_version=2\nsuites=[]\n', "CONFIG.SCHEMA_VERSION")): + self.write(REGISTRY, content) + physical = self.failure(lambda: suite_input_projection_bytes(self.root)) + frozen = self.failure(self.frozen) + self.assertEqual(physical, frozen) + self.assertEqual(physical.code, code) + + def test_markdown_newline_and_utf8_semantics_are_preserved(self): + target = "target\nname.md" + self.write(target, "# Target\n") + subprocess.run(["git", "add", "--", target], cwd=self.root, check=True) + for newline in ("\r\n", "\r", "\n"): + self.write("docs/readme.md", "[Target](../target" + newline + "name.md)") + frozen = self.frozen() + self.assertEqual(frozen, suite_input_projection_bytes(self.root)) + self.assertIn(target, {item["path"] for item in json.loads(frozen)["files"]}) + self.write("docs/readme.md", b"\xff") + physical = self.failure(lambda: suite_input_projection_bytes(self.root)) + frozen = self.failure(self.frozen) + self.assertEqual(physical, frozen) + self.assertEqual(frozen.code, "INPUT.INVALID_UTF8") + + def test_escaping_links_preserve_diagnostics(self): + for link in ("../../outside.md", "/absolute.md"): + self.write("docs/readme.md", f"[Outside]({link})") + physical = self.failure(lambda: suite_input_projection_bytes(self.root)) + frozen = self.failure(self.frozen) + self.assertEqual(physical, frozen) + self.assertEqual(frozen.code, "PATH.LINK_OUTSIDE_REPOSITORY") + + def test_directory_and_missing_inputs_preserve_classification(self): + for link, code in (("../docs", "INPUT.NOT_FILE"), ("../missing", "INPUT.UNAVAILABLE")): + self.write("docs/readme.md", f"[Target]({link})") + physical = self.failure(lambda: suite_input_projection_bytes(self.root)) + frozen = self.failure(self.frozen) + self.assertEqual((physical.code, physical.path, physical.outcome), + (frozen.code, frozen.path, frozen.outcome)) + self.assertEqual(frozen.code, code) + + def test_absence_and_contradictory_declarations_are_shared(self): + from standards_verifier.checks.markdown_links import MarkdownLinksCheck + for declarations, code in ((absent_inputs("required", "uncaptured.txt"), "INPUT.EXPECTED_ABSENT"), + ((*present_inputs("a", "target.md"), *absent_inputs("b", "target.md")), "INPUT.CONTRADICTORY_STATE")): + with patch.object(MarkdownLinksCheck, "authority_inputs", return_value=declarations): + physical = self.failure(lambda: suite_input_projection_bytes(self.root)) + frozen = self.failure(self.frozen) + self.assertEqual(physical, frozen) + self.assertEqual(frozen.code, code) + + def test_frozen_source_and_index_stay_independent_of_current_files(self): + source = FrozenContentSource(self.files()) + paths = self.population() + expected = suite_input_projection_bytes_from_content(source, repository_paths=paths) + self.write("target.md", "Changed ambient bytes") + self.assertEqual(suite_input_projection_bytes_from_content(source, repository_paths=paths), expected) + self.assertNotEqual(suite_input_projection_bytes(self.root), expected) + + def test_rejects_invalid_or_contradictory_membership(self): + files = self.files() + for paths, code in (([*self.population(), self.population()[0]], "INPUT.INVALID_REPOSITORY_PATHS"), + ([*self.population(), "../escape"], "INPUT.INVALID_REPOSITORY_PATH"), + ([*self.population(), "docs"], "INPUT.CONTRADICTORY_MEMBERSHIP"), + ([p for p in self.population() if p != "target.md"], "INPUT.CONTRADICTORY_MEMBERSHIP")): + self.assertEqual(self.failure(lambda: self.frozen(files, paths)).code, code) + + def test_physical_symlink_checks_remain_at_filesystem_boundary(self): + outside = self.root.parent / (self.root.name + "-outside") + outside.write_text("private") + self.addCleanup(lambda: outside.unlink(missing_ok=True)) + (self.root / "escape.md").symlink_to(outside) + self.write("docs/readme.md", "[Escape](../escape.md)") + diagnostic = self.failure(lambda: suite_input_projection_bytes(self.root)) + self.assertEqual(diagnostic.code, "PATH.LINK_OUTSIDE_REPOSITORY") From de85f5adfda221fe88fbf0dba12b34aa2e410cf6 Mon Sep 17 00:00:00 2001 From: ChatGPT Date: Thu, 24 Sep 2026 01:50:32 +0000 Subject: [PATCH 10/26] test(engine): reuse the provenance read authority handle Use the existing provenance-read-result authority field for the post-publication snapshot. Preserve fresh boundary captures and all exclusion and historical-read assertions; no runtime or public contract change. --- tools/standards_engine/tests/test_supporting_workflow.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tools/standards_engine/tests/test_supporting_workflow.py b/tools/standards_engine/tests/test_supporting_workflow.py index 133fbc27..376e79df 100644 --- a/tools/standards_engine/tests/test_supporting_workflow.py +++ b/tools/standards_engine/tests/test_supporting_workflow.py @@ -133,6 +133,6 @@ def test_coordinated_publication_and_provenance_only_revision(self): current = self.author.read({"target": REASON}) self.assertEqual(historical["record"]["rationale"], PRIVATE) self.assertEqual(current["record"]["rationale"], PRIVATE + "_REVISED") - self.assertNotEqual(current["snapshot"], old_snapshot) - self.assertEqual(self.app.read({"snapshot": current["snapshot"], "target": RULE})["content"], first["content"]) - self.assertEqual(self.app.read({"snapshot": current["snapshot"], "target": REASON})["kind"], "application-rejected-result") + self.assertNotEqual(current["authority"], old_snapshot) + self.assertEqual(self.app.read({"snapshot": current["authority"], "target": RULE})["content"], first["content"]) + self.assertEqual(self.app.read({"snapshot": current["authority"], "target": REASON})["kind"], "application-rejected-result") From 32aac0e7cb292b6fba4aa132449562068784c1fa Mon Sep 17 00:00:00 2001 From: ChatGPT Date: Thu, 24 Sep 2026 02:04:54 +0000 Subject: [PATCH 11/26] docs(engine): record byte and manifest performance verification Record same-corpus identity, read, proposal, allocation and full-publication measurements. Separate runtime gains from explicit-snapshot test reuse, preserve exact output oracles, and retain the final 616-test and structural evidence with supported-environment limits. --- .../performance-byte-manifest-increment.md | 243 ++++++++++++++++++ .../admission.md | 56 ++++ .../checkpoint-precommit.json | 11 + .../comparison.csv | 5 + .../environment.json | 31 +++ .../final-baseline.json | 130 ++++++++++ .../final-candidate.json | 130 ++++++++++ .../final-manifest-equivalence.json | 11 + .../measure_increment.py | 74 ++++++ .../measure_publication.py | 72 ++++++ .../preservation.json | 8 + .../publication-baseline.json | 17 ++ .../publication-reused.json | 17 ++ .../publication-runtime.json | 17 ++ .../qualification-candidate.json | 4 + .../source-binding.json | 165 ++++++++++++ .../verification.json | 206 +++++++++++++++ .../generated/suite-inputs.json | 2 +- 18 files changed, 1198 insertions(+), 1 deletion(-) create mode 100644 docs/plans/purpose-separated-standards-engine/reports/performance-byte-manifest-increment.md create mode 100644 docs/plans/purpose-separated-standards-engine/reports/performance-byte-manifest-increment/admission.md create mode 100644 docs/plans/purpose-separated-standards-engine/reports/performance-byte-manifest-increment/checkpoint-precommit.json create mode 100644 docs/plans/purpose-separated-standards-engine/reports/performance-byte-manifest-increment/comparison.csv create mode 100644 docs/plans/purpose-separated-standards-engine/reports/performance-byte-manifest-increment/environment.json create mode 100644 docs/plans/purpose-separated-standards-engine/reports/performance-byte-manifest-increment/final-baseline.json create mode 100644 docs/plans/purpose-separated-standards-engine/reports/performance-byte-manifest-increment/final-candidate.json create mode 100644 docs/plans/purpose-separated-standards-engine/reports/performance-byte-manifest-increment/final-manifest-equivalence.json create mode 100644 docs/plans/purpose-separated-standards-engine/reports/performance-byte-manifest-increment/measure_increment.py create mode 100644 docs/plans/purpose-separated-standards-engine/reports/performance-byte-manifest-increment/measure_publication.py create mode 100644 docs/plans/purpose-separated-standards-engine/reports/performance-byte-manifest-increment/preservation.json create mode 100644 docs/plans/purpose-separated-standards-engine/reports/performance-byte-manifest-increment/publication-baseline.json create mode 100644 docs/plans/purpose-separated-standards-engine/reports/performance-byte-manifest-increment/publication-reused.json create mode 100644 docs/plans/purpose-separated-standards-engine/reports/performance-byte-manifest-increment/publication-runtime.json create mode 100644 docs/plans/purpose-separated-standards-engine/reports/performance-byte-manifest-increment/qualification-candidate.json create mode 100644 docs/plans/purpose-separated-standards-engine/reports/performance-byte-manifest-increment/source-binding.json create mode 100644 docs/plans/purpose-separated-standards-engine/reports/performance-byte-manifest-increment/verification.json diff --git a/docs/plans/purpose-separated-standards-engine/reports/performance-byte-manifest-increment.md b/docs/plans/purpose-separated-standards-engine/reports/performance-byte-manifest-increment.md new file mode 100644 index 00000000..7e966021 --- /dev/null +++ b/docs/plans/purpose-separated-standards-engine/reports/performance-byte-manifest-increment.md @@ -0,0 +1,243 @@ +# Compact bytes and source-based manifests — implementation and evidence + +**Status:** implemented and locally qualified; supported installed qualification and independent review are separate. + +**Branch:** `implementation/purpose-separated-standards-engine` +**Base:** `2aef993edc8a47ce474468c641cc2e542e3ec8da` +**Tested implementation commit:** `de85f5adfda221fe88fbf0dba12b34aa2e410cf6` +**Evidence date:** September 23, 2026 (America/Vancouver). + +## Objective and bounded admission + +Implement the next measured opportunities from the bounded investigation: cheaper +exact-byte identity computation, suite-input manifest construction without an +intermediate filesystem/Git repository, and explicit snapshot reuse within one +publication test's unchanged-revision intervals. The [admission](performance-byte-manifest-increment/admission.md) +records responsibilities, write scope, preserved guarantees and the deciding evidence. + +Applicable guidance was Core, the selected Performance, Verification and oracle +rules, Development Proportionality, Architecture and immutable replay, Contracts, +Implementation, Commit and Documentation. This is code and implementation evidence; +normative standards, operational prompts/templates, public Engine wire schemas, +persisted formats, dependency locks and the installed configuration are unchanged. +The existing plan is not relabeled as globally accepted by this report. + +## Implemented design + +### Identity-owned compact storage and exact encoding + +`standards_identity.IdentityArray` retains exact immutable `bytes` directly. +Other iterables retain validated tuple construction. The public `values` +observation, sequence equality, hash and representation remain tuple-based; +observing the tuple explicitly may allocate it. Compact storage changes an internal dataclass layout; serialization continues through the canonical Identity encoder, not dataclass introspection. Byte subclasses and mutable +iterables still use the generic validation/copying path. Raw bytes do not become +a new top-level IdentityValue variant. + +The encoder emits the same decimal integer-array preimage, using the existing +256 decimal tokens in 64 KiB input chunks. This bounds per-byte join scratch, +not total output memory: the public encoder still returns complete encoded bytes. +Path ordering, Unicode, escaping, arbitrary-size integers, domain/prefix/length +framing and complete SHA-256 verification are preserved. The implementation +removes millions of unnecessary generic validation/dispatch calls rather than +trusting a stored digest or retaining a cache across operations. + +### One manifest compiler with explicit input adapters + +The Verifier now distinguishes declaration input (`CheckInputContext`) from +physical check execution (`CheckContext`). `SuiteInputSource` provides the small +input surface actually required by declaration discovery: exact bytes, explicit +membership, repository-index observation and local link resolution. + +`DirectoryInputs` retains real-file containment, symlink handling and candidate +membership observations. `FrozenInputs` consumes the existing FrozenContentSource +and an explicit normalized regular-file inventory. It separates an indexed file +from captured bytes: unused uncaptured files are valid membership, while every +consumed file needs actual bytes. Missing bytes produce `INPUT.UNAVAILABLE`; +conflicting file/directory membership is invalid. An empty file is present only +when real empty bytes were supplied and receives the actual empty-content digest. + +Both adapters feed the same check-owned declarations and manifest compiler. +Config, tables, package manifests and policy-impact declarations use that input +surface for discovery. Markdown retains universal-newline parsing while file +digests continue to bind original bytes. Declaration-only dependency validation +uses symbolic graph IDs with explicit empty artifact membership, eliminating +ambient host-file alias discovery. The generic graph engine is unchanged. + +The exported `suite_input_projection_bytes_from_content` lets Engine logical +authoring pass its already-known content and computed candidate inventory to +that compiler. The removed bridge previously touched every proposed path, +wrote captured material, initialized/staged a temporary Git repository and +removed it afterward. None of those temporary steps is required now. + +Actual check execution, package subprocess validation, physical candidate +verification, Git publication and recovery still operate on real checkouts. +Filesystem and frozen interfaces are both current consumers of one compiler; +there is no second serializer, compatibility branch, selective verification, +new database, cross-call cache or transport-lifetime change. + +### Narrow test-workload correction + +The coordinated publication/provenance test now supplies the returned snapshot +for reference, prompt/template and repeated content reads intended to observe the +same accepted revision. The provenance-only proposal explicitly uses that same +base. Fresh capture is retained before publication and after each publication, +as are assertions that the later snapshots differ. Historical provenance, +unchanged normative bytes/revisions and application exclusion assertions remain. +Independent implicit-capture, main-advancement, replay and recovery tests remain. +This changes the test workload, not the runtime meaning of an omitted snapshot. + +## Same-corpus performance + +Three serial baseline and candidate sweeps used the same executable, dependency +set, host and fixed fixture source at `2aef993e`. All observations used +435 captured files, 3,738,522 source bytes, +and the same content identity. Facade creation, initial capture and fixture setup +were outside these operation timings. Final comparisons ran after all package +qualification; no package test process ran concurrently. + +| Operation | Baseline median | Candidate median | Speedup | +| --- | ---: | ---: | ---: | +| content_identity | 0.612 s | 0.148 s | 4.14x | +| read | 0.852 s | 0.362 s | 2.35x | +| propose | 1.810 s | 0.850 s | 2.13x | +| manifest_refresh | 0.653 s | 0.159 s | 4.11x | + +`manifest_refresh` is an inclusive subspan of `propose`; these rows must not be +added. Three samples establish medians/ranges, not p95/p99 or deployment SLAs. +The [comparison CSV](performance-byte-manifest-increment/comparison.csv) and raw +[baseline](performance-byte-manifest-increment/final-baseline.json)/[candidate](performance-byte-manifest-increment/final-candidate.json) +records retain CPU, spans and exact input bindings. + +### Identity and memory evidence + +Both implementations emitted 13,137,463 encoded preimage bytes: + +- Preimage SHA-256: `b2669faaace40e7b8a3003a1d13527a2f1c410a78caee7723eef1db46cb2ba5d`. +- Content ID: `snapshot-content:sha256:2a1b789a3d20e26d4d2dd96ecf11476e3f1b968a104655c701633ed2f7496378`. + +A separate complete-identity tracemalloc probe measured peak traced allocation +of **77,203,351 bytes before** and **26,729,514 bytes after**, +a **65.4% reduction**. This is Python +traced allocation during that operation, not process RSS or all native memory. +Its instrumented duration is not used in the latency comparison. Whole encoded +output and final frame allocation remain proportional to the input representation. + +### Publication workflow: runtime versus test-only changes + +One serial run per combination used the same committed fixture source. Runtime +imports and test-file selection were independently selected. Physical publication +checkpoints exercised that same fixture candidate; complete final-candidate +qualification below separately covers the changed repository source. + +| Combination | Test body | Snapshot publications | Complete checkpoints | +| --- | ---: | ---: | ---: | +| Baseline runtime / original test | 100.516 s | 10 | 2 | +| Candidate runtime / original test | 62.507 s | 10 | 2 | +| Candidate runtime / explicit-snapshot test | 51.251 s | 4 | 2 | + +The first comparison isolates runtime changes while preserving the original +test and assertions. The third also includes the reviewed snapshot-reuse change. +Both actual publications and their complete checkpoints remain in every run. +These are single-workflow observations, not a suite-wide speedup estimate or a +prediction for the user's seven-minute development-machine run. + +## Correctness and standards-consistency evidence + +Five new Identity tests cover all 256 byte values, empty content, chunk boundaries, +large arrays, immutable observation, mutable/subclass input behavior, Unicode +path ordering, arbitrary integers and exact independent preimage/digest oracles. +Construction and encoding counters verify that byte payloads bypass generic +per-element work without bypassing validation of surrounding values. + +Twelve new Verifier tests compare filesystem/frozen manifests and diagnostics, +including actual registered check populations, empty/missing data, malformed +configuration, UTF-8 and newline semantics, escaping links, directory inputs, +contradictory declarations, index errors and real symlink containment. One new +Engine regression runs logical projection while temporary staging and subprocess +creation are forbidden. Existing mutation, purpose, integrity, head, authorization, +publication and cold-recovery assertions are retained. + +A separate full-corpus comparison reproduced the baseline manifest's exact +406,921 bytes with SHA-256 +`2b7979b930bac05dabc5eab2547f81d3e618d3fae49962cbfa093f2440c7ad63`. +It consumed 417 declared content inputs against 1,165 repository paths, while +filesystem content reads, ambient existence queries, subprocess runs and +TemporaryDirectory creation were blocked during frozen compilation. See +[manifest equivalence](performance-byte-manifest-increment/final-manifest-equivalence.json). + +Membership alone now yields a typed unavailable result when consumed bytes are +missing, rather than inheriting the removed bridge's touched empty file. This is +an explicit validity improvement, not a claim that invented empty content and +unavailable content have identical outcomes. On complete equivalent material, +manifest bytes, membership, declarations and content digests agree. + +The design localizes each decision: Identity owns representation; the Verifier +owns declaration discovery and manifest compilation; each source adapter owns +its input guarantees; Engine composition supplies exact candidate material; +physical verification retains its own authority. Removing the new input seam +would put filesystem materialization back into logical authoring. It contains +an independently meaningful existing responsibility rather than speculative +reusability. Review refined symbolic graph isolation and newline parity before +the final run; interrupted intermediate runs are not counted as qualification. A completed first pass found a test-only handle-field error; the test now uses the existing provenance result `authority` field. The final full pass below includes that correction. + +## Local qualification + +The committed implementation `de85f5ad` ran **178 Engine +tests in one serial unittest process**, with return code zero. The eleven +supporting package suites ran **438 tests**, with +**1 existing interpreter-dependent skip**. +Combined: **616 tests run, 615 passed, 1 skipped**. +Test outcomes and commands are in [verification](performance-byte-manifest-increment/verification.json). +Full process elapsed time includes imports; unittest-reported duration is +recorded independently. No full-suite baseline/candidate speedup is claimed. + +The structural checkpoint ran separately and passed **73 suites / 121 checks**. +Generated manifest publication uses the existing Engine owner. The final delivery +also runs this checkpoint after the evidence-only commit. These checks validate +structure/freshness, not prose quality or independent implementation review. + +The source checkout preserves its existing accepted `main`. Disposable test +clones give the exact candidate their own local accepted `main`, as required +by PURPOSE-SEPARATION.md. [Source binding](performance-byte-manifest-increment/source-binding.json) +identifies tested implementation hashes; the later evidence commit changes +reporting and derived index evidence rather than production Python. Changed +Python also parses with the 3.11 grammar; grammar acceptance is not execution. + +## Qualification limits and handoff + +The isolated local runtime is Python 3.13.5, outside the declared 3.11/3.12 +range. It uses the same executable binary and core dependencies for both sides; +rpds-py 2026.5.1 differs from locked 2026.6.3. Optional rich-environment packages +were not imported. The dependency lock and supported range remain unchanged. +See [environment](performance-byte-manifest-increment/environment.json). + +The official SDK/configured Codex client and an independent reviewer were not +available for this increment. Local native/CLI/MCP, real Git/SQLite publication +and recovery tests are evidence of their actual claims, not substituted installed +qualification. Run the supported locked qualification and relevant client checks +before installed acceptance. No user store, archived proposal, Codex configuration, +remote branch or real accepted-main ref was changed. + +Use one delivery method in APPLY.md. The incremental bundle preserves actual +Git CLI commits; the patch reproduces the same final tree. The delivery manifest +records exact base/result commits, modes, file hashes and any removals. + +## Reproduction + +Use separate implementation checkouts at the base and candidate plus one fixed +fixture checkout of `2aef993e`, with its own local main at that base. Execute the +same Python/dependencies serially: + +```bash +python measure_increment.py --source /path/to/base --fixture-source /path/to/fixture --output baseline.json --repeats 3 +python measure_increment.py --source /path/to/candidate --fixture-source /path/to/fixture --output candidate.json --repeats 3 +python measure_publication.py --source /path/to/base --fixture-source /path/to/fixture --test-source /path/to/base --output publication-base.json +python measure_publication.py --source /path/to/candidate --fixture-source /path/to/fixture --test-source /path/to/base --output publication-runtime.json +python measure_publication.py --source /path/to/candidate --fixture-source /path/to/fixture --test-source /path/to/candidate --output publication-reused.json +``` + +The [operation driver](performance-byte-manifest-increment/measure_increment.py) +and [workflow driver](performance-byte-manifest-increment/measure_publication.py) +write only disposable fixtures and selected evidence files. Required publication +checks remain active. Use the recorded commands in verification.json for full +package populations; retain the separate structural result. diff --git a/docs/plans/purpose-separated-standards-engine/reports/performance-byte-manifest-increment/admission.md b/docs/plans/purpose-separated-standards-engine/reports/performance-byte-manifest-increment/admission.md new file mode 100644 index 00000000..1c2cd04e --- /dev/null +++ b/docs/plans/purpose-separated-standards-engine/reports/performance-byte-manifest-increment/admission.md @@ -0,0 +1,56 @@ +# Performance increment admission + +Base: `2aef993edc8a47ce474468c641cc2e542e3ec8da`. +Branch: `implementation/purpose-separated-standards-engine`. +User direction: implement the next measured performance optimizations and deliver a ZIP. + +## Outcomes and owners + +1. Identity owns compact exact-byte array storage and encoding, with unchanged + identity-v2 preimages, IDs and malformed-input behavior. Existing public value + observation and equality remain sequence-based. Byte joins use bounded chunks. +2. Verifier owns suite-input compilation from explicit content and repository + membership. Its filesystem adapter retains physical path checks; its frozen + adapter requires actual bytes for every consumed file. Check execution and + publication still use actual filesystem candidates. Engine logical authoring + stops creating temporary repositories merely to derive the manifest. +3. The coordinated-publication test reuses snapshots only during intervals in + which it intends to observe one accepted revision. Fresh captures after both + real publications and independent implicit-capture/replay tests remain. + +## Write set + +- `tools/standards_identity/standards_identity/encoding.py`, its tests and README. +- Verifier suite-input/config/input-context and directly affected authority-input + adapters; their focused tests, public export, README and derived input manifest. +- `tools/standards_engine/standards_engine/logical_authoring.py`, directly affected + tests, and `tools/standards_engine/tests/test_supporting_workflow.py`. +- One bounded implementation/evidence report and reproduction data under the + existing purpose-separated Engine reports directory. + +Normative bodies, public wire/persistence formats, identity framing, dependency +locks, authorization, accepted-main capture, independent replay, full physical +candidate verification, recovery, installed config and stores remain unchanged. +No retained cross-call cache or shared mutable fixture framework is admitted. + +## Design review + +The verifier's content/declaration input is distinct from executing a check. +Directory and frozen sources implement only consumed input operations; the +canonical compiler and check-owned declarations remain shared. No shadow +compiler or guessed empty files are introduced. The physical adapter hides +containment/symlink behavior; the frozen adapter hides membership and byte lookup. +The Identity change stays in the existing value owner rather than a second codec. +Each outcome is reversible independently and receives its own focused evidence. + +## Deciding evidence + +Exact identity fixtures and independent preimage/digest comparisons cover bytes, +Unicode, arbitrary integers, ordering, mutation and large/chunked inputs. Frozen +and filesystem manifest bytes and exact diagnostics are compared over real and +focused malformed corpora; unavailable captured bytes remain unavailable. Existing +Git/SQLite publication, cold replay, purpose and recovery tests remain mandatory. +Performance comparisons use the same executable, dependencies, corpus and serial +operation sequence. Separate memory probes report tracemalloc rather than RSS. +Functional tests remain separate from the structural checkpoint. Supported +installed qualification remains honestly distinct from this local environment. diff --git a/docs/plans/purpose-separated-standards-engine/reports/performance-byte-manifest-increment/checkpoint-precommit.json b/docs/plans/purpose-separated-standards-engine/reports/performance-byte-manifest-increment/checkpoint-precommit.json new file mode 100644 index 00000000..bdb5ca9d --- /dev/null +++ b/docs/plans/purpose-separated-standards-engine/reports/performance-byte-manifest-increment/checkpoint-precommit.json @@ -0,0 +1,11 @@ +{ + "kind": "verify-repository-result", + "refreshed_verification_inputs": true, + "verification": { + "checks": 121, + "exit_code": 0, + "failures": [], + "passed": true, + "suites": 73 + } +} diff --git a/docs/plans/purpose-separated-standards-engine/reports/performance-byte-manifest-increment/comparison.csv b/docs/plans/purpose-separated-standards-engine/reports/performance-byte-manifest-increment/comparison.csv new file mode 100644 index 00000000..232a6f1d --- /dev/null +++ b/docs/plans/purpose-separated-standards-engine/reports/performance-byte-manifest-increment/comparison.csv @@ -0,0 +1,5 @@ +operation,baseline_median_seconds,candidate_median_seconds,baseline_min_seconds,baseline_max_seconds,candidate_min_seconds,candidate_max_seconds,speedup +content_identity,0.6115366229996653,0.14784532100020442,0.608705115000248,0.6361973240000225,0.1432127309999487,0.15226144200005365,4.136327202392964 +read,0.8523036010001306,0.36215967899988755,0.8185912670001017,0.9291884250001203,0.35441837999997006,0.37201259099992967,2.35339175071556 +propose,1.8096413250000296,0.8504836430001887,1.7892878709999422,1.8716306849996727,0.8453465580000739,0.8626112629999625,2.127779105329164 +manifest_refresh,0.6531223689999024,0.15903526900001452,0.6303173850001258,0.6763391710001088,0.15581275200020173,0.16115098900036173,4.106776899907924 diff --git a/docs/plans/purpose-separated-standards-engine/reports/performance-byte-manifest-increment/environment.json b/docs/plans/purpose-separated-standards-engine/reports/performance-byte-manifest-increment/environment.json new file mode 100644 index 00000000..46163b58 --- /dev/null +++ b/docs/plans/purpose-separated-standards-engine/reports/performance-byte-manifest-increment/environment.json @@ -0,0 +1,31 @@ +{ + "base": "2aef993edc8a47ce474468c641cc2e542e3ec8da", + "python": "3.13.5 (main, Jul 15 2026, 20:25:40) [GCC 14.2.0]", + "executable": "/mnt/data/next-performance-env/bin/python", + "executable_sha256": "17b78e0a93175e86f9ac03141924fd7a7f0c0c52e66b34bfa0de20ffef989df1", + "packages": { + "attrs": "26.1.0", + "jsonschema": "4.26.0", + "jsonschema-specifications": "2025.9.1", + "referencing": "0.37.0", + "rpds-py": "2026.5.1", + "typing-extensions": "4.16.0" + }, + "qualification": "Isolated core dependencies; Python 3.13.5 and rpds-py 2026.5.1, not pinned supported qualification", + "platform": "Linux-6.18.44-x86_64-with-glibc2.41", + "machine": "x86_64", + "logical_cpus": 5, + "cpu_affinity": [ + 0, + 1, + 2, + 3, + 4 + ], + "sqlite": "3.46.1", + "git": "git version 2.47.3", + "cpu_pinning": false, + "os_page_cache_cold": false, + "cgroup_cpu_max": "400000 100000", + "cgroup_memory_max": "4294967296" +} diff --git a/docs/plans/purpose-separated-standards-engine/reports/performance-byte-manifest-increment/final-baseline.json b/docs/plans/purpose-separated-standards-engine/reports/performance-byte-manifest-increment/final-baseline.json new file mode 100644 index 00000000..0f4fd679 --- /dev/null +++ b/docs/plans/purpose-separated-standards-engine/reports/performance-byte-manifest-increment/final-baseline.json @@ -0,0 +1,130 @@ +[ + { + "operation": "content_identity", + "trial": 0, + "seconds": 0.6361973240000225, + "cpu_seconds": 0.636157249, + "manifest_refresh_seconds": 0, + "manifest_refresh_calls": 0, + "files": 435, + "source_bytes": 3738522, + "content_id": "snapshot-content:sha256:2a1b789a3d20e26d4d2dd96ecf11476e3f1b968a104655c701633ed2f7496378", + "preimage_bytes": 13137463, + "preimage_sha256": "b2669faaace40e7b8a3003a1d13527a2f1c410a78caee7723eef1db46cb2ba5d" + }, + { + "operation": "read", + "trial": 0, + "seconds": 0.8523036010001306, + "cpu_seconds": 0.8523023280000004, + "manifest_refresh_seconds": 0, + "manifest_refresh_calls": 0, + "files": 435, + "source_bytes": 3738522, + "content_id": "snapshot-content:sha256:2a1b789a3d20e26d4d2dd96ecf11476e3f1b968a104655c701633ed2f7496378", + "preimage_bytes": 13137463, + "preimage_sha256": "b2669faaace40e7b8a3003a1d13527a2f1c410a78caee7723eef1db46cb2ba5d" + }, + { + "operation": "propose", + "trial": 0, + "seconds": 1.8716306849996727, + "cpu_seconds": 1.6904070359999999, + "manifest_refresh_seconds": 0.6763391710001088, + "manifest_refresh_calls": 1, + "files": 435, + "source_bytes": 3738522, + "content_id": "snapshot-content:sha256:2a1b789a3d20e26d4d2dd96ecf11476e3f1b968a104655c701633ed2f7496378", + "preimage_bytes": 13137463, + "preimage_sha256": "b2669faaace40e7b8a3003a1d13527a2f1c410a78caee7723eef1db46cb2ba5d" + }, + { + "operation": "content_identity", + "trial": 1, + "seconds": 0.6115366229996653, + "cpu_seconds": 0.6115071670000001, + "manifest_refresh_seconds": 0, + "manifest_refresh_calls": 0, + "files": 435, + "source_bytes": 3738522, + "content_id": "snapshot-content:sha256:2a1b789a3d20e26d4d2dd96ecf11476e3f1b968a104655c701633ed2f7496378", + "preimage_bytes": 13137463, + "preimage_sha256": "b2669faaace40e7b8a3003a1d13527a2f1c410a78caee7723eef1db46cb2ba5d" + }, + { + "operation": "read", + "trial": 1, + "seconds": 0.9291884250001203, + "cpu_seconds": 0.9289821109999998, + "manifest_refresh_seconds": 0, + "manifest_refresh_calls": 0, + "files": 435, + "source_bytes": 3738522, + "content_id": "snapshot-content:sha256:2a1b789a3d20e26d4d2dd96ecf11476e3f1b968a104655c701633ed2f7496378", + "preimage_bytes": 13137463, + "preimage_sha256": "b2669faaace40e7b8a3003a1d13527a2f1c410a78caee7723eef1db46cb2ba5d" + }, + { + "operation": "propose", + "trial": 1, + "seconds": 1.8096413250000296, + "cpu_seconds": 1.6285664180000001, + "manifest_refresh_seconds": 0.6531223689999024, + "manifest_refresh_calls": 1, + "files": 435, + "source_bytes": 3738522, + "content_id": "snapshot-content:sha256:2a1b789a3d20e26d4d2dd96ecf11476e3f1b968a104655c701633ed2f7496378", + "preimage_bytes": 13137463, + "preimage_sha256": "b2669faaace40e7b8a3003a1d13527a2f1c410a78caee7723eef1db46cb2ba5d" + }, + { + "operation": "content_identity", + "trial": 2, + "seconds": 0.608705115000248, + "cpu_seconds": 0.608721289, + "manifest_refresh_seconds": 0, + "manifest_refresh_calls": 0, + "files": 435, + "source_bytes": 3738522, + "content_id": "snapshot-content:sha256:2a1b789a3d20e26d4d2dd96ecf11476e3f1b968a104655c701633ed2f7496378", + "preimage_bytes": 13137463, + "preimage_sha256": "b2669faaace40e7b8a3003a1d13527a2f1c410a78caee7723eef1db46cb2ba5d" + }, + { + "operation": "read", + "trial": 2, + "seconds": 0.8185912670001017, + "cpu_seconds": 0.8173386489999999, + "manifest_refresh_seconds": 0, + "manifest_refresh_calls": 0, + "files": 435, + "source_bytes": 3738522, + "content_id": "snapshot-content:sha256:2a1b789a3d20e26d4d2dd96ecf11476e3f1b968a104655c701633ed2f7496378", + "preimage_bytes": 13137463, + "preimage_sha256": "b2669faaace40e7b8a3003a1d13527a2f1c410a78caee7723eef1db46cb2ba5d" + }, + { + "operation": "propose", + "trial": 2, + "seconds": 1.7892878709999422, + "cpu_seconds": 1.6105545810000006, + "manifest_refresh_seconds": 0.6303173850001258, + "manifest_refresh_calls": 1, + "files": 435, + "source_bytes": 3738522, + "content_id": "snapshot-content:sha256:2a1b789a3d20e26d4d2dd96ecf11476e3f1b968a104655c701633ed2f7496378", + "preimage_bytes": 13137463, + "preimage_sha256": "b2669faaace40e7b8a3003a1d13527a2f1c410a78caee7723eef1db46cb2ba5d" + }, + { + "operation": "identity_memory", + "retained_bytes": 346233, + "peak_bytes": 77203351, + "instrumented_seconds": 0.6278925040001013, + "files": 435, + "source_bytes": 3738522, + "content_id": "snapshot-content:sha256:2a1b789a3d20e26d4d2dd96ecf11476e3f1b968a104655c701633ed2f7496378", + "preimage_bytes": 13137463, + "preimage_sha256": "b2669faaace40e7b8a3003a1d13527a2f1c410a78caee7723eef1db46cb2ba5d" + } +] diff --git a/docs/plans/purpose-separated-standards-engine/reports/performance-byte-manifest-increment/final-candidate.json b/docs/plans/purpose-separated-standards-engine/reports/performance-byte-manifest-increment/final-candidate.json new file mode 100644 index 00000000..b73f68e0 --- /dev/null +++ b/docs/plans/purpose-separated-standards-engine/reports/performance-byte-manifest-increment/final-candidate.json @@ -0,0 +1,130 @@ +[ + { + "operation": "content_identity", + "trial": 0, + "seconds": 0.1432127309999487, + "cpu_seconds": 0.1432025269999997, + "manifest_refresh_seconds": 0, + "manifest_refresh_calls": 0, + "files": 435, + "source_bytes": 3738522, + "content_id": "snapshot-content:sha256:2a1b789a3d20e26d4d2dd96ecf11476e3f1b968a104655c701633ed2f7496378", + "preimage_bytes": 13137463, + "preimage_sha256": "b2669faaace40e7b8a3003a1d13527a2f1c410a78caee7723eef1db46cb2ba5d" + }, + { + "operation": "read", + "trial": 0, + "seconds": 0.35441837999997006, + "cpu_seconds": 0.35441674700000014, + "manifest_refresh_seconds": 0, + "manifest_refresh_calls": 0, + "files": 435, + "source_bytes": 3738522, + "content_id": "snapshot-content:sha256:2a1b789a3d20e26d4d2dd96ecf11476e3f1b968a104655c701633ed2f7496378", + "preimage_bytes": 13137463, + "preimage_sha256": "b2669faaace40e7b8a3003a1d13527a2f1c410a78caee7723eef1db46cb2ba5d" + }, + { + "operation": "propose", + "trial": 0, + "seconds": 0.8504836430001887, + "cpu_seconds": 0.8472012379999998, + "manifest_refresh_seconds": 0.15903526900001452, + "manifest_refresh_calls": 1, + "files": 435, + "source_bytes": 3738522, + "content_id": "snapshot-content:sha256:2a1b789a3d20e26d4d2dd96ecf11476e3f1b968a104655c701633ed2f7496378", + "preimage_bytes": 13137463, + "preimage_sha256": "b2669faaace40e7b8a3003a1d13527a2f1c410a78caee7723eef1db46cb2ba5d" + }, + { + "operation": "content_identity", + "trial": 1, + "seconds": 0.14784532100020442, + "cpu_seconds": 0.14784365400000032, + "manifest_refresh_seconds": 0, + "manifest_refresh_calls": 0, + "files": 435, + "source_bytes": 3738522, + "content_id": "snapshot-content:sha256:2a1b789a3d20e26d4d2dd96ecf11476e3f1b968a104655c701633ed2f7496378", + "preimage_bytes": 13137463, + "preimage_sha256": "b2669faaace40e7b8a3003a1d13527a2f1c410a78caee7723eef1db46cb2ba5d" + }, + { + "operation": "read", + "trial": 1, + "seconds": 0.37201259099992967, + "cpu_seconds": 0.3719996919999997, + "manifest_refresh_seconds": 0, + "manifest_refresh_calls": 0, + "files": 435, + "source_bytes": 3738522, + "content_id": "snapshot-content:sha256:2a1b789a3d20e26d4d2dd96ecf11476e3f1b968a104655c701633ed2f7496378", + "preimage_bytes": 13137463, + "preimage_sha256": "b2669faaace40e7b8a3003a1d13527a2f1c410a78caee7723eef1db46cb2ba5d" + }, + { + "operation": "propose", + "trial": 1, + "seconds": 0.8453465580000739, + "cpu_seconds": 0.842112374, + "manifest_refresh_seconds": 0.16115098900036173, + "manifest_refresh_calls": 1, + "files": 435, + "source_bytes": 3738522, + "content_id": "snapshot-content:sha256:2a1b789a3d20e26d4d2dd96ecf11476e3f1b968a104655c701633ed2f7496378", + "preimage_bytes": 13137463, + "preimage_sha256": "b2669faaace40e7b8a3003a1d13527a2f1c410a78caee7723eef1db46cb2ba5d" + }, + { + "operation": "content_identity", + "trial": 2, + "seconds": 0.15226144200005365, + "cpu_seconds": 0.1522687490000001, + "manifest_refresh_seconds": 0, + "manifest_refresh_calls": 0, + "files": 435, + "source_bytes": 3738522, + "content_id": "snapshot-content:sha256:2a1b789a3d20e26d4d2dd96ecf11476e3f1b968a104655c701633ed2f7496378", + "preimage_bytes": 13137463, + "preimage_sha256": "b2669faaace40e7b8a3003a1d13527a2f1c410a78caee7723eef1db46cb2ba5d" + }, + { + "operation": "read", + "trial": 2, + "seconds": 0.36215967899988755, + "cpu_seconds": 0.36214338300000026, + "manifest_refresh_seconds": 0, + "manifest_refresh_calls": 0, + "files": 435, + "source_bytes": 3738522, + "content_id": "snapshot-content:sha256:2a1b789a3d20e26d4d2dd96ecf11476e3f1b968a104655c701633ed2f7496378", + "preimage_bytes": 13137463, + "preimage_sha256": "b2669faaace40e7b8a3003a1d13527a2f1c410a78caee7723eef1db46cb2ba5d" + }, + { + "operation": "propose", + "trial": 2, + "seconds": 0.8626112629999625, + "cpu_seconds": 0.8592630079999992, + "manifest_refresh_seconds": 0.15581275200020173, + "manifest_refresh_calls": 1, + "files": 435, + "source_bytes": 3738522, + "content_id": "snapshot-content:sha256:2a1b789a3d20e26d4d2dd96ecf11476e3f1b968a104655c701633ed2f7496378", + "preimage_bytes": 13137463, + "preimage_sha256": "b2669faaace40e7b8a3003a1d13527a2f1c410a78caee7723eef1db46cb2ba5d" + }, + { + "operation": "identity_memory", + "retained_bytes": 346233, + "peak_bytes": 26729514, + "instrumented_seconds": 0.5940659419998155, + "files": 435, + "source_bytes": 3738522, + "content_id": "snapshot-content:sha256:2a1b789a3d20e26d4d2dd96ecf11476e3f1b968a104655c701633ed2f7496378", + "preimage_bytes": 13137463, + "preimage_sha256": "b2669faaace40e7b8a3003a1d13527a2f1c410a78caee7723eef1db46cb2ba5d" + } +] diff --git a/docs/plans/purpose-separated-standards-engine/reports/performance-byte-manifest-increment/final-manifest-equivalence.json b/docs/plans/purpose-separated-standards-engine/reports/performance-byte-manifest-increment/final-manifest-equivalence.json new file mode 100644 index 00000000..6a2e4406 --- /dev/null +++ b/docs/plans/purpose-separated-standards-engine/reports/performance-byte-manifest-increment/final-manifest-equivalence.json @@ -0,0 +1,11 @@ +{ + "exact_bytes": true, + "actual_content_inputs": 417, + "repository_paths": 1165, + "manifest_bytes": 406921, + "manifest_sha256": "2b7979b930bac05dabc5eab2547f81d3e618d3fae49962cbfa093f2440c7ad63", + "ambient_path_existence_reads": 0, + "filesystem_content_reads": 0, + "subprocess_runs": 0, + "temporary_materializations": 0 +} diff --git a/docs/plans/purpose-separated-standards-engine/reports/performance-byte-manifest-increment/measure_increment.py b/docs/plans/purpose-separated-standards-engine/reports/performance-byte-manifest-increment/measure_increment.py new file mode 100644 index 00000000..da26a5a9 --- /dev/null +++ b/docs/plans/purpose-separated-standards-engine/reports/performance-byte-manifest-increment/measure_increment.py @@ -0,0 +1,74 @@ +"""Paired fixed-corpus measurements; only disposable repositories/stores are written.""" +from __future__ import annotations +import argparse +import gc +import hashlib +import json +from pathlib import Path +import sys +import tempfile +import time +import tracemalloc +from unittest.mock import patch + + +def main(): + parser = argparse.ArgumentParser(description=__doc__) + parser.add_argument('--source', type=Path, required=True) + parser.add_argument('--fixture-source', type=Path, required=True) + parser.add_argument('--output', type=Path, required=True) + parser.add_argument('--repeats', type=int, default=3) + args = parser.parse_args() + sys.path.insert(0, str(args.source.resolve())) + from tools.standards_engine.standards_engine import AgentToolFacade, StandardsEngine + from tools.standards_engine.standards_engine import _generated_contract as c + from tools.standards_engine.standards_engine import logical_authoring as logical + from tools.standards_engine.standards_engine.tools import LocalAlwaysAllowAuthorizer, _contracts + from tools.standards_analysis.standards_analysis import AnalysisExecutionContext + from tools.standards_engine.tests import test_agent_workflow as fixtures + from tools.standards_identity.standards_identity import encode_identity_value, frame_path_byte_set + fixtures.ROOT = args.fixture_source.resolve() + records = [] + with tempfile.TemporaryDirectory(prefix='performance-paired-') as tmp: + root = Path(tmp) / 'repository' + fixtures.prepare_repository(root) + with StandardsEngine.open_repository(root, purpose='authoring', + execution_context=AnalysisExecutionContext(LocalAlwaysAllowAuthorizer(root))) as engine: + facade = AgentToolFacade(engine, _contracts(root)) + snap = facade.create_snapshot({'kind':'create-snapshot'}) + assert snap['kind'] == 'create-snapshot-result', snap + snapshot = snap['snapshot']['snapshot'] + capture = engine._snapshots.load_content(engine._snapshot_id(c.SnapshotHandle.from_value(snapshot))) + dims = {'files':len(capture.files), 'source_bytes':sum(len(x.content) for x in capture.files), + 'content_id':engine._snapshots._content_id(capture)} + entries = tuple((x.path.components,x.content) for x in capture.files) + encoded = encode_identity_value(frame_path_byte_set(entries)) + dims.update(preimage_bytes=len(encoded),preimage_sha256=hashlib.sha256(encoded).hexdigest()) + del encoded + for trial in range(args.repeats): + for op, action in [('content_identity',lambda:engine._snapshots._content_id(capture)), + ('read',lambda:facade.read({'snapshot':snapshot,'target':'core'})), + ('propose',lambda:facade.propose({'snapshot':snapshot,'change_set':fixtures.reference_change(root,f'bytebench{trial}')}))]: + spans = []; original = logical._refresh_suite_input_projection + def refresh(*a, **k): + t=time.perf_counter() + try:return original(*a,**k) + finally:spans.append(time.perf_counter()-t) + with patch.object(logical,'_refresh_suite_input_projection',refresh): + t=time.perf_counter(); cpu=time.process_time(); result=action() + elapsed=time.perf_counter()-t; used=time.process_time()-cpu + if op == 'content_identity': assert result == dims['content_id'] + elif op == 'read': assert result['kind'] in ('read-result','compact-read-result'),result + else: assert result.get('status') == 'complete',result + records.append({'operation':op,'trial':trial,'seconds':elapsed,'cpu_seconds':used, + 'manifest_refresh_seconds':sum(spans),'manifest_refresh_calls':len(spans),**dims}) + gc.collect(); tracemalloc.start(); t=time.perf_counter() + identity=engine._snapshots._content_id(capture) + retained,peak=tracemalloc.get_traced_memory();tracemalloc.stop() + assert identity==dims['content_id'] + records.append({'operation':'identity_memory','retained_bytes':retained,'peak_bytes':peak, + 'instrumented_seconds':time.perf_counter()-t,**dims}) + args.output.write_text(json.dumps(records,indent=2)+'\n') + print(json.dumps(records,indent=2)) + +if __name__=='__main__': main() diff --git a/docs/plans/purpose-separated-standards-engine/reports/performance-byte-manifest-increment/measure_publication.py b/docs/plans/purpose-separated-standards-engine/reports/performance-byte-manifest-increment/measure_publication.py new file mode 100644 index 00000000..8933801a --- /dev/null +++ b/docs/plans/purpose-separated-standards-engine/reports/performance-byte-manifest-increment/measure_publication.py @@ -0,0 +1,72 @@ +"""Observe an unchanged or snapshot-reused workflow against one fixed fixture. + +Implementation imports come from --source; only fixture creation and evidence +output write to disk. The selected test is loaded from --test-source independently. +""" +from __future__ import annotations + +import argparse +import importlib.util +import json +from pathlib import Path +import sys +import time +import unittest +from unittest.mock import patch + + +def main() -> None: + parser = argparse.ArgumentParser(description=__doc__) + parser.add_argument('--source', type=Path, required=True) + parser.add_argument('--fixture-source', type=Path, required=True) + parser.add_argument('--test-source', type=Path, required=True) + parser.add_argument('--output', type=Path, required=True) + args = parser.parse_args() + sys.path.insert(0, str(args.source.resolve())) + from tools.standards_engine.tests import test_agent_workflow as fixtures + from tools.standards_engine.standards_engine import engine as engine_module + from tools.standards_snapshots.standards_snapshots import SnapshotModule + fixtures.ROOT = args.fixture_source.resolve() + test_path = args.test_source / 'tools/standards_engine/tests/test_supporting_workflow.py' + spec = importlib.util.spec_from_file_location('measured_publication', test_path) + assert spec is not None and spec.loader is not None + module = importlib.util.module_from_spec(spec) + spec.loader.exec_module(module) + counts = {'capture': 0, 'checkpoint': 0} + checkpoint_seconds = [] + original_capture = SnapshotModule.create_snapshot + original_checkpoint = engine_module.run_complete_verification + def capture(self, *a, **k): + counts['capture'] += 1 + return original_capture(self, *a, **k) + def checkpoint(*a, **k): + counts['checkpoint'] += 1 + start = time.perf_counter() + try: + return original_checkpoint(*a, **k) + finally: + checkpoint_seconds.append(time.perf_counter() - start) + class Result(unittest.TextTestResult): + def startTest(self, test): + self.started = time.perf_counter() + super().startTest(test) + def stopTest(self, test): + self.body_seconds = time.perf_counter() - self.started + super().stopTest(test) + with patch.object(SnapshotModule, 'create_snapshot', capture), \ + patch.object(engine_module, 'run_complete_verification', checkpoint): + suite = unittest.defaultTestLoader.loadTestsFromTestCase(module.SupportingWorkflowTest) + start = time.perf_counter() + result = unittest.TextTestRunner(verbosity=2, resultclass=Result).run(suite) + elapsed = time.perf_counter() - start + record = {'source': str(args.source.resolve()), 'test_source': str(args.test_source.resolve()), + 'fixture_source': str(args.fixture_source.resolve()), 'tests': result.testsRun, + 'successful': result.wasSuccessful(), 'body_seconds': getattr(result, 'body_seconds', None), + 'total_seconds': elapsed, 'counts': counts, 'checkpoint_seconds': checkpoint_seconds} + args.output.write_text(json.dumps(record, indent=2) + '\n') + print(json.dumps(record, indent=2)) + if not result.wasSuccessful(): + raise SystemExit(1) + +if __name__ == '__main__': + main() diff --git a/docs/plans/purpose-separated-standards-engine/reports/performance-byte-manifest-increment/preservation.json b/docs/plans/purpose-separated-standards-engine/reports/performance-byte-manifest-increment/preservation.json new file mode 100644 index 00000000..8ef75c9b --- /dev/null +++ b/docs/plans/purpose-separated-standards-engine/reports/performance-byte-manifest-increment/preservation.json @@ -0,0 +1,8 @@ +{ + "base": "2aef993edc8a47ce474468c641cc2e542e3ec8da", + "implementation": "de85f5adfda221fe88fbf0dba12b34aa2e410cf6", + "changed_protected_files": [], + "local_main": "366c1d90a24bbfb50973f62b155a5f3396c0f107", + "wire_schemas_and_dependency_locks": "unchanged", + "normative_content_and_real_support_manifests": "unchanged" +} diff --git a/docs/plans/purpose-separated-standards-engine/reports/performance-byte-manifest-increment/publication-baseline.json b/docs/plans/purpose-separated-standards-engine/reports/performance-byte-manifest-increment/publication-baseline.json new file mode 100644 index 00000000..92a320bf --- /dev/null +++ b/docs/plans/purpose-separated-standards-engine/reports/performance-byte-manifest-increment/publication-baseline.json @@ -0,0 +1,17 @@ +{ + "source": "/mnt/data/next-performance-baseline", + "test_source": "/mnt/data/next-performance-baseline", + "fixture_source": "/mnt/data/next-performance-baseline", + "tests": 1, + "successful": true, + "body_seconds": 100.51564909099989, + "total_seconds": 101.4477989080001, + "counts": { + "capture": 10, + "checkpoint": 2 + }, + "checkpoint_seconds": [ + 5.925694817000021, + 5.739251099999819 + ] +} diff --git a/docs/plans/purpose-separated-standards-engine/reports/performance-byte-manifest-increment/publication-reused.json b/docs/plans/purpose-separated-standards-engine/reports/performance-byte-manifest-increment/publication-reused.json new file mode 100644 index 00000000..27654602 --- /dev/null +++ b/docs/plans/purpose-separated-standards-engine/reports/performance-byte-manifest-increment/publication-reused.json @@ -0,0 +1,17 @@ +{ + "source": "/mnt/data/next-performance-qualification", + "test_source": "/mnt/data/next-performance-qualification", + "fixture_source": "/mnt/data/next-performance-baseline", + "tests": 1, + "successful": true, + "body_seconds": 51.25129755299986, + "total_seconds": 52.15833841800031, + "counts": { + "capture": 4, + "checkpoint": 2 + }, + "checkpoint_seconds": [ + 5.881440428000133, + 5.709668811000029 + ] +} diff --git a/docs/plans/purpose-separated-standards-engine/reports/performance-byte-manifest-increment/publication-runtime.json b/docs/plans/purpose-separated-standards-engine/reports/performance-byte-manifest-increment/publication-runtime.json new file mode 100644 index 00000000..ef8bc605 --- /dev/null +++ b/docs/plans/purpose-separated-standards-engine/reports/performance-byte-manifest-increment/publication-runtime.json @@ -0,0 +1,17 @@ +{ + "source": "/mnt/data/next-performance-qualification", + "test_source": "/mnt/data/next-performance-baseline", + "fixture_source": "/mnt/data/next-performance-baseline", + "tests": 1, + "successful": true, + "body_seconds": 62.5069384010003, + "total_seconds": 63.40759748600021, + "counts": { + "capture": 10, + "checkpoint": 2 + }, + "checkpoint_seconds": [ + 5.731353058999957, + 5.761884992999967 + ] +} diff --git a/docs/plans/purpose-separated-standards-engine/reports/performance-byte-manifest-increment/qualification-candidate.json b/docs/plans/purpose-separated-standards-engine/reports/performance-byte-manifest-increment/qualification-candidate.json new file mode 100644 index 00000000..71f9df8b --- /dev/null +++ b/docs/plans/purpose-separated-standards-engine/reports/performance-byte-manifest-increment/qualification-candidate.json @@ -0,0 +1,4 @@ +{ + "commit": "de85f5adfda221fe88fbf0dba12b34aa2e410cf6", + "tree": "260473c629ac6d4e9e90b3a1ba618fb3773975d1" +} diff --git a/docs/plans/purpose-separated-standards-engine/reports/performance-byte-manifest-increment/source-binding.json b/docs/plans/purpose-separated-standards-engine/reports/performance-byte-manifest-increment/source-binding.json new file mode 100644 index 00000000..cf0c57b0 --- /dev/null +++ b/docs/plans/purpose-separated-standards-engine/reports/performance-byte-manifest-increment/source-binding.json @@ -0,0 +1,165 @@ +{ + "base": "2aef993edc8a47ce474468c641cc2e542e3ec8da", + "tested_implementation": "de85f5adfda221fe88fbf0dba12b34aa2e410cf6", + "files": [ + { + "path": "evaluation/standards-effectiveness/generated/suite-inputs.json", + "sha256": "988c9ee8e0fbaa33fa67dccdaa2f18a33ca47825b1cc1c6488b2e08f315fb504", + "matches_tested_implementation": true + }, + { + "path": "tools/standards_engine/standards_engine/logical_authoring.py", + "sha256": "f9471723773b3a23e50548e459c2965a67bc769d6504000b524e1ef05863f36a", + "matches_tested_implementation": true, + "python311_grammar": true + }, + { + "path": "tools/standards_engine/tests/test_logical_authoring.py", + "sha256": "14e741917620c6e2e7274393cf583afeb797ac4e670122853244514410cda071", + "matches_tested_implementation": true, + "python311_grammar": true + }, + { + "path": "tools/standards_engine/tests/test_supporting_workflow.py", + "sha256": "b4944088cbc5d9c365b9b87fdae656c1bae6fafe7b5cc4325dd1d99f7a9f3f92", + "matches_tested_implementation": true, + "python311_grammar": true + }, + { + "path": "tools/standards_identity/README.md", + "sha256": "1838ceb220964296fe1af9f0e25ea91b076972a8ee452c684da13e0f6db86709", + "matches_tested_implementation": true + }, + { + "path": "tools/standards_identity/standards_identity/encoding.py", + "sha256": "611655e641a65b8e7d0986f0af34a792b4b8a977523bee683553f8e0e48804f1", + "matches_tested_implementation": true, + "python311_grammar": true + }, + { + "path": "tools/standards_identity/tests/test_compact_bytes.py", + "sha256": "5e4b6806477dfdaef4ed0606ae4f3d09c4a061df81a161498e1819487a4a79fd", + "matches_tested_implementation": true, + "python311_grammar": true + }, + { + "path": "tools/standards_verifier/README.md", + "sha256": "32b8f1d3c681bcc9cbcb81fc68a57d668653a266b2abb7d8b8ac28a815f95ef1", + "matches_tested_implementation": true + }, + { + "path": "tools/standards_verifier/standards_verifier/__init__.py", + "sha256": "df0fe1fded4e6acfa85c0342285064016cf70f7aeb6e351ae7cf4c26f81b2c0f", + "matches_tested_implementation": true, + "python311_grammar": true + }, + { + "path": "tools/standards_verifier/standards_verifier/checks/contract_projection.py", + "sha256": "84eeaaaadec2526b56e1d17efac213ff4fd30dfc44bc3e4fb5776486a5c32b64", + "matches_tested_implementation": true, + "python311_grammar": true + }, + { + "path": "tools/standards_verifier/standards_verifier/checks/markdown_link_coverage.py", + "sha256": "56caef06f81ab095f10a5a174022f9ea7c1a362cdb9c4b50fd45a4ee054cdf15", + "matches_tested_implementation": true, + "python311_grammar": true + }, + { + "path": "tools/standards_verifier/standards_verifier/checks/markdown_links.py", + "sha256": "2a594dda5c4cb718a16e0cd09ed04df4b16f841004a170442c3bb4c36864ab3c", + "matches_tested_implementation": true, + "python311_grammar": true + }, + { + "path": "tools/standards_verifier/standards_verifier/checks/markdown_targets.py", + "sha256": "4973ad8da5931d0905096ef51b420c8276a9171cc5c568ce3a003db4476ba136", + "matches_tested_implementation": true, + "python311_grammar": true + }, + { + "path": "tools/standards_verifier/standards_verifier/checks/metadata.py", + "sha256": "dea89749eea74df0b1194907d5507d6dc74cf1e74c18e1861e4a5e3c99613dcd", + "matches_tested_implementation": true, + "python311_grammar": true + }, + { + "path": "tools/standards_verifier/standards_verifier/checks/metadata_route.py", + "sha256": "42a7223e6aad21bf6bf4239c0e37751b6c0f5499db78e2b3725d0cec95525812", + "matches_tested_implementation": true, + "python311_grammar": true + }, + { + "path": "tools/standards_verifier/standards_verifier/checks/plan_contract.py", + "sha256": "c7266c0564b9ee02944fc4eb12d66cc20d604fd4ddb7f051ed77d01e9fe4466e", + "matches_tested_implementation": true, + "python311_grammar": true + }, + { + "path": "tools/standards_verifier/standards_verifier/checks/policy_impact.py", + "sha256": "e28442711d42d69bdb9348ec01923daefd49cec2be8850239c9489fb6cb71dc9", + "matches_tested_implementation": true, + "python311_grammar": true + }, + { + "path": "tools/standards_verifier/standards_verifier/checks/python_package_contract.py", + "sha256": "a292b6d7aa44f3cbc2b1876ca46935aa7c1edf602b49fddf47308eba5ec7dca5", + "matches_tested_implementation": true, + "python311_grammar": true + }, + { + "path": "tools/standards_verifier/standards_verifier/checks/table.py", + "sha256": "439b9ee8fe5cdd890cf8a7b3b43a6f19293c9e456579c68b5fab556543a65fe8", + "matches_tested_implementation": true, + "python311_grammar": true + }, + { + "path": "tools/standards_verifier/standards_verifier/config.py", + "sha256": "45e5a3af333253b2a93d5c0f3802b803be3603b37a61c557a0794a2459b7c8f6", + "matches_tested_implementation": true, + "python311_grammar": true + }, + { + "path": "tools/standards_verifier/standards_verifier/graph_adapters.py", + "sha256": "a2daac9fcba96192e64bd0161c9af3f3878e6f833078415700eddc30698c2aec", + "matches_tested_implementation": true, + "python311_grammar": true + }, + { + "path": "tools/standards_verifier/standards_verifier/input_sources.py", + "sha256": "c54c8c8967dec15675b3a9dfc5c0bcca118a63edf0eec0f99038221cda134ca7", + "matches_tested_implementation": true, + "python311_grammar": true + }, + { + "path": "tools/standards_verifier/standards_verifier/model.py", + "sha256": "5b5b87b7eee4dfa98776459ac50e02af29b62eb602842e0b547a190b74acbe02", + "matches_tested_implementation": true, + "python311_grammar": true + }, + { + "path": "tools/standards_verifier/standards_verifier/policy_impact.py", + "sha256": "d2505473e3c78783c7c3f50f4072e4830c80ae9d91cbb2b09ece8aa85b68612e", + "matches_tested_implementation": true, + "python311_grammar": true + }, + { + "path": "tools/standards_verifier/standards_verifier/python_packages.py", + "sha256": "717bc3fe807cd00a6da5b147a0a7923c009ac594157a76ed43e18feabb8413d7", + "matches_tested_implementation": true, + "python311_grammar": true + }, + { + "path": "tools/standards_verifier/standards_verifier/suite_inputs.py", + "sha256": "9c2e21a210ce0ad4ca076e9ed73645ca34b929abbdfae4a822dc31bd0b266cae", + "matches_tested_implementation": true, + "python311_grammar": true + }, + { + "path": "tools/standards_verifier/tests/test_frozen_suite_inputs.py", + "sha256": "ed0bf34bfe420265796efca17198383d8f19cf30eba9512b0e66c273f5b3b3ed", + "matches_tested_implementation": true, + "python311_grammar": true + } + ] +} diff --git a/docs/plans/purpose-separated-standards-engine/reports/performance-byte-manifest-increment/verification.json b/docs/plans/purpose-separated-standards-engine/reports/performance-byte-manifest-increment/verification.json new file mode 100644 index 00000000..be09533b --- /dev/null +++ b/docs/plans/purpose-separated-standards-engine/reports/performance-byte-manifest-increment/verification.json @@ -0,0 +1,206 @@ +[ + { + "package": "standards_engine", + "seconds": 447.3258253590002, + "returncode": 0, + "command": [ + "/mnt/data/next-performance-env/bin/python", + "-m", + "unittest", + "discover", + "-v", + "-s", + "tools/standards_engine/tests" + ], + "tests": 178, + "unittest_seconds": 446.654, + "skipped": 0 + }, + { + "package": "graph_engine", + "seconds": 0.2619696850001674, + "returncode": 0, + "command": [ + "/mnt/data/next-performance-env/bin/python", + "-m", + "unittest", + "discover", + "-v", + "-s", + "tools/graph_engine/tests" + ], + "tests": 37, + "unittest_seconds": 0.163, + "skipped": 0 + }, + { + "package": "repository_git", + "seconds": 1.551024043000325, + "returncode": 0, + "command": [ + "/mnt/data/next-performance-env/bin/python", + "-m", + "unittest", + "discover", + "-v", + "-s", + "tools/repository_git/tests" + ], + "tests": 16, + "unittest_seconds": 1.466, + "skipped": 0 + }, + { + "package": "standards_analysis", + "seconds": 1.214660425999682, + "returncode": 0, + "command": [ + "/mnt/data/next-performance-env/bin/python", + "-m", + "unittest", + "discover", + "-v", + "-s", + "tools/standards_analysis/tests" + ], + "tests": 100, + "unittest_seconds": 0.667, + "skipped": 0 + }, + { + "package": "standards_applicability", + "seconds": 0.06773129900011554, + "returncode": 0, + "command": [ + "/mnt/data/next-performance-env/bin/python", + "-m", + "unittest", + "discover", + "-v", + "-s", + "tools/standards_applicability/tests" + ], + "tests": 12, + "unittest_seconds": 0.014, + "skipped": 0 + }, + { + "package": "standards_contracts", + "seconds": 22.7793129759998, + "returncode": 0, + "command": [ + "/mnt/data/next-performance-env/bin/python", + "-m", + "unittest", + "discover", + "-v", + "-s", + "tools/standards_contracts/tests" + ], + "tests": 23, + "unittest_seconds": 22.665, + "skipped": 1 + }, + { + "package": "standards_graph", + "seconds": 0.1809301900002538, + "returncode": 0, + "command": [ + "/mnt/data/next-performance-env/bin/python", + "-m", + "unittest", + "discover", + "-v", + "-s", + "tools/standards_graph/tests" + ], + "tests": 2, + "unittest_seconds": 0.067, + "skipped": 0 + }, + { + "package": "standards_identity", + "seconds": 0.19765231199971822, + "returncode": 0, + "command": [ + "/mnt/data/next-performance-env/bin/python", + "-m", + "unittest", + "discover", + "-v", + "-s", + "tools/standards_identity/tests" + ], + "tests": 16, + "unittest_seconds": 0.121, + "skipped": 0 + }, + { + "package": "standards_metadata", + "seconds": 0.7223698359998707, + "returncode": 0, + "command": [ + "/mnt/data/next-performance-env/bin/python", + "-m", + "unittest", + "discover", + "-v", + "-s", + "tools/standards_metadata/tests" + ], + "tests": 31, + "unittest_seconds": 0.304, + "skipped": 0 + }, + { + "package": "standards_policy_impact", + "seconds": 0.49996840699986933, + "returncode": 0, + "command": [ + "/mnt/data/next-performance-env/bin/python", + "-m", + "unittest", + "discover", + "-v", + "-s", + "tools/standards_policy_impact/tests" + ], + "tests": 10, + "unittest_seconds": 0.375, + "skipped": 0 + }, + { + "package": "standards_snapshots", + "seconds": 0.151160493000134, + "returncode": 0, + "command": [ + "/mnt/data/next-performance-env/bin/python", + "-m", + "unittest", + "discover", + "-v", + "-s", + "tools/standards_snapshots/tests" + ], + "tests": 23, + "unittest_seconds": 0.071, + "skipped": 0 + }, + { + "package": "standards_verifier", + "seconds": 5.9437179609999475, + "returncode": 0, + "command": [ + "/mnt/data/next-performance-env/bin/python", + "-m", + "unittest", + "discover", + "-v", + "-s", + "tools/standards_verifier/tests" + ], + "tests": 168, + "unittest_seconds": 5.501, + "skipped": 0 + } +] diff --git a/evaluation/standards-effectiveness/generated/suite-inputs.json b/evaluation/standards-effectiveness/generated/suite-inputs.json index 519d1d26..4eecfa8e 100644 --- a/evaluation/standards-effectiveness/generated/suite-inputs.json +++ b/evaluation/standards-effectiveness/generated/suite-inputs.json @@ -13278,7 +13278,7 @@ "path": "evaluation/standards-effectiveness/suite-registry.toml" }, "repository_index": { - "digest": "sha256:d39d6edf3f798f07bfdd360876a1361a025c9492615f6e49ca19f44fa79d6aa0", + "digest": "sha256:bf9f20d938b0c75ce9db7c9bdac20e05556c915212bc850af729a7c75925d6d2", "uses": [ { "check": "python-package-contract", From b81a5aae2eb72fb976b0570a4dab76d30e531fe4 Mon Sep 17 00:00:00 2001 From: ChatGPT Date: Thu, 24 Sep 2026 02:05:14 +0000 Subject: [PATCH 12/26] docs(engine): normalize report and measurement line endings --- .../reports/performance-byte-manifest-increment.md | 6 +++--- .../performance-byte-manifest-increment/comparison.csv | 10 +++++----- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/docs/plans/purpose-separated-standards-engine/reports/performance-byte-manifest-increment.md b/docs/plans/purpose-separated-standards-engine/reports/performance-byte-manifest-increment.md index 7e966021..9cf12840 100644 --- a/docs/plans/purpose-separated-standards-engine/reports/performance-byte-manifest-increment.md +++ b/docs/plans/purpose-separated-standards-engine/reports/performance-byte-manifest-increment.md @@ -2,9 +2,9 @@ **Status:** implemented and locally qualified; supported installed qualification and independent review are separate. -**Branch:** `implementation/purpose-separated-standards-engine` -**Base:** `2aef993edc8a47ce474468c641cc2e542e3ec8da` -**Tested implementation commit:** `de85f5adfda221fe88fbf0dba12b34aa2e410cf6` +**Branch:** `implementation/purpose-separated-standards-engine` +**Base:** `2aef993edc8a47ce474468c641cc2e542e3ec8da` +**Tested implementation commit:** `de85f5adfda221fe88fbf0dba12b34aa2e410cf6` **Evidence date:** September 23, 2026 (America/Vancouver). ## Objective and bounded admission diff --git a/docs/plans/purpose-separated-standards-engine/reports/performance-byte-manifest-increment/comparison.csv b/docs/plans/purpose-separated-standards-engine/reports/performance-byte-manifest-increment/comparison.csv index 232a6f1d..222c2104 100644 --- a/docs/plans/purpose-separated-standards-engine/reports/performance-byte-manifest-increment/comparison.csv +++ b/docs/plans/purpose-separated-standards-engine/reports/performance-byte-manifest-increment/comparison.csv @@ -1,5 +1,5 @@ -operation,baseline_median_seconds,candidate_median_seconds,baseline_min_seconds,baseline_max_seconds,candidate_min_seconds,candidate_max_seconds,speedup -content_identity,0.6115366229996653,0.14784532100020442,0.608705115000248,0.6361973240000225,0.1432127309999487,0.15226144200005365,4.136327202392964 -read,0.8523036010001306,0.36215967899988755,0.8185912670001017,0.9291884250001203,0.35441837999997006,0.37201259099992967,2.35339175071556 -propose,1.8096413250000296,0.8504836430001887,1.7892878709999422,1.8716306849996727,0.8453465580000739,0.8626112629999625,2.127779105329164 -manifest_refresh,0.6531223689999024,0.15903526900001452,0.6303173850001258,0.6763391710001088,0.15581275200020173,0.16115098900036173,4.106776899907924 +operation,baseline_median_seconds,candidate_median_seconds,baseline_min_seconds,baseline_max_seconds,candidate_min_seconds,candidate_max_seconds,speedup +content_identity,0.6115366229996653,0.14784532100020442,0.608705115000248,0.6361973240000225,0.1432127309999487,0.15226144200005365,4.136327202392964 +read,0.8523036010001306,0.36215967899988755,0.8185912670001017,0.9291884250001203,0.35441837999997006,0.37201259099992967,2.35339175071556 +propose,1.8096413250000296,0.8504836430001887,1.7892878709999422,1.8716306849996727,0.8453465580000739,0.8626112629999625,2.127779105329164 +manifest_refresh,0.6531223689999024,0.15903526900001452,0.6303173850001258,0.6763391710001088,0.15581275200020173,0.16115098900036173,4.106776899907924 From bac7dc3dc39fbf519429ea91bff1e02e65925299 Mon Sep 17 00:00:00 2001 From: MrScripty Date: Wed, 23 Sep 2026 21:40:36 -0700 Subject: [PATCH 13/26] perf(engine): reuse process-owned interface and compiled snapshots --- .../reports/performance-process-reuse.md | 241 +++++++++++ .../admission-baseline.json | 333 +++++++++++++++ .../admission-interface-only.json | 288 +++++++++++++ .../performance-process-reuse/admission.md | 80 ++++ .../performance-process-reuse/comparison.csv | 14 + .../environment.json | 36 ++ .../final-baseline.json | 339 +++++++++++++++ .../final-candidate.json | 285 +++++++++++++ .../final-stdio-baseline.json | 96 +++++ .../final-stdio-candidate.json | 96 +++++ .../performance-process-reuse/measure_mcp.py | 60 +++ .../measure_stdio.py | 65 +++ .../source-binding.json | 14 + .../performance-process-reuse/structural.json | 11 + .../performance-process-reuse/support.json | 79 ++++ .../validate_warm_recovery.py | 41 ++ .../verification.json | 141 +++++++ .../warm-recovery.json | 42 ++ .../generated/suite-inputs.json | 20 +- tools/standards_engine/PURPOSE-SEPARATION.md | 51 ++- .../standards_engine/compiled_cache.py | 175 ++++++++ .../standards_engine/engine.py | 11 + .../standards_engine/standards_engine/mcp.py | 69 +++- .../standards_engine/tools.py | 19 +- .../tests/test_process_reuse.py | 389 ++++++++++++++++++ 25 files changed, 2967 insertions(+), 28 deletions(-) create mode 100644 docs/plans/purpose-separated-standards-engine/reports/performance-process-reuse.md create mode 100644 docs/plans/purpose-separated-standards-engine/reports/performance-process-reuse/admission-baseline.json create mode 100644 docs/plans/purpose-separated-standards-engine/reports/performance-process-reuse/admission-interface-only.json create mode 100644 docs/plans/purpose-separated-standards-engine/reports/performance-process-reuse/admission.md create mode 100644 docs/plans/purpose-separated-standards-engine/reports/performance-process-reuse/comparison.csv create mode 100644 docs/plans/purpose-separated-standards-engine/reports/performance-process-reuse/environment.json create mode 100644 docs/plans/purpose-separated-standards-engine/reports/performance-process-reuse/final-baseline.json create mode 100644 docs/plans/purpose-separated-standards-engine/reports/performance-process-reuse/final-candidate.json create mode 100644 docs/plans/purpose-separated-standards-engine/reports/performance-process-reuse/final-stdio-baseline.json create mode 100644 docs/plans/purpose-separated-standards-engine/reports/performance-process-reuse/final-stdio-candidate.json create mode 100644 docs/plans/purpose-separated-standards-engine/reports/performance-process-reuse/measure_mcp.py create mode 100644 docs/plans/purpose-separated-standards-engine/reports/performance-process-reuse/measure_stdio.py create mode 100644 docs/plans/purpose-separated-standards-engine/reports/performance-process-reuse/source-binding.json create mode 100644 docs/plans/purpose-separated-standards-engine/reports/performance-process-reuse/structural.json create mode 100644 docs/plans/purpose-separated-standards-engine/reports/performance-process-reuse/support.json create mode 100644 docs/plans/purpose-separated-standards-engine/reports/performance-process-reuse/validate_warm_recovery.py create mode 100644 docs/plans/purpose-separated-standards-engine/reports/performance-process-reuse/verification.json create mode 100644 docs/plans/purpose-separated-standards-engine/reports/performance-process-reuse/warm-recovery.json create mode 100644 tools/standards_engine/standards_engine/compiled_cache.py create mode 100644 tools/standards_engine/tests/test_process_reuse.py diff --git a/docs/plans/purpose-separated-standards-engine/reports/performance-process-reuse.md b/docs/plans/purpose-separated-standards-engine/reports/performance-process-reuse.md new file mode 100644 index 00000000..f2bdafb5 --- /dev/null +++ b/docs/plans/purpose-separated-standards-engine/reports/performance-process-reuse.md @@ -0,0 +1,241 @@ +# Process-owned interface and immutable-compilation reuse + +**Status:** implemented and locally verified; installed supported qualification and +independent implementation review remain separate. + +**Branch:** `implementation/purpose-separated-standards-engine` + +**Base:** `b81a5aae2eb72fb976b0570a4dab76d30e531fe4` + +## Objective and admission + +Improve repeated explicit-snapshot MCP interactions by retaining the installed +API contract and a small amount of pure compiled snapshot material. Preserve the +per-call Engine, facade and SQLite lifetime, all required content verification, +current lifecycle/authorization observations, and exact publication/recovery. + +The [bounded admission](performance-process-reuse/admission.md) records the +applicable standards, write set and composed-design decisions. Interface reuse +was implemented first: its intermediate local measurements reduced repeated +reads from about 0.676 to 0.371 seconds. Full standards compilation still occupied +about 0.196 seconds, justifying the second, bounded mechanism. Those exploratory +observations are retained separately from the final comparisons below. + +Code and implementation evidence are the only changed concerns. Normative +standards, operational prompts/templates, public Engine schemas, supported +versions, dependency locks, Identity-v2, Git object verification and SQLite +settings remain unchanged. Git batching, selective compilation, test-runner +parallelism, persisted caches and shared cache services are outside this scope. + +## Design and ownership + +### Installed interface + +`AgentToolFacade.load_interface` prepares the canonical installed schema and +interface once. The MCP server owns it for its code-installation lifetime and +passes it to each newly opened facade. Discovery is projected from the same +compiled contract used for invocation. Request decoding and result validation +still run on every call; this is preparation reuse, not validation removal. + +The standalone facade remains an independent cold consumer. Embedders may supply +a prepared interface explicitly when they own its fixed implementation lifetime. +The returned catalog is independent data, so a caller cannot mutate subsequent +discovery results. Replacing installed code or the API schema requires restart; +ordinary accepted-standards publication does not change the installed API. + +### Compiled snapshot material + +`CompiledSnapshotCache` is a small Engine-owned mechanism. The MCP process owns +its lifetime and supplies it explicitly; the Engine retains no implicit global +cache. It is fixed to a repository root and purpose and uses an exact capture plus +the installed compiler function as the key. Capture equality includes the sorted +paths, bytes and source revision. A Python hash collision cannot conflate keys. +Public snapshot IDs and response provenance are reconstructed for each request. + +`_compiled_snapshot` first performs the existing `SnapshotModule.load_content`. +That method still checks current lifecycle and verifies the complete durable +content. Only the successfully verified capture reaches compilation lookup. The +cache returns pure compiled input, never an earlier response or live access +result. Snapshot-bound attestations and exposure declarations remain historical +input; they do not acquire new authorization authority. + +Equal already-verified material from separate stores may share pure compilation +inside the same trusted owner. Store-specific lifecycle, handles, integrity and +result envelopes are still observed in the current call. Missing, replaced, +quarantined, purged or corrupt storage cannot be answered from retained material. + +The full compiler remains the only compiler. Misses compile frozen captured +bytes; failures are not retained. Stateful or closure-based compiler adapters +remain valid cold callers. Capture's live and frozen passes call the compiler +independently, compare closure/signatures and publish only afterward. Neither +pass consults this cache. Proposal construction independently compiles changed +candidates; this increment adds no cross-call proposal-projection cache. + +### Bounds, concurrency and lifetime + +The cache admits at most **two entries and 32 MiB of accounted retained data**. +A bounded LRU chooses entries; oversized or unaccountable valid material uses +ordinary verified computation. Both entry pressure and byte pressure are tested. + +Accounting includes captured bytes, reachable Python containers, compiled models, +patterns and mapping tables. It counts shared objects once inside an entry and +conservatively counts inter-entry sharing separately. Path value caches are +materialized before measuring. Unknown mapping/native backing allocations and +closure state make an entry ineligible rather than pretending their size is known. +Imported implementation code and fixed-size cache bookkeeping are outside the +entry budget. It is not a total RSS or transient-compiler memory guarantee. + +MCP retains serial dispatch. Each tool call opens and closes a real Engine/facade +and store. Independent MCP processes own separate fixed-purpose caches; this +change does not make a SQLite connection or one Engine concurrently callable. +The public result constructors and graph/source interfaces retain read-only +ownership; caller-visible data is constructed afresh. Stream EOF and stream +failure release the owner interface, catalog and cache. Closing a borrowing +Engine releases its store without clearing the server-owned cache. + +Removing either mechanism restores a correct cold computation. Necessary state +is contained by its actual lifetime owner; neither mechanism is a durable +correctness dependency or a second authority for standards, identity or policy. + +## Measured behavior + +Final comparisons use the same executable, dependency set, host and fixed source +at `b81a5aae`, with no other test jobs running. Each implementation has three +serial sequences, each beginning with a new server. A prepared persisted snapshot +selects **436 files / 3,747,165 source bytes** and the same content ID on both sides: + +`snapshot-content:sha256:48852a7cf384b41ea39182169465521e22aef3addc6f3d77cd39ccdb8c784ae5` + +Fixture creation and initial snapshot capture are outside the operation timings. +These are local authoring-purpose observations, not an installed Codex benchmark +or a claim that the real application content has been qualified. Three samples +provide medians/ranges rather than p95/p99 service levels. Fresh processes do not +imply cold operating-system caches. + +### Actual stdio process and request latency + +| Observation | Baseline median | Candidate median | Interpretation | +| --- | ---: | ---: | --- | +| Process start through MCP initialization | 0.319 s | 0.584 s | +0.265 s: interface preparation now happens once at startup | +| First explicit-snapshot read after initialization | 0.617 s | 0.393 s | 1.57x faster; includes cold compilation/admission | +| Repeated read | 0.610 s | 0.172 s | 3.55x faster | +| Read another policy in the same snapshot | 0.615 s | 0.169 s | 3.63x faster | +| Another repeated read | 0.618 s | 0.175 s | 3.53x faster | +| Startup plus first read, summed per sequence | 0.938 s | 0.979 s | About 0.041 s slower; single-use startup is not the target gain | +| Startup plus all four reads, summed per sequence | 2.787 s | 1.496 s | 46.3% lower elapsed time / 1.86x throughput for this sequence | + +Totals are formed per run before taking their median; they are not sums of +separately chosen medians. Raw subprocess outputs were asserted through the +actual newline-delimited MCP transport and both result encodings remain intact. + +### In-process MCP dispatch attribution + +| Observation | Baseline median | Candidate median | +| --- | ---: | ---: | +| Server construction and initialization | 0.006 s | 0.276 s | +| First read | 0.633 s | 0.391 s | +| Repeated read | 0.669 s | 0.178 s | +| Different policy | 0.615 s | 0.166 s | +| Full-detail read | 0.618 s | 0.180 s | +| Route using an explicit snapshot | 0.811 s | 0.367 s | + +Across three five-call sequences, interface compilation falls **15 to 3** and +full standards compilation **15 to 3**. Complete durable content loading remains +**15 to 15**, with median spans of approximately **0.154 and 0.153 seconds**. +Thus the principal remaining warm-read cost is still the required content check. +Inclusive spans are not added to manufacture an overall speedup. + +Every candidate sequence admits one entry, records four hits and one miss, and +retains about **6.47 MB** of accounted data (6,465,001 to 6,465,033 bytes). That is +well within the entry and byte bounds. End-of-sequence Linux RSS medians are about +61.2 MB before and 64.4 MB after. Those single-process observations include the +interpreter, installed interface, allocator retention and transient results; they +are not the cache-owned size or a portable upper bound. + +The [comparison CSV](performance-process-reuse/comparison.csv), raw +[baseline](performance-process-reuse/final-baseline.json) and +[candidate](performance-process-reuse/final-candidate.json) dispatch observations, +and [baseline](performance-process-reuse/final-stdio-baseline.json) and +[candidate](performance-process-reuse/final-stdio-candidate.json) stdio observations +retain all sample ranges and count data. + +## Correctness evidence and failure rules + +The new regressions exercise actual stores and existing owned interfaces: + +| Boundary | Evidence | +| --- | --- | +| Interface preparation versus validation | One preparation per server; malformed requests still reject; discovery/runtime use the same contract; restarted server detects changed schema | +| Every new request | Full durable load on each call, including cache hits; response mutations do not affect later output | +| Storage state | Warm reads reject quarantine, purge, missing/replaced stores and corrupted complete content before cache lookup | +| Purpose and repository | Trusted scope mismatch rejected before store open; application catalog remains restricted; existing publication scenario uses separate purpose caches | +| Current authority | Quarantine during review authorization prevents readiness; original live-evidence rejection also passes under warm recovery validation | +| Accepted main | Advancing main yields a new capture with two compiler passes; old snapshot remains readable after its working-tree source disappears | +| Cold process | Two actual fresh stdio servers reproduce the same exact historical result | +| Bounds and failures | Disabled retention, entry/byte eviction, oversized/unknown-size state, stateful compiler and failed compilation preserve cold-path behavior | +| Cleanup | EOF/write failure closes the owner; borrower close retains cache but closes store | +| Publication and recovery | Existing coordinated publication/provenance assertions pass with warmed purpose-isolated caches; unchanged audit/recovery assertions pass with a warmed first owner and a cold second owner/store | + +The extra [warm recovery run](performance-process-reuse/warm-recovery.json) retains +all original assertions: actual review and candidate verification, rejection of +evidence changed after review, interrupted application, recovery, and readback +from an independent database. It observes ten first-owner cache hits. The second +owner starts cold, and both caches release their entries on completion. It is a +correctness observation, not a paired recovery performance claim. + +## Test execution and qualification limits + +The full serial Engine discovery run passed **199 tests**. Eleven supporting +package suites ran **438 tests**, with **one existing interpreter-dependent skip**. +Together those runs cover **637 distinct tests: 636 passed and one skipped**. + +After that full run, accounting was tightened to exclude arbitrary Mapping +implementations with unknown backing allocations, and the existing bound test +added a byte-pressure case. All **21 new regression tests were then rerun and +passed** on the final code. The production source hashes of that final candidate +match this delivery; the distinction between the full run and final focused +rerun is retained in [verification](performance-process-reuse/verification.json) +and [source binding](performance-process-reuse/source-binding.json). No assertion +was removed or failure accepted as debt. The full-run duration is not a paired +suite-performance measurement and should not be compared with the user's host. + +The structural checkpoint is run separately against the final source and again +after the delivery commit. Its expected population is the existing **73 suites / +121 checks**. Actual outcomes are in [structural evidence](performance-process-reuse/structural.json). +These checks establish structure and generated freshness, not functional or +semantic acceptance. Existing real publication checks remain active inside tests. + +The environment is isolated Python **3.13.5**, outside the declared 3.11/3.12 +range; local `rpds-py` **2026.5.1** differs from the locked **2026.6.3**. Baseline and +candidate use identical executables and dependencies. The dependency lock and +supported versions are unchanged. Changed code parses with the 3.11 grammar; +that is not execution on 3.11. See the [environment](performance-process-reuse/environment.json). + +Official SDK/configured Codex qualification and independent implementation review +were not available here. Real raw stdio, native/facade tests and the narrower +existing authorization/publication fixtures are reported for their actual claims. +Run the supported locked environment and relevant installed-client qualification +before accepting this increment. The older increment's review does not transfer. + +## Reproduction and delivery + +Use one common fixture checkout at `b81a5aae` and separate baseline/candidate +implementation checkouts. The scripts create their own temporary Git fixture +with local accepted main at the fixture commit and preserve the source checkout. +Run each implementation serially with the same supported Python/environment: + +```bash +python measure_mcp.py --source /path/to/implementation --fixture /path/to/baseline --output /path/to/dispatch.json --repeats 3 +python measure_stdio.py --source /path/to/implementation --fixture /path/to/baseline --output /path/to/stdio.json --repeats 3 +python validate_warm_recovery.py --source /path/to/disposable-candidate --output /path/to/recovery.json +``` + +The scripts are retained beside this report. Instrumentation counts the same +boundaries on each implementation. Its compiler wrapper is stateless, so it +preserves the actual retention admission rule. Raw qualification logs are included +in the ZIP outside the source replacement tree. The exact Git CLI commit/tree, +file hashes, patch and bundle are identified by the delivery manifest. Use one +application method, then restart the installed MCP server for the new code. +The user's accepted main, live store, archived proposals and configuration remain +outside the write set. No remote publication or normative-content migration is +part of this delivery. diff --git a/docs/plans/purpose-separated-standards-engine/reports/performance-process-reuse/admission-baseline.json b/docs/plans/purpose-separated-standards-engine/reports/performance-process-reuse/admission-baseline.json new file mode 100644 index 00000000..7ded410e --- /dev/null +++ b/docs/plans/purpose-separated-standards-engine/reports/performance-process-reuse/admission-baseline.json @@ -0,0 +1,333 @@ +{ + "source": "/mnt/data/interface-work/baseline", + "python": "3.13.5 (main, Jun 25 2025, 18:55:22) [GCC 14.2.0]", + "observations": [ + { + "repeat": 0, + "operation": "initialize", + "seconds": 0.00591173799998046, + "spans": [] + }, + { + "repeat": 0, + "operation": "read_first", + "seconds": 0.6780853420000028, + "cpu": 0.676963722, + "spans": [ + { + "name": "interface", + "seconds": 0.2821525109999925 + }, + { + "name": "load_content", + "seconds": 0.1694347490000041 + }, + { + "name": "compile", + "seconds": 0.20243820199999618 + } + ], + "content_size": 8172 + }, + { + "repeat": 0, + "operation": "read_repeat", + "seconds": 0.6895395619999931, + "cpu": 0.6884025660000002, + "spans": [ + { + "name": "interface", + "seconds": 0.3012676900000031 + }, + { + "name": "load_content", + "seconds": 0.16566560499998673 + }, + { + "name": "compile", + "seconds": 0.1980427759999941 + } + ], + "content_size": 8172 + }, + { + "repeat": 0, + "operation": "read_other", + "seconds": 0.6848129569999912, + "cpu": 0.6839754690000004, + "spans": [ + { + "name": "interface", + "seconds": 0.3014453190000097 + }, + { + "name": "load_content", + "seconds": 0.15895815900000798 + }, + { + "name": "compile", + "seconds": 0.20538262299999133 + } + ], + "content_size": 17601 + }, + { + "repeat": 0, + "operation": "read_full", + "seconds": 0.6855269130000181, + "cpu": 0.6846134639999999, + "spans": [ + { + "name": "interface", + "seconds": 0.2894588279999937 + }, + { + "name": "load_content", + "seconds": 0.16518728299999452 + }, + { + "name": "compile", + "seconds": 0.19993460300000265 + } + ], + "content_size": 8172 + }, + { + "repeat": 0, + "operation": "route", + "seconds": 0.837397530000004, + "spans": [ + { + "name": "interface", + "seconds": 0.28536827700000345 + }, + { + "name": "load_content", + "seconds": 0.15814682799998536 + }, + { + "name": "compile", + "seconds": 0.1861608849999925 + } + ] + }, + { + "repeat": 1, + "operation": "initialize", + "seconds": 0.006901947000017117, + "spans": [] + }, + { + "repeat": 1, + "operation": "read_first", + "seconds": 0.6333646819999785, + "cpu": 0.6323859609999998, + "spans": [ + { + "name": "interface", + "seconds": 0.2628792149999981 + }, + { + "name": "load_content", + "seconds": 0.16089445299999738 + }, + { + "name": "compile", + "seconds": 0.18775820900000895 + } + ], + "content_size": 8172 + }, + { + "repeat": 1, + "operation": "read_repeat", + "seconds": 0.6334762190000163, + "cpu": 0.6328559979999993, + "spans": [ + { + "name": "interface", + "seconds": 0.2724548850000019 + }, + { + "name": "load_content", + "seconds": 0.15639992999999208 + }, + { + "name": "compile", + "seconds": 0.18189484499998798 + } + ], + "content_size": 8172 + }, + { + "repeat": 1, + "operation": "read_other", + "seconds": 0.6225524229999735, + "cpu": 0.6215451610000002, + "spans": [ + { + "name": "interface", + "seconds": 0.2642764010000178 + }, + { + "name": "load_content", + "seconds": 0.1543421149999915 + }, + { + "name": "compile", + "seconds": 0.1864318780000076 + } + ], + "content_size": 17601 + }, + { + "repeat": 1, + "operation": "read_full", + "seconds": 0.6446036380000066, + "cpu": 0.6436479009999996, + "spans": [ + { + "name": "interface", + "seconds": 0.27054690599999276 + }, + { + "name": "load_content", + "seconds": 0.16005957900000567 + }, + { + "name": "compile", + "seconds": 0.1839213609999888 + } + ], + "content_size": 8172 + }, + { + "repeat": 1, + "operation": "route", + "seconds": 0.8385780069999953, + "spans": [ + { + "name": "interface", + "seconds": 0.2789622009999846 + }, + { + "name": "load_content", + "seconds": 0.15384424600000557 + }, + { + "name": "compile", + "seconds": 0.18650579000001244 + } + ] + }, + { + "repeat": 2, + "operation": "initialize", + "seconds": 0.006659021999979586, + "spans": [] + }, + { + "repeat": 2, + "operation": "read_first", + "seconds": 0.6417006389999926, + "cpu": 0.6407074059999989, + "spans": [ + { + "name": "interface", + "seconds": 0.2592785170000127 + }, + { + "name": "load_content", + "seconds": 0.17777574199999435 + }, + { + "name": "compile", + "seconds": 0.18130920900000547 + } + ], + "content_size": 8172 + }, + { + "repeat": 2, + "operation": "read_repeat", + "seconds": 0.6757057199999963, + "cpu": 0.6746247899999993, + "spans": [ + { + "name": "interface", + "seconds": 0.27890803899998673 + }, + { + "name": "load_content", + "seconds": 0.1750343860000214 + }, + { + "name": "compile", + "seconds": 0.19567620600000168 + } + ], + "content_size": 8172 + }, + { + "repeat": 2, + "operation": "read_other", + "seconds": 0.6541189829999894, + "cpu": 0.6534049030000002, + "spans": [ + { + "name": "interface", + "seconds": 0.29720867499997894 + }, + { + "name": "load_content", + "seconds": 0.15261305299998185 + }, + { + "name": "compile", + "seconds": 0.18495356400001128 + } + ], + "content_size": 17601 + }, + { + "repeat": 2, + "operation": "read_full", + "seconds": 0.6302266810000106, + "cpu": 0.6293346159999995, + "spans": [ + { + "name": "interface", + "seconds": 0.25533152700000983 + }, + { + "name": "load_content", + "seconds": 0.15020664200000056 + }, + { + "name": "compile", + "seconds": 0.19528224799998384 + } + ], + "content_size": 8172 + }, + { + "repeat": 2, + "operation": "route", + "seconds": 0.7986471029999791, + "spans": [ + { + "name": "interface", + "seconds": 0.2554158949999987 + }, + { + "name": "load_content", + "seconds": 0.1556320459999938 + }, + { + "name": "compile", + "seconds": 0.17741836400000466 + } + ] + } + ] +} diff --git a/docs/plans/purpose-separated-standards-engine/reports/performance-process-reuse/admission-interface-only.json b/docs/plans/purpose-separated-standards-engine/reports/performance-process-reuse/admission-interface-only.json new file mode 100644 index 00000000..d4409bab --- /dev/null +++ b/docs/plans/purpose-separated-standards-engine/reports/performance-process-reuse/admission-interface-only.json @@ -0,0 +1,288 @@ +{ + "source": "/mnt/data/interface-work/repo", + "python": "3.13.5 (main, Jun 25 2025, 18:55:22) [GCC 14.2.0]", + "observations": [ + { + "repeat": 0, + "operation": "initialize", + "seconds": 0.2835653619999903, + "spans": [ + { + "name": "interface", + "seconds": 0.26513339199999564 + } + ] + }, + { + "repeat": 0, + "operation": "read_first", + "seconds": 0.3879527540000254, + "cpu": 0.38793028499999993, + "spans": [ + { + "name": "load_content", + "seconds": 0.16064178200002743 + }, + { + "name": "compile", + "seconds": 0.20323218200002202 + } + ], + "content_size": 8172 + }, + { + "repeat": 0, + "operation": "read_repeat", + "seconds": 0.3674845979999759, + "cpu": 0.36724542299999996, + "spans": [ + { + "name": "load_content", + "seconds": 0.15784249999995836 + }, + { + "name": "compile", + "seconds": 0.18642686099997263 + } + ], + "content_size": 8172 + }, + { + "repeat": 0, + "operation": "read_other", + "seconds": 0.3780983019999553, + "cpu": 0.37807445100000026, + "spans": [ + { + "name": "load_content", + "seconds": 0.17076601499996968 + }, + { + "name": "compile", + "seconds": 0.18818037800002685 + } + ], + "content_size": 17601 + }, + { + "repeat": 0, + "operation": "read_full", + "seconds": 0.4120889250000346, + "cpu": 0.41095177900000035, + "spans": [ + { + "name": "load_content", + "seconds": 0.17459925499997553 + }, + { + "name": "compile", + "seconds": 0.20582541800001763 + } + ], + "content_size": 8172 + }, + { + "repeat": 0, + "operation": "route", + "seconds": 0.5898115719999737, + "spans": [ + { + "name": "load_content", + "seconds": 0.15770986199999015 + }, + { + "name": "compile", + "seconds": 0.20228817399998889 + } + ] + }, + { + "repeat": 1, + "operation": "initialize", + "seconds": 0.32344417400003067, + "spans": [ + { + "name": "interface", + "seconds": 0.3055802239999821 + } + ] + }, + { + "repeat": 1, + "operation": "read_first", + "seconds": 0.38952098500004695, + "cpu": 0.3892698750000001, + "spans": [ + { + "name": "load_content", + "seconds": 0.16390188200000466 + }, + { + "name": "compile", + "seconds": 0.2013710029999629 + } + ], + "content_size": 8172 + }, + { + "repeat": 1, + "operation": "read_repeat", + "seconds": 0.37066323999999895, + "cpu": 0.37063690000000005, + "spans": [ + { + "name": "load_content", + "seconds": 0.15410359399999152 + }, + { + "name": "compile", + "seconds": 0.19358766699997432 + } + ], + "content_size": 8172 + }, + { + "repeat": 1, + "operation": "read_other", + "seconds": 0.3861348379999754, + "cpu": 0.38589465899999986, + "spans": [ + { + "name": "load_content", + "seconds": 0.16539757399999644 + }, + { + "name": "compile", + "seconds": 0.2008582309999838 + } + ], + "content_size": 17601 + }, + { + "repeat": 1, + "operation": "read_full", + "seconds": 0.41451398599997447, + "cpu": 0.4144969060000001, + "spans": [ + { + "name": "load_content", + "seconds": 0.1658852890000162 + }, + { + "name": "compile", + "seconds": 0.21715098599997873 + } + ], + "content_size": 8172 + }, + { + "repeat": 1, + "operation": "route", + "seconds": 0.6156071399999519, + "spans": [ + { + "name": "load_content", + "seconds": 0.1630001259999858 + }, + { + "name": "compile", + "seconds": 0.2083806939999704 + } + ] + }, + { + "repeat": 2, + "operation": "initialize", + "seconds": 0.3078649329999621, + "spans": [ + { + "name": "interface", + "seconds": 0.29076450199994497 + } + ] + }, + { + "repeat": 2, + "operation": "read_first", + "seconds": 0.3678224639999712, + "cpu": 0.3678023699999997, + "spans": [ + { + "name": "load_content", + "seconds": 0.15757933600002616 + }, + { + "name": "compile", + "seconds": 0.1865296130000047 + } + ], + "content_size": 8172 + }, + { + "repeat": 2, + "operation": "read_repeat", + "seconds": 0.3824673179999536, + "cpu": 0.3822172349999997, + "spans": [ + { + "name": "load_content", + "seconds": 0.15044215299997177 + }, + { + "name": "compile", + "seconds": 0.20996930600000496 + } + ], + "content_size": 8172 + }, + { + "repeat": 2, + "operation": "read_other", + "seconds": 0.35052646900004447, + "cpu": 0.35052183399999937, + "spans": [ + { + "name": "load_content", + "seconds": 0.14915329100000463 + }, + { + "name": "compile", + "seconds": 0.1824960999999803 + } + ], + "content_size": 17601 + }, + { + "repeat": 2, + "operation": "read_full", + "seconds": 0.3673669980000227, + "cpu": 0.367342515999999, + "spans": [ + { + "name": "load_content", + "seconds": 0.1514559099999815 + }, + { + "name": "compile", + "seconds": 0.18593571399998154 + } + ], + "content_size": 8172 + }, + { + "repeat": 2, + "operation": "route", + "seconds": 0.5421901809999667, + "spans": [ + { + "name": "load_content", + "seconds": 0.1508743840000193 + }, + { + "name": "compile", + "seconds": 0.17935453400002643 + } + ] + } + ] +} diff --git a/docs/plans/purpose-separated-standards-engine/reports/performance-process-reuse/admission.md b/docs/plans/purpose-separated-standards-engine/reports/performance-process-reuse/admission.md new file mode 100644 index 00000000..868f90da --- /dev/null +++ b/docs/plans/purpose-separated-standards-engine/reports/performance-process-reuse/admission.md @@ -0,0 +1,80 @@ +# Process-owned pure reuse: bounded implementation admission + +Base: `b81a5aae2eb72fb976b0570a4dab76d30e531fe4`. +Branch: `implementation/purpose-separated-standards-engine`. + +## Objective and authority + +The user requested the next measured performance optimizations and a ZIP. +Improve repeated explicit-snapshot MCP calls while preserving per-call store, +lifecycle, content-integrity, purpose, input-validation and authorization checks. +First reuse the installed interface contract at server lifetime. Admit bounded +pure snapshot compilation reuse only after measuring the residual cost. + +Applicable guidance: Core/Router, Performance, Verification and oracles, +Development Proportionality, Architecture and Immutable Results And Replay, +Contracts, Security, Implementation, Commit and Documentation. This code change +uses the agreed positive, proportionate practices and preserves normative text. + +## Owned boundaries and allowed writes + +- `tools/standards_engine/standards_engine/tools.py`: optional trusted precompiled + interface injection; normal standalone construction remains a real consumer. +- `tools/standards_engine/standards_engine/mcp.py`: process-owned pure resources, + schema discovery from the same interface, per-call stores, terminal cleanup. +- `tools/standards_engine/standards_engine/compiled_cache.py` and `engine.py`: + conditional bounded compilation reuse after full durable validation. +- Focused new Engine tests and only concretely affected existing tests. +- `tools/standards_engine/PURPOSE-SEPARATION.md`, relevant implementation README, + this report/evidence directory, and the existing generated suite-input index. + +Production schemas, persisted formats, identity encoding, Git reader behavior, +SQLite settings, normative guidance and installed configuration are preserved. +The scope contains no test-parallelism framework or persistent cache service. + +## Composed design + +The installed interface and immutable standards compilation have independent +owners and keys. MCP only owns their lifetime and supplies them to per-call +facades. Each Engine continues to own and close its store. Capture retains two +fresh independent compiler passes. Publication/recovery and decision evaluation +retain current checks. The cache (if admitted) holds only a verified frozen +capture and pure compilation; results, access decisions and mutable heads are +fresh. It is local to a fixed repository/purpose and installed implementation. + +Removing interface retention restores a repeated schema compile. Removing +snapshot retention restores the existing correct verified cold path. Neither +optimization is an authority dependency; both can fail admission without changing +the result's meaning. Normal misses and budget overflow perform verified work. +No unrelated adapter or version is introduced for either mechanism. + +## Evidence and stopping conditions + +Baseline: three serial sequences of server initialization and explicit-snapshot +read/route calls against one unchanged disposable candidate-main fixture. +Record facade-interface time, full compilation, full content load, operation +wall/CPU and catalog timing separately; do not add inclusive spans. + +Verify correct and malformed requests, result/schema parity, fixed-purpose +isolation, fresh authorization, closed/replaced/corrupt stores, cold replacement, +main advancement and historical snapshots. For any compilation cache, also test +entry/byte bounds, eviction, uncacheable entries, lifecycle denial after warming, +response mutation isolation, independent capture passes and cleanup. Existing +real Git/SQLite publication/recovery tests remain required. + +Use exact baseline/candidate inputs and report the supported-environment limit. +Tests and a structural checkpoint prove separate claims. Final evidence records +all run outcomes; package checks do not imply configured-client qualification. +Stop at the measured pure-reuse scope; runtime semantics or owner changes require +an explicit revision of this admission. Ordinary defects are repaired within it. + +## Residual-cost decision + +Three local explicit-snapshot sweeps measured approximately 0.279 seconds of +interface compilation and 0.196 seconds of full standards compilation per +repeated 0.676-second MCP-dispatched read. Interface-only reuse reduced repeated +reads to approximately 0.371 seconds. The residual compilation remains about +half that time, justifying the bounded two-entry pure cache in this increment. +Initial cache admission accounts for approximately 6.5 MB per representative +capture; retain the proposed 32 MiB budget and measure it in final evidence. +This does not claim installed Codex timings or a whole-suite speedup. diff --git a/docs/plans/purpose-separated-standards-engine/reports/performance-process-reuse/comparison.csv b/docs/plans/purpose-separated-standards-engine/reports/performance-process-reuse/comparison.csv new file mode 100644 index 00000000..9bc34820 --- /dev/null +++ b/docs/plans/purpose-separated-standards-engine/reports/performance-process-reuse/comparison.csv @@ -0,0 +1,14 @@ +transport,operation,samples_each,baseline_median_s,baseline_min_s,baseline_max_s,candidate_median_s,candidate_min_s,candidate_max_s,speedup +in-process MCP dispatch,initialize,3,0.006368097999938982,0.006167545999915092,0.006395395000026838,0.2757893560001321,0.2721619330000067,0.28823670399992807,0.02309044153225381 +in-process MCP dispatch,read_first,3,0.6329637369999546,0.6269803929999398,0.6605068700000629,0.3908776690000195,0.3840765749998809,0.39650924099987606,1.619339724930469 +in-process MCP dispatch,read_repeat,3,0.6687986470001306,0.6068956389999585,0.6701822420000099,0.17780863999996654,0.1671994010000617,0.17881003200000123,3.7613394208529822 +in-process MCP dispatch,read_other,3,0.6151434169998993,0.6120387349999419,0.7268398649998744,0.16646399599994766,0.16304629600017506,0.17137406899996677,3.695354141324907 +in-process MCP dispatch,read_full,3,0.6181734920000963,0.6127912130000368,0.6281915839999783,0.18012109299979784,0.1760634110000865,0.18280390499990062,3.431988345755764 +in-process MCP dispatch,route,3,0.8107210670000313,0.8068153030001213,0.817805781000061,0.367399794999983,0.35190553999996155,0.3807934199999181,2.2066453983733685 +stdio,process_initialize,3,0.31861344799995095,0.30339593999997305,0.32317135700009203,0.5837240999999267,0.5716445640000529,0.5880860100000973,0.5458288393437772 +stdio,read_cold,3,0.6167820139999094,0.6151544140000169,0.6521691020000162,0.39334122200011734,0.39161440299994865,0.3956212499999765,1.56805841722769 +stdio,read_warm,3,0.6100092729998323,0.5957390329999726,0.6297903710001265,0.17202490099998613,0.17125547399996321,0.17745480999997199,3.546052167179457 +stdio,read_other,3,0.6147646410001926,0.5931139879999137,0.6204875409998749,0.16945157000009203,0.16818897100006325,0.17401298400000087,3.62796662786812 +stdio,read_warm_again,3,0.6180173049999667,0.6145124739998664,0.6560644999999568,0.1752431180000258,0.17289443200002097,0.17533727999989424,3.5266281041625596 +stdio,startup_and_first_read,3,0.9383257710001089,0.9201779539998824,0.9707825499999672,0.9793453499999032,0.9649857860001703,0.979700413000046,0.9581153073328031 +stdio,startup_and_four_reads,3,2.786839889999783,2.723543448999635,2.871402062000243,1.495650575000127,1.4780940900002406,1.5061504239997703,1.8632961044390641 diff --git a/docs/plans/purpose-separated-standards-engine/reports/performance-process-reuse/environment.json b/docs/plans/purpose-separated-standards-engine/reports/performance-process-reuse/environment.json new file mode 100644 index 00000000..de13db66 --- /dev/null +++ b/docs/plans/purpose-separated-standards-engine/reports/performance-process-reuse/environment.json @@ -0,0 +1,36 @@ +{ + "python": "3.13.5 (main, Jul 15 2026, 20:25:40) [GCC 14.2.0]", + "dependencies": [ + { + "name": "attrs", + "version": "26.1.0" + }, + { + "name": "jsonschema", + "version": "4.26.0" + }, + { + "name": "jsonschema-specifications", + "version": "2025.9.1" + }, + { + "name": "referencing", + "version": "0.37.0" + }, + { + "name": "rpds-py", + "version": "2026.5.1" + }, + { + "name": "typing-extensions", + "version": "4.16.0" + } + ], + "qualification": "Local Python 3.13.5, not supported pinned 3.11/3.12. rpds-py differs from lock.", + "executable": "/mnt/data/interface-work/env/bin/python", + "executable_sha256": "e59d0124ff06c248546876e01fcfb1ea3cda63534949f94a9372bfcfe3bfc3f5", + "platform": "Linux-6.18.44-x86_64-with-glibc2.41", + "git": "git version 2.47.3", + "baseline_commit": "b81a5aae2eb72fb976b0570a4dab76d30e531fe4", + "performance_run_policy": "Baseline then candidate, three samples each, no other package/test jobs running. Fresh processes, not guaranteed cold OS caches." +} diff --git a/docs/plans/purpose-separated-standards-engine/reports/performance-process-reuse/final-baseline.json b/docs/plans/purpose-separated-standards-engine/reports/performance-process-reuse/final-baseline.json new file mode 100644 index 00000000..7ee16fd4 --- /dev/null +++ b/docs/plans/purpose-separated-standards-engine/reports/performance-process-reuse/final-baseline.json @@ -0,0 +1,339 @@ +{ + "source": "/mnt/data/interface-work/baseline", + "python": "3.13.5 (main, Jun 25 2025, 18:55:22) [GCC 14.2.0]", + "corpus": { + "files": 436, + "bytes": 3747165, + "content_id": "snapshot-content:sha256:48852a7cf384b41ea39182169465521e22aef3addc6f3d77cd39ccdb8c784ae5", + "source_revision": "b81a5aae2eb72fb976b0570a4dab76d30e531fe4" + }, + "observations": [ + { + "repeat": 0, + "operation": "initialize", + "seconds": 0.006167545999915092, + "spans": [] + }, + { + "repeat": 0, + "operation": "read_first", + "seconds": 0.6329637369999546, + "cpu": 0.6318216699999999, + "spans": [ + { + "name": "interface", + "seconds": 0.263798898999994 + }, + { + "name": "load_content", + "seconds": 0.15312219699990237 + }, + { + "name": "compile", + "seconds": 0.19430730099998073 + } + ], + "content_size": 8172 + }, + { + "repeat": 0, + "operation": "read_repeat", + "seconds": 0.6687986470001306, + "cpu": 0.6679860520000003, + "spans": [ + { + "name": "interface", + "seconds": 0.2926456469999721 + }, + { + "name": "load_content", + "seconds": 0.15969725699983428 + }, + { + "name": "compile", + "seconds": 0.19253551099996002 + } + ], + "content_size": 8172 + }, + { + "repeat": 0, + "operation": "read_other", + "seconds": 0.7268398649998744, + "cpu": 0.7257669320000004, + "spans": [ + { + "name": "interface", + "seconds": 0.35367749800002457 + }, + { + "name": "load_content", + "seconds": 0.1540714370000842 + }, + { + "name": "compile", + "seconds": 0.19923962999996547 + } + ], + "content_size": 17601 + }, + { + "repeat": 0, + "operation": "read_full", + "seconds": 0.6281915839999783, + "cpu": 0.6271876880000002, + "spans": [ + { + "name": "interface", + "seconds": 0.26197744299997794 + }, + { + "name": "load_content", + "seconds": 0.15052015399987795 + }, + { + "name": "compile", + "seconds": 0.18336530999999923 + } + ], + "content_size": 8172 + }, + { + "repeat": 0, + "operation": "route", + "seconds": 0.817805781000061, + "spans": [ + { + "name": "interface", + "seconds": 0.2586689480001496 + }, + { + "name": "load_content", + "seconds": 0.15357917599999382 + }, + { + "name": "compile", + "seconds": 0.18759590500008017 + } + ] + }, + { + "repeat": 1, + "operation": "initialize", + "seconds": 0.006368097999938982, + "spans": [] + }, + { + "repeat": 1, + "operation": "read_first", + "seconds": 0.6605068700000629, + "cpu": 0.6596841089999996, + "spans": [ + { + "name": "interface", + "seconds": 0.2697183860000223 + }, + { + "name": "load_content", + "seconds": 0.16306392000001324 + }, + { + "name": "compile", + "seconds": 0.2040212370000063 + } + ], + "content_size": 8172 + }, + { + "repeat": 1, + "operation": "read_repeat", + "seconds": 0.6701822420000099, + "cpu": 0.6691387229999997, + "spans": [ + { + "name": "interface", + "seconds": 0.3094467999999324 + }, + { + "name": "load_content", + "seconds": 0.15528474600000663 + }, + { + "name": "compile", + "seconds": 0.1811088980000477 + } + ], + "content_size": 8172 + }, + { + "repeat": 1, + "operation": "read_other", + "seconds": 0.6120387349999419, + "cpu": 0.6110515019999996, + "spans": [ + { + "name": "interface", + "seconds": 0.2617194249999102 + }, + { + "name": "load_content", + "seconds": 0.15321830199991382 + }, + { + "name": "compile", + "seconds": 0.17772469499982435 + } + ], + "content_size": 17601 + }, + { + "repeat": 1, + "operation": "read_full", + "seconds": 0.6181734920000963, + "cpu": 0.617482496, + "spans": [ + { + "name": "interface", + "seconds": 0.25574302599989096 + }, + { + "name": "load_content", + "seconds": 0.15179559000011977 + }, + { + "name": "compile", + "seconds": 0.18054032899999584 + } + ], + "content_size": 8172 + }, + { + "repeat": 1, + "operation": "route", + "seconds": 0.8068153030001213, + "spans": [ + { + "name": "interface", + "seconds": 0.2561027340000237 + }, + { + "name": "load_content", + "seconds": 0.1579876430000695 + }, + { + "name": "compile", + "seconds": 0.18420011800003522 + } + ] + }, + { + "repeat": 2, + "operation": "initialize", + "seconds": 0.006395395000026838, + "spans": [] + }, + { + "repeat": 2, + "operation": "read_first", + "seconds": 0.6269803929999398, + "cpu": 0.6260117090000001, + "spans": [ + { + "name": "interface", + "seconds": 0.27623542900005305 + }, + { + "name": "load_content", + "seconds": 0.14946125599999505 + }, + { + "name": "compile", + "seconds": 0.17911691800009066 + } + ], + "content_size": 8172 + }, + { + "repeat": 2, + "operation": "read_repeat", + "seconds": 0.6068956389999585, + "cpu": 0.6062379, + "spans": [ + { + "name": "interface", + "seconds": 0.25756802199998674 + }, + { + "name": "load_content", + "seconds": 0.14951377400007004 + }, + { + "name": "compile", + "seconds": 0.1779703709999012 + } + ], + "content_size": 8172 + }, + { + "repeat": 2, + "operation": "read_other", + "seconds": 0.6151434169998993, + "cpu": 0.6141119689999996, + "spans": [ + { + "name": "interface", + "seconds": 0.2595952760000273 + }, + { + "name": "load_content", + "seconds": 0.1547648170001139 + }, + { + "name": "compile", + "seconds": 0.18268731900002422 + } + ], + "content_size": 17601 + }, + { + "repeat": 2, + "operation": "read_full", + "seconds": 0.6127912130000368, + "cpu": 0.6121391669999987, + "spans": [ + { + "name": "interface", + "seconds": 0.2507211360000383 + }, + { + "name": "load_content", + "seconds": 0.15562243900012618 + }, + { + "name": "compile", + "seconds": 0.1777055319998908 + } + ], + "content_size": 8172 + }, + { + "repeat": 2, + "operation": "route", + "seconds": 0.8107210670000313, + "spans": [ + { + "name": "interface", + "seconds": 0.2583658949999972 + }, + { + "name": "load_content", + "seconds": 0.1564252180000949 + }, + { + "name": "compile", + "seconds": 0.1781281690000469 + } + ] + } + ] +} diff --git a/docs/plans/purpose-separated-standards-engine/reports/performance-process-reuse/final-candidate.json b/docs/plans/purpose-separated-standards-engine/reports/performance-process-reuse/final-candidate.json new file mode 100644 index 00000000..a6058e63 --- /dev/null +++ b/docs/plans/purpose-separated-standards-engine/reports/performance-process-reuse/final-candidate.json @@ -0,0 +1,285 @@ +{ + "source": "/mnt/data/interface-work/repo", + "python": "3.13.5 (main, Jun 25 2025, 18:55:22) [GCC 14.2.0]", + "corpus": { + "files": 436, + "bytes": 3747165, + "content_id": "snapshot-content:sha256:48852a7cf384b41ea39182169465521e22aef3addc6f3d77cd39ccdb8c784ae5", + "source_revision": "b81a5aae2eb72fb976b0570a4dab76d30e531fe4" + }, + "observations": [ + { + "repeat": 0, + "operation": "initialize", + "seconds": 0.28823670399992807, + "spans": [ + { + "name": "interface", + "seconds": 0.27295136700013245 + } + ] + }, + { + "repeat": 0, + "operation": "read_first", + "seconds": 0.3908776690000195, + "cpu": 0.39036076799999986, + "spans": [ + { + "name": "load_content", + "seconds": 0.15264709100006257 + }, + { + "name": "compile", + "seconds": 0.1918777770001725 + } + ], + "content_size": 8172 + }, + { + "repeat": 0, + "operation": "read_repeat", + "seconds": 0.17881003200000123, + "cpu": 0.17855910900000005, + "spans": [ + { + "name": "load_content", + "seconds": 0.15692990499996995 + } + ], + "content_size": 8172 + }, + { + "repeat": 0, + "operation": "read_other", + "seconds": 0.16646399599994766, + "cpu": 0.16633457500000004, + "spans": [ + { + "name": "load_content", + "seconds": 0.14919980599984228 + } + ], + "content_size": 17601 + }, + { + "repeat": 0, + "operation": "read_full", + "seconds": 0.18280390499990062, + "cpu": 0.18256525899999998, + "spans": [ + { + "name": "load_content", + "seconds": 0.15409010699977443 + } + ], + "content_size": 8172 + }, + { + "repeat": 0, + "operation": "route", + "seconds": 0.3807934199999181, + "spans": [ + { + "name": "load_content", + "seconds": 0.159077907999972 + } + ] + }, + { + "repeat": 0, + "operation": "cache_statistics", + "seconds": 0, + "stats": { + "entries": 1, + "accounted_bytes": 6465033, + "hits": 4, + "misses": 1, + "evictions": 0, + "uncached": 0 + } + }, + { + "repeat": 1, + "operation": "initialize", + "seconds": 0.2757893560001321, + "spans": [ + { + "name": "interface", + "seconds": 0.2609818029998223 + } + ] + }, + { + "repeat": 1, + "operation": "read_first", + "seconds": 0.3840765749998809, + "cpu": 0.38376053, + "spans": [ + { + "name": "load_content", + "seconds": 0.14769780799997534 + }, + { + "name": "compile", + "seconds": 0.1949534139998832 + } + ], + "content_size": 8172 + }, + { + "repeat": 1, + "operation": "read_repeat", + "seconds": 0.1671994010000617, + "cpu": 0.16703066999999994, + "spans": [ + { + "name": "load_content", + "seconds": 0.14723738399993636 + } + ], + "content_size": 8172 + }, + { + "repeat": 1, + "operation": "read_other", + "seconds": 0.16304629600017506, + "cpu": 0.16303526300000026, + "spans": [ + { + "name": "load_content", + "seconds": 0.14629375300000902 + } + ], + "content_size": 17601 + }, + { + "repeat": 1, + "operation": "read_full", + "seconds": 0.1760634110000865, + "cpu": 0.17590700700000017, + "spans": [ + { + "name": "load_content", + "seconds": 0.14843920499993146 + } + ], + "content_size": 8172 + }, + { + "repeat": 1, + "operation": "route", + "seconds": 0.35190553999996155, + "spans": [ + { + "name": "load_content", + "seconds": 0.14677781199998208 + } + ] + }, + { + "repeat": 1, + "operation": "cache_statistics", + "seconds": 0, + "stats": { + "entries": 1, + "accounted_bytes": 6465017, + "hits": 4, + "misses": 1, + "evictions": 0, + "uncached": 0 + } + }, + { + "repeat": 2, + "operation": "initialize", + "seconds": 0.2721619330000067, + "spans": [ + { + "name": "interface", + "seconds": 0.2565942249998443 + } + ] + }, + { + "repeat": 2, + "operation": "read_first", + "seconds": 0.39650924099987606, + "cpu": 0.3961694859999998, + "spans": [ + { + "name": "load_content", + "seconds": 0.1704660610000701 + }, + { + "name": "compile", + "seconds": 0.1800155039998117 + } + ], + "content_size": 8172 + }, + { + "repeat": 2, + "operation": "read_repeat", + "seconds": 0.17780863999996654, + "cpu": 0.1776472130000002, + "spans": [ + { + "name": "load_content", + "seconds": 0.15534518599997682 + } + ], + "content_size": 8172 + }, + { + "repeat": 2, + "operation": "read_other", + "seconds": 0.17137406899996677, + "cpu": 0.171373451, + "spans": [ + { + "name": "load_content", + "seconds": 0.1532312329998149 + } + ], + "content_size": 17601 + }, + { + "repeat": 2, + "operation": "read_full", + "seconds": 0.18012109299979784, + "cpu": 0.1799730179999992, + "spans": [ + { + "name": "load_content", + "seconds": 0.15143581799998174 + } + ], + "content_size": 8172 + }, + { + "repeat": 2, + "operation": "route", + "seconds": 0.367399794999983, + "spans": [ + { + "name": "load_content", + "seconds": 0.15281867899989265 + } + ] + }, + { + "repeat": 2, + "operation": "cache_statistics", + "seconds": 0, + "stats": { + "entries": 1, + "accounted_bytes": 6465001, + "hits": 4, + "misses": 1, + "evictions": 0, + "uncached": 0 + } + } + ] +} diff --git a/docs/plans/purpose-separated-standards-engine/reports/performance-process-reuse/final-stdio-baseline.json b/docs/plans/purpose-separated-standards-engine/reports/performance-process-reuse/final-stdio-baseline.json new file mode 100644 index 00000000..f2a4677f --- /dev/null +++ b/docs/plans/purpose-separated-standards-engine/reports/performance-process-reuse/final-stdio-baseline.json @@ -0,0 +1,96 @@ +{ + "source": "/mnt/data/interface-work/baseline", + "python": "3.13.5 (main, Jun 25 2025, 18:55:22) [GCC 14.2.0]", + "observations": [ + { + "repeat": 0, + "operation": "process_initialize", + "seconds": 0.31861344799995095, + "rss_bytes": 35110912 + }, + { + "repeat": 0, + "operation": "read_cold", + "seconds": 0.6521691020000162, + "rss_bytes": 59179008 + }, + { + "repeat": 0, + "operation": "read_warm", + "seconds": 0.6297903710001265, + "rss_bytes": 60256256 + }, + { + "repeat": 0, + "operation": "read_other", + "seconds": 0.6147646410001926, + "rss_bytes": 60973056 + }, + { + "repeat": 0, + "operation": "read_warm_again", + "seconds": 0.6560644999999568, + "rss_bytes": 61214720 + }, + { + "repeat": 1, + "operation": "process_initialize", + "seconds": 0.32317135700009203, + "rss_bytes": 35151872 + }, + { + "repeat": 1, + "operation": "read_cold", + "seconds": 0.6151544140000169, + "rss_bytes": 59158528 + }, + { + "repeat": 1, + "operation": "read_warm", + "seconds": 0.6100092729998323, + "rss_bytes": 60252160 + }, + { + "repeat": 1, + "operation": "read_other", + "seconds": 0.6204875409998749, + "rss_bytes": 60985344 + }, + { + "repeat": 1, + "operation": "read_warm_again", + "seconds": 0.6180173049999667, + "rss_bytes": 61214720 + }, + { + "repeat": 2, + "operation": "process_initialize", + "seconds": 0.30339593999997305, + "rss_bytes": 35266560 + }, + { + "repeat": 2, + "operation": "read_cold", + "seconds": 0.6167820139999094, + "rss_bytes": 59232256 + }, + { + "repeat": 2, + "operation": "read_warm", + "seconds": 0.5957390329999726, + "rss_bytes": 60309504 + }, + { + "repeat": 2, + "operation": "read_other", + "seconds": 0.5931139879999137, + "rss_bytes": 61059072 + }, + { + "repeat": 2, + "operation": "read_warm_again", + "seconds": 0.6145124739998664, + "rss_bytes": 61284352 + } + ] +} diff --git a/docs/plans/purpose-separated-standards-engine/reports/performance-process-reuse/final-stdio-candidate.json b/docs/plans/purpose-separated-standards-engine/reports/performance-process-reuse/final-stdio-candidate.json new file mode 100644 index 00000000..0563f0a1 --- /dev/null +++ b/docs/plans/purpose-separated-standards-engine/reports/performance-process-reuse/final-stdio-candidate.json @@ -0,0 +1,96 @@ +{ + "source": "/mnt/data/interface-work/repo", + "python": "3.13.5 (main, Jun 25 2025, 18:55:22) [GCC 14.2.0]", + "observations": [ + { + "repeat": 0, + "operation": "process_initialize", + "seconds": 0.5716445640000529, + "rss_bytes": 36638720 + }, + { + "repeat": 0, + "operation": "read_cold", + "seconds": 0.39334122200011734, + "rss_bytes": 59031552 + }, + { + "repeat": 0, + "operation": "read_warm", + "seconds": 0.17202490099998613, + "rss_bytes": 64217088 + }, + { + "repeat": 0, + "operation": "read_other", + "seconds": 0.16818897100006325, + "rss_bytes": 65048576 + }, + { + "repeat": 0, + "operation": "read_warm_again", + "seconds": 0.17289443200002097, + "rss_bytes": 65130496 + }, + { + "repeat": 1, + "operation": "process_initialize", + "seconds": 0.5837240999999267, + "rss_bytes": 36610048 + }, + { + "repeat": 1, + "operation": "read_cold", + "seconds": 0.3956212499999765, + "rss_bytes": 59006976 + }, + { + "repeat": 1, + "operation": "read_warm", + "seconds": 0.17745480999997199, + "rss_bytes": 64163840 + }, + { + "repeat": 1, + "operation": "read_other", + "seconds": 0.17401298400000087, + "rss_bytes": 64262144 + }, + { + "repeat": 1, + "operation": "read_warm_again", + "seconds": 0.17533727999989424, + "rss_bytes": 64356352 + }, + { + "repeat": 2, + "operation": "process_initialize", + "seconds": 0.5880860100000973, + "rss_bytes": 36560896 + }, + { + "repeat": 2, + "operation": "read_cold", + "seconds": 0.39161440299994865, + "rss_bytes": 59031552 + }, + { + "repeat": 2, + "operation": "read_warm", + "seconds": 0.17125547399996321, + "rss_bytes": 64184320 + }, + { + "repeat": 2, + "operation": "read_other", + "seconds": 0.16945157000009203, + "rss_bytes": 64278528 + }, + { + "repeat": 2, + "operation": "read_warm_again", + "seconds": 0.1752431180000258, + "rss_bytes": 64372736 + } + ] +} diff --git a/docs/plans/purpose-separated-standards-engine/reports/performance-process-reuse/measure_mcp.py b/docs/plans/purpose-separated-standards-engine/reports/performance-process-reuse/measure_mcp.py new file mode 100644 index 00000000..c53597b3 --- /dev/null +++ b/docs/plans/purpose-separated-standards-engine/reports/performance-process-reuse/measure_mcp.py @@ -0,0 +1,60 @@ +"""Compare an unchanged explicit-snapshot MCP sequence in isolated Git fixtures.""" +from __future__ import annotations +import argparse, json, subprocess, sys, tempfile, time +from pathlib import Path +from statistics import median +from unittest.mock import patch +p=argparse.ArgumentParser();p.add_argument('--source',type=Path,required=True);p.add_argument('--fixture',type=Path,required=True);p.add_argument('--output',type=Path,required=True);p.add_argument('--repeats',type=int,default=3) +a=p.parse_args();sys.path.insert(0,str(a.source.resolve())) +from tools.standards_engine.standards_engine import AgentToolFacade, StandardsEngine +from tools.standards_engine.standards_engine.mcp import MCPServer +from tools.standards_engine.standards_engine import tools as facade_tools +from tools.standards_snapshots.standards_snapshots import SnapshotModule +observations=[]; active=[] +original_compile = StandardsEngine._compile +def timed_compile(source): + t=time.perf_counter() + try:return original_compile(source) + finally:active.append({'name':'compile','seconds':time.perf_counter()-t}) +def wrap(name, fn): + def called(*args,**kwargs): + t=time.perf_counter() + try:return fn(*args,**kwargs) + finally: active.append({'name':name,'seconds':time.perf_counter()-t}) + return called +def call(server, method, params=None, number=1): + return server.dispatch({'jsonrpc':'2.0','id':number,'method':method,'params':params or {}}) +def init(server): + r=call(server,'initialize',{'protocolVersion':'2025-11-25','clientInfo':{'name':'performance-observer','version':'1'},'capabilities':{}}) + assert 'result' in r,r + server.dispatch({'jsonrpc':'2.0','method':'notifications/initialized'}) +with tempfile.TemporaryDirectory(prefix='engine-interface-benchmark-') as tmp: + root=Path(tmp)/'repo' + subprocess.run(['git','clone','--quiet','--no-hardlinks',str(a.fixture.resolve()),str(root)],check=True) + subprocess.run(['git','-C',str(root),'checkout','--quiet','-B','main','b81a5aae'],check=True) + with AgentToolFacade.open_repository(root,purpose='authoring') as facade: + c=facade.create_snapshot({'kind':'create-snapshot'}) + assert c['kind']=='create-snapshot-result',c + snap=c['snapshot']['snapshot'] + from tools.standards_snapshots.standards_snapshots import SnapshotId + capture=facade._engine._snapshots.load_content(SnapshotId(snap['id'])) + corpus={'files':len(capture.files),'bytes':sum(len(x.content) for x in capture.files),'content_id':SnapshotModule._content_id(capture),'source_revision':capture.source_revision} + with patch.object(facade_tools,'_contracts',wrap('interface',facade_tools._contracts)),patch.object(StandardsEngine,'_compile',staticmethod(timed_compile)),patch.object(SnapshotModule,'load_content',wrap('load_content',SnapshotModule.load_content)): + for repeat in range(a.repeats): + active.clear();t=time.perf_counter();server=MCPServer(root,purpose='authoring');init(server) + observations.append({'repeat':repeat,'operation':'initialize','seconds':time.perf_counter()-t,'spans':active.copy()}) + for label,args in [('read_first',{'target':'core','snapshot':snap}),('read_repeat',{'target':'core','snapshot':snap}),('read_other',{'target':'workflow.planning','snapshot':snap}),('read_full',{'target':'core','snapshot':snap,'detail':'full'})]: + active.clear();t=time.perf_counter();cpu=time.process_time();r=call(server,'tools/call',{'name':'read','arguments':args}) + assert 'result' in r and not r['result']['isError'],r + result=r['result']['structuredContent'];assert result['snapshot']==snap + observations.append({'repeat':repeat,'operation':label,'seconds':time.perf_counter()-t,'cpu':time.process_time()-cpu,'spans':active.copy(),'content_size':len(result['content'])}) + active.clear();t=time.perf_counter();r=call(server,'tools/call',{'name':'route','arguments':{'facts':{},'snapshot':snap}}) + assert not r['result']['isError'],r + observations.append({'repeat':repeat,'operation':'route','seconds':time.perf_counter()-t,'spans':active.copy()}) + if hasattr(server,'_compiled_cache'): + observations.append({'repeat':repeat,'operation':'cache_statistics','seconds':0,'stats':server._compiled_cache.statistics}) + if hasattr(server,'close'):server.close() +a.output.write_text(json.dumps({'source':str(a.source),'python':sys.version,'corpus':corpus,'observations':observations},indent=2)+'\n') +for name in dict.fromkeys(x['operation'] for x in observations): + xs=[x['seconds'] for x in observations if x['operation']==name] + print(name,round(median(xs),5),flush=True) diff --git a/docs/plans/purpose-separated-standards-engine/reports/performance-process-reuse/measure_stdio.py b/docs/plans/purpose-separated-standards-engine/reports/performance-process-reuse/measure_stdio.py new file mode 100644 index 00000000..dee163c2 --- /dev/null +++ b/docs/plans/purpose-separated-standards-engine/reports/performance-process-reuse/measure_stdio.py @@ -0,0 +1,65 @@ +"""Observe startup and explicit retained-snapshot reads through real MCP stdio.""" +from __future__ import annotations +import argparse +import json +import os +from pathlib import Path +import subprocess +import sys +import tempfile +import time +from statistics import median + +p=argparse.ArgumentParser() +p.add_argument('--source',type=Path,required=True) +p.add_argument('--fixture',type=Path,required=True) +p.add_argument('--output',type=Path,required=True) +p.add_argument('--repeats',type=int,default=3) +a=p.parse_args();source=a.source.resolve();sys.path.insert(0,str(source)) +from tools.standards_engine.standards_engine import AgentToolFacade + +def rss(pid): + try: + rows=Path(f'/proc/{pid}/status').read_text().splitlines() + return int(next(row.split()[1] for row in rows if row.startswith('VmRSS:')))*1024 + except (OSError,StopIteration,ValueError):return None + +rows=[] +with tempfile.TemporaryDirectory(prefix='mcp-process-measurement-') as tmp: + root=Path(tmp)/'repository' + subprocess.run(['git','clone','--quiet','--no-hardlinks',str(a.fixture.resolve()),str(root)],check=True) + subprocess.run(['git','-C',str(root),'checkout','--quiet','-B','main','b81a5aae'],check=True) + with AgentToolFacade.open_repository(root,purpose='authoring') as f: + created=f.create_snapshot({'kind':'create-snapshot'}) + assert created['kind']=='create-snapshot-result',created + snapshot=created['snapshot']['snapshot'] + for repeat in range(a.repeats): + startup=time.perf_counter() + with tempfile.TemporaryFile(mode='w+t') as errors: + process=subprocess.Popen([sys.executable,'-P','-m','tools.standards_engine.standards_engine.mcp','--repo-root',str(root),'--purpose','authoring'],cwd=tmp,env={**os.environ,'PYTHONPATH':str(source)},stdin=subprocess.PIPE,stdout=subprocess.PIPE,stderr=errors,text=True) + def send(method,params=None,number=1): + process.stdin.write(json.dumps({'jsonrpc':'2.0','id':number,'method':method,'params':params or {}})+'\n');process.stdin.flush() + line=process.stdout.readline() + if not line: + errors.seek(0);raise RuntimeError('MCP closed without a response: '+errors.read()) + response=json.loads(line) + assert 'result' in response,response + return response['result'] + try: + send('initialize',{'protocolVersion':'2025-11-25','capabilities':{},'clientInfo':{'name':'performance-measurement','version':'1'}}) + rows.append({'repeat':repeat,'operation':'process_initialize','seconds':time.perf_counter()-startup,'rss_bytes':rss(process.pid)}) + process.stdin.write(json.dumps({'jsonrpc':'2.0','method':'notifications/initialized'})+'\n');process.stdin.flush() + for label,target in [('read_cold','core'),('read_warm','core'),('read_other','workflow.planning'),('read_warm_again','core')]: + start=time.perf_counter();value=send('tools/call',{'name':'read','arguments':{'snapshot':snapshot,'target':target}}) + assert not value['isError'],value + assert value['structuredContent']['snapshot']==snapshot + rows.append({'repeat':repeat,'operation':label,'seconds':time.perf_counter()-start,'rss_bytes':rss(process.pid)}) + process.stdin.close();process.wait(timeout=30) + assert process.returncode==0,process.returncode + finally: + if process.poll() is None:process.terminate();process.wait(timeout=30) + process.stdout.close() +a.output.write_text(json.dumps({'source':str(source),'python':sys.version,'observations':rows},indent=2)+'\n') +for label in dict.fromkeys(row['operation'] for row in rows): + values=[row for row in rows if row['operation']==label] + print(label,round(median(x['seconds'] for x in values),5), 'RSS',median(x['rss_bytes'] for x in values)) diff --git a/docs/plans/purpose-separated-standards-engine/reports/performance-process-reuse/source-binding.json b/docs/plans/purpose-separated-standards-engine/reports/performance-process-reuse/source-binding.json new file mode 100644 index 00000000..04761af0 --- /dev/null +++ b/docs/plans/purpose-separated-standards-engine/reports/performance-process-reuse/source-binding.json @@ -0,0 +1,14 @@ +{ + "base_commit": "b81a5aae2eb72fb976b0570a4dab76d30e531fe4", + "base_tree": "3dee4d4cfe2e1a16c6a442557f6f7609ada416ff", + "final_focused_qualification_commit": "0df48da8ceb9d461e1cac7be21c5a4e0b8ca97b6", + "files_sha256": { + "tools/standards_engine/standards_engine/tools.py": "2f38454dfebd1bd5813f380f093c97a3cca584be8de2db9a3482ce0dec9a761c", + "tools/standards_engine/standards_engine/mcp.py": "648cb500ff3a53aaa95793768d254395528157178d7ebbab4dc33fd40ae78b98", + "tools/standards_engine/standards_engine/engine.py": "6a57f1f1b179cbe85c4491d8fcf8baabc25c1c3587261973067fbaa800d49f7e", + "tools/standards_engine/standards_engine/compiled_cache.py": "834629773d98efb9dbc8461c9926eb58851b9ab5ebfa94938a08d410ce2d02a5", + "tools/standards_engine/tests/test_process_reuse.py": "13880c3f3fb9ae476037f3ccc7ebe63a71b20dbf00c486ce9adaf47040e6e6aa" + }, + "python_3_11_grammar": "passed; this is not Python 3.11 execution", + "scope": "Private disposable candidate main. Exact production and new regression hashes match the delivered source." +} diff --git a/docs/plans/purpose-separated-standards-engine/reports/performance-process-reuse/structural.json b/docs/plans/purpose-separated-standards-engine/reports/performance-process-reuse/structural.json new file mode 100644 index 00000000..e7a47c71 --- /dev/null +++ b/docs/plans/purpose-separated-standards-engine/reports/performance-process-reuse/structural.json @@ -0,0 +1,11 @@ +{ + "kind": "verify-repository-result", + "refreshed_verification_inputs": true, + "verification": { + "passed": true, + "exit_code": 0, + "suites": 73, + "checks": 121, + "failures": [] + } +} diff --git a/docs/plans/purpose-separated-standards-engine/reports/performance-process-reuse/support.json b/docs/plans/purpose-separated-standards-engine/reports/performance-process-reuse/support.json new file mode 100644 index 00000000..8fcfdbd9 --- /dev/null +++ b/docs/plans/purpose-separated-standards-engine/reports/performance-process-reuse/support.json @@ -0,0 +1,79 @@ +[ + { + "package": "graph_engine", + "returncode": 0, + "seconds": 0.2713069240001005, + "tests": 37, + "skipped": 0 + }, + { + "package": "repository_git", + "returncode": 0, + "seconds": 1.4816052880000825, + "tests": 16, + "skipped": 0 + }, + { + "package": "standards_analysis", + "returncode": 0, + "seconds": 1.2024484620001203, + "tests": 100, + "skipped": 0 + }, + { + "package": "standards_applicability", + "returncode": 0, + "seconds": 0.06562526700008675, + "tests": 12, + "skipped": 0 + }, + { + "package": "standards_contracts", + "returncode": 0, + "seconds": 23.717944660000057, + "tests": 23, + "skipped": 1 + }, + { + "package": "standards_graph", + "returncode": 0, + "seconds": 0.16668000899994695, + "tests": 2, + "skipped": 0 + }, + { + "package": "standards_identity", + "returncode": 0, + "seconds": 0.18750458500016975, + "tests": 16, + "skipped": 0 + }, + { + "package": "standards_metadata", + "returncode": 0, + "seconds": 0.7032010290001836, + "tests": 31, + "skipped": 0 + }, + { + "package": "standards_policy_impact", + "returncode": 0, + "seconds": 0.4470718279999346, + "tests": 10, + "skipped": 0 + }, + { + "package": "standards_snapshots", + "returncode": 0, + "seconds": 0.13230375700004515, + "tests": 23, + "skipped": 0 + }, + { + "package": "standards_verifier", + "returncode": 0, + "seconds": 4.424347185999977, + "tests": 168, + "skipped": 0 + } +] diff --git a/docs/plans/purpose-separated-standards-engine/reports/performance-process-reuse/validate_warm_recovery.py b/docs/plans/purpose-separated-standards-engine/reports/performance-process-reuse/validate_warm_recovery.py new file mode 100644 index 00000000..f99387c9 --- /dev/null +++ b/docs/plans/purpose-separated-standards-engine/reports/performance-process-reuse/validate_warm_recovery.py @@ -0,0 +1,41 @@ +"""Run the unchanged real recovery scenario with a new cache per Engine owner.""" +from __future__ import annotations +import argparse +import json +from pathlib import Path +import sys +import time +from unittest.mock import patch + +parser = argparse.ArgumentParser() +parser.add_argument('--source', type=Path, required=True) +parser.add_argument('--output', type=Path, required=True) +args = parser.parse_args() +sys.path.insert(0, str(args.source.resolve())) +from tools.standards_engine.standards_engine import StandardsEngine +from tools.standards_engine.standards_engine.compiled_cache import CompiledSnapshotCache +from tools.standards_engine.tests.test_coverage_publication import EngineAuditPublicationTest + +original = StandardsEngine.open_repository +caches = [] +def opened(root, **kwargs): + cache = CompiledSnapshotCache(Path(root), kwargs['purpose']) + caches.append(cache) + return original(root, compiled_cache=cache, **kwargs) + +start = time.perf_counter() +try: + with patch.object(StandardsEngine, 'open_repository', side_effect=opened): + case = EngineAuditPublicationTest('test_review_verify_apply_recover_and_read_without_original_database') + case.test_review_verify_apply_recover_and_read_without_original_database() + assert len(caches) == 2, len(caches) + assert caches[0].statistics['hits'] > 0, caches[0].statistics + result = {'outcome': 'passed', 'seconds': time.perf_counter() - start, + 'scenario': case.id(), 'caches_before_close': [cache.statistics for cache in caches], + 'scope': 'Original assertions unchanged; first Engine warms through review, live-evidence rejection, interrupted apply and recovery. Second Engine uses a fresh cache and independent database.'} +finally: + for cache in caches: + cache.close() +result['caches_after_close'] = [cache.statistics for cache in caches] +args.output.write_text(json.dumps(result, indent=2) + '\n') +print(json.dumps(result, indent=2)) diff --git a/docs/plans/purpose-separated-standards-engine/reports/performance-process-reuse/verification.json b/docs/plans/purpose-separated-standards-engine/reports/performance-process-reuse/verification.json new file mode 100644 index 00000000..d06ea559 --- /dev/null +++ b/docs/plans/purpose-separated-standards-engine/reports/performance-process-reuse/verification.json @@ -0,0 +1,141 @@ +{ + "engine_full_run": { + "tests": 199, + "returncode": 0, + "unittest_seconds": 497.8, + "scope": "Complete serial Engine discovery, before final conservative unknown-Mapping rejection and expanded byte-pressure subcases." + }, + "final_new_module_rerun": { + "tests": 21, + "returncode": 0, + "unittest_seconds": 73.844, + "scope": "All new regressions after the final accounting tightening and byte-pressure cases; original full-run assertions are retained." + }, + "supporting_packages": [ + { + "package": "graph_engine", + "returncode": 0, + "seconds": 0.2713069240001005, + "tests": 37, + "skipped": 0 + }, + { + "package": "repository_git", + "returncode": 0, + "seconds": 1.4816052880000825, + "tests": 16, + "skipped": 0 + }, + { + "package": "standards_analysis", + "returncode": 0, + "seconds": 1.2024484620001203, + "tests": 100, + "skipped": 0 + }, + { + "package": "standards_applicability", + "returncode": 0, + "seconds": 0.06562526700008675, + "tests": 12, + "skipped": 0 + }, + { + "package": "standards_contracts", + "returncode": 0, + "seconds": 23.717944660000057, + "tests": 23, + "skipped": 1 + }, + { + "package": "standards_graph", + "returncode": 0, + "seconds": 0.16668000899994695, + "tests": 2, + "skipped": 0 + }, + { + "package": "standards_identity", + "returncode": 0, + "seconds": 0.18750458500016975, + "tests": 16, + "skipped": 0 + }, + { + "package": "standards_metadata", + "returncode": 0, + "seconds": 0.7032010290001836, + "tests": 31, + "skipped": 0 + }, + { + "package": "standards_policy_impact", + "returncode": 0, + "seconds": 0.4470718279999346, + "tests": 10, + "skipped": 0 + }, + { + "package": "standards_snapshots", + "returncode": 0, + "seconds": 0.13230375700004515, + "tests": 23, + "skipped": 0 + }, + { + "package": "standards_verifier", + "returncode": 0, + "seconds": 4.424347185999977, + "tests": 168, + "skipped": 0 + } + ], + "distinct_tests_with_successful_evidence": 637, + "passed": 636, + "skipped": 1, + "independent_implementation_review": "not performed", + "official_sdk_and_configured_client": "not present; real raw MCP stdio tested", + "qualification_limit": "Python 3.13.5, not declared supported 3.11/3.12; rpds-py 2026.5.1 differs from 2026.6.3 pin.", + "warm_recovery_validation": { + "outcome": "passed", + "seconds": 34.65131413100016, + "scenario": "tools.standards_engine.tests.test_coverage_publication.EngineAuditPublicationTest.test_review_verify_apply_recover_and_read_without_original_database", + "caches_before_close": [ + { + "entries": 1, + "accounted_bytes": 6476032, + "hits": 10, + "misses": 1, + "evictions": 0, + "uncached": 0 + }, + { + "entries": 1, + "accounted_bytes": 6488242, + "hits": 0, + "misses": 1, + "evictions": 0, + "uncached": 0 + } + ], + "scope": "Original assertions unchanged; first Engine warms through review, live-evidence rejection, interrupted apply and recovery. Second Engine uses a fresh cache and independent database.", + "caches_after_close": [ + { + "entries": 0, + "accounted_bytes": 0, + "hits": 10, + "misses": 1, + "evictions": 0, + "uncached": 0 + }, + { + "entries": 0, + "accounted_bytes": 0, + "hits": 0, + "misses": 1, + "evictions": 0, + "uncached": 0 + } + ] + } +} diff --git a/docs/plans/purpose-separated-standards-engine/reports/performance-process-reuse/warm-recovery.json b/docs/plans/purpose-separated-standards-engine/reports/performance-process-reuse/warm-recovery.json new file mode 100644 index 00000000..1aad2def --- /dev/null +++ b/docs/plans/purpose-separated-standards-engine/reports/performance-process-reuse/warm-recovery.json @@ -0,0 +1,42 @@ +{ + "outcome": "passed", + "seconds": 34.65131413100016, + "scenario": "tools.standards_engine.tests.test_coverage_publication.EngineAuditPublicationTest.test_review_verify_apply_recover_and_read_without_original_database", + "caches_before_close": [ + { + "entries": 1, + "accounted_bytes": 6476032, + "hits": 10, + "misses": 1, + "evictions": 0, + "uncached": 0 + }, + { + "entries": 1, + "accounted_bytes": 6488242, + "hits": 0, + "misses": 1, + "evictions": 0, + "uncached": 0 + } + ], + "scope": "Original assertions unchanged; first Engine warms through review, live-evidence rejection, interrupted apply and recovery. Second Engine uses a fresh cache and independent database.", + "caches_after_close": [ + { + "entries": 0, + "accounted_bytes": 0, + "hits": 10, + "misses": 1, + "evictions": 0, + "uncached": 0 + }, + { + "entries": 0, + "accounted_bytes": 0, + "hits": 0, + "misses": 1, + "evictions": 0, + "uncached": 0 + } + ] +} diff --git a/evaluation/standards-effectiveness/generated/suite-inputs.json b/evaluation/standards-effectiveness/generated/suite-inputs.json index 4eecfa8e..3daa4b04 100644 --- a/evaluation/standards-effectiveness/generated/suite-inputs.json +++ b/evaluation/standards-effectiveness/generated/suite-inputs.json @@ -7052,6 +7052,18 @@ } ] }, + { + "digest": "sha256:834629773d98efb9dbc8461c9926eb58851b9ab5ebfa94938a08d410ce2d02a5", + "path": "tools/standards_engine/standards_engine/compiled_cache.py", + "state": "present", + "uses": [ + { + "check": "python-package-contract", + "role": "package-contract-input", + "suite": "a1c-public-cutover" + } + ] + }, { "digest": "sha256:e25b0bbce6c5cb76359221cb7e8430e68e3de1dbb7e6f2883fe3b463eff87dfb", "path": "tools/standards_engine/standards_engine/context_projection.py", @@ -7065,7 +7077,7 @@ ] }, { - "digest": "sha256:1c40aeafc3b247b8acded59b4b9fd9bb99c8eb00d59b795f8b60cce03243a196", + "digest": "sha256:6a57f1f1b179cbe85c4491d8fcf8baabc25c1c3587261973067fbaa800d49f7e", "path": "tools/standards_engine/standards_engine/engine.py", "state": "present", "uses": [ @@ -7111,7 +7123,7 @@ ] }, { - "digest": "sha256:7ceec1b5fa21922a8d7b3b8d87f7e351488b3393978bcb7d7518c01516c07872", + "digest": "sha256:648cb500ff3a53aaa95793768d254395528157178d7ebbab4dc33fd40ae78b98", "path": "tools/standards_engine/standards_engine/mcp.py", "state": "present", "uses": [ @@ -7188,7 +7200,7 @@ ] }, { - "digest": "sha256:dc4e3add4b93dfb2de4c32aca3c838793cdb18eb49d0a953082cae1dcae57c0c", + "digest": "sha256:2f38454dfebd1bd5813f380f093c97a3cca584be8de2db9a3482ce0dec9a761c", "path": "tools/standards_engine/standards_engine/tools.py", "state": "present", "uses": [ @@ -13278,7 +13290,7 @@ "path": "evaluation/standards-effectiveness/suite-registry.toml" }, "repository_index": { - "digest": "sha256:bf9f20d938b0c75ce9db7c9bdac20e05556c915212bc850af729a7c75925d6d2", + "digest": "sha256:a301a2bc291c9a2551880e81593ef48f17b08d62808bec7d669b96b1e881b283", "uses": [ { "check": "python-package-contract", diff --git a/tools/standards_engine/PURPOSE-SEPARATION.md b/tools/standards_engine/PURPOSE-SEPARATION.md index e30c6663..fe92a159 100644 --- a/tools/standards_engine/PURPOSE-SEPARATION.md +++ b/tools/standards_engine/PURPOSE-SEPARATION.md @@ -82,8 +82,55 @@ re-entry constructs its own scope, and public request shapes remain unchanged. Each subsequent operation loads and verifies its own captured bytes. Publication verification, target compare-and-swap and recovery obtain fresh observations; no operation-local material crosses those barriers as permission or readiness. -The MCP/facade/SQLite lifetime remains per call. There is no cross-call compiled -cache, persistent derived cache, or alternate identity format in this increment. +Each facade/Engine/SQLite lifetime remains per call. MCP now owns the installed +interface and a bounded cache of pure snapshot compilation as described below. +Operation-local proposal state, evaluations and permissions remain per-call. + +## Process-owned pure reuse + +The MCP server compiles its installed API interface once. Discovery and invocation +consume that same contract, and every request still uses the complete generated +decoder and current purpose-qualified result checks. The interface describes the +installed implementation, not the accepted standards revision. Replacing Engine +code or its API schema requires a controlled process restart. Ordinary standards +publication keeps the installed interface valid. Standalone facades prepare their +own interface unless their trusted owner supplies an already prepared one. + +One MCP process also owns a repository/purpose-scoped compilation cache with a +two-entry and 32 MiB accounted-retention limit. Keys contain the exact verified +captured paths, bytes and source revision, plus the installed compiler function. +Python dictionary equality distinguishes hash collisions. Each new operation +opens and validates its store, checks snapshot lifecycle and verifies complete +content identity before lookup. Missing, quarantined, purged, replaced or corrupt +storage therefore remains observable. Equal verified inputs may share pure +compilation even when obtained from distinct store roots; store-specific handles, +access checks and result envelopes remain fresh. No store facts enter the cache. + +Successful full compilation is eligible for retention. The cache has no negative +entries, response objects, live authorization/provider outcomes, mutable proposal +heads, readiness or publication outcomes. Snapshot-bound attestations and exposure +declarations remain part of that historical material; they grant no new access. +Eviction, oversized inputs and entries whose retained size cannot be established use the normal verified computation. The accounting +walk charges reachable Python data once per entry, includes captured bytes and +mapping tables, and conservatively charges inter-entry sharing separately. It +materializes pathlib value caches before accounting. Imported implementation +code and bounded LRU bookkeeping are separate from the per-entry budget. The +budget is not a process-RSS or transient-working-memory limit. + +Capture always resolves accepted main and runs both independent live/frozen +compiler passes and closure checks. Neither pass consults the cache. A later +explicit read may reuse only a compilation of its own fully verified capture. +Advancing main affects new captures; historical snapshots preserve their captured +material. Publication candidate verification and recovery keep their existing +fresh observations. Each new process starts empty and reconstructs correctly. + +The transport retains serial dispatch and opens/closes a fresh facade and SQLite +connection for each call. Pure cached structures are read-only through their +owned interfaces; each response and continuation is newly constructed. The cache +is not a thread-safety guarantee for concurrent use of one Engine. Independent +server processes retain separate fixed-purpose resources. Stream EOF or failure +releases the server-owned interface, catalog and cache; closing a borrowing Engine +closes its store without releasing the owner's cache. ## Application qualification diff --git a/tools/standards_engine/standards_engine/compiled_cache.py b/tools/standards_engine/standards_engine/compiled_cache.py new file mode 100644 index 00000000..4ee20fb4 --- /dev/null +++ b/tools/standards_engine/standards_engine/compiled_cache.py @@ -0,0 +1,175 @@ +"""Bounded pure compilation reuse after the caller verifies captured content. + +An MCP process owns one cache for its repository, purpose and installed code. +Its serial calls borrow results; stores, handles, decisions and responses remain +per-call. Capacity overflow changes only whether the result is retained. +""" +from __future__ import annotations + +from collections import OrderedDict +from collections.abc import Callable, Mapping +from enum import Enum +from pathlib import Path, PurePath +import re +import sys +from types import FunctionType, MappingProxyType +from typing import TYPE_CHECKING + +from tools.standards_metadata.standards_metadata import FrozenContentSource +from tools.standards_snapshots.standards_snapshots import CapturedContent + +from .context_projection import Purpose + +if TYPE_CHECKING: + from .engine import CompiledSnapshot + + +class CompiledSnapshotCache: + """Retain at most a representative base/proposed pair for one serial owner. + + A key contains the exact *already verified* capture and compiler callable. + Equality includes bytes, paths and source revision; a Python hash collision + cannot identify different material. No snapshot lifecycle or access decision + is stored here. Each caller performs its complete durable read first. + """ + + def __init__( + self, root: Path, purpose: Purpose | str, *, + max_entries: int = 2, max_bytes: int = 32 * 1024 * 1024, + ) -> None: + if any(type(value) is not int or value < 0 for value in (max_entries, max_bytes)): + raise ValueError("Compilation cache bounds must be nonnegative integers.") + self._root = root.resolve() + self._purpose = Purpose(purpose) + self._max_entries = max_entries + self._max_bytes = max_bytes + self._entries: OrderedDict[ + tuple[CapturedContent, Callable], tuple[CompiledSnapshot, int] + ] = OrderedDict() + self._bytes = 0 + self._closed = False + self._hits = self._misses = self._evictions = self._uncached = 0 + + def require_scope(self, root: Path, purpose: Purpose | str) -> None: + if self._closed: + raise ValueError("Compilation cache is closed.") + if root.resolve() != self._root or Purpose(purpose) is not self._purpose: + raise ValueError("Compilation cache belongs to another repository or purpose.") + + def compile_verified( + self, capture: CapturedContent, + compiler: Callable[[FrozenContentSource], CompiledSnapshot], + ) -> CompiledSnapshot: + if self._closed: + raise ValueError("Compilation cache is closed.") + # Stateful or closure-based compiler adapters remain valid cold callers. + # Retention is reserved for the installed, stateless compiler function. + if not isinstance(compiler, FunctionType) or compiler.__closure__: + self._misses += 1 + self._uncached += 1 + return compiler(FrozenContentSource( + (str(item.path), item.content) for item in capture.files + )) + key = (capture, compiler) + existing = self._entries.get(key) + if existing is not None: + self._hits += 1 + self._entries.move_to_end(key) + return existing[0] + self._misses += 1 + result = compiler(FrozenContentSource( + (str(item.path), item.content) for item in capture.files + )) + size = ( + _retained_size((key, result), self._max_bytes) + if self._max_entries and self._max_bytes else None + ) + if size is None: + self._uncached += 1 + return result + while self._entries and ( + len(self._entries) >= self._max_entries or self._bytes + size > self._max_bytes + ): + _, (_, removed_size) = self._entries.popitem(last=False) + self._bytes -= removed_size + self._evictions += 1 + self._entries[key] = (result, size) + self._bytes += size + return result + + @property + def statistics(self) -> dict[str, int]: + """Diagnostics for owned entries, distinct from transient or RSS memory.""" + return { + "entries": len(self._entries), "accounted_bytes": self._bytes, + "hits": self._hits, "misses": self._misses, + "evictions": self._evictions, "uncached": self._uncached, + } + + def close(self) -> None: + self._entries.clear() + self._bytes = 0 + self._closed = True + + +def _retained_size(root: object, limit: int) -> int | None: + """Conservatively charge the reachable data graph once per entry. + + sys.getsizeof includes Python container/native pattern storage. Mapping + proxies additionally charge a same-population dictionary table. Shared data + between entries is charged independently, so accounting may overestimate. + Imported classes/functions are implementation state, not entry-owned data. + Unknown native objects or closures make an entry ineligible for retention. + The bounded LRU bookkeeping and active-operation memory are separate. + """ + pending = [root] + seen: set[int] = set() + total = 0 + while pending: + value = pending.pop() + identity = id(value) + if identity in seen: + continue + seen.add(identity) + if isinstance(value, type): + continue + if isinstance(value, FunctionType): + if value.__closure__: + return None + continue + total += sys.getsizeof(value) + if total > limit: + return None + if value is None or type(value) in (bool, int, float, str, bytes): + continue + if isinstance(value, Enum): + pending.append(value.value) + elif isinstance(value, Mapping): + if isinstance(value, MappingProxyType): + # Owned compiler models construct these from ordinary dictionaries. + total += sys.getsizeof(dict.fromkeys(value)) + elif type(value) is not dict: + # The Mapping protocol does not describe its backing allocation. + return None + pending.extend(value.keys()) + pending.extend(value.values()) + elif isinstance(value, (tuple, list, set, frozenset)): + pending.extend(value) + elif isinstance(value, re.Pattern): + pending.append(value.pattern) + elif isinstance(value, PurePath) or type(value).__module__.startswith("tools."): + if isinstance(value, PurePath): + # Materialize pathlib's lazy value caches before charging slots. + str(value), value.parts, hash(value) + if hasattr(value, "__dict__"): + pending.append(vars(value)) + for cls in type(value).__mro__: + slots = cls.__dict__.get("__slots__", ()) + if isinstance(slots, str): + slots = (slots,) + for slot in slots: + if slot not in ("__dict__", "__weakref__") and hasattr(value, slot): + pending.append(getattr(value, slot)) + else: + return None + return total if total <= limit else None diff --git a/tools/standards_engine/standards_engine/engine.py b/tools/standards_engine/standards_engine/engine.py index 9dff5bcf..806a8e4f 100644 --- a/tools/standards_engine/standards_engine/engine.py +++ b/tools/standards_engine/standards_engine/engine.py @@ -220,6 +220,7 @@ ) from .navigation_indexes import NavigationIndex from .operation_materials import ProposalMaterials +from .compiled_cache import CompiledSnapshotCache from .context_projection import Purpose, public_operation @@ -443,8 +444,12 @@ def __init__( purpose: Purpose | str, execution_context: AnalysisExecutionContext | None = None, temporary_store: tempfile.TemporaryDirectory[str] | None = None, + compiled_cache: CompiledSnapshotCache | None = None, ) -> None: self._purpose = Purpose(purpose) + if compiled_cache is not None: + compiled_cache.require_scope(repository.root, self._purpose) + self._compiled_cache = compiled_cache self._repository = repository self._snapshots = snapshots self._logical_authoring = LogicalAuthoringCompiler(self._compile) @@ -462,9 +467,12 @@ def open_repository( store_path: Path | None = None, purpose: Purpose | str, execution_context: AnalysisExecutionContext | None = None, + compiled_cache: CompiledSnapshotCache | None = None, ) -> StandardsEngine: selected_purpose = Purpose(purpose) selected_root = root.resolve() + if compiled_cache is not None: + compiled_cache.require_scope(selected_root, selected_purpose) temporary = None if store_path is None: if durable: @@ -478,6 +486,7 @@ def open_repository( purpose=selected_purpose, execution_context=execution_context, temporary_store=temporary, + compiled_cache=compiled_cache, ) @property @@ -1721,6 +1730,8 @@ def inspect(self, call: InspectCall) -> InspectionResult | RejectedResult: def _compiled_snapshot(self, snapshot: SnapshotId) -> CompiledSnapshot: capture = self._snapshots.load_content(snapshot) + if self._compiled_cache is not None: + return self._compiled_cache.compile_verified(capture, self._compile) return self._compile( FrozenContentSource( (str(item.path), item.content) for item in capture.files diff --git a/tools/standards_engine/standards_engine/mcp.py b/tools/standards_engine/standards_engine/mcp.py index c5ed45d8..afab5b21 100644 --- a/tools/standards_engine/standards_engine/mcp.py +++ b/tools/standards_engine/standards_engine/mcp.py @@ -8,18 +8,21 @@ import argparse from contextlib import redirect_stdout +from copy import deepcopy import json from pathlib import Path import sys import traceback from typing import TextIO +from tools.standards_contracts.standards_contracts import CompiledContracts + from .tools import AgentToolFacade +from .compiled_cache import CompiledSnapshotCache from .context_projection import Purpose, qualified_operations PROTOCOL_VERSION = "2025-11-25" -CONTRACT_PATH = "tools/standards_engine/contracts/generated/agent-tools.json" READ_ONLY_OPERATIONS = frozenset( { "workflow_status", @@ -123,8 +126,13 @@ def visit(value: object) -> None: return {**root, "$defs": selected} -def tool_catalog(root: Path, *, purpose: Purpose | str, advanced: bool = False) -> list[dict]: - contract = json.loads((root / CONTRACT_PATH).read_text(encoding="utf-8")) +def tool_catalog( + root: Path, *, purpose: Purpose | str, advanced: bool = False, + interface: CompiledContracts | None = None, +) -> list[dict]: + # Discovery and invocation share the same installed schema authority. + selected = interface if interface is not None else AgentToolFacade.load_interface(root) + contract = selected.project().agent_tools definitions = contract["$defs"] result = [] purpose = Purpose(purpose) @@ -209,8 +217,13 @@ def __init__(self, root: Path, *, purpose: Purpose | str, advanced: bool = False self.root = root.resolve() self._purpose = Purpose(purpose) self.advanced = advanced - self.tools = tool_catalog(self.root, purpose=self.purpose, advanced=advanced) + self._interface = AgentToolFacade.load_interface(self.root) + self.tools = tool_catalog( + self.root, purpose=self.purpose, advanced=advanced, interface=self._interface + ) self.names = {tool["name"] for tool in self.tools} + self._compiled_cache = CompiledSnapshotCache(self.root, self.purpose) + self._closed = False self.initialized = False self.ready = False @@ -218,6 +231,14 @@ def __init__(self, root: Path, *, purpose: Purpose | str, advanced: bool = False def purpose(self) -> Purpose: return self._purpose + def close(self) -> None: + """Release only process-owned pure resources; each call closes its store.""" + self._compiled_cache.close() + self._interface = None + self.tools.clear() + self.names.clear() + self._closed = True + def dispatch(self, message: object) -> dict | None: identifier = None try: @@ -255,6 +276,8 @@ def dispatch(self, message: object) -> dict | None: } def _request(self, method: str, params: dict) -> dict: + if self._closed: + raise ProtocolError(-32000, "The server is closed.") if method == "ping": return {} if method == "initialize": @@ -287,7 +310,7 @@ def _request(self, method: str, params: dict) -> dict: if method == "tools/list": if "cursor" in params: raise ProtocolError(-32602, "This catalog has no continuation cursor.") - return {"tools": self.tools} + return {"tools": deepcopy(self.tools)} if method != "tools/call": raise ProtocolError(-32601, "Method not found.") name = params.get("name") @@ -300,7 +323,10 @@ def _request(self, method: str, params: dict) -> dict: # Opening per call matches the reference transport and avoids keeping # store state alive across idle client sessions. No operation retries. with redirect_stdout(sys.stderr): - with AgentToolFacade.open_repository(self.root, purpose=self.purpose) as facade: + with AgentToolFacade.open_repository( + self.root, purpose=self.purpose, interface=self._interface, + compiled_cache=self._compiled_cache, + ) as facade: value = getattr(facade, name)(arguments) except Exception as error: if self.purpose is Purpose.APPLICATION: @@ -335,20 +361,23 @@ def _request(self, method: str, params: dict) -> dict: def serve(server: MCPServer, source: TextIO, destination: TextIO) -> None: - for line in source: - try: - message = json.loads(line) - except (ValueError, RecursionError): - response = { - "jsonrpc": "2.0", - "id": None, - "error": {"code": -32700, "message": "Invalid JSON."}, - } - else: - response = server.dispatch(message) - if response is not None: - destination.write(json.dumps(response) + "\n") - destination.flush() + try: + for line in source: + try: + message = json.loads(line) + except (ValueError, RecursionError): + response = { + "jsonrpc": "2.0", + "id": None, + "error": {"code": -32700, "message": "Invalid JSON."}, + } + else: + response = server.dispatch(message) + if response is not None: + destination.write(json.dumps(response) + "\n") + destination.flush() + finally: + server.close() def main() -> int: diff --git a/tools/standards_engine/standards_engine/tools.py b/tools/standards_engine/standards_engine/tools.py index b3fe4647..4bbe3861 100644 --- a/tools/standards_engine/standards_engine/tools.py +++ b/tools/standards_engine/standards_engine/tools.py @@ -32,6 +32,7 @@ from . import _generated_contract as generated_contract from ._generated_contract import decode_contract from .engine import StandardsEngine +from .compiled_cache import CompiledSnapshotCache from .context_projection import Purpose, application_rejection from ._generated_contract import ( MaintainEvidenceCall, @@ -147,7 +148,11 @@ def __init__(self, engine: StandardsEngine, contracts: CompiledContracts) -> Non } @classmethod - def open_repository(cls, root: Path, *, purpose: Purpose | str) -> AgentToolFacade: + def open_repository( + cls, root: Path, *, purpose: Purpose | str, + interface: CompiledContracts | None = None, + compiled_cache: CompiledSnapshotCache | None = None, + ) -> AgentToolFacade: repo_root = root.resolve() engine = StandardsEngine.open_repository( repo_root, @@ -155,13 +160,23 @@ def open_repository(cls, root: Path, *, purpose: Purpose | str) -> AgentToolFaca LocalAlwaysAllowAuthorizer(repo_root) ), purpose=purpose, + compiled_cache=compiled_cache, ) try: - return cls(engine, _contracts(repo_root)) + return cls(engine, interface if interface is not None else _contracts(repo_root)) except Exception: engine.close() raise + @staticmethod + def load_interface(root: Path) -> CompiledContracts: + """Prepare the installed API once for an owning server process. + + The caller owns the immutable implementation lifetime. Request decoding + and purpose-qualified projection remain per-call work. + """ + return _contracts(root.resolve()) + def close(self) -> None: self._engine.close() diff --git a/tools/standards_engine/tests/test_process_reuse.py b/tools/standards_engine/tests/test_process_reuse.py new file mode 100644 index 00000000..d748750e --- /dev/null +++ b/tools/standards_engine/tests/test_process_reuse.py @@ -0,0 +1,389 @@ +"""Real per-call stores with bounded pure compilation and installed API reuse.""" +from __future__ import annotations + +from copy import deepcopy +from contextlib import closing +import hashlib +import io +import json +from pathlib import Path +import sqlite3 +import os +import sys +import subprocess +import tempfile +import unittest +from unittest.mock import patch + +from tools.standards_contracts.standards_contracts import ContractError +from tools.standards_engine.standards_engine import AgentToolFacade, StandardsEngine +from tools.standards_engine.standards_engine import engine as engine_module +from tools.standards_engine.standards_engine import tools as tool_module +from tools.standards_engine.standards_engine.compiled_cache import ( + CompiledSnapshotCache, _retained_size, +) +from tools.standards_engine.standards_engine.mcp import MCPServer, serve +from tools.standards_engine.tests.test_agent_workflow import ( + prepare_repository, reference_change, +) +from tools.standards_engine.tests.test_mcp import initialize, request +from tools.standards_snapshots.standards_snapshots import CapturedContent, SnapshotId + +ROOT = Path(__file__).resolve().parents[3] + + +class ProcessReuseTest(unittest.TestCase): + @classmethod + def setUpClass(cls): + cls.fixture = tempfile.TemporaryDirectory(prefix="process-reuse-fixture-") + cls.root = Path(cls.fixture.name) / "repository" + prepare_repository(cls.root) + cls.interface = AgentToolFacade.load_interface(cls.root) + with AgentToolFacade.open_repository( + cls.root, purpose="authoring", interface=cls.interface, + ) as facade: + result = facade.create_snapshot({"kind": "create-snapshot"}) + assert result["kind"] == "create-snapshot-result", result + snapshot = SnapshotId(result["snapshot"]["snapshot"]["id"]) + cls.original_snapshot = result["snapshot"]["snapshot"] + cls.capture = facade._engine._snapshots.load_content(snapshot) + + @classmethod + def tearDownClass(cls): + cls.fixture.cleanup() + + def setUp(self): + self.temporary = tempfile.TemporaryDirectory(prefix="process-reuse-store-") + self.addCleanup(self.temporary.cleanup) + self.store = Path(self.temporary.name) / "store.sqlite3" + self.cache = CompiledSnapshotCache(self.root, "authoring") + self.addCleanup(self.cache.close) + self.engine = self.open_engine() + self.addCleanup(lambda: self.engine.close()) + summary = self.engine._snapshots.create_snapshot(self.capture) + self.snapshot = self.engine._snapshot_handle(summary.snapshot) + self.facade = AgentToolFacade(self.engine, self.interface) + + def open_engine(self, cache=None): + return StandardsEngine.open_repository( + self.root, purpose="authoring", store_path=self.store, + compiled_cache=self.cache if cache is None else cache, + execution_context=tool_module.AnalysisExecutionContext( + tool_module.LocalAlwaysAllowAuthorizer(self.root) + ), + ) + + def read(self, **options): + return self.facade.read({"snapshot": self.snapshot, "target": "core", **options}) + + def test_reuse_still_verifies_all_durable_content_each_call(self): + with ( + patch.object(self.engine._snapshots, "load_content", wraps=self.engine._snapshots.load_content) as load, + patch.object(engine_module, "compile_policy_impact", wraps=engine_module.compile_policy_impact) as compile, + ): + first = self.read() + second = self.read() + self.assertEqual(first, second) + self.assertEqual(load.call_count, 2) + self.assertEqual(compile.call_count, 1) + self.assertEqual(self.cache.statistics["hits"], 1) + self.assertGreater(self.cache.statistics["accounted_bytes"], 0) + self.assertLessEqual(self.cache.statistics["accounted_bytes"], 32 * 1024 * 1024) + + def test_closing_borrower_preserves_cache_and_reopens_real_store(self): + first = self.read() + self.engine.close() + self.engine = self.open_engine() + self.facade = AgentToolFacade(self.engine, self.interface) + with patch.object(engine_module, "compile_policy_impact", wraps=engine_module.compile_policy_impact) as compile: + second = self.read() + self.assertEqual(first, second) + compile.assert_not_called() + self.assertEqual(self.cache.statistics["entries"], 1) + + def test_quarantine_and_purge_override_warm_compilation(self): + self.read() + snapshot = SnapshotId(self.snapshot["id"]) + self.engine._snapshots.delete_snapshot(snapshot) + quarantined = self.read() + self.assertEqual(quarantined["kind"], "rejected-result", quarantined) + self.assertEqual(quarantined["outcome"], "unavailable") + deadline = self.engine._snapshots.snapshot(snapshot, include_quarantined=True).purge_deadline + with patch.object(self.engine._snapshots, "_now", return_value=deadline + 1): + purged = self.read() + self.assertEqual(purged["kind"], "rejected-result", purged) + self.assertEqual(self.cache.statistics["hits"], 0) + + def test_corruption_is_observed_before_cache_lookup(self): + self.read() + # Deliberately corrupt this disposable store, then restore its exact DDL. + with closing(sqlite3.connect(self.store)) as connection, connection: + trigger = connection.execute("SELECT sql FROM sqlite_schema WHERE name='content_files_no_update'").fetchone()[0] + connection.execute("DROP TRIGGER content_files_no_update") + connection.execute( + "UPDATE content_files SET raw_bytes=?, byte_length=?, sha256=? WHERE logical_path=?", + (b"corrupt", 7, hashlib.sha256(b"corrupt").hexdigest(), "CORE-STANDARDS.md"), + ) + connection.execute(trigger) + rejected = self.read() + self.assertEqual(rejected["code"], "SNAPSHOT.CONTENT_ID_MISMATCH", rejected) + self.assertEqual(self.cache.statistics["hits"], 0) + + def test_store_replacement_cannot_be_answered_from_cache(self): + self.read() + self.engine.close() + # Closed fixture store has no active borrowers or sidecar writes. + self.store.rename(self.store.with_suffix(".retained")) + self.engine = self.open_engine() + self.facade = AgentToolFacade(self.engine, self.interface) + missing = self.read() + self.assertEqual(missing["kind"], "rejected-result", missing) + self.assertEqual(missing["outcome"], "unavailable") + self.assertEqual(self.cache.statistics["hits"], 0) + + def test_new_process_owner_cold_rebuild_matches_retained_result(self): + first = self.read() + self.cache.close() + self.assertEqual(self.cache.statistics["entries"], 0) + self.engine.close() + self.cache = CompiledSnapshotCache(self.root, "authoring") + self.addCleanup(self.cache.close) + self.engine = self.open_engine() + self.facade = AgentToolFacade(self.engine, self.interface) + second = self.read() + self.assertEqual(first, second) + self.assertEqual(self.cache.statistics["misses"], 1) + + def test_responses_are_independent_of_retained_compilation(self): + first = self.read(detail="full") + expected = deepcopy(first) + first["requires"].append("invented") + first["related"].clear() + first["next_operations"].clear() + self.assertEqual(self.read(detail="full"), expected) + + def test_bounds_eviction_and_disabled_retention_preserve_results(self): + expected = self.read() + byte_pressure = self.cache.statistics["accounted_bytes"] * 3 // 2 + for entries, budget in ( + (0, 32 * 1024 * 1024), (2, 1), (1, 32 * 1024 * 1024), + (4, byte_pressure), + ): + with self.subTest(entries=entries, budget=budget): + cache = CompiledSnapshotCache(self.root, "authoring", max_entries=entries, max_bytes=budget) + try: + with self.open_engine(cache) as engine: + facade = AgentToolFacade(engine, self.interface) + self.assertEqual(facade.read({"snapshot": self.snapshot, "target": "core"}), expected) + different = CapturedContent("different-source-revision", self.capture.files) + other = engine._snapshots.create_snapshot(different) + facade.read({"snapshot": engine._snapshot_handle(other.snapshot), "target": "core"}) + self.assertEqual(facade.read({"snapshot": self.snapshot, "target": "core"}), expected) + self.assertLessEqual(cache.statistics["entries"], entries) + self.assertLessEqual(cache.statistics["accounted_bytes"], budget) + if entries in (1, 4): + self.assertEqual(cache.statistics["entries"], 1) + self.assertEqual(cache.statistics["evictions"], 2) + else: + self.assertEqual(cache.statistics["uncached"], 3) + finally: + cache.close() + + def test_unknown_size_and_invalid_bounds_have_explicit_dispositions(self): + from collections import UserDict + self.assertIsNone(_retained_size(object(), 1024)) + self.assertIsNone(_retained_size(UserDict({"owned": b"payload"}), 1024)) + for value in (-1, True, 1.5): + with self.assertRaises(ValueError): + CompiledSnapshotCache(self.root, "authoring", max_bytes=value) + + def test_stateful_compiler_is_computed_without_retaining_hidden_state(self): + calls = [] + def compiled(source): + calls.append(source) + return StandardsEngine._compile(source) + first = self.cache.compile_verified(self.capture, compiled) + second = self.cache.compile_verified(self.capture, compiled) + self.assertEqual(first.semantic_signature(), second.semantic_signature()) + self.assertEqual(len(calls), 2) + self.assertEqual(self.cache.statistics["entries"], 0) + + def test_real_stdio_restarts_read_the_same_retained_snapshot(self): + messages = [ + request("initialize", {"protocolVersion": "2025-11-25", "capabilities": {}, + "clientInfo": {"name": "cache-restart-fixture", "version": "1"}}), + {"jsonrpc": "2.0", "method": "notifications/initialized"}, + request("tools/call", {"name": "read", "arguments": {"snapshot": self.original_snapshot, "target": "core"}}, identifier=2), + request("tools/call", {"name": "read", "arguments": {"snapshot": self.original_snapshot, "target": "core"}}, identifier=3), + ] + observed = [] + for _ in range(2): + completed = subprocess.run( + [sys.executable, "-P", "-m", "tools.standards_engine.standards_engine.mcp", + "--repo-root", str(self.root), "--purpose", "authoring"], + input="".join(json.dumps(value) + "\n" for value in messages), text=True, + capture_output=True, check=True, timeout=60, cwd=self.temporary.name, + env={**os.environ, "PYTHONPATH": str(ROOT)}, + ) + responses = [json.loads(line) for line in completed.stdout.splitlines()] + reads = [row["result"] for row in responses if row["id"] in (2, 3)] + self.assertEqual(len(reads), 2) + self.assertFalse(any(row["isError"] for row in reads), reads) + self.assertEqual(reads[0], reads[1]) + observed.append(reads[0]) + self.assertEqual(observed[0], observed[1]) + self.assertEqual(observed[0]["structuredContent"]["snapshot"], self.original_snapshot) + + def test_repository_and_purpose_are_fixed_before_opening_store(self): + for root, purpose in ((self.root.parent, "authoring"), (self.root, "application")): + with self.assertRaisesRegex(ValueError, "another repository or purpose"): + StandardsEngine.open_repository(root, purpose=purpose, compiled_cache=self.cache) + + def test_compilation_failure_is_not_cached(self): + with patch.object(engine_module, "compile_policy_impact", side_effect=RuntimeError("failed compiler")): + with self.assertRaisesRegex(RuntimeError, "failed compiler"): + self.read() + self.assertEqual(self.cache.statistics["entries"], 0) + self.assertEqual(self.read()["kind"], "compact-read-result") + self.assertEqual(self.cache.statistics["misses"], 2) + + def test_warm_cache_preserves_independent_capture_passes(self): + self.read() + with patch.object(engine_module, "compile_policy_impact", wraps=engine_module.compile_policy_impact) as compile: + captured = self.facade.create_snapshot({"kind": "create-snapshot"}) + self.assertEqual(captured["kind"], "create-snapshot-result", captured) + self.assertEqual(compile.call_count, 2) + + def test_authorization_is_fresh_after_warming_proposal_base(self): + self.read() + change = reference_change(self.root, "warm-authority") + proposed = self.facade.propose({"snapshot": self.snapshot, "change_set": change}) + self.assertEqual(proposed.get("status"), "complete", proposed) + self.assertGreater(self.cache.statistics["hits"], 0) + authorize = self.engine._execution_context.authorization.authorize + calls = [] + def quarantine(request): + calls.append(request) + self.engine._snapshots.delete_snapshot(SnapshotId(self.snapshot["id"])) + return authorize(request) + # A review's current authority/lifecycle work remains outside the cache. + from tools.standards_engine.tests.test_agent_workflow import decisions + with patch.object(self.engine._execution_context.authorization, "authorize", side_effect=quarantine): + reviewed = self.facade.review({"context": proposed["context"], "decisions": decisions(self.root)}) + self.assertTrue(calls) + self.assertNotEqual(reviewed.get("status"), "ready", reviewed) + + +class InstalledInterfaceReuseTest(unittest.TestCase): + def test_one_interface_compile_per_server_and_fresh_call_validation(self): + with patch.object(tool_module, "_contracts", wraps=tool_module._contracts) as compiled: + server = MCPServer(ROOT, purpose="authoring") + self.addCleanup(server.close) + initialize(server) + for _ in range(2): + result = server.dispatch(request("tools/call", {"name": "read", "arguments": {"extra": True}}))["result"] + self.assertTrue(result["isError"]) + self.assertEqual(result["structuredContent"]["code"], "INTERFACE.INVALID_ARGUMENTS") + self.assertEqual(compiled.call_count, 1) + + def test_catalog_and_runtime_share_the_installed_interface(self): + with tempfile.TemporaryDirectory(prefix="interface-fixed-") as tmp: + root = Path(tmp) / "repository" + prepare_repository(root) + server = MCPServer(root, purpose="application") + self.addCleanup(server.close) + initialize(server) + # The running installation is fixed. A new startup must inspect new bytes. + schema = root / tool_module.INTERFACE_SCHEMA + schema.write_text("{}") + returned = server.dispatch(request("tools/list"))["result"]["tools"] + returned.clear() + self.assertTrue(server.dispatch(request("tools/list"))["result"]["tools"]) + bad = server.dispatch(request("tools/call", {"name": "read", "arguments": {"extra": True}}))["result"] + self.assertEqual(bad["structuredContent"]["code"], "APPLICATION.INPUT_INVALID") + self.assertNotIn("propose", server.names) + with self.assertRaises(ContractError): + MCPServer(root, purpose="application") + + def test_stream_eof_and_write_failure_release_process_resources(self): + for failing in (False, True): + server = MCPServer(ROOT, purpose="authoring") + if failing: + class FailedOutput(io.StringIO): + def write(self, value): + raise OSError("closed output") + with self.assertRaises(OSError): + serve(server, io.StringIO(json.dumps(request("ping")) + "\n"), FailedOutput()) + else: + serve(server, io.StringIO(""), io.StringIO()) + self.assertIsNone(server._interface) + self.assertEqual(server._compiled_cache.statistics["entries"], 0) + self.assertEqual(server.dispatch(request("ping"))["error"]["code"], -32000) + + def test_each_tool_call_opens_and_closes_its_own_facade(self): + server = MCPServer(ROOT, purpose="application") + self.addCleanup(server.close) + initialize(server) + opened = AgentToolFacade.open_repository + with patch.object(AgentToolFacade, "open_repository", wraps=opened) as calls: + for _ in range(2): + value = server.dispatch(request("tools/call", {"name": "read", "arguments": {"extra": True}})) + self.assertTrue(value["result"]["isError"]) + self.assertEqual(calls.call_count, 2) + for call in calls.call_args_list: + self.assertIs(call.kwargs["interface"], server._interface) + self.assertIs(call.kwargs["compiled_cache"], server._compiled_cache) + + def test_main_advancement_and_cold_historical_read_use_exact_captures(self): + from tools.standards_verifier.standards_verifier import suite_input_projection_bytes + with tempfile.TemporaryDirectory(prefix="cache-main-advance-") as tmp: + root = Path(tmp) / "repository" + prepare_repository(root) + for name, value in (("user.name", "Fixture"), ("user.email", "fixture@example.invalid"), ("commit.gpgsign", "false")): + subprocess.run(["git", "-C", str(root), "config", name, value], check=True) + interface = AgentToolFacade.load_interface(root) + cache = CompiledSnapshotCache(root, "authoring") + try: + with AgentToolFacade.open_repository(root, purpose="authoring", interface=interface, compiled_cache=cache) as facade: + first = facade.read({"target": "core"}) + self.assertEqual(first["kind"], "compact-read-result", first) + core = root / "CORE-STANDARDS.md" + core.write_text(core.read_text() + "\n\n") + manifest = root / "evaluation/standards-effectiveness/generated/suite-inputs.json" + manifest.write_bytes(suite_input_projection_bytes(root)) + subprocess.run(["git", "-C", str(root), "add", "CORE-STANDARDS.md", str(manifest.relative_to(root))], check=True) + subprocess.run(["git", "-C", str(root), "commit", "--quiet", "-m", "fixture: advance accepted main"], check=True) + with patch.object(engine_module, "compile_policy_impact", wraps=engine_module.compile_policy_impact) as compile: + captured = facade.create_snapshot({"kind": "create-snapshot"}) + self.assertEqual(captured["kind"], "create-snapshot-result", captured) + self.assertEqual(compile.call_count, 2) + newer = facade.read({"snapshot": captured["snapshot"]["snapshot"], "target": "core"}) + self.assertNotEqual(first["content"], newer["content"]) + self.assertEqual(facade.read({"snapshot": first["snapshot"], "target": "core"}), first) + finally: + cache.close() + # Cold code has no cache and the working-tree source is unavailable. + (root / "CORE-STANDARDS.md").unlink() + with AgentToolFacade.open_repository(root, purpose="authoring", interface=interface) as cold: + self.assertEqual(cold.read({"snapshot": first["snapshot"], "target": "core"}), first) + + def test_existing_publication_scenario_with_warm_purpose_isolated_caches(self): + # Reuse the unchanged assertions, not a second approximate workflow. + from tools.standards_engine.tests.test_supporting_workflow import SupportingWorkflowTest + case = SupportingWorkflowTest("test_coordinated_publication_and_provenance_only_revision") + SupportingWorkflowTest.setUpClass() + caches = [] + try: + for name, purpose in (("author", "authoring"), ("app", "application")): + getattr(case, name).close() + cache = CompiledSnapshotCache(case.root, purpose) + caches.append(cache) + setattr(SupportingWorkflowTest, name, AgentToolFacade.open_repository( + case.root, purpose=purpose, compiled_cache=cache, + )) + case.test_coordinated_publication_and_provenance_only_revision() + self.assertTrue(all(cache.statistics["hits"] > 0 for cache in caches)) + finally: + SupportingWorkflowTest.tearDownClass() + for cache in caches: + cache.close() From 0ad9ce9b1568090f24d73ef543095d84c329cbab Mon Sep 17 00:00:00 2001 From: MrScripty Date: Thu, 24 Sep 2026 10:42:04 -0700 Subject: [PATCH 14/26] perf(engine): batch capture reads and add grouped navigation --- .../reports/performance-capture-multiread.md | 230 +++++++++++++++++ .../admission.md | 54 ++++ .../capture-baseline.json | 66 +++++ .../capture-candidate.json | 66 +++++ .../comparison.csv | 4 + .../engine-qualification.json | 16 ++ .../environment.json | 18 ++ .../mcp-formatting.json | 6 + .../measure_capture.py | 108 ++++++++ .../measure_read_many.py | 166 +++++++++++++ .../multiread-stdio.json | 221 +++++++++++++++++ .../packages-qualification.json | 156 ++++++++++++ .../source-binding.json | 65 +++++ .../structural.json | 11 + .../verification.json | 107 ++++++++ .../generated/suite-inputs.json | 44 ++-- tools/repository_git/README.md | 41 +-- tools/repository_git/repository_git/batch.py | 233 ++++++++++++++++++ .../repository_git/repository.py | 193 ++++++++------- tools/repository_git/tests/test_batch.py | 192 +++++++++++++++ tools/repository_git/tests/test_repository.py | 11 +- tools/standards_engine/PURPOSE-SEPARATION.md | 29 ++- tools/standards_engine/README.md | 5 + tools/standards_engine/contracts/README.md | 14 ++ .../contracts/a1-contract.schema.json | 181 +++++++++++++- .../contracts/a1-interface.toml | 9 +- .../contracts/examples/a1-examples.json | 42 +++- .../contracts/generated/agent-tools.json | 193 ++++++++++++++- .../standards_engine/_generated_contract.py | 172 ++++++++++++- .../standards_engine/agent_navigation.py | 60 +++++ .../standards_engine/context_projection.py | 5 + .../standards_engine/engine.py | 13 + .../standards_engine/standards_engine/mcp.py | 4 + .../standards_engine/rendering.py | 5 +- .../standards_engine/tools.py | 6 + .../tests/codex_navigation_client.py | 7 + .../tests/mcp_workflow_client.py | 12 +- .../tests/test_purpose_projection.py | 2 +- .../tests/test_purpose_transport.py | 4 +- .../standards_engine/tests/test_read_many.py | 222 +++++++++++++++++ 40 files changed, 2847 insertions(+), 146 deletions(-) create mode 100644 docs/plans/purpose-separated-standards-engine/reports/performance-capture-multiread.md create mode 100644 docs/plans/purpose-separated-standards-engine/reports/performance-capture-multiread/admission.md create mode 100644 docs/plans/purpose-separated-standards-engine/reports/performance-capture-multiread/capture-baseline.json create mode 100644 docs/plans/purpose-separated-standards-engine/reports/performance-capture-multiread/capture-candidate.json create mode 100644 docs/plans/purpose-separated-standards-engine/reports/performance-capture-multiread/comparison.csv create mode 100644 docs/plans/purpose-separated-standards-engine/reports/performance-capture-multiread/engine-qualification.json create mode 100644 docs/plans/purpose-separated-standards-engine/reports/performance-capture-multiread/environment.json create mode 100644 docs/plans/purpose-separated-standards-engine/reports/performance-capture-multiread/mcp-formatting.json create mode 100644 docs/plans/purpose-separated-standards-engine/reports/performance-capture-multiread/measure_capture.py create mode 100644 docs/plans/purpose-separated-standards-engine/reports/performance-capture-multiread/measure_read_many.py create mode 100644 docs/plans/purpose-separated-standards-engine/reports/performance-capture-multiread/multiread-stdio.json create mode 100644 docs/plans/purpose-separated-standards-engine/reports/performance-capture-multiread/packages-qualification.json create mode 100644 docs/plans/purpose-separated-standards-engine/reports/performance-capture-multiread/source-binding.json create mode 100644 docs/plans/purpose-separated-standards-engine/reports/performance-capture-multiread/structural.json create mode 100644 docs/plans/purpose-separated-standards-engine/reports/performance-capture-multiread/verification.json create mode 100644 tools/repository_git/repository_git/batch.py create mode 100644 tools/repository_git/tests/test_batch.py create mode 100644 tools/standards_engine/tests/test_read_many.py diff --git a/docs/plans/purpose-separated-standards-engine/reports/performance-capture-multiread.md b/docs/plans/purpose-separated-standards-engine/reports/performance-capture-multiread.md new file mode 100644 index 00000000..2bdc5aae --- /dev/null +++ b/docs/plans/purpose-separated-standards-engine/reports/performance-capture-multiread.md @@ -0,0 +1,230 @@ +# Batched capture and bounded multi-read — implementation and evidence + +**Status:** implemented and locally verified. Supported installed qualification and +independent review remain separate. + +**Branch:** `implementation/purpose-separated-standards-engine` + +**Base:** `bac7dc3dc39fbf519429ea91bff1e02e65925299` + +**Implementation commit:** `3d92a78b` + +**Evidence date:** September 24, 2026. + +## Outcome and scope + +The user selected faster fresh capture and a grouped-read API from the consumer +performance investigation. The [admission](performance-capture-multiread/admission.md) +records the owner boundaries, scope, applicable standards and unchanged promises. +This increment implements those two changes. Proposal-projection caching, +selective compilation, decoder optimization, standards rewriting and test-runner +parallelism remain separate concerns. + +Repository Git owns the batch process, frame validation, decoded-tree reuse and +session cleanup. Engine navigation owns a bounded same-snapshot reading set. +Canonical Engine schemas own the interface shape, with regenerated native models, +tool definitions and examples. Existing purpose, store, snapshot, authorization, +publication and recovery owners retain their contracts. + +## Capture pipeline + +`RevisionReadSession` keeps one active `git cat-file --batch` child and reuses +verified object bytes and decoded immutable tree tables. Switching to an explicit +mapped repository closes the preceding child and opens the selected repository; +the cache key still includes repository, object ID, type and hash algorithm. +There is no global process or repository cache. + +Each object miss validates header framing, type, bounded declared size, complete +body framing and the actual object hash. Mode and path traversal checks remain +active on every file resolution. One-shot reads and the batch transport use the +same object-verification functions. A failed exchange closes its stream and does +not retry the operation. + +One pipe-exchange worker and one bounded stderr drain belong to the child. Each +exchange retains the existing Git command timeout, including pipe writes; it is +not a whole-capture deadline. Normal closure checks trailing output and exit, +then reaps the child and joins workers. Failure or caller interruption aborts the +owned process (its process group on POSIX), reaps it, and releases streams/workers. +These failure paths were exercised on Linux; Windows execution is not claimed. + +Raw object payload and decoded-tree allocations share the existing 8 MiB / +1,024-entry LRU budget. Tree tables are immutable views over validated built-in +structures, with conservative allocation accounting. Oversized tables remain +uncached and eviction changes cost only. The budget is not a total process-RSS or +transient-read-memory limit; existing individual object limits still apply. + +Accepted `main` is resolved once. Its exact revision supplies the recorded pass. +The session closes before the independent frozen compiler pass. Both requested +path closure and semantic signatures are compared before snapshot publication. +Old explicit snapshots continue reading captured bytes, independent of new main. + +## Multi-read interface + +Engine interface **32** adds `read_many` to the native facade, focused MCP catalog +and generated reference CLI. Other owned version domains remain unchanged. +Each request supplies an explicit snapshot and **1–32 ordered item specifications**. +Exact duplicate specifications reject. Each item has a target and optional detail; +authoring additionally permits the existing coverage/routing read options. + +```python +result = facade.read_many({ + "snapshot": snapshot, # The exact handle returned by route or read. + "items": [ + {"target": "core"}, + {"target": "workflow.implementation"}, + {"target": "workflow.verification", "detail": "full"}, + ], +}) +``` + +The entire ordered set succeeds or one bounded rejection returns. A failed item, +invalid option, unavailable dependency or lifecycle change returns no preceding +item content. Single-item projection and focused continuations are shared with +ordinary reads; the API does not expand the requested set automatically. + +The complete domain result is limited to **2 MiB under default JSON encoding** +(ASCII escaping and default separators). This includes the result envelope and +item values, but not protocol framing, pretty-printing or MCP's duplicated +structured/text encodings. Over-budget results reject without truncation; callers +can select fewer items or narrower policy scopes. + +One complete durable content and identity validation supplies the operation. +Snapshot lifecycle is observed before each item and before final return. Current +host purpose and ordinary exposure/dependency rules still govern every projection. +A new independent request performs its own full integrity check, even with a warm +compiled cache. This scope introduces no new cross-call cache or mutable session. + +`read_many` is a named operation, not a new `query`/`query_proposal` request variant. +It requires a snapshot rather than implicitly capturing main. Existing single-read +and capture semantics remain unchanged. Reconnect the client and restart the MCP +server to load the new interface; authoring focused discovery adds one tool and +application discovery adds the corresponding restricted variant. Official SDK and +configured-client harnesses were updated to exercise it. + +## Measured performance + +Capture compared baseline/candidate code against the same accepted fixture at +`bac7dc3d`: **437 files, 3,757,063 source bytes and a 4,530,176-byte temporary store**. +Three serial samples per implementation excluded fixture preparation and Engine +construction. Attribution counters ran separately from those timing samples. +Both implementations returned the exact same source revision and content ID: + +`snapshot-content:sha256:99a23add9dfa4f48711c1945dc0d133cf00dc44808f2ac9cfc00481690dc49f3` + +| Capture observation | Baseline | Candidate | +| --- | ---: | ---: | +| Median capture | 2.001 s | 0.661 s | +| Range | 1.981–2.233 s | 0.658–0.695 s | +| Git processes | 529 | 3 | +| `cat-file` processes | 527 | 1 | +| Tree parses | 3,872 | 89 | +| Full compiler passes | 2 | 2 | +| Logical source reads | 1,140 | 1,140 | +| Peak accounted session bytes | 3,793,805 | 4,007,360 | +| Peak retained object entries | 527 | 527 | +| Retained bytes/entries after close | 0 / 0 | 0 / 0 | + +Capture is **3.03x faster (67.0% less elapsed time)** in this comparison. Parsed +reuse accounts for approximately 209 KiB more retained session data; it remains +inside the existing budget. Full process memory was not measured. + +Multi-read used real MCP subprocesses and six selected real module bodies over +one synthetic qualified snapshot. The fixture has **437 files / 3,757,909 bytes**; +its approvals are benchmark-only records, not qualification of real standards. +Every comparison used the same snapshot, implementation, server, purpose and +ordered items. An initial explicit read warmed existing compilation. Five paired +comparisons per purpose alternated six-call/grouped-call ordering. + +| Actual warm stdio workload | Six separate reads | One `read_many` | Speedup | +| --- | ---: | ---: | ---: | +| Application purpose, median | 1.051 s | 0.183 s | 5.76x | +| Application range | 1.041–1.083 s | 0.177–0.219 s | — | +| Authoring purpose, median | 1.115 s | 0.249 s | 4.47x | +| Authoring range | 1.099–1.151 s | 0.240–0.266 s | — | +| Complete durable loads, each purpose | 6 | 1 | — | + +All ordered item values matched exactly. Structured MCP content and its text JSON +were independently compared. The selected item payload is about 93–94 KB. This is +the completed public API, not the earlier experimental kernel. Capture/init and +model tool-selection latency are outside the grouped-read timings. Sample counts +support medians/ranges, not p95/p99 or an installed-client/full-suite speed claim. +Baseline and candidate use identical executable bytes and dependency versions; +local configuration limits are recorded below. + +[Comparison CSV](performance-capture-multiread/comparison.csv), +[capture baseline](performance-capture-multiread/capture-baseline.json), +[capture candidate](performance-capture-multiread/capture-candidate.json) and +[multi-read observations](performance-capture-multiread/multiread-stdio.json) +retain exact inputs, counts and observations. Inclusive work is not added twice. + +## Correctness evidence + +The full serial Engine discovery run passed **211 tests**. Eleven supporting +package suites ran **450 tests: 449 passed and one existing interpreter-dependent +skip**. Combined, this is **661 tests run, 660 passed and one skipped**. +The Engine runner itself was serial; supporting suites used a separate process +during its early execution. These are correctness results, not paired suite-speed +measurements. + +Twelve new Repository Git tests cover fragmented binary frames, one-process reuse, +missing/type/size/truncation/hash failures, oversized stderr, exchange/shutdown +timeouts, nonzero exit, startup failure, caller interruption, tree reuse, bounds +and cleanup. Existing real Git SHA-256, corruption, gitlink and cache cases remain. + +Twelve new Engine tests cover ordered equality and one durable load, all existing +single-read result kinds, 1/32 limits, duplicate/invalid/privileged input, hidden +items and whole-request rejection, exact result-budget boundaries, quarantine +between items and after the final item, warm-cache corruption, cold reopening, +purpose-specific schema discovery, and actual CLI/two-fresh-MCP-process output. +Existing publication, authorization, main advancement, independent replay and +cold-recovery tests passed without relaxing assertions or changing capture. + +After the full run, one MCP set-literal formatting correction preserved its parsed +AST. All **13 MCP tests and 12 multi-read tests** then passed against that exact +final code in the qualified disposable candidate context. A trial rerun from the +source checkout encountered `SUPPORT.UNSUPPORTED_CAPTURE` because its preserved +accepted main still has the older contract. The corrected rerun used the documented +disposable candidate main; production capture was not changed to accommodate it. + +The [verification inventory](performance-capture-multiread/verification.json) and +[source binding](performance-capture-multiread/source-binding.json) identify exact +scopes. The final structural checkpoint is recorded separately in +[structural evidence](performance-capture-multiread/structural.json). Its expected +population is **73 suites / 121 checks**; it proves declared structure and generated +freshness rather than functional correctness or semantic standards quality. + +## Qualification and delivery limits + +Local execution used isolated **Python 3.13.5**, outside supported 3.11/3.12, with +`rpds-py 2026.5.1` rather than locked `2026.6.3`. Other core package versions and +executable hashes are in [environment](performance-capture-multiread/environment.json). +The official MCP SDK, configured Codex executable and independent reviewer were +unavailable. Supported locked-environment, official SDK/configured-client and +independent review qualification remain required for this new interface/capture +implementation. Real raw MCP results are not substituted for those claims. + +Normative standards, reference and operational guidance content, dependency locks, +identity framing, persisted state and SQLite policy remain unchanged. Only the +new read API advances its wire interface. The source checkout keeps real accepted +main at `366c1d9`; disposable clones own their candidate main for qualification. +The user's installed store, archived proposals and Codex configuration were not +accessed or modified. Delivery is a Git CLI commit bundle/patch and complete changed +files; application and merging into main remain explicit operator actions. + +## Reproduction + +Run the included drivers from the supported environment with separate baseline +and candidate implementation checkouts and a common fixture checkout whose local +main points to `bac7dc3d`. They write only disposable repositories/stores and the +chosen evidence file. + +```bash +python measure_capture.py --source /path/to/base --fixture /path/to/common-fixture --output capture-base.json --repeats 3 +python measure_capture.py --source /path/to/candidate --fixture /path/to/common-fixture --output capture-candidate.json --repeats 3 +python measure_read_many.py --source /path/to/candidate --fixture /path/to/common-fixture --output reads.json --repeats 5 +``` + +[Capture driver](performance-capture-multiread/measure_capture.py) and +[grouped-read driver](performance-capture-multiread/measure_read_many.py) retain +validation assertions, corpus identity, alternating order and separate attribution. +The new API does not infer approvals for real application content. diff --git a/docs/plans/purpose-separated-standards-engine/reports/performance-capture-multiread/admission.md b/docs/plans/purpose-separated-standards-engine/reports/performance-capture-multiread/admission.md new file mode 100644 index 00000000..0b3450cb --- /dev/null +++ b/docs/plans/purpose-separated-standards-engine/reports/performance-capture-multiread/admission.md @@ -0,0 +1,54 @@ +# Capture and grouped-reading increment + +Status: implemented; local qualification recorded in the companion evidence report. Base `bac7dc3dc39fbf519429ea91bff1e02e65925299`. + +The user selected two consumer-performance changes: persistent batch Git reads +with parsed-tree reuse inside one revision-read session, and a bounded same- +snapshot multi-read API. Repository Git owns child lifecycle, object integrity, +path interpretation and retained-memory bounds. Engine navigation owns one +verified input set and fresh purpose-specific outputs. Canonical schemas own +wire shapes; generated models and catalogs are regenerated together. + +Applicable guidance: Core and Router; Implementation, Verification and evidence +oracles, Performance, Development Proportionality, Architecture and Replay, +Contracts and generated-contract/IPC boundaries, Concurrency, Resilience and +Security. Existing storage, authorization, publication and recovery boundaries +remain authoritative. The previously agreed prospective positive-guidance and +proportionality practices apply; normative text stays unchanged. + +Write scope: repository_git implementation/tests/README; standards_engine +navigation/facade/MCP/renderer/contracts/generated outputs/tests and implementation +documentation; derived verification-input manifest; this report directory. +New helpers remain inside their existing package owner. No second graph, +database, cross-call proposal cache or standards-content rewrite is introduced. + +Design: each read session retains at most one active Git batch child; switching +an explicit gitlink repository closes that child and opens the selected one. +Verified object and decoded-tree data share the existing bounded LRU. Every +object miss checks protocol framing, type, length and hash. Each request retains +the existing Git command timeout; there is no total capture deadline. Closure, +mode and path checks remain. Normal close verifies EOF/exit and reaps workers; +exceptional close aborts the owned process and releases all state. + +Multi-read uses an explicit snapshot and 1–32 ordered requested reads, with a +2 MiB JSON-result budget. It returns the complete set or one rejection, with no +partial result. Application and authoring inputs/results retain separate schema +variants. One durable integrity load supplies the operation; current snapshot +lifecycle is observed before each item and before return. Each item uses the +existing read projection and permission boundary. Detail and handles never +change purpose. Independent calls, fresh captures and publication remain fresh. + +Simplicity review: repository sessions contain the actual pipe/cache lifetime; +removing them reinstates per-object processes and parsing. Grouped reads compose +the existing single-item projection and do not create a batch execution engine. +Consumers know one snapshot and a requested set, rather than compiler/storage +mechanisms. Child framing changes stay in Repository Git; wire changes stay in +Engine contracts/navigation. Reuse ends with its explicit owner. + +Acceptance: exact baseline/candidate capture IDs and two independent compiles; +real Git corruption/missing/size/gitlink/timeout/EOF/cleanup tests; bounded decoded +memory; ordered multi-read equality including failures and purpose exclusions; +current lifecycle and cold replay; native/CLI/real MCP multi-read and schema +projection; same-environment timing with inputs/repeats/limits recorded. Required +checks remain intact. Repairs within this scope continue normally; changes to +ownership, guarantees or consumer contract require an explicit revised decision. diff --git a/docs/plans/purpose-separated-standards-engine/reports/performance-capture-multiread/capture-baseline.json b/docs/plans/purpose-separated-standards-engine/reports/performance-capture-multiread/capture-baseline.json new file mode 100644 index 00000000..6ae63304 --- /dev/null +++ b/docs/plans/purpose-separated-standards-engine/reports/performance-capture-multiread/capture-baseline.json @@ -0,0 +1,66 @@ +{ + "source_commit": "bac7dc3dc39fbf519429ea91bff1e02e65925299", + "fixture_revision": "bac7dc3dc39fbf519429ea91bff1e02e65925299", + "python": "3.13.5 (main, Jun 25 2025, 18:55:22) [GCC 14.2.0]", + "python_binary_sha256": "e59d0124ff06c248546876e01fcfb1ea3cda63534949f94a9372bfcfe3bfc3f5", + "observations": [ + { + "label": "sample-0", + "seconds": 2.000777889000119, + "parent_cpu_seconds": 1.202563377, + "content_id": "snapshot-content:sha256:99a23add9dfa4f48711c1945dc0d133cf00dc44808f2ac9cfc00481690dc49f3", + "source_revision": "bac7dc3dc39fbf519429ea91bff1e02e65925299", + "files": 437, + "source_bytes": 3757063, + "store_bytes": 4530176 + }, + { + "label": "sample-1", + "seconds": 1.9806353500000569, + "parent_cpu_seconds": 1.2397191200000002, + "content_id": "snapshot-content:sha256:99a23add9dfa4f48711c1945dc0d133cf00dc44808f2ac9cfc00481690dc49f3", + "source_revision": "bac7dc3dc39fbf519429ea91bff1e02e65925299", + "files": 437, + "source_bytes": 3757063, + "store_bytes": 4530176 + }, + { + "label": "sample-2", + "seconds": 2.2334635510001135, + "parent_cpu_seconds": 1.2946092030000003, + "content_id": "snapshot-content:sha256:99a23add9dfa4f48711c1945dc0d133cf00dc44808f2ac9cfc00481690dc49f3", + "source_revision": "bac7dc3dc39fbf519429ea91bff1e02e65925299", + "files": 437, + "source_bytes": 3757063, + "store_bytes": 4530176 + } + ], + "attribution": { + "label": "attribution-only", + "seconds": 2.156517116000032, + "parent_cpu_seconds": 1.3071809409999995, + "content_id": "snapshot-content:sha256:99a23add9dfa4f48711c1945dc0d133cf00dc44808f2ac9cfc00481690dc49f3", + "source_revision": "bac7dc3dc39fbf519429ea91bff1e02e65925299", + "files": 437, + "source_bytes": 3757063, + "store_bytes": 4530176, + "counts": { + "git_processes": 529, + "full_compiles": 2, + "git_batch_processes": 527, + "tree_parses": 3872, + "source_reads": 1140 + }, + "peak_session_retention": { + "bytes": 3793805, + "entries": 527 + }, + "session_count": 1, + "closed_session_bytes": [ + 0 + ], + "closed_session_entries": [ + 0 + ] + } +} diff --git a/docs/plans/purpose-separated-standards-engine/reports/performance-capture-multiread/capture-candidate.json b/docs/plans/purpose-separated-standards-engine/reports/performance-capture-multiread/capture-candidate.json new file mode 100644 index 00000000..357c0fc5 --- /dev/null +++ b/docs/plans/purpose-separated-standards-engine/reports/performance-capture-multiread/capture-candidate.json @@ -0,0 +1,66 @@ +{ + "source_commit": "3d92a78b3343204e686ed75d31172c1d02b24f11", + "fixture_revision": "bac7dc3dc39fbf519429ea91bff1e02e65925299", + "python": "3.13.5 (main, Jun 25 2025, 18:55:22) [GCC 14.2.0]", + "python_binary_sha256": "e59d0124ff06c248546876e01fcfb1ea3cda63534949f94a9372bfcfe3bfc3f5", + "observations": [ + { + "label": "sample-0", + "seconds": 0.6580945979999342, + "parent_cpu_seconds": 0.616518533, + "content_id": "snapshot-content:sha256:99a23add9dfa4f48711c1945dc0d133cf00dc44808f2ac9cfc00481690dc49f3", + "source_revision": "bac7dc3dc39fbf519429ea91bff1e02e65925299", + "files": 437, + "source_bytes": 3757063, + "store_bytes": 4530176 + }, + { + "label": "sample-1", + "seconds": 0.6945829159999448, + "parent_cpu_seconds": 0.656972232, + "content_id": "snapshot-content:sha256:99a23add9dfa4f48711c1945dc0d133cf00dc44808f2ac9cfc00481690dc49f3", + "source_revision": "bac7dc3dc39fbf519429ea91bff1e02e65925299", + "files": 437, + "source_bytes": 3757063, + "store_bytes": 4530176 + }, + { + "label": "sample-2", + "seconds": 0.6611960109999018, + "parent_cpu_seconds": 0.6220192300000003, + "content_id": "snapshot-content:sha256:99a23add9dfa4f48711c1945dc0d133cf00dc44808f2ac9cfc00481690dc49f3", + "source_revision": "bac7dc3dc39fbf519429ea91bff1e02e65925299", + "files": 437, + "source_bytes": 3757063, + "store_bytes": 4530176 + } + ], + "attribution": { + "label": "attribution-only", + "seconds": 0.6940271039998152, + "parent_cpu_seconds": 0.633667682, + "content_id": "snapshot-content:sha256:99a23add9dfa4f48711c1945dc0d133cf00dc44808f2ac9cfc00481690dc49f3", + "source_revision": "bac7dc3dc39fbf519429ea91bff1e02e65925299", + "files": 437, + "source_bytes": 3757063, + "store_bytes": 4530176, + "counts": { + "git_processes": 3, + "full_compiles": 2, + "git_batch_processes": 1, + "tree_parses": 89, + "source_reads": 1140 + }, + "peak_session_retention": { + "bytes": 4007360, + "entries": 527 + }, + "session_count": 1, + "closed_session_bytes": [ + 0 + ], + "closed_session_entries": [ + 0 + ] + } +} diff --git a/docs/plans/purpose-separated-standards-engine/reports/performance-capture-multiread/comparison.csv b/docs/plans/purpose-separated-standards-engine/reports/performance-capture-multiread/comparison.csv new file mode 100644 index 00000000..760caea6 --- /dev/null +++ b/docs/plans/purpose-separated-standards-engine/reports/performance-capture-multiread/comparison.csv @@ -0,0 +1,4 @@ +purpose,operation,baseline_samples,candidate_samples,baseline_median,candidate_median,speedup,baseline_min,baseline_max,candidate_min,candidate_max +authoring,new_capture,3,3,2.000777889000119,0.6611960109999018,3.0259981241786655,1.9806353500000569,2.2334635510001135,0.6580945979999342,0.6945829159999448 +application,six_reads_vs_read_many,5,5,1.0514371639999354,0.18259409300003426,5.75833065968754,1.0405755130000216,1.0827503269999852,0.17693527900019035,0.21883916400020098 +authoring,six_reads_vs_read_many,5,5,1.115447205999999,0.24931760899994515,4.474000895782072,1.0992856069999561,1.151454208999894,0.2402914360000068,0.26619081400008326 diff --git a/docs/plans/purpose-separated-standards-engine/reports/performance-capture-multiread/engine-qualification.json b/docs/plans/purpose-separated-standards-engine/reports/performance-capture-multiread/engine-qualification.json new file mode 100644 index 00000000..fd19df62 --- /dev/null +++ b/docs/plans/purpose-separated-standards-engine/reports/performance-capture-multiread/engine-qualification.json @@ -0,0 +1,16 @@ +[ + { + "package": "standards_engine", + "command": [ + "/mnt/data/capture-env/bin/python", + "-m", + "unittest", + "discover", + "-s", + "tools/standards_engine/tests", + "-v" + ], + "elapsed": 523.1531623640001, + "exit": 0 + } +] \ No newline at end of file diff --git a/docs/plans/purpose-separated-standards-engine/reports/performance-capture-multiread/environment.json b/docs/plans/purpose-separated-standards-engine/reports/performance-capture-multiread/environment.json new file mode 100644 index 00000000..69502638 --- /dev/null +++ b/docs/plans/purpose-separated-standards-engine/reports/performance-capture-multiread/environment.json @@ -0,0 +1,18 @@ +{ + "python": "3.13.5 (main, Jun 25 2025, 18:55:22) [GCC 14.2.0]", + "executable_sha256": "e59d0124ff06c248546876e01fcfb1ea3cda63534949f94a9372bfcfe3bfc3f5", + "platform": "Linux-6.18.44-x86_64-with-glibc2.41", + "git": "git version 2.47.3", + "sqlite": "3.46.1", + "packages": { + "attrs": "26.1.0", + "jsonschema": "4.26.0", + "jsonschema-specifications": "2025.9.1", + "referencing": "0.37.0", + "rpds-py": "2026.5.1", + "typing-extensions": "4.16.0" + }, + "official_mcp_sdk_available": false, + "codex_available": false, + "scope": "local isolated supporting qualification, not supported pinned Python 3.11/3.12 or installed client acceptance" +} diff --git a/docs/plans/purpose-separated-standards-engine/reports/performance-capture-multiread/mcp-formatting.json b/docs/plans/purpose-separated-standards-engine/reports/performance-capture-multiread/mcp-formatting.json new file mode 100644 index 00000000..f3dc6375 --- /dev/null +++ b/docs/plans/purpose-separated-standards-engine/reports/performance-capture-multiread/mcp-formatting.json @@ -0,0 +1,6 @@ +{ + "path": "tools/standards_engine/standards_engine/mcp.py", + "before_sha256": "38ad14683d21188b95eb8e458da5cee49ea5d84be560a0ff38b13d4f5b4dd449", + "after_sha256": "3f87dbdd3157f6b98baeb6bf78c4cfdf8cfefb65be2a13e5c55e0bb58e295bb6", + "parsed_ast_equal": true +} diff --git a/docs/plans/purpose-separated-standards-engine/reports/performance-capture-multiread/measure_capture.py b/docs/plans/purpose-separated-standards-engine/reports/performance-capture-multiread/measure_capture.py new file mode 100644 index 00000000..f7683058 --- /dev/null +++ b/docs/plans/purpose-separated-standards-engine/reports/performance-capture-multiread/measure_capture.py @@ -0,0 +1,108 @@ +"""Compare real accepted-revision captures; writes only disposable stores/evidence.""" +from __future__ import annotations +import argparse +from collections import Counter +from contextlib import ExitStack +import hashlib +import json +from pathlib import Path +import subprocess +import sys +import tempfile +import time +from unittest.mock import patch + + +def main() -> None: + parser = argparse.ArgumentParser(description=__doc__) + parser.add_argument("--source", type=Path, required=True) + parser.add_argument("--fixture", type=Path, required=True) + parser.add_argument("--output", type=Path, required=True) + parser.add_argument("--repeats", type=int, default=3) + args = parser.parse_args() + source, fixture = args.source.resolve(), args.fixture.resolve() + sys.path.insert(0, str(source)) + from tools.standards_engine.standards_engine import StandardsEngine + from tools.standards_engine.standards_engine import _generated_contract as contract + from tools.standards_snapshots.standards_snapshots import SnapshotId, SnapshotModule + from tools.repository_git.repository_git import repository as rg + + observations = [] + counters = Counter() + sessions = [] + peak = {"bytes": 0, "entries": 0} + compiled = StandardsEngine._compile + popen = subprocess.Popen + tree_entries = rg._tree_entries + session_init = rg.RevisionReadSession.__init__ + session_read = rg.RevisionReadSession.read_file + def compile_count(content): + counters["full_compiles"] += 1 + return compiled(content) + def start(command, *arguments, **options): + counters["git_processes" if command[0] == "git" else "other_processes"] += 1 + if "cat-file" in command: + counters["git_batch_processes"] += 1 + return popen(command, *arguments, **options) + def tree(*arguments): + counters["tree_parses"] += 1 + return tree_entries(*arguments) + def initialize(session, *arguments, **options): + session_init(session, *arguments, **options) + sessions.append(session) + def read(session, *arguments): + value = session_read(session, *arguments) + peak["bytes"] = max(peak["bytes"], session.cached_bytes) + peak["entries"] = max(peak["entries"], session.cached_objects) + counters["source_reads"] += 1 + return value + def measure(root: Path, store: Path, label: str) -> dict: + with StandardsEngine.open_repository(root, purpose="authoring", store_path=store) as engine: + begin, cpu = time.perf_counter(), time.process_time() + value = engine.create_snapshot(contract.CreateSnapshotCall(kind="create-snapshot")).as_contract() + wall, cpu_elapsed = time.perf_counter()-begin, time.process_time()-cpu + if value["kind"] != "create-snapshot-result": + raise AssertionError(value) + # The independent readback is outside capture's timing and counters. + captured = engine._snapshots.load_content(SnapshotId(value["snapshot"]["snapshot"]["id"])) + return {"label": label, "seconds": wall, "parent_cpu_seconds": cpu_elapsed, + "content_id": SnapshotModule._content_id(captured), + "source_revision": captured.source_revision, + "files": len(captured.files), + "source_bytes": sum(len(row.content) for row in captured.files), + "store_bytes": store.stat().st_size} + with tempfile.TemporaryDirectory(prefix="capture-pair-") as temporary: + scratch = Path(temporary) + root = scratch / "repository" + subprocess.run(["git", "clone", "--quiet", "--no-hardlinks", str(fixture), str(root)], check=True) + revision = subprocess.check_output(["git", "-C", str(fixture), "rev-parse", "main"], text=True).strip() + subprocess.run(["git", "-C", str(root), "checkout", "--quiet", "-B", "main", revision], check=True) + for index in range(args.repeats): + row = measure(root, scratch / f"store-{index}.sqlite3", f"sample-{index}") + observations.append(row) + print(json.dumps(row), flush=True) + with ExitStack() as instrumentation: + instrumentation.enter_context(patch.object(StandardsEngine, "_compile", staticmethod(compile_count))) + instrumentation.enter_context(patch.object(subprocess, "Popen", start)) + instrumentation.enter_context(patch.object(rg, "_tree_entries", tree)) + instrumentation.enter_context(patch.object(rg.RevisionReadSession, "__init__", initialize)) + instrumentation.enter_context(patch.object(rg.RevisionReadSession, "read_file", read)) + attributed = measure(root, scratch / "counted.sqlite3", "attribution-only") + attributed["counts"] = dict(counters) + attributed["peak_session_retention"] = peak + attributed["session_count"] = len(sessions) + attributed["closed_session_bytes"] = [session.cached_bytes for session in sessions] + attributed["closed_session_entries"] = [session.cached_objects for session in sessions] + assert counters["full_compiles"] == 2, counters + assert all(session.cached_bytes == 0 for session in sessions) + assert all(session.cached_objects == 0 for session in sessions) + assert len({row["content_id"] for row in [*observations, attributed]}) == 1 + args.output.write_text(json.dumps({ + "source_commit": subprocess.check_output(["git", "-C", str(source), "rev-parse", "HEAD"], text=True).strip(), + "fixture_revision": revision, "python": sys.version, + "python_binary_sha256": hashlib.sha256(Path(sys.executable).read_bytes()).hexdigest(), + "observations": observations, "attribution": attributed, + }, indent=2) + "\n") + +if __name__ == "__main__": + main() diff --git a/docs/plans/purpose-separated-standards-engine/reports/performance-capture-multiread/measure_read_many.py b/docs/plans/purpose-separated-standards-engine/reports/performance-capture-multiread/measure_read_many.py new file mode 100644 index 00000000..a650b48c --- /dev/null +++ b/docs/plans/purpose-separated-standards-engine/reports/performance-capture-multiread/measure_read_many.py @@ -0,0 +1,166 @@ +"""Compare six real MCP reads with read_many over one synthetic qualified capture.""" +from __future__ import annotations +import argparse +from collections import Counter +from contextlib import ExitStack +import hashlib +import json +import os +from pathlib import Path +import shutil +import subprocess +import sys +import tempfile +import time +from unittest.mock import patch + +TARGETS = ("core", "workflow.implementation", "workflow.planning", "workflow.verification", + "topic.contracts", "topic.architecture") + + +def main() -> None: + parser = argparse.ArgumentParser(description=__doc__) + parser.add_argument("--source", type=Path, required=True) + parser.add_argument("--fixture", type=Path, required=True) + parser.add_argument("--output", type=Path, required=True) + parser.add_argument("--repeats", type=int, default=5) + args = parser.parse_args() + source, fixture = args.source.resolve(), args.fixture.resolve() + sys.path.insert(0, str(source)) + from tools.standards_engine.standards_engine import AgentToolFacade, StandardsEngine + from tools.standards_engine.standards_engine import _generated_contract as contract + from tools.standards_engine.standards_engine.logical_authoring import _toml_inline + from tools.standards_engine.standards_engine.mcp import MCPServer + from tools.standards_engine.tests.test_purpose_projection import refresh + from tools.standards_metadata.standards_metadata import APPLICATION_CONTENT + from tools.standards_snapshots.standards_snapshots import CapturedContent, SnapshotFile, SnapshotId, SnapshotModule, SnapshotPath + observations, server_observations = [], [] + with tempfile.TemporaryDirectory(prefix="read-many-pair-") as temporary: + root = Path(temporary) / "repository" + subprocess.run(["git", "clone", "--quiet", "--no-hardlinks", str(fixture), str(root)], check=True) + revision = subprocess.check_output(["git", "-C", str(fixture), "rev-parse", "main"], text=True).strip() + subprocess.run(["git", "-C", str(root), "checkout", "--quiet", "-B", "main", revision], check=True) + # Installed interface comes from implementation; policy capture stays on + # the exact common fixture's accepted main, not these working-tree files. + for path in ("tools/standards_engine/contracts/a1-contract.schema.json", + "tools/standards_engine/contracts/a1-interface.toml", + "tools/standards_engine/contracts/generated/agent-tools.json"): + shutil.copyfile(source / path, root / path) + with AgentToolFacade.open_repository(root, purpose="authoring") as facade: + value = facade.create_snapshot({"kind": "create-snapshot"}) + assert value["kind"] == "create-snapshot-result", value + original_snapshot = value["snapshot"]["snapshot"] + engine = facade._engine + capture = engine._snapshots.load_content(SnapshotId(original_snapshot["id"])) + compiled = engine._compiled_snapshot(SnapshotId(original_snapshot["id"])) + selected, pending = set(TARGETS), list(TARGETS) + while pending: + material = compiled.materials[pending.pop()] + for identity in (*material.requires, *material.specializes): + if identity not in selected: + selected.add(identity) + pending.append(identity) + files = {str(row.path): row.content for row in capture.files} + entries = [{"target": identity, "binding": compiled.materials[identity].binding} for identity in sorted(selected)] + files[APPLICATION_CONTENT] = ("schema_version = 1\nentries = " + _toml_inline(entries) + "\n").encode() + frozen = refresh(files) + approved = CapturedContent(capture.source_revision, ( + SnapshotFile(SnapshotPath.parse(path), content) for path, content in frozen.files)) + summary = engine._snapshots.create_snapshot(approved) + snapshot = engine._snapshot_handle(summary.snapshot) + corpus = {"files": len(approved.files), "bytes": sum(len(row.content) for row in approved.files), + "content_id": SnapshotModule._content_id(approved), "source_revision": capture.source_revision, + "synthetic_approvals": sorted(selected)} + items = [{"target": target} for target in TARGETS] + for purpose in ("authoring", "application"): + with tempfile.TemporaryFile(mode="w+t") as stderr: + started = time.perf_counter() + process = subprocess.Popen([sys.executable, "-P", "-m", "tools.standards_engine.standards_engine.mcp", + "--repo-root", str(root), "--purpose", purpose], stdin=subprocess.PIPE, stdout=subprocess.PIPE, + stderr=stderr, text=True, cwd=temporary, env={**os.environ, "PYTHONPATH": str(source)}) + number = 0 + def send(method, params): + nonlocal number + number += 1 + process.stdin.write(json.dumps({"jsonrpc": "2.0", "id": number, "method": method, "params": params}) + "\n") + process.stdin.flush() + line = process.stdout.readline() + if not line: + stderr.seek(0) + raise RuntimeError("MCP closed: " + stderr.read()) + value = json.loads(line) + assert value.get("id") == number and "result" in value, value + return value["result"] + def rpc(operation, arguments): + value = send("tools/call", {"name": operation, "arguments": arguments}) + assert not value.get("isError"), value + data = value["structuredContent"] + assert data == json.loads(value["content"][0]["text"]) + return data + try: + send("initialize", {"protocolVersion": "2025-11-25", "capabilities": {}, + "clientInfo": {"name": "capture-multiread-measurement", "version": "1"}}) + server_observations.append({"purpose": purpose, "initialize_seconds": time.perf_counter() - started}) + process.stdin.write(json.dumps({"jsonrpc": "2.0", "method": "notifications/initialized"}) + "\n") + process.stdin.flush() + # Explicit warm-up excludes initial corpus compilation from + # both variants; cold behavior remains a separate claim. + rpc("read", {"snapshot": snapshot, "target": "core"}) + for repeat in range(args.repeats): + results = {} + for operation in (("six_reads", "read_many") if repeat % 2 == 0 else ("read_many", "six_reads")): + begin = time.perf_counter() + if operation == "six_reads": + values = [rpc("read", {"snapshot": snapshot, **item}) for item in items] + else: + grouped = rpc("read_many", {"snapshot": snapshot, "items": items}) + assert grouped["snapshot"] == snapshot + values = grouped["items"] + seconds = time.perf_counter() - begin + results[operation] = values + observations.append({"purpose": purpose, "repeat": repeat, "operation": operation, + "seconds": seconds, "ordered_items_sha256": hashlib.sha256(json.dumps(values, sort_keys=True).encode()).hexdigest(), + "item_json_bytes": sum(len(json.dumps(value).encode()) for value in values)}) + print(json.dumps(observations[-1]), flush=True) + assert results["six_reads"] == results["read_many"] + process.stdin.close() + process.wait(timeout=30) + assert process.returncode == 0 + finally: + if process.poll() is None: + process.kill(); process.wait() + process.stdout.close() + if not process.stdin.closed: + process.stdin.close() + # Separate attribution exercises real MCP dispatch without changing the + # timed subprocess runs. Complete loads count before the compiler cache. + counts = [] + for purpose in ("authoring", "application"): + server = MCPServer(root, purpose=purpose) + def call(operation, arguments): + response = server.dispatch({"jsonrpc": "2.0", "id": 1, "method": "tools/call", + "params": {"name": operation, "arguments": arguments}}) + assert "result" in response and not response["result"].get("isError"), response + return response["result"]["structuredContent"] + try: + server.dispatch({"jsonrpc": "2.0", "id": 0, "method": "initialize", "params": { + "protocolVersion": "2025-11-25", "capabilities": {}, "clientInfo": {"name": "attribution", "version": "1"}}}) + server.dispatch({"jsonrpc": "2.0", "method": "notifications/initialized"}) + call("read", {"snapshot": snapshot, "target": "core"}) + for operation in ("six_reads", "read_many"): + with patch.object(SnapshotModule, "load_content", autospec=True, side_effect=SnapshotModule.load_content) as load: + if operation == "six_reads": + values = [call("read", {"snapshot": snapshot, **item}) for item in items] + else: + values = call("read_many", {"snapshot": snapshot, "items": items})["items"] + counts.append({"purpose": purpose, "operation": operation, "complete_loads": load.call_count}) + assert load.call_count == (6 if operation == "six_reads" else 1) + finally: + server.close() + args.output.write_text(json.dumps({"source_commit": subprocess.check_output( + ["git", "-C", str(source), "rev-parse", "HEAD"], text=True).strip(), "python": sys.version, + "corpus": corpus, "targets": TARGETS, "observations": observations, "server_startup": server_observations, + "separate_dispatch_counts": counts}, indent=2) + "\n") + +if __name__ == "__main__": + main() diff --git a/docs/plans/purpose-separated-standards-engine/reports/performance-capture-multiread/multiread-stdio.json b/docs/plans/purpose-separated-standards-engine/reports/performance-capture-multiread/multiread-stdio.json new file mode 100644 index 00000000..6634da0b --- /dev/null +++ b/docs/plans/purpose-separated-standards-engine/reports/performance-capture-multiread/multiread-stdio.json @@ -0,0 +1,221 @@ +{ + "source_commit": "3d92a78b3343204e686ed75d31172c1d02b24f11", + "python": "3.13.5 (main, Jun 25 2025, 18:55:22) [GCC 14.2.0]", + "corpus": { + "files": 437, + "bytes": 3757909, + "content_id": "snapshot-content:sha256:a177446c7cec932ff6c35c0997905fecabf44187fe84b52205818a2d8217ecf3", + "source_revision": "bac7dc3dc39fbf519429ea91bff1e02e65925299", + "synthetic_approvals": [ + "core", + "topic.architecture", + "topic.contracts", + "workflow.development-proportionality", + "workflow.implementation", + "workflow.planning", + "workflow.verification" + ] + }, + "targets": [ + "core", + "workflow.implementation", + "workflow.planning", + "workflow.verification", + "topic.contracts", + "topic.architecture" + ], + "observations": [ + { + "purpose": "authoring", + "repeat": 0, + "operation": "six_reads", + "seconds": 1.1121734369999103, + "ordered_items_sha256": "f9d49151937af5a22032024df31cc6330db605d72490a5798f57477c830defcf", + "item_json_bytes": 94316 + }, + { + "purpose": "authoring", + "repeat": 0, + "operation": "read_many", + "seconds": 0.24931760899994515, + "ordered_items_sha256": "f9d49151937af5a22032024df31cc6330db605d72490a5798f57477c830defcf", + "item_json_bytes": 94316 + }, + { + "purpose": "authoring", + "repeat": 1, + "operation": "read_many", + "seconds": 0.24342684599992026, + "ordered_items_sha256": "f9d49151937af5a22032024df31cc6330db605d72490a5798f57477c830defcf", + "item_json_bytes": 94316 + }, + { + "purpose": "authoring", + "repeat": 1, + "operation": "six_reads", + "seconds": 1.139775008000015, + "ordered_items_sha256": "f9d49151937af5a22032024df31cc6330db605d72490a5798f57477c830defcf", + "item_json_bytes": 94316 + }, + { + "purpose": "authoring", + "repeat": 2, + "operation": "six_reads", + "seconds": 1.151454208999894, + "ordered_items_sha256": "f9d49151937af5a22032024df31cc6330db605d72490a5798f57477c830defcf", + "item_json_bytes": 94316 + }, + { + "purpose": "authoring", + "repeat": 2, + "operation": "read_many", + "seconds": 0.26619081400008326, + "ordered_items_sha256": "f9d49151937af5a22032024df31cc6330db605d72490a5798f57477c830defcf", + "item_json_bytes": 94316 + }, + { + "purpose": "authoring", + "repeat": 3, + "operation": "read_many", + "seconds": 0.2609236640000745, + "ordered_items_sha256": "f9d49151937af5a22032024df31cc6330db605d72490a5798f57477c830defcf", + "item_json_bytes": 94316 + }, + { + "purpose": "authoring", + "repeat": 3, + "operation": "six_reads", + "seconds": 1.0992856069999561, + "ordered_items_sha256": "f9d49151937af5a22032024df31cc6330db605d72490a5798f57477c830defcf", + "item_json_bytes": 94316 + }, + { + "purpose": "authoring", + "repeat": 4, + "operation": "six_reads", + "seconds": 1.115447205999999, + "ordered_items_sha256": "f9d49151937af5a22032024df31cc6330db605d72490a5798f57477c830defcf", + "item_json_bytes": 94316 + }, + { + "purpose": "authoring", + "repeat": 4, + "operation": "read_many", + "seconds": 0.2402914360000068, + "ordered_items_sha256": "f9d49151937af5a22032024df31cc6330db605d72490a5798f57477c830defcf", + "item_json_bytes": 94316 + }, + { + "purpose": "application", + "repeat": 0, + "operation": "six_reads", + "seconds": 1.0514371639999354, + "ordered_items_sha256": "6ad90d4d806671ae19546e47d866ceb9a7da1c2b81a909bea9679e708343b13e", + "item_json_bytes": 92644 + }, + { + "purpose": "application", + "repeat": 0, + "operation": "read_many", + "seconds": 0.18259409300003426, + "ordered_items_sha256": "6ad90d4d806671ae19546e47d866ceb9a7da1c2b81a909bea9679e708343b13e", + "item_json_bytes": 92644 + }, + { + "purpose": "application", + "repeat": 1, + "operation": "read_many", + "seconds": 0.17693527900019035, + "ordered_items_sha256": "6ad90d4d806671ae19546e47d866ceb9a7da1c2b81a909bea9679e708343b13e", + "item_json_bytes": 92644 + }, + { + "purpose": "application", + "repeat": 1, + "operation": "six_reads", + "seconds": 1.0582228639998448, + "ordered_items_sha256": "6ad90d4d806671ae19546e47d866ceb9a7da1c2b81a909bea9679e708343b13e", + "item_json_bytes": 92644 + }, + { + "purpose": "application", + "repeat": 2, + "operation": "six_reads", + "seconds": 1.0827503269999852, + "ordered_items_sha256": "6ad90d4d806671ae19546e47d866ceb9a7da1c2b81a909bea9679e708343b13e", + "item_json_bytes": 92644 + }, + { + "purpose": "application", + "repeat": 2, + "operation": "read_many", + "seconds": 0.1840112820000286, + "ordered_items_sha256": "6ad90d4d806671ae19546e47d866ceb9a7da1c2b81a909bea9679e708343b13e", + "item_json_bytes": 92644 + }, + { + "purpose": "application", + "repeat": 3, + "operation": "read_many", + "seconds": 0.21883916400020098, + "ordered_items_sha256": "6ad90d4d806671ae19546e47d866ceb9a7da1c2b81a909bea9679e708343b13e", + "item_json_bytes": 92644 + }, + { + "purpose": "application", + "repeat": 3, + "operation": "six_reads", + "seconds": 1.0405755130000216, + "ordered_items_sha256": "6ad90d4d806671ae19546e47d866ceb9a7da1c2b81a909bea9679e708343b13e", + "item_json_bytes": 92644 + }, + { + "purpose": "application", + "repeat": 4, + "operation": "six_reads", + "seconds": 1.048103645999845, + "ordered_items_sha256": "6ad90d4d806671ae19546e47d866ceb9a7da1c2b81a909bea9679e708343b13e", + "item_json_bytes": 92644 + }, + { + "purpose": "application", + "repeat": 4, + "operation": "read_many", + "seconds": 0.1796942979999585, + "ordered_items_sha256": "6ad90d4d806671ae19546e47d866ceb9a7da1c2b81a909bea9679e708343b13e", + "item_json_bytes": 92644 + } + ], + "server_startup": [ + { + "purpose": "authoring", + "initialize_seconds": 0.6307419339998432 + }, + { + "purpose": "application", + "initialize_seconds": 0.6154904979998719 + } + ], + "separate_dispatch_counts": [ + { + "purpose": "authoring", + "operation": "six_reads", + "complete_loads": 6 + }, + { + "purpose": "authoring", + "operation": "read_many", + "complete_loads": 1 + }, + { + "purpose": "application", + "operation": "six_reads", + "complete_loads": 6 + }, + { + "purpose": "application", + "operation": "read_many", + "complete_loads": 1 + } + ] +} diff --git a/docs/plans/purpose-separated-standards-engine/reports/performance-capture-multiread/packages-qualification.json b/docs/plans/purpose-separated-standards-engine/reports/performance-capture-multiread/packages-qualification.json new file mode 100644 index 00000000..a5b4d135 --- /dev/null +++ b/docs/plans/purpose-separated-standards-engine/reports/performance-capture-multiread/packages-qualification.json @@ -0,0 +1,156 @@ +[ + { + "package": "graph_engine", + "command": [ + "/mnt/data/capture-env/bin/python", + "-m", + "unittest", + "discover", + "-s", + "tools/graph_engine/tests", + "-v" + ], + "elapsed": 0.3108587429999261, + "exit": 0 + }, + { + "package": "repository_git", + "command": [ + "/mnt/data/capture-env/bin/python", + "-m", + "unittest", + "discover", + "-s", + "tools/repository_git/tests", + "-v" + ], + "elapsed": 2.9379715210000086, + "exit": 0 + }, + { + "package": "standards_analysis", + "command": [ + "/mnt/data/capture-env/bin/python", + "-m", + "unittest", + "discover", + "-s", + "tools/standards_analysis/tests", + "-v" + ], + "elapsed": 1.520688199999995, + "exit": 0 + }, + { + "package": "standards_applicability", + "command": [ + "/mnt/data/capture-env/bin/python", + "-m", + "unittest", + "discover", + "-s", + "tools/standards_applicability/tests", + "-v" + ], + "elapsed": 0.1011078039999802, + "exit": 0 + }, + { + "package": "standards_contracts", + "command": [ + "/mnt/data/capture-env/bin/python", + "-m", + "unittest", + "discover", + "-s", + "tools/standards_contracts/tests", + "-v" + ], + "elapsed": 28.819086434000155, + "exit": 0 + }, + { + "package": "standards_graph", + "command": [ + "/mnt/data/capture-env/bin/python", + "-m", + "unittest", + "discover", + "-s", + "tools/standards_graph/tests", + "-v" + ], + "elapsed": 0.23012377899999592, + "exit": 0 + }, + { + "package": "standards_identity", + "command": [ + "/mnt/data/capture-env/bin/python", + "-m", + "unittest", + "discover", + "-s", + "tools/standards_identity/tests", + "-v" + ], + "elapsed": 0.2763602950001314, + "exit": 0 + }, + { + "package": "standards_metadata", + "command": [ + "/mnt/data/capture-env/bin/python", + "-m", + "unittest", + "discover", + "-s", + "tools/standards_metadata/tests", + "-v" + ], + "elapsed": 0.8619135810001808, + "exit": 0 + }, + { + "package": "standards_policy_impact", + "command": [ + "/mnt/data/capture-env/bin/python", + "-m", + "unittest", + "discover", + "-s", + "tools/standards_policy_impact/tests", + "-v" + ], + "elapsed": 0.49905596600001445, + "exit": 0 + }, + { + "package": "standards_snapshots", + "command": [ + "/mnt/data/capture-env/bin/python", + "-m", + "unittest", + "discover", + "-s", + "tools/standards_snapshots/tests", + "-v" + ], + "elapsed": 0.16544800600013332, + "exit": 0 + }, + { + "package": "standards_verifier", + "command": [ + "/mnt/data/capture-env/bin/python", + "-m", + "unittest", + "discover", + "-s", + "tools/standards_verifier/tests", + "-v" + ], + "elapsed": 5.963659173999986, + "exit": 0 + } +] \ No newline at end of file diff --git a/docs/plans/purpose-separated-standards-engine/reports/performance-capture-multiread/source-binding.json b/docs/plans/purpose-separated-standards-engine/reports/performance-capture-multiread/source-binding.json new file mode 100644 index 00000000..0dcd5e89 --- /dev/null +++ b/docs/plans/purpose-separated-standards-engine/reports/performance-capture-multiread/source-binding.json @@ -0,0 +1,65 @@ +{ + "production_sources": [ + { + "path": "tools/repository_git/repository_git/batch.py", + "delivered_sha256": "45e07721da5c893ff0c4ebcbe34ed0e0e37386bdbdcc6a053aff8db5b52bf75b", + "final_qualification_sha256": "45e07721da5c893ff0c4ebcbe34ed0e0e37386bdbdcc6a053aff8db5b52bf75b", + "same": true + }, + { + "path": "tools/repository_git/repository_git/repository.py", + "delivered_sha256": "66ef50088989f4c896287ef7f15920d1f68aa3e82e02af16b3e9cb29c88a3ecb", + "final_qualification_sha256": "66ef50088989f4c896287ef7f15920d1f68aa3e82e02af16b3e9cb29c88a3ecb", + "same": true + }, + { + "path": "tools/standards_engine/standards_engine/_generated_contract.py", + "delivered_sha256": "b023eeef004835e52ab836d27f435dfef6a0d783957fc956857e1140f4c2d213", + "final_qualification_sha256": "b023eeef004835e52ab836d27f435dfef6a0d783957fc956857e1140f4c2d213", + "same": true + }, + { + "path": "tools/standards_engine/standards_engine/agent_navigation.py", + "delivered_sha256": "00eac297060bbcbad9b70768f1dd04e4f8a05db0eb824a0ab67a4f9042d4de55", + "final_qualification_sha256": "00eac297060bbcbad9b70768f1dd04e4f8a05db0eb824a0ab67a4f9042d4de55", + "same": true + }, + { + "path": "tools/standards_engine/standards_engine/context_projection.py", + "delivered_sha256": "f8da1bd1da13767122b76ee201fa37c62704739719a8c01cb4356c23cc997fb6", + "final_qualification_sha256": "f8da1bd1da13767122b76ee201fa37c62704739719a8c01cb4356c23cc997fb6", + "same": true + }, + { + "path": "tools/standards_engine/standards_engine/engine.py", + "delivered_sha256": "7790c66981e1b88986e186c521c2ab51e00c37f62cd096897063ae55504cc1c0", + "final_qualification_sha256": "7790c66981e1b88986e186c521c2ab51e00c37f62cd096897063ae55504cc1c0", + "same": true + }, + { + "path": "tools/standards_engine/standards_engine/mcp.py", + "delivered_sha256": "3f87dbdd3157f6b98baeb6bf78c4cfdf8cfefb65be2a13e5c55e0bb58e295bb6", + "final_qualification_sha256": "3f87dbdd3157f6b98baeb6bf78c4cfdf8cfefb65be2a13e5c55e0bb58e295bb6", + "same": true + }, + { + "path": "tools/standards_engine/standards_engine/rendering.py", + "delivered_sha256": "1b7e525f8b0b1628013c18769a0639eeb12980b5541e8115e61573246e1bda3e", + "final_qualification_sha256": "1b7e525f8b0b1628013c18769a0639eeb12980b5541e8115e61573246e1bda3e", + "same": true + }, + { + "path": "tools/standards_engine/standards_engine/tools.py", + "delivered_sha256": "c25f973967eb949de4a3168635ef36bac111d75a3f1f38000ba198d3926bde93", + "final_qualification_sha256": "c25f973967eb949de4a3168635ef36bac111d75a3f1f38000ba198d3926bde93", + "same": true + } + ], + "full_campaign_mcp_formatting": { + "path": "tools/standards_engine/standards_engine/mcp.py", + "before_sha256": "38ad14683d21188b95eb8e458da5cee49ea5d84be560a0ff38b13d4f5b4dd449", + "after_sha256": "3f87dbdd3157f6b98baeb6bf78c4cfdf8cfefb65be2a13e5c55e0bb58e295bb6", + "parsed_ast_equal": true + }, + "source_main": "366c1d90a24bbfb50973f62b155a5f3396c0f107" +} diff --git a/docs/plans/purpose-separated-standards-engine/reports/performance-capture-multiread/structural.json b/docs/plans/purpose-separated-standards-engine/reports/performance-capture-multiread/structural.json new file mode 100644 index 00000000..bdb5ca9d --- /dev/null +++ b/docs/plans/purpose-separated-standards-engine/reports/performance-capture-multiread/structural.json @@ -0,0 +1,11 @@ +{ + "kind": "verify-repository-result", + "refreshed_verification_inputs": true, + "verification": { + "checks": 121, + "exit_code": 0, + "failures": [], + "passed": true, + "suites": 73 + } +} diff --git a/docs/plans/purpose-separated-standards-engine/reports/performance-capture-multiread/verification.json b/docs/plans/purpose-separated-standards-engine/reports/performance-capture-multiread/verification.json new file mode 100644 index 00000000..76217cb7 --- /dev/null +++ b/docs/plans/purpose-separated-standards-engine/reports/performance-capture-multiread/verification.json @@ -0,0 +1,107 @@ +{ + "tested_commit": "3d92a78b3343204e686ed75d31172c1d02b24f11", + "runs": [ + { + "package": "standards_engine", + "tests": 211, + "unittest_seconds": 522.251, + "skipped": 0, + "successful": true + }, + { + "package": "graph_engine", + "tests": 37, + "unittest_seconds": 0.206, + "skipped": 0, + "successful": true + }, + { + "package": "repository_git", + "tests": 28, + "unittest_seconds": 2.82, + "skipped": 0, + "successful": true + }, + { + "package": "standards_analysis", + "tests": 100, + "unittest_seconds": 0.897, + "skipped": 0, + "successful": true + }, + { + "package": "standards_applicability", + "tests": 12, + "unittest_seconds": 0.022, + "skipped": 0, + "successful": true + }, + { + "package": "standards_contracts", + "tests": 23, + "unittest_seconds": 28.672, + "skipped": 1, + "successful": true + }, + { + "package": "standards_graph", + "tests": 2, + "unittest_seconds": 0.097, + "skipped": 0, + "successful": true + }, + { + "package": "standards_identity", + "tests": 16, + "unittest_seconds": 0.185, + "skipped": 0, + "successful": true + }, + { + "package": "standards_metadata", + "tests": 31, + "unittest_seconds": 0.342, + "skipped": 0, + "successful": true + }, + { + "package": "standards_policy_impact", + "tests": 10, + "unittest_seconds": 0.384, + "skipped": 0, + "successful": true + }, + { + "package": "standards_snapshots", + "tests": 23, + "unittest_seconds": 0.075, + "skipped": 0, + "successful": true + }, + { + "package": "standards_verifier", + "tests": 168, + "unittest_seconds": 5.605, + "skipped": 0, + "successful": true + } + ], + "total_run": 661, + "passed": 660, + "skipped": 1, + "final_focused_runs": [ + { + "suite": "test_mcp", + "tests": 13, + "passed": 13 + }, + { + "suite": "test_read_many", + "tests": 12, + "passed": 12 + } + ], + "full_engine_process": "one serial 211-test process; supporting packages ran in a separate process during the early part of Engine qualification; durations are not a paired suite benchmark", + "qualification_root_main": "candidate commit; real/source accepted main preserved", + "excluded_trial": "A final MCP rerun from source checkout failed SUPPORT.UNSUPPORTED_CAPTURE because its accepted main remains the older contract; correct disposable candidate context reran all 13 successfully without changing runtime capture semantics." +} diff --git a/evaluation/standards-effectiveness/generated/suite-inputs.json b/evaluation/standards-effectiveness/generated/suite-inputs.json index 3daa4b04..39d0ca1e 100644 --- a/evaluation/standards-effectiveness/generated/suite-inputs.json +++ b/evaluation/standards-effectiveness/generated/suite-inputs.json @@ -6371,6 +6371,18 @@ } ] }, + { + "digest": "sha256:45e07721da5c893ff0c4ebcbe34ed0e0e37386bdbdcc6a053aff8db5b52bf75b", + "path": "tools/repository_git/repository_git/batch.py", + "state": "present", + "uses": [ + { + "check": "python-package-contract", + "role": "package-contract-input", + "suite": "a1c-public-cutover" + } + ] + }, { "digest": "sha256:ea71c0789c6406d87f2a0ed126a3390701ed9939d40bd8226208953566f2c5a0", "path": "tools/repository_git/repository_git/errors.py", @@ -6406,7 +6418,7 @@ ] }, { - "digest": "sha256:ce80fb027f30e176f14bd199dfaa475a1d9be2917a23f80897b72ea0cbc321ef", + "digest": "sha256:66ef50088989f4c896287ef7f15920d1f68aa3e82e02af16b3e9cb29c88a3ecb", "path": "tools/repository_git/repository_git/repository.py", "state": "present", "uses": [ @@ -6423,7 +6435,7 @@ ] }, { - "digest": "sha256:23037b75194f4654f9bb5494d46e73256845ac505bdc3e5c53408d37c2357cca", + "digest": "sha256:a383ddf24493c9467ee6aaabddc986d7dde271c320a24c2f39b90347dd77f17f", "path": "tools/repository_git/tests/test_repository.py", "state": "present", "uses": [ @@ -6857,7 +6869,7 @@ ] }, { - "digest": "sha256:7763b37f539658e5cd5e7455ea7445c03b8b0996fb193640fc4ffe498de6ac94", + "digest": "sha256:d353a60df761481e751378095e49115bbff1dbcb77b1c1c010ade03e1ceb9766", "path": "tools/standards_engine/README.md", "state": "present", "uses": [ @@ -6869,7 +6881,7 @@ ] }, { - "digest": "sha256:12608318a1e933210500c6108b1b19c288681d0b9422a6ec7856a7e6b94dacc2", + "digest": "sha256:f8947f7d442ef05808da9cfad54a4dfb2324e9aca95c4a3475e593f5569d9d60", "path": "tools/standards_engine/contracts/README.md", "state": "present", "uses": [ @@ -6881,7 +6893,7 @@ ] }, { - "digest": "sha256:66c17c61cb0f19a987b0142ee333958f8fb1d955774b654fd33e2de580a7c67b", + "digest": "sha256:f72b766a17224da7599267e47a9d40e25a15e2b4b1dd8c2a846dd2e167979c02", "path": "tools/standards_engine/contracts/a1-contract.schema.json", "state": "present", "uses": [ @@ -6898,7 +6910,7 @@ ] }, { - "digest": "sha256:6adabee9f9a06b1d75e6f39c059d2f39acd070eafdc8fc881b20a9fcd24d6a14", + "digest": "sha256:e7bdf6aff70f72506955a902de1ffb829762bf8b37003d20f2bff5a110c024f2", "path": "tools/standards_engine/contracts/a1-interface.toml", "state": "present", "uses": [ @@ -6915,7 +6927,7 @@ ] }, { - "digest": "sha256:afdbab01ff7ef546815d8c6e62822a21d78c6415d56bc7b77c4ae8b64757410f", + "digest": "sha256:4b6a6a9bec925e778d0d34919233a03011221d200872f42e2ce4698c2fa4791f", "path": "tools/standards_engine/contracts/examples/a1-examples.json", "state": "present", "uses": [ @@ -6932,7 +6944,7 @@ ] }, { - "digest": "sha256:66ba0b7b55516b564a88f41d8f4aabaa49f4a245b9c18799cc7e3255d5e3da96", + "digest": "sha256:f4739057451b802feac32c05f64e7f4d3ac918fdc643609fb9f1d5c99dc2943a", "path": "tools/standards_engine/contracts/generated/agent-tools.json", "state": "present", "uses": [ @@ -6995,7 +7007,7 @@ ] }, { - "digest": "sha256:b4ae2a77dcadb32092fb8eccad07ae6565412d14f2784af6b0ad454bf2677505", + "digest": "sha256:b023eeef004835e52ab836d27f435dfef6a0d783957fc956857e1140f4c2d213", "path": "tools/standards_engine/standards_engine/_generated_contract.py", "state": "present", "uses": [ @@ -7017,7 +7029,7 @@ ] }, { - "digest": "sha256:d8c782756de20ca704d7fc1e361bb8939ed06cd8a3c1b0a4a149e282bb27bd5a", + "digest": "sha256:00eac297060bbcbad9b70768f1dd04e4f8a05db0eb824a0ab67a4f9042d4de55", "path": "tools/standards_engine/standards_engine/agent_navigation.py", "state": "present", "uses": [ @@ -7065,7 +7077,7 @@ ] }, { - "digest": "sha256:e25b0bbce6c5cb76359221cb7e8430e68e3de1dbb7e6f2883fe3b463eff87dfb", + "digest": "sha256:f8da1bd1da13767122b76ee201fa37c62704739719a8c01cb4356c23cc997fb6", "path": "tools/standards_engine/standards_engine/context_projection.py", "state": "present", "uses": [ @@ -7077,7 +7089,7 @@ ] }, { - "digest": "sha256:6a57f1f1b179cbe85c4491d8fcf8baabc25c1c3587261973067fbaa800d49f7e", + "digest": "sha256:7790c66981e1b88986e186c521c2ab51e00c37f62cd096897063ae55504cc1c0", "path": "tools/standards_engine/standards_engine/engine.py", "state": "present", "uses": [ @@ -7123,7 +7135,7 @@ ] }, { - "digest": "sha256:648cb500ff3a53aaa95793768d254395528157178d7ebbab4dc33fd40ae78b98", + "digest": "sha256:3f87dbdd3157f6b98baeb6bf78c4cfdf8cfefb65be2a13e5c55e0bb58e295bb6", "path": "tools/standards_engine/standards_engine/mcp.py", "state": "present", "uses": [ @@ -7159,7 +7171,7 @@ ] }, { - "digest": "sha256:9e7f316e15d9af14228558dc7ed2bb48ab28605204c7d4c22ce9857671546fd4", + "digest": "sha256:1b7e525f8b0b1628013c18769a0639eeb12980b5541e8115e61573246e1bda3e", "path": "tools/standards_engine/standards_engine/rendering.py", "state": "present", "uses": [ @@ -7200,7 +7212,7 @@ ] }, { - "digest": "sha256:2f38454dfebd1bd5813f380f093c97a3cca584be8de2db9a3482ce0dec9a761c", + "digest": "sha256:c25f973967eb949de4a3168635ef36bac111d75a3f1f38000ba198d3926bde93", "path": "tools/standards_engine/standards_engine/tools.py", "state": "present", "uses": [ @@ -13290,7 +13302,7 @@ "path": "evaluation/standards-effectiveness/suite-registry.toml" }, "repository_index": { - "digest": "sha256:a301a2bc291c9a2551880e81593ef48f17b08d62808bec7d669b96b1e881b283", + "digest": "sha256:a61573877dbf8758c052973548c08f55e5e22ebf2effe449f40f37d0036f8094", "uses": [ { "check": "python-package-contract", diff --git a/tools/repository_git/README.md b/tools/repository_git/README.md index d6f02078..5d757590 100644 --- a/tools/repository_git/README.md +++ b/tools/repository_git/README.md @@ -9,21 +9,30 @@ or public Engine operation. Callers resolve one revision and retain that exact value while loaders request files. Worktree changes and later commits cannot substitute bytes for the retained revision. -`read_session(revision)` gives one bulk-read owner bounded reuse of fully -verified Git objects. The owner closes the session when its operation ends. -Entries are keyed by the configured repository, object ID, expected object type, -and hash algorithm. Each miss performs the ordinary header, size, framing, -and object-hash checks. Path, mode and explicit gitlink interpretation still -run for every file request. A fresh session verifies its first reads again. +`read_session(revision)` owns one bounded batch reader and an LRU of verified +objects and decoded trees. Requests remain pinned to the selected revision. +Each cache miss reads a frame from `git cat-file --batch`, then checks header, +size, type, body framing and object hash. Decoded trees retain that verified +object's interpretation; path/mode/gitlink decisions still run for every file. +A fresh session verifies its first reads again. Ordinary `read_file` retains +its independent one-shot observation boundary. -The defaults retain at most 8 MiB of object payload and 1,024 entries; callers -may select smaller bounds or zero retention. Entry bookkeeping is bounded by -the entry cap separately from payload. Evicted and oversized valid objects use -the same verified read path. The session is single-owner and contains no child -process beyond those already owned by an individual Git command. Earlier -verified objects remain immutable operation inputs; the session is not a -continuous audit of the underlying disk. Ordinary `read_file` retains its -independent, uncached observation boundary. +The defaults retain at most 8 MiB of raw payload plus accounted decoded-tree +allocations, and 1,024 entries. Entry bookkeeping is bounded separately by the +entry cap. Oversized values use the same verified uncached path. A session owns +at most one child at a time: crossing an explicit gitlink repository closes the +previous child's stream and lazily starts the selected one. This bounds process +and pipe population independently of the number of repository mappings. + +A dedicated exchange worker and bounded stderr drain keep blocking pipe work +inside the existing per-command timeout. Each request gets its own deadline; +there is no total capture deadline. Normal close verifies stdout EOF and exit +status and joins workers. Exceptions abort the owned child (and its process +group on POSIX), join workers and release retained state. A later explicit read +can reopen a failed stream; there is no automatic request replay. Callers use +the session context manager and complete it before accepting a capture. +Earlier verified objects are immutable operation inputs, not a continuous audit +of the source disk. The session remains single-owner, not a concurrent connection. The Adapter can also return the exact sorted path observation for a retained commit tree; callers persist that observation when later deterministic @@ -49,8 +58,8 @@ index are not staging authority. Candidate blobs and the constructed commit must fit the same object bound used by exact reads, so publication cannot create content that a subsequent Adapter -read rejects by size. All Git subprocesses receive a sanitized environment, -bounded output, and a fixed timeout. Missing objects are `unavailable`; +read rejects by size. Git commands and individual batch exchanges receive a sanitized environment, +bounded output, and the existing command timeout. Missing objects are `unavailable`; malformed or contradictory objects are `invalid`; unsupported object modes, path encodings, and output sizes are `unsupported`. diff --git a/tools/repository_git/repository_git/batch.py b/tools/repository_git/repository_git/batch.py new file mode 100644 index 00000000..952a2967 --- /dev/null +++ b/tools/repository_git/repository_git/batch.py @@ -0,0 +1,233 @@ +"""Single-owner Git batch exchange with bounded frames and deterministic cleanup.""" +from __future__ import annotations + +import hashlib +import os +import queue +import signal +import subprocess +import threading +from dataclasses import dataclass, field +from typing import Callable + +from .errors import GitRepositoryError, invalid, unavailable, unsupported + +HEADER_LIMIT = 256 + + +def object_size(header: bytes, oid: str, expected_type: str, limit: int) -> int: + if not header.endswith(b"\n") or len(header) > HEADER_LIMIT: + raise invalid("REPOSITORY_GIT.INVALID_OBJECT", "batch header is incomplete or oversized") + header = header[:-1] + if header == f"{oid} missing".encode("ascii"): + raise unavailable("REPOSITORY_GIT.OBJECT_UNAVAILABLE", f"Git object {oid} is unavailable") + fields = header.split(b" ") + if len(fields) != 3 or fields[0] != oid.encode("ascii"): + raise invalid("REPOSITORY_GIT.INVALID_OBJECT", "batch header is contradictory") + try: + observed_type = fields[1].decode("ascii") + size = int(fields[2]) + except (UnicodeDecodeError, ValueError) as error: + raise invalid("REPOSITORY_GIT.INVALID_OBJECT", "batch size or type is invalid") from error + if observed_type != expected_type: + raise invalid("REPOSITORY_GIT.TYPE_MISMATCH", f"expected {expected_type}, observed {observed_type}") + if size < 0 or size > limit: + raise unsupported("REPOSITORY_GIT.OBJECT_LIMIT", f"Git object exceeds {limit} bytes") + return size + + +def verified_body(body: bytes, size: int, oid: str, expected_type: str, algorithm: str) -> bytes: + if len(body) != size + 1 or body[-1:] != b"\n": + raise invalid("REPOSITORY_GIT.INVALID_OBJECT", "batch body length is invalid") + content = body[:-1] + header = f"{expected_type} {size}\0".encode("ascii") + if hashlib.new(algorithm, header + content).hexdigest() != oid: + raise invalid("REPOSITORY_GIT.HASH_MISMATCH", f"Git object {oid} failed verification") + return content + + +def command_failure(returncode: int | None, stderr: bytes) -> GitRepositoryError: + detail = stderr.decode("utf-8", "replace").strip() + if any(marker in detail.lower() for marker in ("corrupt", "inflate", "hash mismatch")): + return invalid("REPOSITORY_GIT.INVALID_OBJECT", f"Git exited with {returncode}: {detail}") + return unavailable("REPOSITORY_GIT.COMMAND_UNAVAILABLE", f"Git exited with {returncode}: {detail}") + + +@dataclass +class _Exchange: + action: Callable[[], bytes] + done: threading.Event = field(default_factory=threading.Event) + result: bytes = b"" + error: BaseException | None = None + + +class VerifiedBatchReader: + """One serial caller, one pipe owner, and one bounded stderr drain. + + The per-exchange deadline retains the existing command timeout, including + pipe writes. It never limits the lifetime of a valid multi-object capture. + Exceptions close the protocol stream; a later explicit session read may + create a fresh reader, but this reader never retries a failed request. + """ + + def __init__(self, command: tuple[str, ...], *, environment: dict[str, str], + object_limit: int, stderr_limit: int, timeout: float) -> None: + self._limit, self._stderr_limit, self._timeout = object_limit, stderr_limit, timeout + self._closed = False + self._stderr = bytearray() + self._overflow = threading.Event() + self._stderr_error: OSError | None = None + self._requests: queue.Queue[_Exchange | None] = queue.Queue(maxsize=1) + self._busy = threading.Lock() + try: + self._process = subprocess.Popen( + command, stdin=subprocess.PIPE, stdout=subprocess.PIPE, + stderr=subprocess.PIPE, env=environment, + start_new_session=os.name == "posix", + ) + except OSError as error: + raise unavailable("REPOSITORY_GIT.EXECUTABLE_UNAVAILABLE", f"Git execution failed: {error}") from error + self._worker = threading.Thread(target=self._work, name="git-batch-exchange") + self._drainer = threading.Thread(target=self._drain, name="git-batch-stderr") + try: + self._worker.start() + self._drainer.start() + except BaseException: + self.abort() + raise + + def _kill(self) -> None: + try: + if os.name == "posix": + os.killpg(self._process.pid, signal.SIGKILL) + else: + self._process.kill() + except ProcessLookupError: + pass + + def _drain(self) -> None: + assert self._process.stderr is not None + try: + while chunk := os.read(self._process.stderr.fileno(), 64 * 1024): + remaining = self._stderr_limit - len(self._stderr) + self._stderr.extend(chunk[:remaining]) + if len(chunk) > remaining: + self._overflow.set() + self._kill() + return + except OSError as error: + self._stderr_error = error + self._kill() + + def _work(self) -> None: + while not self._closed: + exchange = self._requests.get() + if exchange is None: + return + try: + exchange.result = exchange.action() + except BaseException as error: + exchange.error = error + finally: + exchange.done.set() + + def _perform(self, action: Callable[[], bytes]) -> bytes: + if self._closed: + raise invalid("REPOSITORY_GIT.READ_SESSION_CLOSED", "the batch reader is closed") + if not self._busy.acquire(blocking=False): + raise invalid("REPOSITORY_GIT.READ_SESSION_BUSY", "batch exchanges require one owner") + try: + exchange = _Exchange(action) + self._requests.put_nowait(exchange) + if not exchange.done.wait(self._timeout): + raise unavailable("REPOSITORY_GIT.COMMAND_TIMEOUT", f"Git exchange exceeded {self._timeout} seconds") + if self._overflow.is_set(): + raise unsupported("REPOSITORY_GIT.OUTPUT_LIMIT", "Git stderr exceeded its configured byte bound") + if self._stderr_error is not None: + raise unavailable("REPOSITORY_GIT.COMMAND_UNAVAILABLE", "Git stderr could not be observed") from self._stderr_error + if exchange.error is not None: + raise exchange.error + return exchange.result + except BaseException as error: + self.abort() + if self._overflow.is_set(): + raise unsupported("REPOSITORY_GIT.OUTPUT_LIMIT", "Git stderr exceeded its configured byte bound") from error + if (isinstance(error, GitRepositoryError) + and error.failure.code == "REPOSITORY_GIT.INVALID_OBJECT" + and self._process.returncode is not None + and self._process.returncode > 0): + raise command_failure(self._process.returncode, bytes(self._stderr)) from error + if isinstance(error, (BrokenPipeError, OSError)): + raise command_failure(self._process.returncode, bytes(self._stderr)) from error + # Corruption can arrive as an incomplete stdout frame plus stderr. + if isinstance(error, GitRepositoryError) and any( + word in bytes(self._stderr).lower() for word in (b"corrupt", b"inflate", b"hash mismatch") + ): + raise command_failure(self._process.returncode, bytes(self._stderr)) from error + raise + finally: + self._busy.release() + + def read(self, oid: str, expected_type: str, algorithm: str) -> bytes: + def exchange() -> bytes: + assert self._process.stdin is not None and self._process.stdout is not None + self._process.stdin.write(f"{oid}\n".encode("ascii")) + self._process.stdin.flush() + header = self._process.stdout.readline(HEADER_LIMIT + 1) + size = object_size(header, oid, expected_type, self._limit) + body = self._process.stdout.read(size + 1) + return verified_body(body, size, oid, expected_type, algorithm) + return self._perform(exchange) + + def _release(self, *, aborted: bool = False) -> None: + self._closed = True + try: + self._requests.put_nowait(None) + except queue.Full: + pass + if self._worker.ident is not None: + self._worker.join() + if self._drainer.ident is not None: + self._drainer.join() + close_error = None + for stream in (self._process.stdin, self._process.stdout, self._process.stderr): + if stream is not None: + try: + stream.close() + except OSError as error: + close_error = error + # An aborted exchange deliberately discards pending stdin after reaping; + # a broken pipe during that discard cannot replace the primary failure. + if close_error is not None and not aborted: + raise unavailable("REPOSITORY_GIT.COMMAND_UNAVAILABLE", "Git pipe cleanup failed") from close_error + + def abort(self) -> None: + if self._closed: + return + self._kill() + self._process.wait() + self._release(aborted=True) + + def close(self) -> None: + if self._closed: + return + def finish() -> bytes: + assert self._process.stdin is not None and self._process.stdout is not None + self._process.stdin.close() + if self._process.stdout.read(1): + raise invalid("REPOSITORY_GIT.INVALID_OBJECT", "unexpected trailing batch output") + return b"" + try: + self._perform(finish) + try: + code = self._process.wait(timeout=self._timeout) + except subprocess.TimeoutExpired as error: + raise unavailable("REPOSITORY_GIT.COMMAND_TIMEOUT", "Git batch shutdown exceeded the command timeout") from error + self._release() + if self._overflow.is_set(): + raise unsupported("REPOSITORY_GIT.OUTPUT_LIMIT", "Git stderr exceeded its configured byte bound") + if self._stderr_error is not None or code != 0: + raise command_failure(code, bytes(self._stderr)) + except BaseException: + self.abort() + raise diff --git a/tools/repository_git/repository_git/repository.py b/tools/repository_git/repository_git/repository.py index 05ef1c8a..7a3fc2ec 100644 --- a/tools/repository_git/repository_git/repository.py +++ b/tools/repository_git/repository_git/repository.py @@ -3,6 +3,10 @@ import hashlib import os import stat +import sys +from dataclasses import dataclass +from types import MappingProxyType +from collections.abc import Mapping import subprocess import threading import tempfile @@ -13,6 +17,7 @@ from typing import Iterable, Iterator, Literal, Sequence from .errors import GitRepositoryError, invalid, unavailable, unsupported +from .batch import VerifiedBatchReader, object_size, verified_body from .model import ( CandidateCommitMessage, CandidateFile, @@ -709,6 +714,7 @@ def _read_file( revision: RepositoryRevision, path: RepositoryPath, read_object: Callable[[Path, str, str, str], bytes], + read_tree: Callable[[Path, str, str], Mapping[str, tuple[str, str]]] | None = None, ) -> bytes: algorithm = _algorithm(revision.oid) commit = read_object(self._repository, revision.oid, "commit", algorithm) @@ -717,8 +723,10 @@ def _read_file( traversed: list[str] = [] index = 0 while index < len(path.components): - tree = read_object(repository, tree_oid, "tree", algorithm) - entries = _tree_entries(tree, algorithm) + entries = ( + read_tree(repository, tree_oid, algorithm) if read_tree is not None + else _tree_entries(read_object(repository, tree_oid, "tree", algorithm), algorithm) + ) component = path.components[index] try: mode, oid = entries[component] @@ -791,79 +799,40 @@ def _object( ) from error raise header, separator, remainder = output.partition(b"\n") - if not separator: - raise invalid("REPOSITORY_GIT.INVALID_OBJECT", "batch header is incomplete") - if header == f"{oid} missing".encode("ascii"): - raise unavailable( - "REPOSITORY_GIT.OBJECT_UNAVAILABLE", f"Git object {oid} is unavailable" - ) - fields = header.split(b" ") - if len(fields) != 3 or fields[0] != oid.encode("ascii"): - raise invalid( - "REPOSITORY_GIT.INVALID_OBJECT", "batch header is contradictory" - ) - try: - observed_type = fields[1].decode("ascii") - size = int(fields[2]) - except (UnicodeDecodeError, ValueError) as error: - raise invalid("REPOSITORY_GIT.INVALID_OBJECT", str(error)) from error - if observed_type != expected_type: - raise invalid( - "REPOSITORY_GIT.TYPE_MISMATCH", - f"expected {expected_type}, observed {observed_type}", - ) - if size < 0 or size > self._max_object_bytes: - raise unsupported( - "REPOSITORY_GIT.OBJECT_LIMIT", - f"Git object exceeds {self._max_object_bytes} bytes", - ) - if len(remainder) != size + 1 or remainder[-1:] != b"\n": - raise invalid( - "REPOSITORY_GIT.INVALID_OBJECT", "batch body length is invalid" - ) - content = remainder[:-1] - object_header = f"{expected_type} {len(content)}\0".encode("ascii") - if hashlib.new(algorithm, object_header + content).hexdigest() != oid: - raise invalid( - "REPOSITORY_GIT.HASH_MISMATCH", f"Git object {oid} failed verification" - ) - return content + size = object_size(header + separator, oid, expected_type, self._max_object_bytes) + return verified_body(remainder, size, oid, expected_type, algorithm) + + + +@dataclass(frozen=True, slots=True) +class _RetainedObject: + content: bytes + entries: Mapping[str, tuple[str, str]] | None + size: int class RevisionReadSession: - """Single-owner, exact-revision reads; close releases all retained objects. + """One exact-revision owner for verified objects, decoded trees and a child. - Only fully verified object bytes enter the cache. Tree/path interpretation - still runs for each requested file. Successful earlier reads establish this - operation's immutable input, not ongoing health of the original object store. - Every new session verifies its first reads again. + A session uses at most one batch child at a time. Switching an explicitly + mapped repository closes the preceding stream; cached objects stay keyed by + repository/type/algorithm. Fresh sessions perform fresh first-read validation. """ def __init__( - self, - repository: GitRepository, - revision: RepositoryRevision, - *, + self, repository: GitRepository, revision: RepositoryRevision, *, max_cached_bytes: int = DEFAULT_REVISION_CACHE_BYTES, max_cached_objects: int = DEFAULT_REVISION_CACHE_OBJECTS, ) -> None: if type(revision) is not RepositoryRevision: - raise invalid( - "REPOSITORY_GIT.INVALID_REVISION", "read session requires an exact revision" - ) - if any( - type(value) is not int or value < 0 - for value in (max_cached_bytes, max_cached_objects) - ): - raise invalid( - "REPOSITORY_GIT.INVALID_BOUND", "cache bounds must be nonnegative integers" - ) - self._repository = repository - self._revision = revision - self._max_bytes = max_cached_bytes - self._max_objects = max_cached_objects - self._objects: OrderedDict[tuple[Path, str, str, str], bytes] = OrderedDict() + raise invalid("REPOSITORY_GIT.INVALID_REVISION", "read session requires an exact revision") + if any(type(value) is not int or value < 0 for value in (max_cached_bytes, max_cached_objects)): + raise invalid("REPOSITORY_GIT.INVALID_BOUND", "cache bounds must be nonnegative integers") + self._repository, self._revision = repository, revision + self._max_bytes, self._max_objects = max_cached_bytes, max_cached_objects + self._objects: OrderedDict[tuple[Path, str, str, str], _RetainedObject] = OrderedDict() self._cached_bytes = 0 + self._reader: tuple[Path, VerifiedBatchReader] | None = None self._closed = False @property @@ -872,59 +841,99 @@ def revision(self) -> RepositoryRevision: @property def cached_bytes(self) -> int: - """Retained verified payload, excluding the bounded entry bookkeeping.""" + """Raw payload plus decoded-tree allocations; entry count bounds bookkeeping.""" return self._cached_bytes @property def cached_objects(self) -> int: return len(self._objects) - def close(self) -> None: - self._objects.clear() - self._cached_bytes = 0 + def close(self, *, abort: bool = False) -> None: + if self._closed: + return self._closed = True + try: + if self._reader is not None: + reader = self._reader[1] + reader.abort() if abort else reader.close() + finally: + self._reader = None + self._objects.clear() + self._cached_bytes = 0 def __enter__(self) -> RevisionReadSession: self._require_open() return self - def __exit__(self, *_: object) -> None: - self.close() + def __exit__(self, exc_type: object, *_: object) -> None: + self.close(abort=exc_type is not None) def _require_open(self) -> None: if self._closed: - raise invalid( - "REPOSITORY_GIT.READ_SESSION_CLOSED", "the revision read session is closed" - ) + raise invalid("REPOSITORY_GIT.READ_SESSION_CLOSED", "the revision read session is closed") def read_file(self, path: RepositoryPath) -> bytes: self._require_open() - return self._repository._read_file(self._revision, path, self._object) + return self._repository._read_file(self._revision, path, self._object, self._tree) + + def _fetch(self, repository: Path, oid: str, expected_type: str, algorithm: str) -> bytes: + if self._reader is not None and self._reader[0] != repository: + previous, self._reader = self._reader, None + previous[1].close() + if self._reader is None: + self._reader = (repository, VerifiedBatchReader( + ("git", "-C", str(repository), "cat-file", "--batch"), + environment=sanitized_git_environment(), + object_limit=self._repository._max_object_bytes, + stderr_limit=ERROR_OUTPUT_LIMIT, timeout=COMMAND_TIMEOUT_SECONDS, + )) + try: + return self._reader[1].read(oid, expected_type, algorithm) + except BaseException: + self._reader[1].abort() + self._reader = None + raise - def _object( - self, repository: Path, oid: str, expected_type: str, algorithm: str - ) -> bytes: + def _retain(self, key: tuple[Path, str, str, str], entry: _RetainedObject) -> None: + if not self._max_objects or not self._max_bytes or entry.size > self._max_bytes: + return + prior = self._objects.pop(key, None) + if prior is not None: + self._cached_bytes -= prior.size + while self._objects and (len(self._objects) >= self._max_objects + or self._cached_bytes + entry.size > self._max_bytes): + _, evicted = self._objects.popitem(last=False) + self._cached_bytes -= evicted.size + self._objects[key] = entry + self._cached_bytes += entry.size + + def _object(self, repository: Path, oid: str, expected_type: str, algorithm: str) -> bytes: key = (repository, oid, expected_type, algorithm) if key in self._objects: self._objects.move_to_end(key) - return self._objects[key] - content = self._repository._object(repository, oid, expected_type, algorithm) - if ( - not self._max_objects - or len(content) > self._max_bytes - or not self._max_bytes - ): - return content - while self._objects and ( - len(self._objects) >= self._max_objects - or self._cached_bytes + len(content) > self._max_bytes - ): - _key, evicted = self._objects.popitem(last=False) - self._cached_bytes -= len(evicted) - self._objects[key] = content - self._cached_bytes += len(content) + return self._objects[key].content + content = self._fetch(repository, oid, expected_type, algorithm) + self._retain(key, _RetainedObject(content, None, len(content))) return content + def _tree(self, repository: Path, oid: str, algorithm: str) -> Mapping[str, tuple[str, str]]: + key = (repository, oid, "tree", algorithm) + entry = self._objects.get(key) + if entry is not None and entry.entries is not None: + self._objects.move_to_end(key) + return entry.entries + content = self._object(repository, oid, "tree", algorithm) + decoded = _tree_entries(content, algorithm) + # The tree schema owns these exact built-in containers. Count every + # referenced string conservatively even when Python shares an object. + size = len(content) + sys.getsizeof(decoded) + sum( + sys.getsizeof(name) + sys.getsizeof(pair) + sum(map(sys.getsizeof, pair)) + for name, pair in decoded.items() + ) + entries = MappingProxyType(decoded) + self._retain(key, _RetainedObject(content, entries, size + sys.getsizeof(entries))) + return entries + def _run_bounded( command: tuple[str, ...], diff --git a/tools/repository_git/tests/test_batch.py b/tools/repository_git/tests/test_batch.py new file mode 100644 index 00000000..5f751a41 --- /dev/null +++ b/tools/repository_git/tests/test_batch.py @@ -0,0 +1,192 @@ +"""Real pipe/process failures and exact-revision retention boundaries.""" +from __future__ import annotations + +import hashlib +import os +from pathlib import Path +import subprocess +import sys +import tempfile +import unittest +from unittest.mock import patch + +from tools.repository_git.repository_git import GitRepository, GitRepositoryError, RepositoryPath +from tools.repository_git.repository_git import repository as repo_module +from tools.repository_git.repository_git.batch import VerifiedBatchReader + + +class BatchReaderTest(unittest.TestCase): + def reader(self, script: str, **options): + reader = VerifiedBatchReader( + (sys.executable, "-u", "-c", script), environment=dict(os.environ), + object_limit=options.get("object_limit", 1024), + stderr_limit=options.get("stderr_limit", 1024), + timeout=options.get("timeout", 3), + ) + self.addCleanup(reader.abort) + return reader + + def assert_released(self, reader): + self.assertIsNotNone(reader._process.poll()) + self.assertFalse(reader._worker.is_alive()) + self.assertFalse(reader._drainer.is_alive()) + self.assertTrue(reader._process.stdin.closed) + self.assertTrue(reader._process.stdout.closed) + self.assertTrue(reader._process.stderr.closed) + + @staticmethod + def response(header: bytes, body: bytes): + return ("import sys; sys.stdin.buffer.readline(); " + f"sys.stdout.buffer.write({header + body!r}); sys.stdout.buffer.flush()") + + def test_fragmented_frames_and_one_owned_process(self): + content = b"a\x00\n\xff" + oid = hashlib.sha1(b"blob 4\0" + content).hexdigest() + script = ("import sys,os\nfor line in sys.stdin.buffer:\n" + f" data=line.strip()+b' blob 4\\n'+{content!r}+b'\\n'\n" + " for byte in data: os.write(1,bytes([byte]))\n") + reader = self.reader(script) + pid = reader._process.pid + for _ in range(20): + self.assertEqual(reader.read(oid, "blob", "sha1"), content) + self.assertEqual(reader._process.pid, pid) + reader.close() + reader.close() + self.assert_released(reader) + + def test_missing_type_size_truncation_and_hash_failures(self): + oid = "a" * 40 + cases = [ + (f"{oid} missing\n".encode(), b"", "REPOSITORY_GIT.OBJECT_UNAVAILABLE"), + (b"contradiction\n", b"", "REPOSITORY_GIT.INVALID_OBJECT"), + (b"x" * 257, b"", "REPOSITORY_GIT.INVALID_OBJECT"), + (f"{oid} tree 0\n".encode(), b"\n", "REPOSITORY_GIT.TYPE_MISMATCH"), + (f"{oid} blob 2048\n".encode(), b"", "REPOSITORY_GIT.OBJECT_LIMIT"), + (f"{oid} blob -1\n".encode(), b"", "REPOSITORY_GIT.OBJECT_LIMIT"), + (f"{oid} blob two\n".encode(), b"", "REPOSITORY_GIT.INVALID_OBJECT"), + (f"{oid} blob 2\n".encode(), b"a", "REPOSITORY_GIT.INVALID_OBJECT"), + (f"{oid} blob 2\n".encode(), b"ab!", "REPOSITORY_GIT.INVALID_OBJECT"), + (f"{oid} blob 2\n".encode(), b"ab\n", "REPOSITORY_GIT.HASH_MISMATCH"), + ] + for header, body, code in cases: + with self.subTest(code=code, header=header): + reader = self.reader(self.response(header, body)) + with self.assertRaises(GitRepositoryError) as raised: + reader.read(oid, "blob", "sha1") + self.assertEqual(raised.exception.failure.code, code) + self.assert_released(reader) + + def test_stderr_overflow_drains_without_deadlock(self): + reader = self.reader("import sys; sys.stdin.buffer.readline(); sys.stderr.buffer.write(b'x'*1000000); sys.stderr.flush(); sys.stdin.read()") + with self.assertRaises(GitRepositoryError) as raised: + reader.read("a" * 40, "blob", "sha1") + self.assertEqual(raised.exception.failure.code, "REPOSITORY_GIT.OUTPUT_LIMIT") + self.assertLessEqual(len(reader._stderr), 1024) + self.assert_released(reader) + + def test_exchange_timeout_kills_and_reaps_without_capture_deadline(self): + reader = self.reader("import sys; sys.stdin.buffer.readline(); sys.stdin.read()", timeout=0.25) + with self.assertRaises(GitRepositoryError) as raised: + reader.read("a" * 40, "blob", "sha1") + self.assertEqual(raised.exception.failure.code, "REPOSITORY_GIT.COMMAND_TIMEOUT") + self.assert_released(reader) + + def test_close_checks_trailing_data_and_exit_status(self): + oid = hashlib.sha1(b"blob 0\0").hexdigest() + for suffix, code in [("; sys.stdout.buffer.write(b'extra');sys.stdout.buffer.flush()", "REPOSITORY_GIT.INVALID_OBJECT"), + ("; sys.exit(7)", "REPOSITORY_GIT.COMMAND_UNAVAILABLE")]: + reader = self.reader(self.response(f"{oid} blob 0\n".encode(), b"\n") + suffix) + self.assertEqual(reader.read(oid, "blob", "sha1"), b"") + with self.assertRaises(GitRepositoryError) as raised: + reader.close() + self.assertEqual(raised.exception.failure.code, code) + self.assert_released(reader) + + def test_caller_interrupt_reaps_worker_and_process(self): + reader = self.reader("import sys; sys.stdin.read()") + original = reader._perform + def interrupted(): + raise KeyboardInterrupt + with self.assertRaises(KeyboardInterrupt): + original(interrupted) + self.assert_released(reader) + + def test_nonzero_early_exit_retains_command_failure(self): + reader = self.reader("import sys; sys.stdin.buffer.readline(); sys.stderr.write('stopped'); sys.exit(7)") + with self.assertRaises(GitRepositoryError) as raised: + reader.read("a" * 40, "blob", "sha1") + self.assertEqual(raised.exception.failure.code, "REPOSITORY_GIT.COMMAND_UNAVAILABLE") + self.assert_released(reader) + + def test_shutdown_timeout_reaps_process(self): + reader = self.reader("import sys,threading; sys.stdin.read(); threading.Event().wait()", timeout=0.25) + with self.assertRaises(GitRepositoryError) as raised: + reader.close() + self.assertEqual(raised.exception.failure.code, "REPOSITORY_GIT.COMMAND_TIMEOUT") + self.assert_released(reader) + + def test_child_start_failure_is_typed(self): + with patch("tools.repository_git.repository_git.batch.subprocess.Popen", side_effect=FileNotFoundError): + with self.assertRaises(GitRepositoryError) as raised: + self.reader("") + self.assertEqual(raised.exception.failure.code, "REPOSITORY_GIT.EXECUTABLE_UNAVAILABLE") + + +class CaptureSessionTest(unittest.TestCase): + def setUp(self): + self.directory = tempfile.TemporaryDirectory() + self.addCleanup(self.directory.cleanup) + self.root = Path(self.directory.name) + self.git("init", "-q") + self.git("config", "user.name", "Test") + self.git("config", "user.email", "test@example.invalid") + (self.root / "sub").mkdir() + for i in range(12): + (self.root / "sub" / f"{i}.txt").write_bytes(str(i).encode()) + self.git("add", ".") + self.git("commit", "-qm", "base") + self.repo = GitRepository(self.root) + self.revision = self.repo.current_revision() + + def git(self, *args): + return subprocess.check_output(("git", "-C", str(self.root), *args)) + + def test_shared_tree_is_parsed_once_and_child_ends_with_owner(self): + with patch.object(repo_module, "_tree_entries", wraps=repo_module._tree_entries) as parse: + with self.repo.read_session(self.revision) as session: + for _ in range(2): + for i in range(12): + self.assertEqual(session.read_file(RepositoryPath.parse(f"sub/{i}.txt")), str(i).encode()) + reader = session._reader[1] + self.assertEqual(parse.call_count, 2) # root and sub tree + raw = sum(len(item.content) for item in session._objects.values()) + self.assertGreater(session.cached_bytes, raw) + self.assertLessEqual(session.cached_bytes, 8 * 1024 * 1024) + self.assertIsNotNone(reader._process.returncode) + self.assertFalse(reader._worker.is_alive()) + self.assertFalse(reader._drainer.is_alive()) + self.assertEqual(session.cached_bytes, 0) + + def test_zero_retention_keeps_batching_and_complete_validation(self): + with self.repo.read_session(self.revision, max_cached_objects=0) as session: + session.read_file(RepositoryPath.parse("sub/1.txt")) + reader = session._reader[1] + for i in range(12): + self.assertEqual(session.read_file(RepositoryPath.parse(f"sub/{i}.txt")), str(i).encode()) + self.assertIs(session._reader[1], reader) + self.assertEqual(session.cached_objects, 0) + self.assertEqual(session.cached_bytes, 0) + + def test_decoded_tree_budget_and_exception_cleanup(self): + for budget in (128, 512, 1024): + with self.subTest(budget=budget): + session = self.repo.read_session(self.revision, max_cached_bytes=budget) + with self.assertRaisesRegex(RuntimeError, "consumer failed"): + with session: + for i in range(12): + self.assertEqual(session.read_file(RepositoryPath.parse(f"sub/{i}.txt")), str(i).encode()) + self.assertLessEqual(session.cached_bytes, budget) + reader = session._reader[1] + raise RuntimeError("consumer failed") + self.assertEqual(session.cached_objects, 0) + self.assertIsNotNone(reader._process.returncode) diff --git a/tools/repository_git/tests/test_repository.py b/tools/repository_git/tests/test_repository.py index 29765ab3..0680dc56 100644 --- a/tools/repository_git/tests/test_repository.py +++ b/tools/repository_git/tests/test_repository.py @@ -723,7 +723,8 @@ def test_read_session_reuses_verified_objects_and_pins_revision(self) -> None: self._commit(root, "base") repository = GitRepository(root) revision = repository.current_revision() - with mock.patch.object(repository, "_object", wraps=repository._object) as fetch: + with mock.patch.object(repository_module.RevisionReadSession, "_fetch", autospec=True, + side_effect=repository_module.RevisionReadSession._fetch) as fetch: with repository.read_session(revision) as session: self.assertEqual(session.read_file(RepositoryPath.parse("a")), b"old") self.assertEqual(session.read_file(RepositoryPath.parse("b")), b"old") @@ -753,7 +754,8 @@ def test_read_session_bounds_and_eviction_preserve_verified_reads(self) -> None: path, revision = RepositoryPath.parse("a"), repository.current_revision() for byte_limit, entry_limit in ((0, 10), (4096, 0), (4096, 1), (256, 10)): with self.subTest(bytes=byte_limit, entries=entry_limit): - with mock.patch.object(repository, "_object", wraps=repository._object) as fetch: + with mock.patch.object(repository_module.RevisionReadSession, "_fetch", autospec=True, + side_effect=repository_module.RevisionReadSession._fetch) as fetch: with repository.read_session(revision, max_cached_bytes=byte_limit, max_cached_objects=entry_limit) as session: self.assertEqual(session.read_file(path), content) @@ -812,13 +814,14 @@ def test_read_session_keeps_gitlink_repository_identity(self) -> None: self._git(root, "commit", "-qm", "gitlink") repository = GitRepository(root, gitlinks=(GitlinkRepository( RepositoryPath.parse("vendor"), nested),)) - with mock.patch.object(repository, "_object", wraps=repository._object) as fetch: + with mock.patch.object(repository_module.RevisionReadSession, "_fetch", autospec=True, + side_effect=repository_module.RevisionReadSession._fetch) as fetch: with repository.read_session(repository.current_revision()) as session: self.assertEqual(session.read_file(RepositoryPath.parse("same")), b"same") self.assertEqual(session.read_file(RepositoryPath.parse("vendor/same")), b"same") self.assertEqual(session.read_file(RepositoryPath.parse("vendor/same")), b"same") shared_oid = self._git(root, "rev-parse", "HEAD:same").strip() - owners = {call.args[0] for call in fetch.call_args_list if call.args[1] == shared_oid} + owners = {call.args[1] for call in fetch.call_args_list if call.args[2] == shared_oid} self.assertEqual(owners, {root.resolve(), nested.resolve()}) diff --git a/tools/standards_engine/PURPOSE-SEPARATION.md b/tools/standards_engine/PURPOSE-SEPARATION.md index fe92a159..581f07ba 100644 --- a/tools/standards_engine/PURPOSE-SEPARATION.md +++ b/tools/standards_engine/PURPOSE-SEPARATION.md @@ -13,7 +13,7 @@ Authorization remains the existing independent injected contract. The local facade is an owner-operated always-allow authorization adapter for admitted authoring operations; this release does not supply a multi-user access service. -Application operations are `route`, `read`, `related`, `routing_facts`, `query` +Application operations are `route`, `read`, `read_many`, `related`, `routing_facts`, `query` and `inspect`. The focused MCP catalog omits native `query`; `--advanced` can expose it within the same purpose. Authoring retains the complete existing workflow. Canonical interface operation variants own each purpose's input and @@ -132,6 +132,31 @@ server processes retain separate fixed-purpose resources. Stream EOF or failure releases the server-owned interface, catalog and cache; closing a borrowing Engine closes its store without releasing the owner's cache. +## Bounded grouped reads + +`read_many` takes one explicit snapshot and 1–32 ordered `items`. Each item has a +`target` and optional `detail`; authoring also permits the single-read coverage +and routing options. Exact duplicate requests are invalid. Reuse the snapshot +returned by routing or a single read, and select only the needed guidance. + +The result contains the original snapshot and ordered single-read results. +One complete durable content/identity validation supplies the whole operation; +current snapshot lifecycle is checked before every item and before return. +Purpose, exposure, prerequisite and item-option checks use the ordinary read +projection. Any failed item or lifecycle observation rejects the entire set. +No item content is returned on failure. A new independent call verifies durable +content again. This is a new explicit operation, not a change to single reads. + +The complete domain result is bounded to 2 MiB in the transport's default JSON +encoding (ASCII escaping and default separators); protocol framing, alternate +pretty-printing and MCP's duplicate structured/text encodings are outside that +payload bound. A larger set returns `READ_MANY.RESULT_LIMIT` in authoring or +`APPLICATION.RESULT_LIMIT` in application. Select fewer items or smaller policy +scopes; the Engine neither truncates material nor substitutes partial success. +`read_many` uses the named operation through MCP, the reference CLI and the +native facade; it is not a new request variant inside `query` or `query_proposal`. +Restart clients/servers after the interface update to discover the new operation. + ## Application qualification A declaration identifies an entire canonical module or registered operational @@ -217,7 +242,7 @@ those same bytes. The Engine does not rewrite semantic versions after review. ## Versions and coordinated cutover -Current Engine package/transport implementation: 0.2.0. Engine interface: 31. +Current Engine package/transport implementation: 0.2.0. Engine interface: 32. Analysis request: 6; result/state and Analysis handles: 7. The semantic-revision interpretation change belongs to Analysis 7. Unchanged Snapshot, proposal, readiness, application and generic identity/storage contracts keep their diff --git a/tools/standards_engine/README.md b/tools/standards_engine/README.md index 3f8ae556..93f207e5 100644 --- a/tools/standards_engine/README.md +++ b/tools/standards_engine/README.md @@ -32,6 +32,11 @@ accepted authority and returns its handle. `read` defaults to compact exact policy content and essential metadata; `detail: "full"` returns all relationship rows. Native `query` remains available. +`read_many` reads a selected set using one explicit snapshot. It accepts 1–32 +ordered unique items, applies the existing purpose-qualified single-read behavior, +and returns all results or one bounded rejection. Its complete JSON domain +payload is limited to 2 MiB. See [the grouped-read contract](PURPOSE-SEPARATION.md#bounded-grouped-reads). + Navigation reads immutable snapshots; proposal analysis, review, verification, and application operate on exact revision handles. Proposal creation and revision each carry one atomic diff --git a/tools/standards_engine/contracts/README.md b/tools/standards_engine/contracts/README.md index 231206d6..185a9e2e 100644 --- a/tools/standards_engine/contracts/README.md +++ b/tools/standards_engine/contracts/README.md @@ -44,6 +44,20 @@ Files under [`examples/`](examples/) are reviewed authored fixtures. Each example names one reachable schema definition and supplies one value. They do not define fields, defaults, variants, identity, or runtime semantics. +## Grouped Reading (Interface 32) + +`read_many` declares authoring and application operation variants. Both require +an explicit snapshot and 1–32 unique ordered read items. Each item uses the +corresponding single-read options without a separate snapshot. Success returns +that snapshot and ordered single-read result objects; failures return one normal +purpose-qualified rejection and no item results. The Engine additionally enforces +a 2 MiB serialized domain-result bound (documented in PURPOSE-SEPARATION.md). + +This public addition changes the interface version and generated projections; +Snapshot, Analysis, identity and store contracts keep their independent versions. +The schema/compiler remain the sole shape authority. Transport catalogs expose +one additional focused operation; existing query variants retain their scope. + ## Focused Agent Navigation Interface version 30 adds `rewrite-navigation-index` to the proposal edit diff --git a/tools/standards_engine/contracts/a1-contract.schema.json b/tools/standards_engine/contracts/a1-contract.schema.json index f98e5c3a..355665ad 100644 --- a/tools/standards_engine/contracts/a1-contract.schema.json +++ b/tools/standards_engine/contracts/a1-contract.schema.json @@ -1,6 +1,6 @@ { "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://coding-standards.local/contracts/standards-engine/a2-v24", + "$id": "https://coding-standards.local/contracts/standards-engine/a2-v32", "title": "Standards Engine A2 contract", "description": "Canonical typed contract for snapshot lifecycle, controlled authoring, navigation, inspection, and immutable standards-change analysis.", "oneOf": [ @@ -22,6 +22,12 @@ { "$ref": "#/$defs/ApplicationReadCall" }, + { + "$ref": "#/$defs/ApplicationReadManyCall" + }, + { + "$ref": "#/$defs/ApplicationReadManyResult" + }, { "$ref": "#/$defs/ApplicationReadResult" }, @@ -130,6 +136,12 @@ { "$ref": "#/$defs/ReadCall" }, + { + "$ref": "#/$defs/ReadManyCall" + }, + { + "$ref": "#/$defs/ReadManyResult" + }, { "$ref": "#/$defs/ReadResult" }, @@ -6589,7 +6601,8 @@ "APPLICATION.INPUT_INVALID", "APPLICATION.OPERATION_UNAVAILABLE", "APPLICATION.INTERNAL_UNAVAILABLE", - "APPLICATION.UNSUPPORTED_CAPTURE" + "APPLICATION.UNSUPPORTED_CAPTURE", + "APPLICATION.RESULT_LIMIT" ] }, "outcome": { @@ -7360,6 +7373,170 @@ "$ref": "#/$defs/PolicySemanticIntent" } } + }, + "ReadManyItem": { + "type": "object", + "required": [ + "target" + ], + "properties": { + "target": { + "$ref": "#/$defs/CanonicalId" + }, + "include_routing": { + "type": "boolean" + }, + "include_coverage": { + "type": "boolean", + "description": "Include current repository attestation status for registered policy units in this read scope." + }, + "detail": { + "enum": [ + "compact", + "full" + ], + "description": "Compact preserves exact policy and essential authority; full includes all relationship rows." + } + }, + "additionalProperties": false + }, + "ReadManyCall": { + "type": "object", + "additionalProperties": false, + "required": [ + "snapshot", + "items" + ], + "description": "Read 1–32 selected items from one explicit snapshot, preserving order. The complete JSON result is limited to 2 MiB; any failed item rejects the entire request.", + "properties": { + "snapshot": { + "$ref": "#/$defs/SnapshotHandle" + }, + "items": { + "type": "array", + "minItems": 1, + "maxItems": 32, + "uniqueItems": true, + "items": { + "$ref": "#/$defs/ReadManyItem" + } + } + } + }, + "ReadManyResult": { + "type": "object", + "additionalProperties": false, + "required": [ + "kind", + "snapshot", + "items" + ], + "properties": { + "kind": { + "const": "read-many-result" + }, + "snapshot": { + "$ref": "#/$defs/SnapshotHandle" + }, + "items": { + "type": "array", + "minItems": 1, + "maxItems": 32, + "items": { + "oneOf": [ + { + "$ref": "#/$defs/CompactReadResult" + }, + { + "$ref": "#/$defs/ReadResult" + }, + { + "$ref": "#/$defs/NavigationIndexesResult" + }, + { + "$ref": "#/$defs/ProvenanceReadResult" + }, + { + "$ref": "#/$defs/OperationalReadResult" + } + ] + } + } + } + }, + "ApplicationReadManyItem": { + "type": "object", + "additionalProperties": false, + "required": [ + "target" + ], + "properties": { + "target": { + "$ref": "#/$defs/CanonicalId" + }, + "detail": { + "enum": [ + "compact", + "full" + ] + } + } + }, + "ApplicationReadManyCall": { + "type": "object", + "additionalProperties": false, + "required": [ + "snapshot", + "items" + ], + "description": "Read 1–32 selected items from one explicit snapshot, preserving order. The complete JSON result is limited to 2 MiB; any failed item rejects the entire request.", + "properties": { + "snapshot": { + "$ref": "#/$defs/SnapshotHandle" + }, + "items": { + "type": "array", + "minItems": 1, + "maxItems": 32, + "uniqueItems": true, + "items": { + "$ref": "#/$defs/ApplicationReadManyItem" + } + } + } + }, + "ApplicationReadManyResult": { + "type": "object", + "additionalProperties": false, + "required": [ + "kind", + "snapshot", + "items", + "purpose" + ], + "properties": { + "kind": { + "const": "application-read-many-result" + }, + "snapshot": { + "$ref": "#/$defs/SnapshotHandle" + }, + "items": { + "type": "array", + "minItems": 1, + "maxItems": 32, + "items": { + "oneOf": [ + { + "$ref": "#/$defs/ApplicationReadResult" + } + ] + } + }, + "purpose": { + "const": "application" + } + } } } } diff --git a/tools/standards_engine/contracts/a1-interface.toml b/tools/standards_engine/contracts/a1-interface.toml index 568699ed..d0227d97 100644 --- a/tools/standards_engine/contracts/a1-interface.toml +++ b/tools/standards_engine/contracts/a1-interface.toml @@ -1,5 +1,5 @@ schema_version = 1 -interface_schema_version = 31 +interface_schema_version = 32 request_contract_version = 6 result_projection_version = 7 @@ -200,3 +200,10 @@ id = "resume" input_definition = "ResumeCall" result_definitions = ["WorkflowResult", "RejectedResult"] capability = "standards.read" + +[[operations]] +id = "read_many" +input_definition = "ReadManyCall" +result_definitions = ["ReadManyResult", "RejectedResult"] +capability = "standards.read" +variants = { "application" = { "input_definition" = "ApplicationReadManyCall", "result_definitions" = ["ApplicationReadManyResult", "ApplicationRejectedResult"] } } diff --git a/tools/standards_engine/contracts/examples/a1-examples.json b/tools/standards_engine/contracts/examples/a1-examples.json index 8a543259..ce0327be 100644 --- a/tools/standards_engine/contracts/examples/a1-examples.json +++ b/tools/standards_engine/contracts/examples/a1-examples.json @@ -1,6 +1,6 @@ { "schema_version": 2, - "interface_schema_version": 31, + "interface_schema_version": 32, "examples": [ { "name": "create-snapshot", @@ -689,6 +689,46 @@ "schema_version": 5 } } + }, + { + "name": "read-many", + "definition": "ReadManyCall", + "value": { + "snapshot": { + "kind": "snapshot-handle", + "id": "snapshot:v1:00000000-0000-4000-8000-000000000001", + "schema_version": 5 + }, + "items": [ + { + "target": "core" + }, + { + "target": "router", + "detail": "full" + } + ] + } + }, + { + "name": "application-read-many", + "definition": "ApplicationReadManyCall", + "value": { + "snapshot": { + "kind": "snapshot-handle", + "id": "snapshot:v1:00000000-0000-4000-8000-000000000001", + "schema_version": 5 + }, + "items": [ + { + "target": "core" + }, + { + "target": "router", + "detail": "full" + } + ] + } } ] } diff --git a/tools/standards_engine/contracts/generated/agent-tools.json b/tools/standards_engine/contracts/generated/agent-tools.json index dde849e8..1621ea2c 100644 --- a/tools/standards_engine/contracts/generated/agent-tools.json +++ b/tools/standards_engine/contracts/generated/agent-tools.json @@ -679,6 +679,80 @@ ], "type": "object" }, + "ApplicationReadManyCall": { + "additionalProperties": false, + "description": "Read 1–32 selected items from one explicit snapshot, preserving order. The complete JSON result is limited to 2 MiB; any failed item rejects the entire request.", + "properties": { + "items": { + "items": { + "$ref": "#/$defs/ApplicationReadManyItem" + }, + "maxItems": 32, + "minItems": 1, + "type": "array", + "uniqueItems": true + }, + "snapshot": { + "$ref": "#/$defs/SnapshotHandle" + } + }, + "required": [ + "snapshot", + "items" + ], + "type": "object" + }, + "ApplicationReadManyItem": { + "additionalProperties": false, + "properties": { + "detail": { + "enum": [ + "compact", + "full" + ] + }, + "target": { + "$ref": "#/$defs/CanonicalId" + } + }, + "required": [ + "target" + ], + "type": "object" + }, + "ApplicationReadManyResult": { + "additionalProperties": false, + "properties": { + "items": { + "items": { + "oneOf": [ + { + "$ref": "#/$defs/ApplicationReadResult" + } + ] + }, + "maxItems": 32, + "minItems": 1, + "type": "array" + }, + "kind": { + "const": "application-read-many-result" + }, + "purpose": { + "const": "application" + }, + "snapshot": { + "$ref": "#/$defs/SnapshotHandle" + } + }, + "required": [ + "kind", + "snapshot", + "items", + "purpose" + ], + "type": "object" + }, "ApplicationReadRequest": { "additionalProperties": false, "properties": { @@ -834,7 +908,8 @@ "APPLICATION.INPUT_INVALID", "APPLICATION.OPERATION_UNAVAILABLE", "APPLICATION.INTERNAL_UNAVAILABLE", - "APPLICATION.UNSUPPORTED_CAPTURE" + "APPLICATION.UNSUPPORTED_CAPTURE", + "APPLICATION.RESULT_LIMIT" ] }, "kind": { @@ -5093,6 +5168,96 @@ ], "type": "object" }, + "ReadManyCall": { + "additionalProperties": false, + "description": "Read 1–32 selected items from one explicit snapshot, preserving order. The complete JSON result is limited to 2 MiB; any failed item rejects the entire request.", + "properties": { + "items": { + "items": { + "$ref": "#/$defs/ReadManyItem" + }, + "maxItems": 32, + "minItems": 1, + "type": "array", + "uniqueItems": true + }, + "snapshot": { + "$ref": "#/$defs/SnapshotHandle" + } + }, + "required": [ + "snapshot", + "items" + ], + "type": "object" + }, + "ReadManyItem": { + "additionalProperties": false, + "properties": { + "detail": { + "description": "Compact preserves exact policy and essential authority; full includes all relationship rows.", + "enum": [ + "compact", + "full" + ] + }, + "include_coverage": { + "description": "Include current repository attestation status for registered policy units in this read scope.", + "type": "boolean" + }, + "include_routing": { + "type": "boolean" + }, + "target": { + "$ref": "#/$defs/CanonicalId" + } + }, + "required": [ + "target" + ], + "type": "object" + }, + "ReadManyResult": { + "additionalProperties": false, + "properties": { + "items": { + "items": { + "oneOf": [ + { + "$ref": "#/$defs/CompactReadResult" + }, + { + "$ref": "#/$defs/ReadResult" + }, + { + "$ref": "#/$defs/NavigationIndexesResult" + }, + { + "$ref": "#/$defs/ProvenanceReadResult" + }, + { + "$ref": "#/$defs/OperationalReadResult" + } + ] + }, + "maxItems": 32, + "minItems": 1, + "type": "array" + }, + "kind": { + "const": "read-many-result" + }, + "snapshot": { + "$ref": "#/$defs/SnapshotHandle" + } + }, + "required": [ + "kind", + "snapshot", + "items" + ], + "type": "object" + }, "ReadRequest": { "additionalProperties": false, "properties": { @@ -7149,7 +7314,7 @@ "type": "object" } }, - "interface_schema_version": 31, + "interface_schema_version": 32, "operations": [ { "capability": "standards.snapshot.create", @@ -7628,6 +7793,30 @@ "WorkflowResult", "RejectedResult" ] + }, + { + "capability": "standards.read", + "id": "read_many", + "input_definition": "ReadManyCall", + "input_schema": { + "$ref": "#/$defs/ReadManyCall" + }, + "result_definitions": [ + "ReadManyResult", + "RejectedResult" + ], + "variants": { + "application": { + "input_definition": "ApplicationReadManyCall", + "input_schema": { + "$ref": "#/$defs/ApplicationReadManyCall" + }, + "result_definitions": [ + "ApplicationReadManyResult", + "ApplicationRejectedResult" + ] + } + } } ], "request_contract_version": 6, diff --git a/tools/standards_engine/standards_engine/_generated_contract.py b/tools/standards_engine/standards_engine/_generated_contract.py index e24adbb1..aa0605f8 100644 --- a/tools/standards_engine/standards_engine/_generated_contract.py +++ b/tools/standards_engine/standards_engine/_generated_contract.py @@ -14,8 +14,8 @@ model_as_contract, ) -_SCHEMA = json.loads('{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"https://coding-standards.local/contracts/standards-engine/a2-v24","title":"Standards Engine A2 contract","description":"Canonical typed contract for snapshot lifecycle, controlled authoring, navigation, inspection, and immutable standards-change analysis.","oneOf":[{"$ref":"#/$defs/AgentRouteResult"},{"$ref":"#/$defs/AnalyzeCall"},{"$ref":"#/$defs/AnalyzeProposalCall"},{"$ref":"#/$defs/ApplicationInspectCall"},{"$ref":"#/$defs/ApplicationQueryCall"},{"$ref":"#/$defs/ApplicationReadCall"},{"$ref":"#/$defs/ApplicationReadResult"},{"$ref":"#/$defs/ApplicationRecoveryRequiredResult"},{"$ref":"#/$defs/ApplicationRejectedResult"},{"$ref":"#/$defs/ApplicationRelatedResult"},{"$ref":"#/$defs/ApplicationRouteResult"},{"$ref":"#/$defs/ApplicationRoutingFactsResult"},{"$ref":"#/$defs/ApplyCall"},{"$ref":"#/$defs/ApplyProposalCall"},{"$ref":"#/$defs/ApplyProposalResult"},{"$ref":"#/$defs/CompactReadResult"},{"$ref":"#/$defs/CompleteResult"},{"$ref":"#/$defs/CreateProposalCall"},{"$ref":"#/$defs/CreateProposalResult"},{"$ref":"#/$defs/CreateSnapshotCall"},{"$ref":"#/$defs/CreateSnapshotResult"},{"$ref":"#/$defs/DeleteSnapshotCall"},{"$ref":"#/$defs/DeleteSnapshotResult"},{"$ref":"#/$defs/FindProposalsCall"},{"$ref":"#/$defs/FindProposalsResult"},{"$ref":"#/$defs/FindSnapshotsCall"},{"$ref":"#/$defs/FindSnapshotsResult"},{"$ref":"#/$defs/InspectCall"},{"$ref":"#/$defs/InspectionResult"},{"$ref":"#/$defs/MaintainEvidenceCall"},{"$ref":"#/$defs/MaintainEvidenceResult"},{"$ref":"#/$defs/NavigationIndexesResult"},{"$ref":"#/$defs/OperationalReadResult"},{"$ref":"#/$defs/PendingResult"},{"$ref":"#/$defs/PrepareCall"},{"$ref":"#/$defs/ProposeCall"},{"$ref":"#/$defs/ProvenanceReadResult"},{"$ref":"#/$defs/QueryCall"},{"$ref":"#/$defs/QueryProposalCall"},{"$ref":"#/$defs/QueryProposalResult"},{"$ref":"#/$defs/QueryResult"},{"$ref":"#/$defs/ReadCall"},{"$ref":"#/$defs/ReadResult"},{"$ref":"#/$defs/RecoverApplicationCall"},{"$ref":"#/$defs/RecoverApplicationResult"},{"$ref":"#/$defs/RecoverCall"},{"$ref":"#/$defs/RejectedResult"},{"$ref":"#/$defs/RelatedCall"},{"$ref":"#/$defs/RelatedResult"},{"$ref":"#/$defs/ResolveCall"},{"$ref":"#/$defs/ResolveWorkflowCall"},{"$ref":"#/$defs/ResumeCall"},{"$ref":"#/$defs/ReviewCall"},{"$ref":"#/$defs/ReviewProposalCall"},{"$ref":"#/$defs/ReviewProposalResult"},{"$ref":"#/$defs/ReviseCall"},{"$ref":"#/$defs/ReviseProposalCall"},{"$ref":"#/$defs/ReviseProposalResult"},{"$ref":"#/$defs/RouteCall"},{"$ref":"#/$defs/RoutingFactsCall"},{"$ref":"#/$defs/RoutingFactsResult"},{"$ref":"#/$defs/UndeleteSnapshotCall"},{"$ref":"#/$defs/UndeleteSnapshotResult"},{"$ref":"#/$defs/VerifyProposalCall"},{"$ref":"#/$defs/VerifyProposalResult"},{"$ref":"#/$defs/VerifyRepositoryCall"},{"$ref":"#/$defs/VerifyRepositoryResult"},{"$ref":"#/$defs/WorkflowResult"},{"$ref":"#/$defs/WorkflowStatusCall"}],"$defs":{"NonEmptyString":{"type":"string","minLength":1},"CanonicalId":{"type":"string","pattern":"^[A-Za-z0-9][A-Za-z0-9._:/-]*$"},"EdgeId":{"type":"string","minLength":1},"Digest":{"type":"string","pattern":"^sha256:[0-9a-f]{64}$"},"ObligationId":{"type":"string","pattern":"^obligation:sha256:[0-9a-f]{64}$"},"ImpactTraceId":{"type":"string","pattern":"^impact-trace:sha256:[0-9a-f]{64}$"},"FactRequirementId":{"type":"string","pattern":"^fact-requirement:sha256:[0-9a-f]{64}$"},"ScalarValue":{"oneOf":[{"type":"boolean"},{"type":"integer"},{"type":"string"},{"type":"null"}]},"FactValue":{"oneOf":[{"type":"object","required":["type","state","value"],"properties":{"type":{"const":"boolean"},"state":{"const":"known"},"value":{"type":"boolean"}},"additionalProperties":false},{"type":"object","required":["type","state","value"],"properties":{"type":{"enum":["boolean","enum","string","string-set","enum-set","canonical-id"]},"state":{"const":"known"},"value":{"type":"null"}},"additionalProperties":false},{"type":"object","required":["type","state","value"],"properties":{"type":{"enum":["enum","string","canonical-id"]},"state":{"const":"known"},"value":{"type":"string"}},"additionalProperties":false},{"type":"object","required":["type","state","value"],"properties":{"type":{"enum":["string-set","enum-set"]},"state":{"const":"known"},"value":{"type":"array","items":{"type":"string"},"uniqueItems":true}},"additionalProperties":false},{"type":"object","required":["type","state"],"properties":{"type":{"enum":["boolean","enum","string","string-set","enum-set","canonical-id"]},"state":{"enum":["known-absent","unknown"]}},"additionalProperties":false}]},"FactSet":{"type":"object","additionalProperties":{"$ref":"#/$defs/FactValue"}},"StructuredScope":{"type":"object","required":["kind","heading_path"],"properties":{"kind":{"const":"structured"},"heading_path":{"type":"array","minItems":1,"items":{"$ref":"#/$defs/NonEmptyString"}}},"additionalProperties":false},"WholeArtifactScope":{"type":"object","required":["kind"],"properties":{"kind":{"const":"whole-artifact"}},"additionalProperties":false},"ReviewScope":{"oneOf":[{"$ref":"#/$defs/StructuredScope"},{"$ref":"#/$defs/WholeArtifactScope"}]},"AllExpression":{"type":"object","required":["operator","expressions"],"properties":{"operator":{"const":"all"},"expressions":{"type":"array","minItems":1,"items":{"$ref":"#/$defs/ApplicabilityExpression"}}},"additionalProperties":false},"AnyExpression":{"type":"object","required":["operator","expressions"],"properties":{"operator":{"const":"any"},"expressions":{"type":"array","minItems":1,"items":{"$ref":"#/$defs/ApplicabilityExpression"}}},"additionalProperties":false},"NotExpression":{"type":"object","required":["operator","expression"],"properties":{"operator":{"const":"not"},"expression":{"$ref":"#/$defs/ApplicabilityExpression"}},"additionalProperties":false},"EqualsExpression":{"type":"object","required":["operator","fact","value"],"properties":{"operator":{"const":"equals"},"fact":{"$ref":"#/$defs/CanonicalId"},"value":{"$ref":"#/$defs/ScalarValue"}},"additionalProperties":false},"InExpression":{"type":"object","required":["operator","fact","values"],"properties":{"operator":{"const":"in"},"fact":{"$ref":"#/$defs/CanonicalId"},"values":{"type":"array","minItems":1,"uniqueItems":true,"items":{"$ref":"#/$defs/ScalarValue"}}},"additionalProperties":false},"ContainsExpression":{"type":"object","required":["operator","fact","value"],"properties":{"operator":{"const":"contains"},"fact":{"$ref":"#/$defs/CanonicalId"},"value":{"$ref":"#/$defs/ScalarValue"}},"additionalProperties":false},"ExistsExpression":{"type":"object","required":["operator","fact"],"properties":{"operator":{"const":"exists"},"fact":{"$ref":"#/$defs/CanonicalId"}},"additionalProperties":false},"AlwaysExpression":{"type":"object","required":["operator"],"properties":{"operator":{"const":"always"}},"additionalProperties":false},"ApplicabilityExpression":{"oneOf":[{"$ref":"#/$defs/AlwaysExpression"},{"$ref":"#/$defs/AllExpression"},{"$ref":"#/$defs/AnyExpression"},{"$ref":"#/$defs/NotExpression"},{"$ref":"#/$defs/EqualsExpression"},{"$ref":"#/$defs/InExpression"},{"$ref":"#/$defs/ContainsExpression"},{"$ref":"#/$defs/ExistsExpression"}]},"GeneralSelectionReason":{"type":"object","required":["kind"],"properties":{"kind":{"enum":["routing-fact","requires","specializes","changed-policy","question","audit-coverage","unmapped-normative-change","structured-scope-analysis-unsupported","navigation-index-change","supporting-content-change"]},"source":{"$ref":"#/$defs/CanonicalId"},"fact":{"$ref":"#/$defs/CanonicalId"},"edge":{"$ref":"#/$defs/EdgeId"},"question":{"$ref":"#/$defs/CanonicalId"}},"additionalProperties":false},"PolicyImpactSelectionReason":{"type":"object","required":["kind","source","edge","relation","evidence_owner","traces"],"properties":{"kind":{"const":"policy-impact-edge"},"source":{"$ref":"#/$defs/CanonicalId"},"edge":{"$ref":"#/$defs/EdgeId"},"relation":{"$ref":"#/$defs/CanonicalId"},"evidence_owner":{"$ref":"#/$defs/CanonicalId"},"traces":{"type":"array","minItems":1,"uniqueItems":true,"items":{"$ref":"#/$defs/ImpactTraceReference"}}},"additionalProperties":false},"SelectionReason":{"oneOf":[{"$ref":"#/$defs/GeneralSelectionReason"},{"$ref":"#/$defs/PolicyImpactSelectionReason"}]},"ImpactTraceReference":{"type":"object","required":["id","graph","applicability"],"properties":{"id":{"$ref":"#/$defs/ImpactTraceId"},"graph":{"enum":["accepted","proposed"]},"applicability":{"enum":["true","false","unknown"]}},"additionalProperties":false},"ConsumerReviewObligationReadingReason":{"type":"object","required":["kind","obligation"],"properties":{"kind":{"const":"consumer-review-obligation"},"obligation":{"$ref":"#/$defs/ObligationId"}},"additionalProperties":false},"RoutingBaseReadingReason":{"type":"object","required":["kind","projection"],"properties":{"kind":{"const":"routing-base"},"projection":{"$ref":"#/$defs/CanonicalId"}},"additionalProperties":false},"RoutingRuleReadingReason":{"type":"object","required":["kind","rule","facts"],"properties":{"kind":{"const":"routing-rule"},"rule":{"$ref":"#/$defs/CanonicalId"},"facts":{"type":"array","uniqueItems":true,"items":{"$ref":"#/$defs/CanonicalId"}}},"additionalProperties":false},"RequiresReadingReason":{"type":"object","required":["kind","edge","source"],"properties":{"kind":{"const":"requires"},"edge":{"$ref":"#/$defs/EdgeId"},"source":{"$ref":"#/$defs/CanonicalId"}},"additionalProperties":false},"SpecializesReadingReason":{"type":"object","required":["kind","edge","source"],"properties":{"kind":{"const":"specializes"},"edge":{"$ref":"#/$defs/EdgeId"},"source":{"$ref":"#/$defs/CanonicalId"}},"additionalProperties":false},"ReadingPlanReason":{"oneOf":[{"$ref":"#/$defs/ConsumerReviewObligationReadingReason"},{"$ref":"#/$defs/RoutingBaseReadingReason"},{"$ref":"#/$defs/RoutingRuleReadingReason"},{"$ref":"#/$defs/RequiresReadingReason"},{"$ref":"#/$defs/SpecializesReadingReason"}]},"ReadingPlanEntry":{"type":"object","required":["target","scope","authority","reasons","state"],"properties":{"target":{"$ref":"#/$defs/CanonicalId"},"scope":{"$ref":"#/$defs/ReviewScope"},"authority":{"enum":["normative","projection","contextual","evidence"]},"reasons":{"type":"array","minItems":1,"uniqueItems":true,"items":{"$ref":"#/$defs/ReadingPlanReason"}},"state":{"enum":["selected","conditional","unresolved"]}},"additionalProperties":false},"RouteRequest":{"type":"object","required":["kind","facts"],"properties":{"kind":{"const":"route"},"facts":{"$ref":"#/$defs/FactSet"}},"additionalProperties":false},"ReadRequest":{"type":"object","required":["kind","target"],"properties":{"kind":{"const":"read"},"target":{"$ref":"#/$defs/CanonicalId"},"include_routing":{"type":"boolean"},"include_coverage":{"type":"boolean","description":"Include current repository attestation status for registered policy units in this read scope."}},"additionalProperties":false},"RelatedRequest":{"type":"object","required":["kind","target","groups","direction","transitive"],"properties":{"kind":{"const":"related"},"target":{"$ref":"#/$defs/CanonicalId"},"groups":{"type":"array","minItems":1,"uniqueItems":true,"items":{"$ref":"#/$defs/CanonicalId"}},"direction":{"enum":["incoming","outgoing","both"]},"transitive":{"type":"boolean","default":false}},"additionalProperties":false},"QueryRequest":{"oneOf":[{"$ref":"#/$defs/RouteRequest"},{"$ref":"#/$defs/ReadRequest"},{"$ref":"#/$defs/RelatedRequest"}]},"PolicyUnitDeclaration":{"type":"object","required":["kind","id","module","heading_path","semantic_revision","lifecycle"],"properties":{"kind":{"const":"policy-unit"},"id":{"$ref":"#/$defs/CanonicalId"},"module":{"$ref":"#/$defs/CanonicalId"},"heading_path":{"type":"array","minItems":1,"items":{"$ref":"#/$defs/NonEmptyString"}},"semantic_revision":{"type":"integer","minimum":1},"lifecycle":{"const":"active"},"aliases":{"type":"array","uniqueItems":true,"items":{"$ref":"#/$defs/CanonicalId"}},"predecessors":{"type":"array","uniqueItems":true,"items":{"$ref":"#/$defs/CanonicalId"}},"successors":{"type":"array","uniqueItems":true,"items":{"$ref":"#/$defs/CanonicalId"}}},"additionalProperties":false},"CanonicalModuleDeclaration":{"type":"object","required":["kind","id","role","level","applies_when","does_not_apply_when","requires","specializes","verification"],"properties":{"kind":{"const":"canonical-module"},"id":{"$ref":"#/$defs/CanonicalId"},"role":{"enum":["core","router","workflow","profile","topic","reference"]},"level":{"enum":["MUST","SHOULD","PROFILE","REFERENCE"]},"applies_when":{"$ref":"#/$defs/NonEmptyString"},"does_not_apply_when":{"$ref":"#/$defs/NonEmptyString"},"requires":{"type":"array","uniqueItems":true,"items":{"$ref":"#/$defs/CanonicalId"}},"specializes":{"type":"array","uniqueItems":true,"items":{"$ref":"#/$defs/CanonicalId"}},"verification":{"$ref":"#/$defs/NonEmptyString"}},"additionalProperties":false},"PolicyRelationshipInspection":{"type":"object","required":["relationship_kind","applicability","source_scope","consumer_scope","propagation","evidence_owner","rationale"],"properties":{"relationship_kind":{"enum":["normative-consumer","router-projection","prompt-projection","template-projection","reference-projection","fixture-projection","enforcement-suite-projection","documentation-projection","implementation-projection"]},"applicability":{"$ref":"#/$defs/ApplicabilityExpression"},"source_scope":{"oneOf":[{"$ref":"#/$defs/ReviewScope"},{"type":"null"}]},"consumer_scope":{"oneOf":[{"$ref":"#/$defs/ReviewScope"},{"type":"null"}]},"propagation":{"const":"source-to-consumer"},"evidence_owner":{"$ref":"#/$defs/CanonicalId"},"rationale":{"$ref":"#/$defs/NonEmptyString"}},"additionalProperties":false},"SemanticProposal":{"type":"object","required":["policy","accepted_semantic_revision","proposed_semantic_revision","intent","structural_digest"],"properties":{"policy":{"$ref":"#/$defs/CanonicalId"},"accepted_semantic_revision":{"oneOf":[{"type":"integer","minimum":1},{"type":"null"}]},"proposed_semantic_revision":{"type":"integer","minimum":1},"intent":{"$ref":"#/$defs/NonEmptyString"},"structural_digest":{"$ref":"#/$defs/Digest"}},"additionalProperties":false},"ChangeDescriptor":{"type":"object","required":["kind","accepted_ids","proposed_ids","scope"],"properties":{"kind":{"enum":["module","modification","addition","removal","move","split","merge","navigation-index","supporting-content"]},"accepted_ids":{"type":"array","uniqueItems":true,"items":{"$ref":"#/$defs/CanonicalId"}},"proposed_ids":{"type":"array","uniqueItems":true,"items":{"$ref":"#/$defs/CanonicalId"}},"scope":{"$ref":"#/$defs/ReviewScope"},"accepted_module":{"$ref":"#/$defs/CanonicalId"},"proposed_module":{"$ref":"#/$defs/CanonicalId"}},"additionalProperties":false},"ChangedPolicyUnit":{"type":"object","required":["policy","change_kind","classification","accepted_representation_digest","proposed_representation_digest","accepted_structural_digest","proposed_structural_digest","accepted_semantic_revision","proposed_semantic_revision","semantic_state","scope"],"properties":{"policy":{"$ref":"#/$defs/CanonicalId"},"change_kind":{"enum":["modification","addition","removal","move","split-predecessor","split-successor","merge-predecessor","merge-successor"]},"classification":{"enum":["unchanged","representation-only-candidate","possibly-semantically-changed","semantically-changed","unresolved"]},"accepted_representation_digest":{"oneOf":[{"$ref":"#/$defs/Digest"},{"type":"null"}]},"proposed_representation_digest":{"oneOf":[{"$ref":"#/$defs/Digest"},{"type":"null"}]},"accepted_structural_digest":{"oneOf":[{"$ref":"#/$defs/Digest"},{"type":"null"}]},"proposed_structural_digest":{"oneOf":[{"$ref":"#/$defs/Digest"},{"type":"null"}]},"accepted_semantic_revision":{"oneOf":[{"type":"integer","minimum":1},{"type":"null"}]},"proposed_semantic_revision":{"oneOf":[{"type":"integer","minimum":1},{"type":"null"}]},"semantic_state":{"enum":["accepted-unchanged","proposed","removed","unresolved"]},"scope":{"$ref":"#/$defs/ReviewScope"}},"additionalProperties":false},"Question":{"type":"object","required":["id","kind","prompt","state","permitted_answers"],"properties":{"id":{"$ref":"#/$defs/CanonicalId"},"kind":{"enum":["applicability-fact","normative-classification","identity-resolution","scope-resolution"]},"prompt":{"$ref":"#/$defs/NonEmptyString"},"state":{"enum":["required","answered","blocked"]},"permitted_answers":{"type":"array","minItems":1,"uniqueItems":true,"items":{"$ref":"#/$defs/NonEmptyString"}}},"additionalProperties":false},"ConsumerReviewContract":{"type":"object","required":["kind","id","version","permitted_dispositions","evidence_contract","authorization_capability","semantics"],"properties":{"kind":{"const":"consumer-review-contract"},"id":{"$ref":"#/$defs/CanonicalId"},"version":{"type":"integer","minimum":1},"permitted_dispositions":{"type":"array","minItems":1,"uniqueItems":true,"items":{"enum":["updated","reviewed-no-change","not-applicable","blocked"]}},"evidence_contract":{"$ref":"#/$defs/CanonicalId"},"authorization_capability":{"$ref":"#/$defs/CanonicalId"},"semantics":{"$ref":"#/$defs/NonEmptyString"}},"additionalProperties":false},"DecisionDependency":{"type":"object","required":["class","identity","digest"],"properties":{"class":{"enum":["policy-unit","semantic-revision","structure","representation","module-locator","applicability-fact","relationship","audit","exception","evidence","provider-contract","applicability-contract","analysis-contract"]},"identity":{"$ref":"#/$defs/NonEmptyString"},"digest":{"$ref":"#/$defs/Digest"}},"additionalProperties":false},"DecisionFingerprint":{"type":"object","required":["decision_kind","decision_contract","schema_version","dependencies"],"properties":{"decision_kind":{"$ref":"#/$defs/CanonicalId"},"decision_contract":{"$ref":"#/$defs/CanonicalId"},"schema_version":{"const":1},"dependencies":{"type":"array","minItems":1,"items":{"$ref":"#/$defs/DecisionDependency"}}},"additionalProperties":false},"FactValueContract":{"type":"object","required":["type","states","nullable"],"properties":{"type":{"enum":["boolean","enum","string","string-set","enum-set","canonical-id"]},"states":{"const":["known","known-absent"]},"nullable":{"type":"boolean"},"values":{"type":"array","minItems":1,"uniqueItems":true,"items":{"type":"string"}}},"additionalProperties":false},"EvidenceReference":{"type":"object","required":["id","digest","provider_contract","provider_contract_version"],"properties":{"id":{"$ref":"#/$defs/CanonicalId"},"digest":{"$ref":"#/$defs/Digest"},"provider_contract":{"$ref":"#/$defs/CanonicalId"},"provider_contract_version":{"$ref":"#/$defs/NonEmptyString"}},"additionalProperties":false},"CompletionProof":{"type":"object","required":["required_coverage_subjects","certificate_subjects","reached_consumer_obligations","disposition_obligations","required_fact_requirements","observed_fact_requirements","non_consumer_obligations_resolved","applicability_resolved","authorization_valid","evidence_valid"],"properties":{"required_coverage_subjects":{"type":"array","uniqueItems":true,"items":{"$ref":"#/$defs/CanonicalId"}},"certificate_subjects":{"type":"array","uniqueItems":true,"items":{"$ref":"#/$defs/CanonicalId"}},"reached_consumer_obligations":{"type":"array","uniqueItems":true,"items":{"$ref":"#/$defs/ObligationId"}},"disposition_obligations":{"type":"array","uniqueItems":true,"items":{"$ref":"#/$defs/ObligationId"}},"required_fact_requirements":{"type":"array","uniqueItems":true,"items":{"$ref":"#/$defs/FactRequirementId"}},"observed_fact_requirements":{"type":"array","uniqueItems":true,"items":{"$ref":"#/$defs/FactRequirementId"}},"non_consumer_obligations_resolved":{"const":true},"applicability_resolved":{"const":true},"authorization_valid":{"const":true},"evidence_valid":{"const":true}},"additionalProperties":false},"Timestamp":{"type":"integer","minimum":0},"SnapshotId":{"type":"string","pattern":"^snapshot:v1:[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"},"AnalysisId":{"type":"string","pattern":"^analysis:sha256:[0-9a-f]{64}$"},"ProposalId":{"type":"string","pattern":"^proposal:v1:[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"},"ProposalRevisionId":{"type":"string","pattern":"^proposal-revision:sha256:[0-9a-f]{64}$"},"ReadinessId":{"type":"string","pattern":"^readiness:sha256:[0-9a-f]{64}$"},"ApplicationId":{"type":"string","pattern":"^application:sha256:[0-9a-f]{64}$"},"ChildId":{"type":"string","pattern":"^sha256:[0-9a-f]{64}$"},"AuthorizationId":{"type":"string","pattern":"^authorization:sha256:[0-9a-f]{64}$"},"SnapshotHandle":{"type":"object","required":["kind","id","schema_version"],"properties":{"kind":{"const":"snapshot-handle"},"id":{"$ref":"#/$defs/SnapshotId"},"schema_version":{"const":5}},"additionalProperties":false},"AnalysisHandle":{"type":"object","required":["kind","id","schema_version"],"properties":{"kind":{"const":"analysis-handle"},"id":{"$ref":"#/$defs/AnalysisId"},"schema_version":{"const":7}},"additionalProperties":false},"ProposalHandle":{"type":"object","required":["kind","id","schema_version"],"properties":{"kind":{"const":"proposal-handle"},"id":{"$ref":"#/$defs/ProposalId"},"schema_version":{"const":1}},"additionalProperties":false},"ProposalRevisionHandle":{"type":"object","required":["kind","id","schema_version"],"properties":{"kind":{"const":"proposal-revision-handle"},"id":{"$ref":"#/$defs/ProposalRevisionId"},"schema_version":{"const":1}},"additionalProperties":false},"ReadinessHandle":{"type":"object","required":["kind","id","schema_version"],"properties":{"kind":{"const":"readiness-handle"},"id":{"$ref":"#/$defs/ReadinessId"},"schema_version":{"const":1}},"additionalProperties":false},"ApplicationHandle":{"type":"object","required":["kind","id","schema_version"],"properties":{"kind":{"const":"application-handle"},"id":{"$ref":"#/$defs/ApplicationId"},"schema_version":{"const":1}},"additionalProperties":false},"SnapshotChildHandle":{"type":"object","required":["kind","snapshot","child_kind","child_id","schema_version"],"properties":{"kind":{"const":"snapshot-child-handle"},"snapshot":{"$ref":"#/$defs/SnapshotHandle"},"child_kind":{"enum":["policy","relationship"]},"child_id":{"$ref":"#/$defs/NonEmptyString"},"schema_version":{"const":5}},"additionalProperties":false},"AnalysisChildHandle":{"type":"object","required":["kind","analysis","child_kind","child_id","schema_version"],"properties":{"kind":{"const":"analysis-child-handle"},"analysis":{"$ref":"#/$defs/AnalysisHandle"},"child_kind":{"enum":["context","fact-requirement","fact-observation","obligation","coverage-requirement","coverage-certificate"]},"child_id":{"$ref":"#/$defs/ChildId"},"schema_version":{"const":7}},"additionalProperties":false},"AnalysisMaterialHandle":{"oneOf":[{"$ref":"#/$defs/SnapshotHandle"},{"$ref":"#/$defs/ProposalRevisionHandle"}]},"InspectableHandle":{"oneOf":[{"$ref":"#/$defs/SnapshotHandle"},{"$ref":"#/$defs/AnalysisHandle"},{"$ref":"#/$defs/SnapshotChildHandle"},{"$ref":"#/$defs/AnalysisChildHandle"}]},"ActiveSnapshotSummary":{"type":"object","required":["snapshot","lifecycle","source_revision","created_at"],"properties":{"snapshot":{"$ref":"#/$defs/SnapshotHandle"},"lifecycle":{"const":"active"},"source_revision":{"$ref":"#/$defs/NonEmptyString"},"created_at":{"$ref":"#/$defs/Timestamp"}},"additionalProperties":false},"QuarantinedSnapshotSummary":{"type":"object","required":["snapshot","lifecycle","source_revision","created_at","purge_deadline"],"properties":{"snapshot":{"$ref":"#/$defs/SnapshotHandle"},"lifecycle":{"const":"quarantined"},"source_revision":{"$ref":"#/$defs/NonEmptyString"},"created_at":{"$ref":"#/$defs/Timestamp"},"purge_deadline":{"$ref":"#/$defs/Timestamp"}},"additionalProperties":false},"SnapshotSummary":{"oneOf":[{"$ref":"#/$defs/ActiveSnapshotSummary"},{"$ref":"#/$defs/QuarantinedSnapshotSummary"}]},"CreateSnapshotCall":{"type":"object","required":["kind"],"properties":{"kind":{"const":"create-snapshot"}},"additionalProperties":false},"CreateSnapshotResult":{"type":"object","required":["kind","snapshot"],"properties":{"kind":{"const":"create-snapshot-result"},"snapshot":{"$ref":"#/$defs/ActiveSnapshotSummary"}},"additionalProperties":false},"FindSnapshotsCall":{"type":"object","required":["kind"],"properties":{"kind":{"const":"find-snapshots"},"lifecycle":{"enum":["active","quarantined"],"default":"active"},"after":{"$ref":"#/$defs/SnapshotHandle"},"limit":{"type":"integer","minimum":1,"default":50}},"additionalProperties":false},"FindSnapshotsResult":{"type":"object","required":["kind","snapshots"],"properties":{"kind":{"const":"find-snapshots-result"},"snapshots":{"type":"array","items":{"$ref":"#/$defs/SnapshotSummary"}},"continuation":{"$ref":"#/$defs/SnapshotHandle"}},"additionalProperties":false},"StandardsChangePurpose":{"type":"object","required":["summary","rationale","evidence"],"properties":{"summary":{"$ref":"#/$defs/NonEmptyString"},"rationale":{"$ref":"#/$defs/NonEmptyString"},"evidence":{"type":"array","minItems":1,"uniqueItems":true,"items":{"$ref":"#/$defs/EvidenceReference"}}},"additionalProperties":false},"StandardContent":{"type":"object","required":["id","title","role","level","applies_when","does_not_apply_when","verification","body"],"properties":{"id":{"$ref":"#/$defs/CanonicalId"},"title":{"$ref":"#/$defs/NonEmptyString"},"role":{"enum":["core","router","workflow","profile","topic","reference"]},"level":{"enum":["MUST","SHOULD","PROFILE","REFERENCE"]},"applies_when":{"$ref":"#/$defs/NonEmptyString"},"does_not_apply_when":{"$ref":"#/$defs/NonEmptyString"},"verification":{"$ref":"#/$defs/NonEmptyString"},"body":{"$ref":"#/$defs/NonEmptyString"}},"additionalProperties":false},"NewPolicyUnit":{"type":"object","required":["id","heading_chain","semantic_revision","intent","aliases","predecessors","successors"],"properties":{"id":{"$ref":"#/$defs/CanonicalId"},"heading_chain":{"type":"array","minItems":1,"items":{"$ref":"#/$defs/NonEmptyString"}},"semantic_revision":{"const":1},"intent":{"$ref":"#/$defs/NonEmptyString"},"aliases":{"type":"array","uniqueItems":true,"items":{"$ref":"#/$defs/CanonicalId"}},"predecessors":{"type":"array","uniqueItems":true,"items":{"$ref":"#/$defs/CanonicalId"}},"successors":{"type":"array","uniqueItems":true,"items":{"$ref":"#/$defs/CanonicalId"}}},"additionalProperties":false},"PreservePolicySemantics":{"type":"object","required":["kind","semantic_revision","intent"],"properties":{"kind":{"const":"preserve"},"semantic_revision":{"type":"integer","minimum":1},"intent":{"$ref":"#/$defs/NonEmptyString"}},"additionalProperties":false},"ChangePolicySemantics":{"type":"object","required":["kind","accepted_semantic_revision","proposed_semantic_revision","intent"],"properties":{"kind":{"const":"change"},"accepted_semantic_revision":{"type":"integer","minimum":1},"proposed_semantic_revision":{"type":"integer","minimum":1},"intent":{"$ref":"#/$defs/NonEmptyString"}},"additionalProperties":false},"PolicySemanticIntent":{"oneOf":[{"$ref":"#/$defs/PreservePolicySemantics"},{"$ref":"#/$defs/ChangePolicySemantics"}]},"CreateStandardEdit":{"type":"object","required":["kind","standard","requires","specializes","policy_units"],"properties":{"kind":{"const":"create-standard"},"standard":{"$ref":"#/$defs/StandardContent"},"requires":{"type":"array","uniqueItems":true,"items":{"$ref":"#/$defs/CanonicalId"}},"specializes":{"type":"array","uniqueItems":true,"items":{"$ref":"#/$defs/CanonicalId"}},"policy_units":{"type":"array","uniqueItems":true,"items":{"$ref":"#/$defs/NewPolicyUnit"}}},"additionalProperties":false},"ReviseStandardEdit":{"type":"object","required":["kind","standard"],"properties":{"kind":{"const":"revise-standard"},"standard":{"$ref":"#/$defs/StandardContent"},"scope_updates":{"type":"array","items":{"$ref":"#/$defs/PolicyScopeUpdate"}}},"additionalProperties":false},"RevisePolicyUnitEdit":{"type":"object","required":["kind","policy","title","body","semantics"],"properties":{"kind":{"const":"revise-policy-unit"},"policy":{"$ref":"#/$defs/CanonicalId"},"title":{"$ref":"#/$defs/NonEmptyString"},"body":{"$ref":"#/$defs/NonEmptyString"},"semantics":{"$ref":"#/$defs/PolicySemanticIntent"}},"additionalProperties":false},"MovePolicyUnitEdit":{"type":"object","required":["kind","policy","standard","semantics"],"properties":{"kind":{"const":"move-policy-unit"},"policy":{"$ref":"#/$defs/CanonicalId"},"standard":{"$ref":"#/$defs/CanonicalId"},"after_policy":{"$ref":"#/$defs/CanonicalId"},"semantics":{"$ref":"#/$defs/PolicySemanticIntent"}},"additionalProperties":false},"RetirePolicyUnitEdit":{"type":"object","required":["kind","policy","retired_semantic_revision","successors","relationship_dispositions","evidence"],"properties":{"kind":{"const":"retire-policy-unit"},"policy":{"$ref":"#/$defs/CanonicalId"},"retired_semantic_revision":{"type":"integer","minimum":1},"successors":{"type":"array","uniqueItems":true,"items":{"$ref":"#/$defs/CanonicalId"}},"relationship_dispositions":{"type":"array","uniqueItems":true,"items":{"$ref":"#/$defs/RelationshipDisposition"}},"evidence":{"type":"array","minItems":1,"uniqueItems":true,"items":{"$ref":"#/$defs/EvidenceReference"}}},"additionalProperties":false},"RetireStandardEdit":{"type":"object","required":["kind","standard","successors","relationship_dispositions","evidence"],"properties":{"kind":{"const":"retire-standard"},"standard":{"$ref":"#/$defs/CanonicalId"},"successors":{"type":"array","uniqueItems":true,"items":{"$ref":"#/$defs/CanonicalId"}},"relationship_dispositions":{"type":"array","uniqueItems":true,"items":{"$ref":"#/$defs/RelationshipDisposition"}},"evidence":{"type":"array","minItems":1,"uniqueItems":true,"items":{"$ref":"#/$defs/EvidenceReference"}}},"additionalProperties":false},"ReplaceStandardRelationshipsEdit":{"type":"object","required":["kind","standard","requires","specializes","rationale"],"properties":{"kind":{"const":"replace-standard-relationships"},"standard":{"$ref":"#/$defs/CanonicalId"},"requires":{"type":"array","uniqueItems":true,"items":{"$ref":"#/$defs/CanonicalId"}},"specializes":{"type":"array","uniqueItems":true,"items":{"$ref":"#/$defs/CanonicalId"}},"rationale":{"$ref":"#/$defs/NonEmptyString"}},"additionalProperties":false},"AuthoringTargetHandle":{"type":"object","required":["kind","snapshot","id","schema_version"],"properties":{"kind":{"const":"authoring-target-handle"},"snapshot":{"$ref":"#/$defs/SnapshotHandle"},"id":{"$ref":"#/$defs/ChildId"},"schema_version":{"const":5}},"additionalProperties":false},"RelationshipConsumer":{"oneOf":[{"$ref":"#/$defs/CanonicalId"},{"$ref":"#/$defs/AuthoringTargetHandle"}]},"PolicyRelationship":{"type":"object","required":["source_policy","consumer","relation","applicability","source_scope","consumer_scope","evidence_owner","rationale"],"properties":{"source_policy":{"$ref":"#/$defs/CanonicalId"},"consumer":{"$ref":"#/$defs/RelationshipConsumer"},"relation":{"enum":["normative-consumer","router-projection","prompt-projection","template-projection","reference-projection","fixture-projection","enforcement-suite-projection","documentation-projection","implementation-projection"]},"applicability":{"$ref":"#/$defs/ApplicabilityExpression"},"source_scope":{"oneOf":[{"$ref":"#/$defs/ReviewScope"},{"type":"null"}]},"consumer_scope":{"oneOf":[{"$ref":"#/$defs/ReviewScope"},{"type":"null"}]},"evidence_owner":{"$ref":"#/$defs/CanonicalId"},"rationale":{"$ref":"#/$defs/NonEmptyString"}},"additionalProperties":false},"PutPolicyRelationshipEdit":{"type":"object","required":["kind","relationship"],"properties":{"kind":{"const":"put-policy-relationship"},"relationship":{"$ref":"#/$defs/PolicyRelationship"}},"additionalProperties":false},"RemovePolicyRelationshipEdit":{"type":"object","required":["kind","relationship"],"properties":{"kind":{"const":"remove-policy-relationship"},"relationship":{"$ref":"#/$defs/PolicyRelationship"}},"additionalProperties":false},"ModuleRelationshipKey":{"type":"object","required":["kind","relation","source","target"],"properties":{"kind":{"const":"module-relationship"},"relation":{"enum":["requires","specializes"]},"source":{"$ref":"#/$defs/CanonicalId"},"target":{"$ref":"#/$defs/CanonicalId"}},"additionalProperties":false},"PolicyRelationshipKey":{"type":"object","required":["kind","source_policy","consumer","relation"],"properties":{"kind":{"const":"policy-relationship"},"source_policy":{"$ref":"#/$defs/CanonicalId"},"consumer":{"$ref":"#/$defs/RelationshipConsumer"},"relation":{"$ref":"#/$defs/CanonicalId"}},"additionalProperties":false},"RelationshipKey":{"oneOf":[{"$ref":"#/$defs/ModuleRelationshipKey"},{"$ref":"#/$defs/PolicyRelationshipKey"}]},"RelationshipDisposition":{"type":"object","required":["relationship","disposition","rationale","evidence"],"properties":{"relationship":{"$ref":"#/$defs/RelationshipKey"},"disposition":{"enum":["remove","retarget"]},"replacement_consumer":{"$ref":"#/$defs/RelationshipConsumer"},"rationale":{"$ref":"#/$defs/NonEmptyString"},"evidence":{"type":"array","minItems":1,"uniqueItems":true,"items":{"$ref":"#/$defs/EvidenceReference"}}},"additionalProperties":false},"StandardEdit":{"oneOf":[{"$ref":"#/$defs/CreateStandardEdit"},{"$ref":"#/$defs/ReviseStandardEdit"},{"$ref":"#/$defs/RevisePolicyUnitEdit"},{"$ref":"#/$defs/MovePolicyUnitEdit"},{"$ref":"#/$defs/RetirePolicyUnitEdit"},{"$ref":"#/$defs/RetireStandardEdit"},{"$ref":"#/$defs/ReplaceStandardRelationshipsEdit"},{"$ref":"#/$defs/PutPolicyRelationshipEdit"},{"$ref":"#/$defs/RemovePolicyRelationshipEdit"},{"$ref":"#/$defs/PutRoutingRuleEdit"},{"$ref":"#/$defs/RemoveRoutingRuleEdit"},{"$ref":"#/$defs/PutRoutingFactEdit"},{"$ref":"#/$defs/RemoveRoutingFactEdit"},{"$ref":"#/$defs/AuditPolicyUnitEdit"},{"$ref":"#/$defs/RewriteNavigationIndexEdit"},{"$ref":"#/$defs/PutDecisionProvenanceEdit"},{"$ref":"#/$defs/RetireDecisionProvenanceEdit"},{"$ref":"#/$defs/ApproveApplicationContentEdit"},{"$ref":"#/$defs/WithdrawApplicationContentEdit"},{"$ref":"#/$defs/ReviseOperationalArtifactEdit"}]},"StandardsChangeSet":{"type":"object","required":["purpose","edits"],"properties":{"purpose":{"$ref":"#/$defs/StandardsChangePurpose"},"edits":{"type":"array","minItems":1,"uniqueItems":true,"items":{"$ref":"#/$defs/StandardEdit"}}},"additionalProperties":false},"ProposalSummary":{"type":"object","required":["proposal","head_revision"],"properties":{"proposal":{"$ref":"#/$defs/ProposalHandle"},"head_revision":{"$ref":"#/$defs/ProposalRevisionHandle"}},"additionalProperties":false},"CreateProposalCall":{"type":"object","required":["kind","base_snapshot","change_set"],"properties":{"kind":{"const":"create-proposal"},"base_snapshot":{"$ref":"#/$defs/SnapshotHandle"},"change_set":{"$ref":"#/$defs/StandardsChangeSet"}},"additionalProperties":false},"CreateProposalResult":{"type":"object","required":["kind","proposal","revision"],"properties":{"kind":{"const":"create-proposal-result"},"proposal":{"$ref":"#/$defs/ProposalHandle"},"revision":{"$ref":"#/$defs/ProposalRevisionHandle"}},"additionalProperties":false},"FindProposalsCall":{"type":"object","required":["kind"],"properties":{"kind":{"const":"find-proposals"},"after":{"$ref":"#/$defs/ProposalHandle"},"limit":{"type":"integer","minimum":1,"default":50}},"additionalProperties":false},"FindProposalsResult":{"type":"object","required":["kind","proposals"],"properties":{"kind":{"const":"find-proposals-result"},"proposals":{"type":"array","items":{"$ref":"#/$defs/ProposalSummary"}},"continuation":{"$ref":"#/$defs/ProposalHandle"}},"additionalProperties":false},"ReviseProposalCall":{"type":"object","required":["kind","expected_revision","change_set"],"properties":{"kind":{"const":"revise-proposal"},"expected_revision":{"$ref":"#/$defs/ProposalRevisionHandle"},"change_set":{"$ref":"#/$defs/StandardsChangeSet"}},"additionalProperties":false},"ReviseProposalResult":{"type":"object","required":["kind","proposal","revision"],"properties":{"kind":{"const":"revise-proposal-result"},"proposal":{"$ref":"#/$defs/ProposalHandle"},"revision":{"$ref":"#/$defs/ProposalRevisionHandle"}},"additionalProperties":false},"DeleteSnapshotCall":{"type":"object","required":["kind","snapshot"],"properties":{"kind":{"const":"delete-snapshot"},"snapshot":{"$ref":"#/$defs/SnapshotHandle"}},"additionalProperties":false},"DeleteSnapshotResult":{"type":"object","required":["kind","snapshot","purge_deadline"],"properties":{"kind":{"const":"delete-snapshot-result"},"snapshot":{"$ref":"#/$defs/SnapshotHandle"},"purge_deadline":{"$ref":"#/$defs/Timestamp"}},"additionalProperties":false},"UndeleteSnapshotCall":{"type":"object","required":["kind","snapshot"],"properties":{"kind":{"const":"undelete-snapshot"},"snapshot":{"$ref":"#/$defs/SnapshotHandle"}},"additionalProperties":false},"UndeleteSnapshotResult":{"type":"object","required":["kind","snapshot"],"properties":{"kind":{"const":"undelete-snapshot-result"},"snapshot":{"$ref":"#/$defs/ActiveSnapshotSummary"}},"additionalProperties":false},"QueryNextOperation":{"type":"object","required":["operation","request_kind","snapshot"],"properties":{"operation":{"const":"query"},"request_kind":{"enum":["route","read","related"]},"target":{"$ref":"#/$defs/CanonicalId"},"snapshot":{"$ref":"#/$defs/SnapshotHandle"}},"additionalProperties":false},"QueryProposalNextOperation":{"type":"object","required":["operation","request_kind","revision"],"properties":{"operation":{"const":"query_proposal"},"request_kind":{"enum":["route","read","related"]},"target":{"$ref":"#/$defs/CanonicalId"},"revision":{"$ref":"#/$defs/ProposalRevisionHandle"}},"additionalProperties":false},"ResolveNextOperation":{"type":"object","required":["operation","request_kind","analysis"],"properties":{"operation":{"const":"resolve"},"request_kind":{"enum":["provide-fact","consumer-disposition","impact-disposition","coverage-attestation"]},"target":{"$ref":"#/$defs/CanonicalId"},"work":{"$ref":"#/$defs/AnalysisChildHandle"},"analysis":{"$ref":"#/$defs/AnalysisHandle"}},"additionalProperties":false},"InspectNextOperation":{"type":"object","required":["operation","request_kind","handle"],"properties":{"operation":{"const":"inspect"},"request_kind":{"const":"inspect"},"handle":{"$ref":"#/$defs/InspectableHandle"}},"additionalProperties":false},"NextOperation":{"oneOf":[{"$ref":"#/$defs/QueryNextOperation"},{"$ref":"#/$defs/ResolveNextOperation"},{"$ref":"#/$defs/InspectNextOperation"},{"$ref":"#/$defs/FocusedQueryNextOperation"}]},"QueryCall":{"type":"object","required":["snapshot","request"],"properties":{"snapshot":{"$ref":"#/$defs/SnapshotHandle"},"request":{"$ref":"#/$defs/QueryRequest"}},"additionalProperties":false},"QueryProposalCall":{"type":"object","required":["revision","request"],"properties":{"revision":{"$ref":"#/$defs/ProposalRevisionHandle"},"request":{"$ref":"#/$defs/QueryRequest"}},"additionalProperties":false},"AnalyzeProposalCall":{"type":"object","required":["revision"],"properties":{"revision":{"$ref":"#/$defs/ProposalRevisionHandle"}},"additionalProperties":false},"ReviewDecision":{"type":"object","required":["owner","decision","rationale","evidence"],"properties":{"owner":{"enum":["consumer","impact","audit"]},"decision":{"const":"accept"},"rationale":{"$ref":"#/$defs/NonEmptyString"},"evidence":{"type":"array","minItems":1,"uniqueItems":true,"items":{"$ref":"#/$defs/EvidenceReference"}}},"additionalProperties":false},"ReviewProposalCall":{"type":"object","required":["kind","analysis","decisions"],"properties":{"kind":{"const":"review-proposal"},"analysis":{"$ref":"#/$defs/AnalysisHandle"},"decisions":{"type":"array","minItems":3,"maxItems":3,"uniqueItems":true,"items":{"$ref":"#/$defs/ReviewDecision"}},"prior_readiness":{"$ref":"#/$defs/ReadinessHandle"}},"additionalProperties":false},"ReviewProposalResult":{"type":"object","required":["kind","readiness","revision","status"],"properties":{"kind":{"const":"review-proposal-result"},"readiness":{"$ref":"#/$defs/ReadinessHandle"},"revision":{"$ref":"#/$defs/ProposalRevisionHandle"},"status":{"const":"ready"}},"additionalProperties":false},"ApplyProposalCall":{"type":"object","required":["kind","readiness"],"properties":{"kind":{"const":"apply-proposal"},"readiness":{"$ref":"#/$defs/ReadinessHandle"}},"additionalProperties":false},"ApplyProposalResult":{"type":"object","required":["kind","application","status"],"properties":{"kind":{"const":"apply-proposal-result"},"application":{"$ref":"#/$defs/ApplicationHandle"},"status":{"const":"applied"}},"additionalProperties":false},"RecoverApplicationCall":{"type":"object","required":["kind","readiness"],"properties":{"kind":{"const":"recover-application"},"readiness":{"$ref":"#/$defs/ReadinessHandle"}},"additionalProperties":false},"RecoverApplicationResult":{"type":"object","required":["kind","application","status"],"properties":{"kind":{"const":"recover-application-result"},"application":{"$ref":"#/$defs/ApplicationHandle"},"status":{"const":"applied"}},"additionalProperties":false},"ApplicationRecoveryRequiredResult":{"type":"object","required":["kind","application","status","code","outcome","message"],"properties":{"kind":{"const":"application-recovery-required-result"},"application":{"$ref":"#/$defs/ApplicationHandle"},"status":{"const":"recovery-required"},"code":{"enum":["APPLICATION.PUBLICATION_UNAVAILABLE","APPLICATION.OBSERVATION_UNAVAILABLE","APPLICATION.OUTCOME_PERSISTENCE_UNAVAILABLE","APPLICATION.RECOVERY_TARGET_UNCERTAIN","APPLICATION.RECOVERY_TARGET_DIVERGED"]},"outcome":{"const":"unavailable"},"message":{"$ref":"#/$defs/NonEmptyString"}},"additionalProperties":false},"PolicySummary":{"type":"object","required":["handle","authority","scope"],"properties":{"handle":{"$ref":"#/$defs/SnapshotChildHandle"},"authority":{"enum":["normative","projection","contextual","evidence"]},"scope":{"$ref":"#/$defs/ReviewScope"}},"additionalProperties":false},"RelationshipSummary":{"type":"object","required":["handle","source","target","relation","groups","direction","traversal_eligible","applicability"],"properties":{"handle":{"$ref":"#/$defs/SnapshotChildHandle"},"source":{"$ref":"#/$defs/CanonicalId"},"target":{"$ref":"#/$defs/CanonicalId"},"relation":{"$ref":"#/$defs/CanonicalId"},"groups":{"type":"array","items":{"$ref":"#/$defs/CanonicalId"},"minItems":1,"uniqueItems":true},"direction":{"enum":["incoming","outgoing"]},"traversal_eligible":{"type":"boolean"},"applicability":{"enum":["true","false","unknown","not-declared"]}},"additionalProperties":false},"ProposalPolicySummary":{"type":"object","required":["id","authority","scope"],"properties":{"id":{"$ref":"#/$defs/CanonicalId"},"authority":{"enum":["normative","projection","contextual","evidence"]},"scope":{"$ref":"#/$defs/ReviewScope"}},"additionalProperties":false},"ProposalRelationshipSummary":{"type":"object","required":["source","target","relation","groups","direction","traversal_eligible","applicability"],"properties":{"source":{"$ref":"#/$defs/CanonicalId"},"target":{"$ref":"#/$defs/CanonicalId"},"relation":{"$ref":"#/$defs/CanonicalId"},"groups":{"type":"array","items":{"$ref":"#/$defs/CanonicalId"},"minItems":1,"uniqueItems":true},"direction":{"enum":["incoming","outgoing"]},"traversal_eligible":{"type":"boolean"},"applicability":{"enum":["true","false","unknown","not-declared"]}},"additionalProperties":false},"RouteResult":{"type":"object","required":["kind","snapshot","reading_plan","unresolved_questions","next_operations"],"properties":{"kind":{"const":"route-result"},"snapshot":{"$ref":"#/$defs/SnapshotHandle"},"reading_plan":{"type":"array","items":{"$ref":"#/$defs/ReadingPlanEntry"}},"unresolved_questions":{"type":"array","items":{"$ref":"#/$defs/Question"}},"next_operations":{"type":"array","items":{"$ref":"#/$defs/NextOperation"}},"summary":{"type":"string"}},"additionalProperties":false},"ReadResult":{"type":"object","required":["kind","snapshot","policy","content","requires","specializes","related","next_operations"],"properties":{"kind":{"const":"read-result"},"snapshot":{"$ref":"#/$defs/SnapshotHandle"},"policy":{"$ref":"#/$defs/PolicySummary"},"content":{"type":"string"},"requires":{"type":"array","items":{"$ref":"#/$defs/CanonicalId"},"uniqueItems":true},"specializes":{"type":"array","items":{"$ref":"#/$defs/CanonicalId"},"uniqueItems":true},"related":{"type":"array","items":{"$ref":"#/$defs/RelationshipSummary"}},"next_operations":{"type":"array","items":{"$ref":"#/$defs/NextOperation"}},"summary":{"type":"string"},"routing":{"$ref":"#/$defs/RoutingConfiguration"},"coverage":{"$ref":"#/$defs/ReadCoverage"},"application_exposure":{"$ref":"#/$defs/ApplicationExposureState"},"provenance":{"type":"array","items":{"$ref":"#/$defs/CanonicalId"}}},"additionalProperties":false},"PolicyUnitMapping":{"type":"object","required":["state","policy_units"],"properties":{"state":{"enum":["exact-policy-unit","policy-units-present","incomplete"]},"reason":{"const":"no-policy-units"},"policy_units":{"type":"array","items":{"$ref":"#/$defs/CanonicalId"},"uniqueItems":true}},"additionalProperties":false},"RelatedResult":{"type":"object","required":["kind","snapshot","target","policy_unit_mapping","relationships","next_operations"],"properties":{"kind":{"const":"related-result"},"snapshot":{"$ref":"#/$defs/SnapshotHandle"},"target":{"$ref":"#/$defs/CanonicalId"},"authoring_target":{"$ref":"#/$defs/AuthoringTargetHandle"},"policy_unit_mapping":{"$ref":"#/$defs/PolicyUnitMapping"},"relationships":{"type":"array","items":{"$ref":"#/$defs/RelationshipSummary"}},"next_operations":{"type":"array","items":{"$ref":"#/$defs/NextOperation"}},"summary":{"type":"string"}},"additionalProperties":false},"QueryResult":{"oneOf":[{"$ref":"#/$defs/RouteResult"},{"$ref":"#/$defs/ReadResult"},{"$ref":"#/$defs/RelatedResult"},{"$ref":"#/$defs/NavigationIndexesResult"},{"$ref":"#/$defs/ProvenanceReadResult"},{"$ref":"#/$defs/OperationalReadResult"}]},"ProposalRouteResult":{"type":"object","required":["kind","revision","reading_plan","unresolved_questions","next_operations"],"properties":{"kind":{"const":"proposal-route-result"},"revision":{"$ref":"#/$defs/ProposalRevisionHandle"},"reading_plan":{"type":"array","items":{"$ref":"#/$defs/ReadingPlanEntry"}},"unresolved_questions":{"type":"array","items":{"$ref":"#/$defs/Question"}},"next_operations":{"type":"array","items":{"$ref":"#/$defs/QueryProposalNextOperation"}},"summary":{"type":"string"}},"additionalProperties":false},"ProposalReadResult":{"type":"object","required":["kind","revision","policy","content","requires","specializes","related","next_operations"],"properties":{"kind":{"const":"proposal-read-result"},"revision":{"$ref":"#/$defs/ProposalRevisionHandle"},"policy":{"$ref":"#/$defs/ProposalPolicySummary"},"content":{"type":"string"},"requires":{"type":"array","items":{"$ref":"#/$defs/CanonicalId"},"uniqueItems":true},"specializes":{"type":"array","items":{"$ref":"#/$defs/CanonicalId"},"uniqueItems":true},"related":{"type":"array","items":{"$ref":"#/$defs/ProposalRelationshipSummary"}},"next_operations":{"type":"array","items":{"$ref":"#/$defs/QueryProposalNextOperation"}},"summary":{"type":"string"},"routing":{"$ref":"#/$defs/RoutingConfiguration"},"coverage":{"$ref":"#/$defs/ReadCoverage"},"application_exposure":{"$ref":"#/$defs/ApplicationExposureState"},"provenance":{"type":"array","items":{"$ref":"#/$defs/CanonicalId"}}},"additionalProperties":false},"ProposalRelatedResult":{"type":"object","required":["kind","revision","target","policy_unit_mapping","relationships","next_operations"],"properties":{"kind":{"const":"proposal-related-result"},"revision":{"$ref":"#/$defs/ProposalRevisionHandle"},"target":{"$ref":"#/$defs/CanonicalId"},"authoring_target":{"$ref":"#/$defs/AuthoringTargetHandle"},"policy_unit_mapping":{"$ref":"#/$defs/PolicyUnitMapping"},"relationships":{"type":"array","items":{"$ref":"#/$defs/ProposalRelationshipSummary"}},"next_operations":{"type":"array","items":{"$ref":"#/$defs/QueryProposalNextOperation"}},"summary":{"type":"string"}},"additionalProperties":false},"QueryProposalResult":{"oneOf":[{"$ref":"#/$defs/ProposalRouteResult"},{"$ref":"#/$defs/ProposalReadResult"},{"$ref":"#/$defs/ProposalRelatedResult"},{"$ref":"#/$defs/NavigationIndexesResult"},{"$ref":"#/$defs/ProvenanceReadResult"},{"$ref":"#/$defs/OperationalReadResult"}]},"AnalysisRequest":{"type":"object","required":["kind","base_snapshot","proposed_snapshot","changes","semantic_proposals","contract_version"],"properties":{"kind":{"const":"analysis-request"},"base_snapshot":{"$ref":"#/$defs/SnapshotHandle"},"proposed_snapshot":{"$ref":"#/$defs/SnapshotHandle"},"changes":{"type":"array","items":{"$ref":"#/$defs/ChangeDescriptor"},"minItems":1},"semantic_proposals":{"type":"array","items":{"$ref":"#/$defs/SemanticProposal"},"uniqueItems":true},"prior_analysis":{"$ref":"#/$defs/AnalysisHandle"},"contract_version":{"const":6}},"additionalProperties":false},"PrepareCall":{"type":"object","required":["request"],"properties":{"request":{"$ref":"#/$defs/AnalysisRequest"}},"additionalProperties":false},"AnalysisContext":{"type":"object","required":["kind","handle","subjects","changes","semantic_proposals"],"properties":{"kind":{"const":"analysis-context"},"handle":{"$ref":"#/$defs/AnalysisChildHandle"},"subjects":{"type":"array","items":{"$ref":"#/$defs/ChangedPolicyUnit"},"uniqueItems":true},"changes":{"type":"array","items":{"$ref":"#/$defs/ChangeDescriptor"},"minItems":1,"uniqueItems":true},"semantic_proposals":{"type":"array","items":{"$ref":"#/$defs/SemanticProposal"},"uniqueItems":true}},"additionalProperties":false},"AuthorizationReference":{"type":"object","required":["id","issuer","capability","authority_digest"],"properties":{"id":{"$ref":"#/$defs/AuthorizationId"},"issuer":{"$ref":"#/$defs/CanonicalId"},"capability":{"$ref":"#/$defs/CanonicalId"},"authority_digest":{"$ref":"#/$defs/Digest"}},"additionalProperties":false},"ProviderReference":{"type":"object","required":["id","contract","contract_version","input_digest"],"properties":{"id":{"$ref":"#/$defs/CanonicalId"},"contract":{"$ref":"#/$defs/CanonicalId"},"contract_version":{"$ref":"#/$defs/NonEmptyString"},"input_digest":{"$ref":"#/$defs/Digest"}},"additionalProperties":false},"AuthorizationRecord":{"type":"object","required":["reference","issuer_semantic_revision","principal","action","subject_kind","subject_id","authorization_evidence","revocation_authority","revocation_authority_semantic_revision","revocation_evidence"],"properties":{"reference":{"$ref":"#/$defs/AuthorizationReference"},"issuer_semantic_revision":{"type":"integer","minimum":1},"principal":{"$ref":"#/$defs/CanonicalId"},"action":{"$ref":"#/$defs/CanonicalId"},"subject_kind":{"$ref":"#/$defs/CanonicalId"},"subject_id":{"$ref":"#/$defs/NonEmptyString"},"authorization_evidence":{"type":"array","items":{"$ref":"#/$defs/EvidenceReference"},"minItems":1,"uniqueItems":true},"revocation_authority":{"$ref":"#/$defs/CanonicalId"},"revocation_authority_semantic_revision":{"type":"integer","minimum":1},"revocation_evidence":{"type":"array","items":{"$ref":"#/$defs/EvidenceReference"},"minItems":1,"uniqueItems":true}},"additionalProperties":false},"DomainContractReference":{"type":"object","required":["id","version"],"properties":{"id":{"$ref":"#/$defs/CanonicalId"},"version":{"$ref":"#/$defs/NonEmptyString"}},"additionalProperties":false},"AnalysisExecutionContractView":{"type":"object","required":["authorization_authority_digest","providers"],"properties":{"authorization_authority_digest":{"oneOf":[{"$ref":"#/$defs/Digest"},{"type":"null"}]},"providers":{"type":"array","items":{"$ref":"#/$defs/ProviderReference"},"uniqueItems":true}},"additionalProperties":false},"FactRequirement":{"type":"object","required":["kind","handle","fact","fact_semantic_revision","fact_contract_digest","context","value_contract","answer_contract","evidence_contract","authorization_capability"],"properties":{"kind":{"const":"fact-requirement"},"handle":{"$ref":"#/$defs/AnalysisChildHandle"},"fact":{"$ref":"#/$defs/CanonicalId"},"fact_semantic_revision":{"type":"integer","minimum":1},"fact_contract_digest":{"$ref":"#/$defs/Digest"},"context":{"$ref":"#/$defs/AnalysisChildHandle"},"value_contract":{"$ref":"#/$defs/FactValueContract"},"answer_contract":{"$ref":"#/$defs/CanonicalId"},"evidence_contract":{"$ref":"#/$defs/CanonicalId"},"authorization_capability":{"$ref":"#/$defs/CanonicalId"}},"additionalProperties":false},"FactRequirementWork":{"type":"object","required":["requirement","prompt","dependent_programs"],"properties":{"requirement":{"$ref":"#/$defs/FactRequirement"},"prompt":{"$ref":"#/$defs/NonEmptyString"},"dependent_programs":{"type":"array","items":{"$ref":"#/$defs/NonEmptyString"},"minItems":1,"uniqueItems":true}},"additionalProperties":false},"FactObservation":{"type":"object","required":["kind","handle","requirement","value","evidence","authorization"],"properties":{"kind":{"const":"fact-observation"},"handle":{"$ref":"#/$defs/AnalysisChildHandle"},"requirement":{"$ref":"#/$defs/AnalysisChildHandle"},"value":{"$ref":"#/$defs/FactValue"},"evidence":{"type":"array","items":{"$ref":"#/$defs/EvidenceReference"},"minItems":1,"uniqueItems":true},"authorization":{"$ref":"#/$defs/AuthorizationReference"},"provider":{"$ref":"#/$defs/ProviderReference"}},"additionalProperties":false},"Obligation":{"type":"object","required":["handle","kind","target","scope","reasons","state","permitted_submissions","fingerprint"],"properties":{"handle":{"$ref":"#/$defs/AnalysisChildHandle"},"kind":{"enum":["consumer-review","impact-review","lifecycle-impact-review","audit-coverage","unmapped-normative-change"]},"target":{"$ref":"#/$defs/CanonicalId"},"scope":{"$ref":"#/$defs/ReviewScope"},"reasons":{"type":"array","items":{"$ref":"#/$defs/SelectionReason"},"minItems":1,"uniqueItems":true},"state":{"enum":["required","resolved","blocked"]},"applicability":{"enum":["true","false","unknown","not-declared"]},"permitted_submissions":{"type":"array","items":{"enum":["consumer-disposition","impact-disposition","coverage-attestation"]},"minItems":1,"uniqueItems":true},"review_contract":{"$ref":"#/$defs/ConsumerReviewContract"},"fingerprint":{"$ref":"#/$defs/DecisionFingerprint"}},"additionalProperties":false},"ProvideFactSubmission":{"type":"object","required":["kind","requirement","value","evidence"],"properties":{"kind":{"const":"provide-fact"},"requirement":{"$ref":"#/$defs/AnalysisChildHandle"},"value":{"$ref":"#/$defs/FactValue"},"evidence":{"type":"array","items":{"$ref":"#/$defs/EvidenceReference"},"minItems":1,"uniqueItems":true}},"additionalProperties":false},"ConsumerDispositionSubmission":{"type":"object","required":["kind","obligation","result","rationale","evidence","fingerprint"],"properties":{"kind":{"const":"consumer-disposition"},"obligation":{"$ref":"#/$defs/AnalysisChildHandle"},"result":{"enum":["updated","reviewed-no-change","not-applicable","blocked"]},"rationale":{"$ref":"#/$defs/NonEmptyString"},"evidence":{"type":"array","items":{"$ref":"#/$defs/EvidenceReference"},"minItems":1},"fingerprint":{"$ref":"#/$defs/DecisionFingerprint"}},"additionalProperties":false},"ImpactDispositionSubmission":{"type":"object","required":["kind","obligation","result","rationale","evidence","fingerprint"],"properties":{"kind":{"const":"impact-disposition"},"obligation":{"$ref":"#/$defs/AnalysisChildHandle"},"result":{"enum":["confirmed","resolved-no-impact","requires-change","blocked"]},"rationale":{"$ref":"#/$defs/NonEmptyString"},"evidence":{"type":"array","items":{"$ref":"#/$defs/EvidenceReference"},"minItems":1},"fingerprint":{"$ref":"#/$defs/DecisionFingerprint"}},"additionalProperties":false},"CoverageAttestationClaim":{"type":"object","required":["requirement","conclusion","evidence","explicit_exclusions","rationale","auditor_provenance"],"properties":{"requirement":{"$ref":"#/$defs/AnalysisChildHandle"},"conclusion":{"const":"complete"},"evidence":{"type":"array","items":{"$ref":"#/$defs/EvidenceReference"},"minItems":1,"uniqueItems":true},"explicit_exclusions":{"type":"array","items":{"$ref":"#/$defs/EvidenceReference"},"uniqueItems":true},"rationale":{"$ref":"#/$defs/NonEmptyString"},"auditor_provenance":{"$ref":"#/$defs/NonEmptyString"}},"additionalProperties":false},"CoverageAttestationSubmission":{"type":"object","required":["kind","claim"],"properties":{"kind":{"const":"coverage-attestation"},"claim":{"$ref":"#/$defs/CoverageAttestationClaim"}},"additionalProperties":false},"Submission":{"oneOf":[{"$ref":"#/$defs/ProvideFactSubmission"},{"$ref":"#/$defs/ConsumerDispositionSubmission"},{"$ref":"#/$defs/ImpactDispositionSubmission"},{"$ref":"#/$defs/CoverageAttestationSubmission"}]},"ResolveCall":{"type":"object","required":["analysis","submission"],"properties":{"analysis":{"$ref":"#/$defs/AnalysisHandle"},"submission":{"$ref":"#/$defs/Submission"}},"additionalProperties":false},"CoverageRequirement":{"type":"object","required":["kind","handle","subject","owner","semantic_revision","relationship_kinds","horizon","required_evidence_contract"],"properties":{"kind":{"const":"coverage-requirement"},"handle":{"$ref":"#/$defs/AnalysisChildHandle"},"subject":{"$ref":"#/$defs/CanonicalId"},"owner":{"$ref":"#/$defs/CanonicalId"},"semantic_revision":{"type":"integer","minimum":1},"relationship_kinds":{"type":"array","items":{"$ref":"#/$defs/CanonicalId"},"uniqueItems":true},"horizon":{"$ref":"#/$defs/CanonicalId"},"required_evidence_contract":{"$ref":"#/$defs/CanonicalId"}},"additionalProperties":false},"CoverageAttestation":{"type":"object","required":["kind","requirement","conclusion","evidence","explicit_exclusions","rationale","auditor_provenance","schema_version","authorization"],"properties":{"kind":{"const":"coverage-attestation"},"requirement":{"$ref":"#/$defs/AnalysisChildHandle"},"conclusion":{"const":"complete"},"evidence":{"type":"array","items":{"$ref":"#/$defs/EvidenceReference"},"minItems":1},"explicit_exclusions":{"type":"array","items":{"$ref":"#/$defs/EvidenceReference"}},"rationale":{"$ref":"#/$defs/NonEmptyString"},"auditor_provenance":{"$ref":"#/$defs/NonEmptyString"},"schema_version":{"const":4},"authorization":{"$ref":"#/$defs/AuthorizationReference"}},"additionalProperties":false},"CoverageCertificate":{"type":"object","required":["kind","handle","requirement","subject","owner","semantic_revision","horizon_digest","relationship_digest","evidence_digests","fact_schema_digest"],"properties":{"kind":{"const":"coverage-certificate"},"handle":{"$ref":"#/$defs/AnalysisChildHandle"},"requirement":{"$ref":"#/$defs/AnalysisChildHandle"},"subject":{"$ref":"#/$defs/CanonicalId"},"owner":{"$ref":"#/$defs/CanonicalId"},"semantic_revision":{"type":"integer","minimum":1},"horizon_digest":{"$ref":"#/$defs/Digest"},"relationship_digest":{"$ref":"#/$defs/Digest"},"evidence_digests":{"type":"array","items":{"$ref":"#/$defs/Digest"},"uniqueItems":true},"fact_schema_digest":{"$ref":"#/$defs/Digest"}},"additionalProperties":false},"DispositionRecord":{"type":"object","required":["obligation","kind","result","rationale","evidence","authorization","fingerprint"],"properties":{"obligation":{"$ref":"#/$defs/AnalysisChildHandle"},"kind":{"enum":["consumer-disposition","impact-disposition"]},"result":{"$ref":"#/$defs/NonEmptyString"},"rationale":{"$ref":"#/$defs/NonEmptyString"},"evidence":{"type":"array","items":{"$ref":"#/$defs/EvidenceReference"}},"authorization":{"$ref":"#/$defs/AuthorizationReference"},"fingerprint":{"$ref":"#/$defs/DecisionFingerprint"}},"additionalProperties":false},"AnalysisState":{"type":"object","required":["kind","handle","base_snapshot","proposed_reference","changes","semantic_proposals","fact_observations","dispositions","coverage_attestations","authorization_records","domain_contracts","execution_contracts","contract_version"],"properties":{"kind":{"const":"analysis-state"},"handle":{"$ref":"#/$defs/AnalysisHandle"},"base_snapshot":{"$ref":"#/$defs/SnapshotHandle"},"proposed_reference":{"$ref":"#/$defs/AnalysisMaterialHandle"},"changes":{"type":"array","items":{"$ref":"#/$defs/ChangeDescriptor"},"minItems":1,"uniqueItems":true},"semantic_proposals":{"type":"array","items":{"$ref":"#/$defs/SemanticProposal"},"uniqueItems":true},"fact_observations":{"type":"array","items":{"$ref":"#/$defs/FactObservation"},"uniqueItems":true},"dispositions":{"type":"array","items":{"$ref":"#/$defs/DispositionRecord"},"uniqueItems":true},"coverage_attestations":{"type":"array","items":{"$ref":"#/$defs/CoverageAttestation"},"uniqueItems":true},"authorization_records":{"type":"array","items":{"$ref":"#/$defs/AuthorizationRecord"},"uniqueItems":true},"domain_contracts":{"type":"array","items":{"$ref":"#/$defs/DomainContractReference"},"minItems":1,"uniqueItems":true},"execution_contracts":{"$ref":"#/$defs/AnalysisExecutionContractView"},"contract_version":{"const":7}},"additionalProperties":false},"PendingResult":{"type":"object","required":["kind","handle","status","context","changes","changed_units","obligations","fact_requirements","reading_plan","next_operations"],"properties":{"kind":{"const":"pending-result"},"handle":{"$ref":"#/$defs/AnalysisHandle"},"status":{"const":"needs-action"},"context":{"$ref":"#/$defs/AnalysisContext"},"changes":{"type":"array","items":{"$ref":"#/$defs/ChangeDescriptor"}},"changed_units":{"type":"array","items":{"$ref":"#/$defs/ChangedPolicyUnit"}},"obligations":{"type":"array","items":{"$ref":"#/$defs/Obligation"}},"fact_requirements":{"type":"array","items":{"$ref":"#/$defs/FactRequirementWork"}},"reading_plan":{"type":"array","items":{"$ref":"#/$defs/ReadingPlanEntry"}},"next_operations":{"type":"array","items":{"$ref":"#/$defs/NextOperation"}},"summary":{"type":"string"}},"additionalProperties":false},"CompleteResult":{"type":"object","required":["kind","handle","status","context","changes","changed_units","coverage_certificates","fact_observations","dispositions","reading_plan","completion"],"properties":{"kind":{"const":"complete-result"},"handle":{"$ref":"#/$defs/AnalysisHandle"},"status":{"const":"complete"},"context":{"$ref":"#/$defs/AnalysisContext"},"changes":{"type":"array","items":{"$ref":"#/$defs/ChangeDescriptor"}},"changed_units":{"type":"array","items":{"$ref":"#/$defs/ChangedPolicyUnit"}},"coverage_certificates":{"type":"array","items":{"$ref":"#/$defs/CoverageCertificate"},"uniqueItems":true},"fact_observations":{"type":"array","items":{"$ref":"#/$defs/FactObservation"},"uniqueItems":true},"dispositions":{"type":"array","items":{"$ref":"#/$defs/DispositionRecord"}},"reading_plan":{"type":"array","items":{"$ref":"#/$defs/ReadingPlanEntry"}},"completion":{"$ref":"#/$defs/CompletionProof"},"summary":{"type":"string"}},"additionalProperties":false},"RepositoryPath":{"type":"array","items":{"$ref":"#/$defs/NonEmptyString"},"minItems":1},"ProvenanceRecord":{"type":"object","required":["snapshot","path"],"properties":{"snapshot":{"$ref":"#/$defs/SnapshotHandle"},"path":{"$ref":"#/$defs/RepositoryPath"}},"additionalProperties":false},"SnapshotInspectionResult":{"type":"object","required":["kind","snapshot"],"properties":{"kind":{"const":"snapshot-inspection-result"},"snapshot":{"$ref":"#/$defs/SnapshotSummary"}},"additionalProperties":false},"PolicyInspectionResult":{"type":"object","required":["kind","policy","declaration","representation_digest","structural_digest","provenance"],"properties":{"kind":{"const":"policy-inspection-result"},"policy":{"$ref":"#/$defs/SnapshotChildHandle"},"declaration":{"oneOf":[{"$ref":"#/$defs/CanonicalModuleDeclaration"},{"$ref":"#/$defs/PolicyUnitDeclaration"}]},"representation_digest":{"$ref":"#/$defs/Digest"},"structural_digest":{"$ref":"#/$defs/Digest"},"provenance":{"$ref":"#/$defs/ProvenanceRecord"}},"additionalProperties":false},"RelationshipInspectionResult":{"type":"object","required":["kind","relationship","policy_semantics","provenance"],"properties":{"kind":{"const":"relationship-inspection-result"},"relationship":{"$ref":"#/$defs/RelationshipSummary"},"policy_semantics":{"oneOf":[{"$ref":"#/$defs/PolicyRelationshipInspection"},{"type":"null"}]},"provenance":{"$ref":"#/$defs/ProvenanceRecord"}},"additionalProperties":false},"AnalysisInspectionResult":{"type":"object","required":["kind","state"],"properties":{"kind":{"const":"analysis-inspection-result"},"state":{"$ref":"#/$defs/AnalysisState"}},"additionalProperties":false},"AnalysisChildArtifact":{"oneOf":[{"$ref":"#/$defs/AnalysisContext"},{"$ref":"#/$defs/FactRequirement"},{"$ref":"#/$defs/FactObservation"},{"$ref":"#/$defs/Obligation"},{"$ref":"#/$defs/CoverageRequirement"},{"$ref":"#/$defs/CoverageCertificate"}]},"AnalysisChildInspectionResult":{"type":"object","required":["kind","handle","artifact"],"properties":{"kind":{"const":"analysis-child-inspection-result"},"handle":{"$ref":"#/$defs/AnalysisChildHandle"},"artifact":{"$ref":"#/$defs/AnalysisChildArtifact"}},"additionalProperties":false},"InspectionResult":{"oneOf":[{"$ref":"#/$defs/SnapshotInspectionResult"},{"$ref":"#/$defs/PolicyInspectionResult"},{"$ref":"#/$defs/RelationshipInspectionResult"},{"$ref":"#/$defs/AnalysisInspectionResult"},{"$ref":"#/$defs/AnalysisChildInspectionResult"}]},"InspectCall":{"type":"object","required":["handle"],"properties":{"handle":{"$ref":"#/$defs/InspectableHandle"}},"additionalProperties":false},"RejectedResult":{"type":"object","required":["kind","code","outcome","message","details","next_operations"],"properties":{"kind":{"const":"rejected-result"},"code":{"$ref":"#/$defs/CanonicalId"},"outcome":{"enum":["invalid","unavailable","unsupported","unauthorized"]},"target":{"$ref":"#/$defs/NonEmptyString"},"message":{"$ref":"#/$defs/NonEmptyString"},"details":{"type":"object","additionalProperties":{"$ref":"#/$defs/ScalarValue"}},"next_operations":{"type":"array","items":{"$ref":"#/$defs/NextOperation"}}},"additionalProperties":false},"AuthoredRoutingRule":{"type":"object","required":["id","target","when","condition"],"properties":{"id":{"$ref":"#/$defs/CanonicalId"},"target":{"$ref":"#/$defs/CanonicalId"},"when":{"$ref":"#/$defs/ApplicabilityExpression"},"condition":{"$ref":"#/$defs/NonEmptyString"}},"additionalProperties":false},"AuthoredRoutingFact":{"type":"object","required":["id","semantic_revision","type","nullable","values","aliases","meaning","prompt"],"properties":{"id":{"$ref":"#/$defs/CanonicalId"},"semantic_revision":{"type":"integer","minimum":1},"type":{"enum":["boolean","enum","string","string-set","enum-set","canonical-id"]},"nullable":{"type":"boolean"},"values":{"type":"array","items":{"type":"string"},"uniqueItems":true},"aliases":{"type":"array","items":{"$ref":"#/$defs/CanonicalId"},"uniqueItems":true},"meaning":{"$ref":"#/$defs/NonEmptyString"},"prompt":{"$ref":"#/$defs/NonEmptyString"}},"additionalProperties":false},"PutRoutingRuleEdit":{"type":"object","required":["kind","rule","rationale"],"properties":{"kind":{"const":"put-routing-rule"},"rule":{"$ref":"#/$defs/AuthoredRoutingRule"},"rationale":{"$ref":"#/$defs/NonEmptyString"}},"additionalProperties":false},"RemoveRoutingRuleEdit":{"type":"object","required":["kind","rule","rationale"],"properties":{"kind":{"const":"remove-routing-rule"},"rule":{"$ref":"#/$defs/CanonicalId"},"rationale":{"$ref":"#/$defs/NonEmptyString"}},"additionalProperties":false},"PutRoutingFactEdit":{"type":"object","required":["kind","fact","rationale"],"properties":{"kind":{"const":"put-routing-fact"},"fact":{"$ref":"#/$defs/AuthoredRoutingFact"},"rationale":{"$ref":"#/$defs/NonEmptyString"}},"additionalProperties":false},"RemoveRoutingFactEdit":{"type":"object","required":["kind","fact","rationale"],"properties":{"kind":{"const":"remove-routing-fact"},"fact":{"$ref":"#/$defs/CanonicalId"},"rationale":{"$ref":"#/$defs/NonEmptyString"}},"additionalProperties":false},"VerificationFailure":{"type":"object","additionalProperties":false,"required":["code","message","suite","check"],"properties":{"code":{"$ref":"#/$defs/NonEmptyString"},"message":{"$ref":"#/$defs/NonEmptyString"},"suite":{"type":["string","null"]},"check":{"type":["string","null"]}}},"VerificationReport":{"type":"object","additionalProperties":false,"required":["passed","exit_code","suites","checks","failures"],"properties":{"passed":{"type":"boolean"},"exit_code":{"enum":[0,1,2,3,4]},"suites":{"type":"integer","minimum":0},"checks":{"type":"integer","minimum":0},"failures":{"type":"array","items":{"$ref":"#/$defs/VerificationFailure"}}}},"VerifyRepositoryCall":{"type":"object","additionalProperties":false,"required":["kind","refresh_verification_inputs"],"properties":{"kind":{"const":"verify-repository"},"refresh_verification_inputs":{"type":"boolean"}}},"VerifyRepositoryResult":{"type":"object","additionalProperties":false,"required":["kind","refreshed_verification_inputs","verification"],"properties":{"kind":{"const":"verify-repository-result"},"refreshed_verification_inputs":{"type":"boolean"},"verification":{"$ref":"#/$defs/VerificationReport"}}},"VerifyProposalCall":{"type":"object","additionalProperties":false,"required":["kind","revision"],"properties":{"kind":{"const":"verify-proposal"},"revision":{"$ref":"#/$defs/ProposalRevisionHandle"},"readiness":{"$ref":"#/$defs/ReadinessHandle"}}},"VerifyProposalResult":{"type":"object","additionalProperties":false,"required":["kind","revision","verification"],"properties":{"kind":{"const":"verify-proposal-result"},"revision":{"$ref":"#/$defs/ProposalRevisionHandle"},"verification":{"$ref":"#/$defs/VerificationReport"},"readiness":{"$ref":"#/$defs/ReadinessHandle"}}},"RoutingConfiguration":{"type":"object","additionalProperties":false,"required":["facts","rules"],"properties":{"facts":{"type":"array","items":{"$ref":"#/$defs/AuthoredRoutingFact"}},"rules":{"type":"array","items":{"$ref":"#/$defs/AuthoredRoutingRule"}}}},"PolicyCoverageStatus":{"type":"object","required":["subject","requirement_id","status"],"properties":{"subject":{"$ref":"#/$defs/CanonicalId"},"requirement_id":{"$ref":"#/$defs/Digest"},"status":{"enum":["current-attestation","review-required"]},"authority":{"$ref":"#/$defs/CoverageAuditAuthority"}},"additionalProperties":false},"ReadCoverage":{"type":"object","description":"Repository attestation status bound to this snapshot or proposal. Empty subjects means no registered policy units in scope, not complete coverage. Analysis-local attestations are not repository certificates.","required":["subjects"],"properties":{"subjects":{"type":"array","items":{"$ref":"#/$defs/PolicyCoverageStatus"}}},"additionalProperties":false},"AuditPolicyUnitEdit":{"type":"object","required":["kind","policy","rationale"],"properties":{"kind":{"const":"audit-policy-unit"},"policy":{"$ref":"#/$defs/CanonicalId"},"rationale":{"$ref":"#/$defs/NonEmptyString"}},"additionalProperties":false},"CoverageAuditAuthority":{"type":"object","required":["issuer","principal","authorization_id"],"properties":{"issuer":{"$ref":"#/$defs/NonEmptyString"},"principal":{"$ref":"#/$defs/NonEmptyString"},"authorization_id":{"$ref":"#/$defs/NonEmptyString"}},"additionalProperties":false},"EvidenceCheckRetirement":{"type":"object","additionalProperties":false,"required":["suite","check"],"properties":{"suite":{"type":"string","minLength":1},"check":{"type":"string","minLength":1}}},"EvidenceSuiteDescription":{"type":"object","additionalProperties":false,"required":["suite","description"],"properties":{"suite":{"type":"string","minLength":1},"description":{"type":"string","minLength":1}}},"EvidenceRelationshipUpdate":{"type":"object","additionalProperties":false,"required":["source_policy","consumer","relation","evidence_owner","rationale"],"properties":{"source_policy":{"type":"string","minLength":1},"consumer":{"type":"string","minLength":1},"relation":{"type":"string","minLength":1},"evidence_owner":{"type":"string","minLength":1},"rationale":{"type":"string","minLength":1}}},"EvidenceConsumerRegistration":{"type":"object","additionalProperties":false,"required":["path","artifact_kind","source_policies","relation","evidence_owner","rationale"],"properties":{"path":{"type":"string","minLength":1},"artifact_kind":{"type":"string","enum":["implementation-artifact","fixture"]},"source_policies":{"type":"array","items":{"type":"string","minLength":1},"minItems":1,"uniqueItems":true},"relation":{"type":"string","enum":["implementation-projection","fixture-projection"]},"evidence_owner":{"type":"string","minLength":1},"rationale":{"type":"string","minLength":1}}},"EvidenceMaintenancePlan":{"type":"object","additionalProperties":false,"required":["prune_stale_certificates","retire_suites","retire_checks","retire_inputs","suite_descriptions","replacement_evidence_owner","replacement_evidence_rationale","relationship_updates","consumer_registrations"],"properties":{"prune_stale_certificates":{"type":"boolean"},"retire_suites":{"type":"array","items":{"type":"string","minLength":1},"uniqueItems":true},"retire_checks":{"type":"array","items":{"$ref":"#/$defs/EvidenceCheckRetirement"}},"retire_inputs":{"type":"array","items":{"type":"string","minLength":1},"uniqueItems":true},"suite_descriptions":{"type":"array","items":{"$ref":"#/$defs/EvidenceSuiteDescription"}},"replacement_evidence_owner":{"type":"string","minLength":1},"replacement_evidence_rationale":{"type":"string","minLength":1},"relationship_updates":{"type":"array","items":{"$ref":"#/$defs/EvidenceRelationshipUpdate"}},"consumer_registrations":{"type":"array","items":{"$ref":"#/$defs/EvidenceConsumerRegistration"}},"unregister_policy_subjects":{"type":"array","items":{"type":"string","minLength":1},"uniqueItems":true,"description":"Remove selected review-subject registrations and their source relationships while preserving normative Markdown."}}},"MaintainEvidenceCall":{"type":"object","additionalProperties":false,"required":["kind","expected_revision","evidence","plan","apply"],"properties":{"kind":{"const":"maintain-evidence"},"expected_revision":{"type":"string","minLength":1},"evidence":{"type":"array","items":{"$ref":"#/$defs/EvidenceReference"},"minItems":1},"plan":{"$ref":"#/$defs/EvidenceMaintenancePlan"},"apply":{"type":"boolean"}}},"MaintainEvidenceResult":{"type":"object","additionalProperties":false,"required":["kind","applied","changed_files","removed_files","verification"],"properties":{"kind":{"const":"maintain-evidence-result"},"applied":{"type":"boolean"},"changed_files":{"type":"array","items":{"type":"string","minLength":1}},"removed_files":{"type":"array","items":{"type":"string","minLength":1}},"verification":{"$ref":"#/$defs/VerificationReport"}}},"RouteCall":{"type":"object","required":["facts"],"properties":{"facts":{"$ref":"#/$defs/FactSet"},"snapshot":{"$ref":"#/$defs/SnapshotHandle"}},"additionalProperties":false},"ReadCall":{"type":"object","required":["target"],"properties":{"target":{"$ref":"#/$defs/CanonicalId"},"include_routing":{"type":"boolean"},"include_coverage":{"type":"boolean","description":"Include current repository attestation status for registered policy units in this read scope."},"snapshot":{"$ref":"#/$defs/SnapshotHandle"},"detail":{"enum":["compact","full"],"description":"Compact preserves exact policy and essential authority; full includes all relationship rows."}},"additionalProperties":false},"RelatedCall":{"type":"object","required":["target","groups","direction","transitive"],"properties":{"target":{"$ref":"#/$defs/CanonicalId"},"groups":{"type":"array","minItems":1,"uniqueItems":true,"items":{"$ref":"#/$defs/CanonicalId"}},"direction":{"enum":["incoming","outgoing","both"]},"transitive":{"type":"boolean","default":false},"snapshot":{"$ref":"#/$defs/SnapshotHandle"}},"additionalProperties":false},"CompactReadResult":{"type":"object","required":["kind","snapshot","policy","content","requires","specializes","next_operations","detail"],"properties":{"kind":{"const":"compact-read-result"},"snapshot":{"$ref":"#/$defs/SnapshotHandle"},"policy":{"$ref":"#/$defs/PolicySummary"},"content":{"type":"string"},"requires":{"type":"array","items":{"$ref":"#/$defs/CanonicalId"},"uniqueItems":true},"specializes":{"type":"array","items":{"$ref":"#/$defs/CanonicalId"},"uniqueItems":true},"next_operations":{"type":"array","items":{"$ref":"#/$defs/NextOperation"}},"summary":{"type":"string"},"routing":{"$ref":"#/$defs/RoutingConfiguration"},"coverage":{"$ref":"#/$defs/ReadCoverage"},"detail":{"const":"compact"},"application_exposure":{"$ref":"#/$defs/ApplicationExposureState"},"provenance":{"type":"array","items":{"$ref":"#/$defs/CanonicalId"}}},"additionalProperties":false},"RoutingFactsCall":{"type":"object","additionalProperties":false,"required":[],"properties":{"snapshot":{"$ref":"#/$defs/SnapshotHandle"}}},"RoutingFactsResult":{"type":"object","additionalProperties":false,"required":["kind","snapshot","facts"],"properties":{"kind":{"const":"routing-facts-result"},"snapshot":{"$ref":"#/$defs/SnapshotHandle"},"facts":{"type":"array","items":{"$ref":"#/$defs/AuthoredRoutingFact"}}}},"RoutingQuestion":{"type":"object","additionalProperties":false,"required":["id","kind","prompt","state","fact"],"properties":{"id":{"$ref":"#/$defs/CanonicalId"},"kind":{"const":"applicability-fact"},"prompt":{"$ref":"#/$defs/NonEmptyString"},"state":{"const":"required"},"fact":{"$ref":"#/$defs/AuthoredRoutingFact"}}},"RoutingRuleExplanation":{"type":"object","additionalProperties":false,"required":["id","target","when","state"],"properties":{"id":{"$ref":"#/$defs/CanonicalId"},"target":{"$ref":"#/$defs/CanonicalId"},"when":{"$ref":"#/$defs/ApplicabilityExpression"},"state":{"enum":["selected","unresolved"]}}},"AgentRouteResult":{"type":"object","required":["kind","snapshot","reading_plan","unresolved_questions","next_operations","facts","rules"],"properties":{"kind":{"const":"agent-route-result"},"snapshot":{"$ref":"#/$defs/SnapshotHandle"},"reading_plan":{"type":"array","items":{"$ref":"#/$defs/ReadingPlanEntry"}},"unresolved_questions":{"type":"array","items":{"$ref":"#/$defs/RoutingQuestion"}},"next_operations":{"type":"array","items":{"$ref":"#/$defs/NextOperation"}},"summary":{"type":"string"},"facts":{"$ref":"#/$defs/FactSet"},"rules":{"type":"array","items":{"$ref":"#/$defs/RoutingRuleExplanation"}}},"additionalProperties":false},"WorkflowContext":{"oneOf":[{"$ref":"#/$defs/ProposalRevisionHandle"},{"$ref":"#/$defs/AnalysisHandle"},{"$ref":"#/$defs/ReadinessHandle"}]},"ProposeCall":{"type":"object","additionalProperties":false,"properties":{"snapshot":{"$ref":"#/$defs/SnapshotHandle"},"change_set":{"$ref":"#/$defs/StandardsChangeSet"}},"required":["change_set"]},"ReviseCall":{"type":"object","additionalProperties":false,"properties":{"context":{"$ref":"#/$defs/WorkflowContext"},"change_set":{"$ref":"#/$defs/StandardsChangeSet"}},"required":["context","change_set"]},"AnalyzeCall":{"type":"object","additionalProperties":false,"properties":{"context":{"$ref":"#/$defs/WorkflowContext"}},"required":["context"]},"ResolveWorkflowCall":{"type":"object","additionalProperties":false,"properties":{"context":{"$ref":"#/$defs/WorkflowContext"},"submission":{"$ref":"#/$defs/Submission"}},"required":["context","submission"]},"ReviewCall":{"type":"object","additionalProperties":false,"properties":{"context":{"$ref":"#/$defs/WorkflowContext"},"decisions":{"type":"array","minItems":3,"maxItems":3,"uniqueItems":true,"items":{"$ref":"#/$defs/ReviewDecision"}}},"required":["context","decisions"]},"ApplyCall":{"type":"object","additionalProperties":false,"properties":{"context":{"$ref":"#/$defs/WorkflowContext"}},"required":["context"]},"RecoverCall":{"type":"object","additionalProperties":false,"properties":{"context":{"$ref":"#/$defs/WorkflowContext"}},"required":["context"]},"WorkflowStatusCall":{"type":"object","additionalProperties":false,"properties":{"context":{"$ref":"#/$defs/WorkflowContext"}},"required":["context"]},"ResumeCall":{"type":"object","additionalProperties":false,"properties":{"context":{"$ref":"#/$defs/WorkflowContext"}},"required":["context"]},"WorkflowContinuation":{"type":"object","additionalProperties":false,"properties":{"operation":{"enum":["revise","analyze","resolve_workflow","review","apply","recover","workflow_status","resume"]},"context":{"$ref":"#/$defs/WorkflowContext"},"required_inputs":{"type":"array","uniqueItems":true,"items":{"enum":["change_set","submission","decisions"]}}},"required":["operation","context","required_inputs"]},"WorkflowOutcome":{"oneOf":[{"$ref":"#/$defs/CreateProposalResult"},{"$ref":"#/$defs/ReviseProposalResult"},{"$ref":"#/$defs/PendingResult"},{"$ref":"#/$defs/CompleteResult"},{"$ref":"#/$defs/ReviewProposalResult"},{"$ref":"#/$defs/ApplyProposalResult"},{"$ref":"#/$defs/ApplicationRecoveryRequiredResult"},{"$ref":"#/$defs/RecoverApplicationResult"},{"$ref":"#/$defs/RejectedResult"}]},"WorkflowResult":{"type":"object","additionalProperties":false,"properties":{"kind":{"const":"workflow-result"},"context":{"$ref":"#/$defs/WorkflowContext"},"proposal":{"$ref":"#/$defs/ProposalHandle"},"revision":{"$ref":"#/$defs/ProposalRevisionHandle"},"status":{"enum":["draft","needs-action","complete","requires-change","ready","recovery-required","applied","rejected","stale"]},"next_operations":{"type":"array","items":{"$ref":"#/$defs/WorkflowContinuation"}},"outcome":{"$ref":"#/$defs/WorkflowOutcome"}},"required":["kind","context","proposal","revision","status","next_operations"]},"FocusedQueryNextOperation":{"type":"object","required":["operation","request_kind","snapshot"],"properties":{"operation":{"enum":["route","read","related"]},"request_kind":{"enum":["route","read","related"]},"target":{"$ref":"#/$defs/CanonicalId"},"snapshot":{"$ref":"#/$defs/SnapshotHandle"}},"additionalProperties":false},"RewriteNavigationIndexEdit":{"type":"object","required":["kind","entrypoint","destinations","rationale"],"properties":{"kind":{"const":"rewrite-navigation-index"},"entrypoint":{"$ref":"#/$defs/AuthoringTargetHandle"},"destinations":{"type":"array","items":{"$ref":"#/$defs/CanonicalId"},"minItems":1,"uniqueItems":true},"rationale":{"$ref":"#/$defs/NonEmptyString"},"retargets":{"type":"array","items":{"$ref":"#/$defs/NavigationRetarget"},"uniqueItems":true}},"additionalProperties":false},"NavigationIndexEntry":{"type":"object","required":["id","entrypoint","destinations"],"properties":{"id":{"$ref":"#/$defs/CanonicalId"},"entrypoint":{"$ref":"#/$defs/AuthoringTargetHandle"},"destinations":{"type":"array","items":{"$ref":"#/$defs/CanonicalId"},"uniqueItems":true},"content":{"$ref":"#/$defs/NonEmptyString"}},"additionalProperties":false},"NavigationIndexesResult":{"type":"object","required":["kind","authority","indexes","next_operations"],"properties":{"kind":{"const":"navigation-indexes-result"},"authority":{"oneOf":[{"$ref":"#/$defs/SnapshotHandle"},{"$ref":"#/$defs/ProposalRevisionHandle"}]},"indexes":{"type":"array","items":{"$ref":"#/$defs/NavigationIndexEntry"},"minItems":1},"next_operations":{"type":"array","items":{"$ref":"#/$defs/NextOperation"},"maxItems":0}},"additionalProperties":false},"NavigationRetarget":{"type":"object","required":["entrypoint","standard"],"properties":{"entrypoint":{"$ref":"#/$defs/AuthoringTargetHandle"},"standard":{"$ref":"#/$defs/CanonicalId"}},"additionalProperties":false},"ApplicationNextOperation":{"type":"object","additionalProperties":false,"required":["operation","snapshot"],"properties":{"operation":{"enum":["read","related","routing_facts","route","query","inspect"]},"snapshot":{"$ref":"#/$defs/SnapshotHandle"},"target":{"$ref":"#/$defs/CanonicalId"},"handle":{"$ref":"#/$defs/SnapshotChildHandle"}}},"ApplicationRejectedResult":{"type":"object","additionalProperties":false,"required":["kind","purpose","code","outcome","message","next_operations"],"properties":{"kind":{"const":"application-rejected-result"},"purpose":{"const":"application"},"code":{"enum":["APPLICATION.CONTENT_UNAVAILABLE","APPLICATION.INPUT_INVALID","APPLICATION.OPERATION_UNAVAILABLE","APPLICATION.INTERNAL_UNAVAILABLE","APPLICATION.UNSUPPORTED_CAPTURE"]},"outcome":{"enum":["invalid","unsupported","unavailable"]},"message":{"type":"string"},"next_operations":{"type":"array","items":{"$ref":"#/$defs/ApplicationNextOperation"}}}},"ApplicationPolicy":{"type":"object","additionalProperties":false,"required":["id","handle","role","level"],"properties":{"id":{"$ref":"#/$defs/CanonicalId"},"handle":{"$ref":"#/$defs/SnapshotChildHandle"},"role":{"enum":["core","router","topic","workflow","profile","reference","prompt","template"]},"level":{"enum":["MUST","SHOULD","PROFILE","REFERENCE"]}}},"ApplicationRelationship":{"type":"object","additionalProperties":false,"required":["handle","source","target","relation","groups","direction"],"properties":{"handle":{"$ref":"#/$defs/SnapshotChildHandle"},"source":{"$ref":"#/$defs/CanonicalId"},"target":{"$ref":"#/$defs/CanonicalId"},"relation":{"type":"string"},"groups":{"type":"array","items":{"$ref":"#/$defs/CanonicalId"}},"direction":{"enum":["incoming","outgoing"]}}},"ApplicationReadResult":{"type":"object","additionalProperties":false,"required":["kind","purpose","snapshot","policy","content","scope","requires","specializes","next_operations"],"properties":{"kind":{"const":"application-read-result"},"purpose":{"const":"application"},"snapshot":{"$ref":"#/$defs/SnapshotHandle"},"policy":{"$ref":"#/$defs/ApplicationPolicy"},"content":{"type":"string"},"scope":{"$ref":"#/$defs/ReviewScope"},"requires":{"type":"array","items":{"$ref":"#/$defs/CanonicalId"}},"specializes":{"type":"array","items":{"$ref":"#/$defs/CanonicalId"}},"related":{"type":"array","items":{"$ref":"#/$defs/ApplicationRelationship"}},"next_operations":{"type":"array","items":{"$ref":"#/$defs/ApplicationNextOperation"}}}},"ApplicationRelatedResult":{"type":"object","additionalProperties":false,"required":["kind","purpose","snapshot","target","relationships","next_operations"],"properties":{"kind":{"const":"application-related-result"},"purpose":{"const":"application"},"snapshot":{"$ref":"#/$defs/SnapshotHandle"},"target":{"$ref":"#/$defs/CanonicalId"},"relationships":{"type":"array","items":{"$ref":"#/$defs/ApplicationRelationship"}},"next_operations":{"type":"array","items":{"$ref":"#/$defs/ApplicationNextOperation"}}}},"ApplicationReadingEntry":{"type":"object","additionalProperties":false,"required":["target","scope","authority","state"],"properties":{"target":{"$ref":"#/$defs/CanonicalId"},"scope":{"$ref":"#/$defs/ReviewScope"},"authority":{"enum":["normative","contextual"]},"state":{"const":"selected"}}},"ApplicationQuestion":{"type":"object","additionalProperties":false,"required":["fact"],"properties":{"fact":{"$ref":"#/$defs/AuthoredRoutingFact"}}},"ApplicationRouteResult":{"type":"object","additionalProperties":false,"required":["kind","purpose","snapshot","status","reading_plan","unresolved_questions","next_operations"],"properties":{"kind":{"const":"application-route-result"},"purpose":{"const":"application"},"snapshot":{"$ref":"#/$defs/SnapshotHandle"},"status":{"enum":["complete","needs-facts"]},"reading_plan":{"type":"array","items":{"$ref":"#/$defs/ApplicationReadingEntry"}},"unresolved_questions":{"type":"array","items":{"$ref":"#/$defs/ApplicationQuestion"}},"next_operations":{"type":"array","items":{"$ref":"#/$defs/ApplicationNextOperation"}}}},"ApplicationRoutingFactsResult":{"type":"object","additionalProperties":false,"required":["kind","purpose","snapshot","facts","next_operations"],"properties":{"kind":{"const":"application-routing-facts-result"},"purpose":{"const":"application"},"snapshot":{"$ref":"#/$defs/SnapshotHandle"},"facts":{"type":"array","items":{"$ref":"#/$defs/AuthoredRoutingFact"}},"next_operations":{"type":"array","items":{"$ref":"#/$defs/ApplicationNextOperation"}}}},"ApplicationReadCall":{"type":"object","additionalProperties":false,"required":["target"],"properties":{"target":{"$ref":"#/$defs/CanonicalId"},"snapshot":{"$ref":"#/$defs/SnapshotHandle"},"detail":{"enum":["compact","full"]}}},"ApplicationReadRequest":{"type":"object","additionalProperties":false,"required":["kind","target"],"properties":{"kind":{"const":"read"},"target":{"$ref":"#/$defs/CanonicalId"},"detail":{"enum":["compact","full"]}}},"ApplicationQueryRequest":{"oneOf":[{"$ref":"#/$defs/RouteRequest"},{"$ref":"#/$defs/ApplicationReadRequest"},{"$ref":"#/$defs/RelatedRequest"}]},"ApplicationQueryCall":{"type":"object","additionalProperties":false,"required":["snapshot","request"],"properties":{"snapshot":{"$ref":"#/$defs/SnapshotHandle"},"request":{"$ref":"#/$defs/ApplicationQueryRequest"}}},"ApplicationInspectCall":{"type":"object","additionalProperties":false,"required":["handle"],"properties":{"handle":{"$ref":"#/$defs/SnapshotChildHandle"}}},"AuthoredDecisionProvenance":{"type":"object","additionalProperties":false,"required":["id","subject","origin","rationale","evidence"],"properties":{"id":{"$ref":"#/$defs/CanonicalId"},"subject":{"$ref":"#/$defs/CanonicalId"},"origin":{"enum":["documented-original","reconstructed-history","current-justification","unrecorded"]},"rationale":{"type":"string"},"evidence":{"type":"array","items":{"$ref":"#/$defs/EvidenceReference"}},"assumptions":{"type":"array","items":{"type":"string"}},"limits":{"type":"array","items":{"type":"string"}},"alternatives":{"type":"array","items":{"type":"string"}},"reconsideration":{"type":"array","items":{"type":"string"}},"supersedes":{"type":"array","items":{"type":"string"}}}},"DecisionProvenanceRecord":{"type":"object","additionalProperties":false,"required":["id","subject","origin","rationale","evidence","assumptions","limits","alternatives","reconsideration","supersedes","subject_binding","retired"],"properties":{"id":{"$ref":"#/$defs/CanonicalId"},"subject":{"$ref":"#/$defs/CanonicalId"},"origin":{"enum":["documented-original","reconstructed-history","current-justification","unrecorded"]},"rationale":{"type":"string"},"evidence":{"type":"array","items":{"$ref":"#/$defs/EvidenceReference"}},"assumptions":{"type":"array","items":{"type":"string"}},"limits":{"type":"array","items":{"type":"string"}},"alternatives":{"type":"array","items":{"type":"string"}},"reconsideration":{"type":"array","items":{"type":"string"}},"supersedes":{"type":"array","items":{"type":"string"}},"subject_binding":{"$ref":"#/$defs/Digest"},"retired":{"type":"boolean"}}},"ApplicationExposureState":{"enum":["unreviewed","current","needs-review"]},"ProvenanceReadResult":{"type":"object","additionalProperties":false,"required":["kind","authority","record","state","next_operations"],"properties":{"kind":{"const":"provenance-read-result"},"authority":{"oneOf":[{"$ref":"#/$defs/SnapshotHandle"},{"$ref":"#/$defs/ProposalRevisionHandle"}]},"record":{"$ref":"#/$defs/DecisionProvenanceRecord"},"state":{"enum":["current","needs-review","retired"]},"next_operations":{"type":"array","items":{"$ref":"#/$defs/NextOperation"}}}},"OperationalReadResult":{"type":"object","additionalProperties":false,"required":["kind","authority","target","canonical_id","role","content","application_exposure","next_operations"],"properties":{"kind":{"const":"operational-read-result"},"authority":{"oneOf":[{"$ref":"#/$defs/SnapshotHandle"},{"$ref":"#/$defs/ProposalRevisionHandle"}]},"target":{"$ref":"#/$defs/AuthoringTargetHandle"},"canonical_id":{"$ref":"#/$defs/CanonicalId"},"role":{"enum":["prompt","template"]},"content":{"type":"string"},"application_exposure":{"$ref":"#/$defs/ApplicationExposureState"},"next_operations":{"type":"array","items":{"$ref":"#/$defs/NextOperation"}}}},"PutDecisionProvenanceEdit":{"type":"object","additionalProperties":false,"required":["kind","record"],"properties":{"kind":{"const":"put-provenance"},"record":{"$ref":"#/$defs/AuthoredDecisionProvenance"}}},"RetireDecisionProvenanceEdit":{"type":"object","additionalProperties":false,"required":["kind","id"],"properties":{"kind":{"const":"retire-provenance"},"id":{"$ref":"#/$defs/CanonicalId"}}},"ApproveApplicationContentEdit":{"type":"object","additionalProperties":false,"required":["kind","target"],"properties":{"kind":{"const":"approve-application-content"},"target":{"oneOf":[{"$ref":"#/$defs/CanonicalId"},{"$ref":"#/$defs/AuthoringTargetHandle"}]}}},"WithdrawApplicationContentEdit":{"type":"object","additionalProperties":false,"required":["kind","target"],"properties":{"kind":{"const":"withdraw-application-content"},"target":{"oneOf":[{"$ref":"#/$defs/CanonicalId"},{"$ref":"#/$defs/AuthoringTargetHandle"}]}}},"ReviseOperationalArtifactEdit":{"type":"object","additionalProperties":false,"required":["kind","target","title","body"],"properties":{"kind":{"const":"revise-operational-artifact"},"target":{"$ref":"#/$defs/AuthoringTargetHandle"},"title":{"$ref":"#/$defs/NonEmptyString"},"body":{"type":"string"}}},"PolicyScopeUpdate":{"type":"object","additionalProperties":false,"required":["policy","heading_path","semantics"],"properties":{"policy":{"$ref":"#/$defs/CanonicalId"},"heading_path":{"type":"array","minItems":1,"items":{"$ref":"#/$defs/NonEmptyString"}},"semantics":{"$ref":"#/$defs/PolicySemanticIntent"}}}}}') -DEFINITION_METADATA = freeze_json({'ActiveSnapshotSummary': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'lifecycle': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'source_revision': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'created_at': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'AgentRouteResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'reading_plan': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'unresolved_questions': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'next_operations': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'summary': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'facts': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'rules': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'AllExpression': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'operator': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'expressions': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'AlwaysExpression': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'operator': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'AnalysisChildArtifact': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'AnalysisChildHandle': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'analysis': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'child_kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'child_id': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'schema_version': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'AnalysisChildInspectionResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'handle': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'artifact': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'AnalysisContext': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'handle': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'subjects': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'changes': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'semantic_proposals': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'AnalysisExecutionContractView': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'authorization_authority_digest': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'providers': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'AnalysisHandle': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'id': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'schema_version': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'AnalysisId': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'AnalysisInspectionResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'state': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'AnalysisMaterialHandle': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'AnalysisRequest': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'base_snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'proposed_snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'changes': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'semantic_proposals': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'prior_analysis': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'contract_version': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'AnalysisState': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'handle': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'base_snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'proposed_reference': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'changes': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'semantic_proposals': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'fact_observations': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'dispositions': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'coverage_attestations': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'authorization_records': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'domain_contracts': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'execution_contracts': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'contract_version': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'AnalyzeCall': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'context': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'AnalyzeProposalCall': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'revision': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'AnyExpression': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'operator': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'expressions': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ApplicabilityExpression': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'ApplicationExposureState': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'ApplicationHandle': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'id': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'schema_version': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ApplicationId': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'ApplicationInspectCall': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'handle': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ApplicationNextOperation': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'operation': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'target': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'handle': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ApplicationPolicy': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'id': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'handle': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'role': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'level': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ApplicationQueryCall': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'request': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ApplicationQueryRequest': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'ApplicationQuestion': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'fact': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ApplicationReadCall': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'target': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'detail': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ApplicationReadRequest': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'target': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'detail': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ApplicationReadResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'purpose': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'policy': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'content': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'scope': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'requires': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'specializes': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'related': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'next_operations': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ApplicationReadingEntry': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'target': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'scope': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'authority': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'state': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ApplicationRecoveryRequiredResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'application': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'status': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'code': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'outcome': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'message': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ApplicationRejectedResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'purpose': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'code': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'outcome': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'message': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'next_operations': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ApplicationRelatedResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'purpose': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'target': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'relationships': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'next_operations': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ApplicationRelationship': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'handle': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'source': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'target': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'relation': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'groups': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'direction': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ApplicationRouteResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'purpose': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'status': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'reading_plan': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'unresolved_questions': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'next_operations': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ApplicationRoutingFactsResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'purpose': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'facts': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'next_operations': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ApplyCall': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'context': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ApplyProposalCall': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'readiness': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ApplyProposalResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'application': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'status': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ApproveApplicationContentEdit': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'target': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'AuditPolicyUnitEdit': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'policy': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'rationale': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'AuthoredDecisionProvenance': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'id': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'subject': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'origin': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'rationale': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'evidence': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'assumptions': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'limits': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'alternatives': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'reconsideration': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'supersedes': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'AuthoredRoutingFact': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'id': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'semantic_revision': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'type': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'nullable': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'values': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'aliases': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'meaning': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'prompt': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'AuthoredRoutingRule': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'id': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'target': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'when': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'condition': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'AuthoringTargetHandle': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'id': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'schema_version': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'AuthorizationId': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'AuthorizationRecord': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'reference': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'issuer_semantic_revision': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'principal': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'action': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'subject_kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'subject_id': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'authorization_evidence': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'revocation_authority': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'revocation_authority_semantic_revision': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'revocation_evidence': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'AuthorizationReference': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'id': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'issuer': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'capability': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'authority_digest': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'CanonicalId': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'CanonicalModuleDeclaration': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'id': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'role': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'level': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'applies_when': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'does_not_apply_when': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'requires': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'specializes': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'verification': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ChangeDescriptor': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'accepted_ids': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'proposed_ids': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'scope': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'accepted_module': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'proposed_module': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ChangePolicySemantics': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'accepted_semantic_revision': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'proposed_semantic_revision': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'intent': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ChangedPolicyUnit': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'policy': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'change_kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'classification': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'accepted_representation_digest': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'proposed_representation_digest': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'accepted_structural_digest': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'proposed_structural_digest': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'accepted_semantic_revision': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'proposed_semantic_revision': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'semantic_state': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'scope': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ChildId': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'CompactReadResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'policy': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'content': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'requires': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'specializes': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'next_operations': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'summary': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'routing': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'coverage': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'detail': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'application_exposure': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'provenance': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'CompleteResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'handle': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'status': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'context': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'changes': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'changed_units': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'coverage_certificates': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'fact_observations': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'dispositions': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'reading_plan': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'completion': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'summary': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'CompletionProof': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'required_coverage_subjects': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'certificate_subjects': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'reached_consumer_obligations': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'disposition_obligations': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'required_fact_requirements': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'observed_fact_requirements': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'non_consumer_obligations_resolved': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'applicability_resolved': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'authorization_valid': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'evidence_valid': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ConsumerDispositionSubmission': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'obligation': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'result': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'rationale': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'evidence': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'fingerprint': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ConsumerReviewContract': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'id': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'version': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'permitted_dispositions': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'evidence_contract': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'authorization_capability': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'semantics': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ConsumerReviewObligationReadingReason': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'obligation': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ContainsExpression': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'operator': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'fact': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'value': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'CoverageAttestation': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'requirement': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'conclusion': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'evidence': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'explicit_exclusions': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'rationale': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'auditor_provenance': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'schema_version': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'authorization': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'CoverageAttestationClaim': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'requirement': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'conclusion': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'evidence': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'explicit_exclusions': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'rationale': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'auditor_provenance': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'CoverageAttestationSubmission': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'claim': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'CoverageAuditAuthority': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'issuer': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'principal': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'authorization_id': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'CoverageCertificate': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'handle': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'requirement': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'subject': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'owner': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'semantic_revision': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'horizon_digest': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'relationship_digest': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'evidence_digests': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'fact_schema_digest': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'CoverageRequirement': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'handle': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'subject': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'owner': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'semantic_revision': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'relationship_kinds': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'horizon': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'required_evidence_contract': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'CreateProposalCall': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'base_snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'change_set': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'CreateProposalResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'proposal': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'revision': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'CreateSnapshotCall': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'CreateSnapshotResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'CreateStandardEdit': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'standard': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'requires': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'specializes': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'policy_units': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'DecisionDependency': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'class': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'identity': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'digest': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'DecisionFingerprint': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'decision_kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'decision_contract': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'schema_version': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'dependencies': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'DecisionProvenanceRecord': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'id': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'subject': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'origin': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'rationale': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'evidence': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'assumptions': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'limits': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'alternatives': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'reconsideration': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'supersedes': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'subject_binding': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'retired': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'DeleteSnapshotCall': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'DeleteSnapshotResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'purge_deadline': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'Digest': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'DispositionRecord': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'obligation': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'result': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'rationale': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'evidence': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'authorization': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'fingerprint': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'DomainContractReference': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'id': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'version': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'EdgeId': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'EqualsExpression': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'operator': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'fact': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'value': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'EvidenceCheckRetirement': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'suite': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'check': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'EvidenceConsumerRegistration': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'path': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'artifact_kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'source_policies': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'relation': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'evidence_owner': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'rationale': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'EvidenceMaintenancePlan': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'prune_stale_certificates': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'retire_suites': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'retire_checks': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'retire_inputs': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'suite_descriptions': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'replacement_evidence_owner': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'replacement_evidence_rationale': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'relationship_updates': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'consumer_registrations': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'unregister_policy_subjects': {'title': None, 'description': 'Remove selected review-subject registrations and their source relationships while preserving normative Markdown.', 'has_default': False, 'default': None}}}, 'EvidenceReference': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'id': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'digest': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'provider_contract': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'provider_contract_version': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'EvidenceRelationshipUpdate': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'source_policy': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'consumer': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'relation': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'evidence_owner': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'rationale': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'EvidenceSuiteDescription': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'suite': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'description': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ExistsExpression': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'operator': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'fact': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'FactObservation': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'handle': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'requirement': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'value': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'evidence': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'authorization': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'provider': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'FactRequirement': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'handle': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'fact': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'fact_semantic_revision': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'fact_contract_digest': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'context': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'value_contract': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'answer_contract': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'evidence_contract': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'authorization_capability': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'FactRequirementId': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'FactRequirementWork': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'requirement': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'prompt': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'dependent_programs': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'FactSet': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'FactValue': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'FactValueContract': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'type': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'states': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'nullable': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'values': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'FindProposalsCall': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'after': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'limit': {'title': None, 'description': None, 'has_default': True, 'default': 50}}}, 'FindProposalsResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'proposals': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'continuation': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'FindSnapshotsCall': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'lifecycle': {'title': None, 'description': None, 'has_default': True, 'default': 'active'}, 'after': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'limit': {'title': None, 'description': None, 'has_default': True, 'default': 50}}}, 'FindSnapshotsResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'snapshots': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'continuation': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'FocusedQueryNextOperation': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'operation': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'request_kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'target': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'GeneralSelectionReason': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'source': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'fact': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'edge': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'question': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ImpactDispositionSubmission': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'obligation': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'result': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'rationale': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'evidence': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'fingerprint': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ImpactTraceId': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'ImpactTraceReference': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'id': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'graph': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'applicability': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'InExpression': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'operator': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'fact': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'values': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'InspectCall': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'handle': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'InspectNextOperation': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'operation': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'request_kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'handle': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'InspectableHandle': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'InspectionResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'MaintainEvidenceCall': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'expected_revision': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'evidence': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'plan': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'apply': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'MaintainEvidenceResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'applied': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'changed_files': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'removed_files': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'verification': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ModuleRelationshipKey': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'relation': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'source': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'target': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'MovePolicyUnitEdit': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'policy': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'standard': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'after_policy': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'semantics': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'NavigationIndexEntry': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'id': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'entrypoint': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'destinations': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'content': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'NavigationIndexesResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'authority': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'indexes': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'next_operations': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'NavigationRetarget': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'entrypoint': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'standard': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'NewPolicyUnit': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'id': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'heading_chain': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'semantic_revision': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'intent': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'aliases': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'predecessors': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'successors': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'NextOperation': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'NonEmptyString': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'NotExpression': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'operator': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'expression': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'Obligation': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'handle': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'target': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'scope': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'reasons': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'state': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'applicability': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'permitted_submissions': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'review_contract': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'fingerprint': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ObligationId': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'OperationalReadResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'authority': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'target': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'canonical_id': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'role': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'content': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'application_exposure': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'next_operations': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'PendingResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'handle': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'status': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'context': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'changes': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'changed_units': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'obligations': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'fact_requirements': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'reading_plan': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'next_operations': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'summary': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'PolicyCoverageStatus': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'subject': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'requirement_id': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'status': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'authority': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'PolicyImpactSelectionReason': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'source': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'edge': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'relation': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'evidence_owner': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'traces': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'PolicyInspectionResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'policy': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'declaration': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'representation_digest': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'structural_digest': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'provenance': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'PolicyRelationship': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'source_policy': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'consumer': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'relation': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'applicability': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'source_scope': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'consumer_scope': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'evidence_owner': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'rationale': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'PolicyRelationshipInspection': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'relationship_kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'applicability': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'source_scope': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'consumer_scope': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'propagation': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'evidence_owner': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'rationale': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'PolicyRelationshipKey': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'source_policy': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'consumer': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'relation': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'PolicyScopeUpdate': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'policy': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'heading_path': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'semantics': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'PolicySemanticIntent': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'PolicySummary': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'handle': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'authority': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'scope': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'PolicyUnitDeclaration': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'id': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'module': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'heading_path': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'semantic_revision': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'lifecycle': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'aliases': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'predecessors': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'successors': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'PolicyUnitMapping': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'state': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'reason': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'policy_units': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'PrepareCall': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'request': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'PreservePolicySemantics': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'semantic_revision': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'intent': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ProposalHandle': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'id': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'schema_version': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ProposalId': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'ProposalPolicySummary': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'id': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'authority': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'scope': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ProposalReadResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'revision': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'policy': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'content': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'requires': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'specializes': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'related': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'next_operations': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'summary': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'routing': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'coverage': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'application_exposure': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'provenance': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ProposalRelatedResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'revision': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'target': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'authoring_target': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'policy_unit_mapping': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'relationships': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'next_operations': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'summary': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ProposalRelationshipSummary': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'source': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'target': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'relation': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'groups': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'direction': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'traversal_eligible': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'applicability': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ProposalRevisionHandle': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'id': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'schema_version': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ProposalRevisionId': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'ProposalRouteResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'revision': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'reading_plan': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'unresolved_questions': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'next_operations': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'summary': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ProposalSummary': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'proposal': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'head_revision': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ProposeCall': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'change_set': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ProvenanceReadResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'authority': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'record': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'state': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'next_operations': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ProvenanceRecord': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'path': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ProvideFactSubmission': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'requirement': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'value': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'evidence': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ProviderReference': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'id': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'contract': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'contract_version': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'input_digest': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'PutDecisionProvenanceEdit': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'record': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'PutPolicyRelationshipEdit': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'relationship': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'PutRoutingFactEdit': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'fact': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'rationale': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'PutRoutingRuleEdit': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'rule': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'rationale': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'QuarantinedSnapshotSummary': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'lifecycle': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'source_revision': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'created_at': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'purge_deadline': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'QueryCall': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'request': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'QueryNextOperation': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'operation': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'request_kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'target': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'QueryProposalCall': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'revision': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'request': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'QueryProposalNextOperation': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'operation': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'request_kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'target': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'revision': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'QueryProposalResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'QueryRequest': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'QueryResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'Question': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'id': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'prompt': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'state': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'permitted_answers': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ReadCall': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'target': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'include_routing': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'include_coverage': {'title': None, 'description': 'Include current repository attestation status for registered policy units in this read scope.', 'has_default': False, 'default': None}, 'snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'detail': {'title': None, 'description': 'Compact preserves exact policy and essential authority; full includes all relationship rows.', 'has_default': False, 'default': None}}}, 'ReadCoverage': {'title': None, 'description': 'Repository attestation status bound to this snapshot or proposal. Empty subjects means no registered policy units in scope, not complete coverage. Analysis-local attestations are not repository certificates.', 'has_default': False, 'default': None, 'properties': {'subjects': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ReadRequest': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'target': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'include_routing': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'include_coverage': {'title': None, 'description': 'Include current repository attestation status for registered policy units in this read scope.', 'has_default': False, 'default': None}}}, 'ReadResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'policy': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'content': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'requires': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'specializes': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'related': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'next_operations': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'summary': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'routing': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'coverage': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'application_exposure': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'provenance': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ReadinessHandle': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'id': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'schema_version': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ReadinessId': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'ReadingPlanEntry': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'target': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'scope': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'authority': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'reasons': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'state': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ReadingPlanReason': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'RecoverApplicationCall': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'readiness': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'RecoverApplicationResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'application': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'status': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'RecoverCall': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'context': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'RejectedResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'code': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'outcome': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'target': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'message': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'details': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'next_operations': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'RelatedCall': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'target': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'groups': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'direction': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'transitive': {'title': None, 'description': None, 'has_default': True, 'default': False}, 'snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'RelatedRequest': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'target': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'groups': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'direction': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'transitive': {'title': None, 'description': None, 'has_default': True, 'default': False}}}, 'RelatedResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'target': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'authoring_target': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'policy_unit_mapping': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'relationships': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'next_operations': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'summary': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'RelationshipConsumer': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'RelationshipDisposition': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'relationship': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'disposition': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'replacement_consumer': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'rationale': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'evidence': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'RelationshipInspectionResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'relationship': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'policy_semantics': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'provenance': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'RelationshipKey': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'RelationshipSummary': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'handle': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'source': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'target': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'relation': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'groups': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'direction': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'traversal_eligible': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'applicability': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'RemovePolicyRelationshipEdit': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'relationship': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'RemoveRoutingFactEdit': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'fact': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'rationale': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'RemoveRoutingRuleEdit': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'rule': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'rationale': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ReplaceStandardRelationshipsEdit': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'standard': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'requires': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'specializes': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'rationale': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'RepositoryPath': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'RequiresReadingReason': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'edge': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'source': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ResolveCall': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'analysis': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'submission': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ResolveNextOperation': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'operation': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'request_kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'target': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'work': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'analysis': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ResolveWorkflowCall': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'context': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'submission': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ResumeCall': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'context': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'RetireDecisionProvenanceEdit': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'id': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'RetirePolicyUnitEdit': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'policy': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'retired_semantic_revision': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'successors': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'relationship_dispositions': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'evidence': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'RetireStandardEdit': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'standard': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'successors': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'relationship_dispositions': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'evidence': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ReviewCall': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'context': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'decisions': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ReviewDecision': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'owner': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'decision': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'rationale': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'evidence': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ReviewProposalCall': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'analysis': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'decisions': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'prior_readiness': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ReviewProposalResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'readiness': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'revision': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'status': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ReviewScope': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'ReviseCall': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'context': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'change_set': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ReviseOperationalArtifactEdit': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'target': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'title': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'body': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'RevisePolicyUnitEdit': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'policy': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'title': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'body': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'semantics': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ReviseProposalCall': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'expected_revision': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'change_set': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ReviseProposalResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'proposal': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'revision': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ReviseStandardEdit': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'standard': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'scope_updates': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'RewriteNavigationIndexEdit': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'entrypoint': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'destinations': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'rationale': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'retargets': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'RouteCall': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'facts': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'RouteRequest': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'facts': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'RouteResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'reading_plan': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'unresolved_questions': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'next_operations': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'summary': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'RoutingBaseReadingReason': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'projection': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'RoutingConfiguration': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'facts': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'rules': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'RoutingFactsCall': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'RoutingFactsResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'facts': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'RoutingQuestion': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'id': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'prompt': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'state': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'fact': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'RoutingRuleExplanation': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'id': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'target': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'when': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'state': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'RoutingRuleReadingReason': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'rule': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'facts': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ScalarValue': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'SelectionReason': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'SemanticProposal': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'policy': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'accepted_semantic_revision': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'proposed_semantic_revision': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'intent': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'structural_digest': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'SnapshotChildHandle': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'child_kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'child_id': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'schema_version': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'SnapshotHandle': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'id': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'schema_version': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'SnapshotId': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'SnapshotInspectionResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'SnapshotSummary': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'SpecializesReadingReason': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'edge': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'source': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'StandardContent': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'id': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'title': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'role': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'level': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'applies_when': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'does_not_apply_when': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'verification': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'body': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'StandardEdit': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'StandardsChangePurpose': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'summary': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'rationale': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'evidence': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'StandardsChangeSet': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'purpose': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'edits': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'StructuredScope': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'heading_path': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'Submission': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'Timestamp': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'UndeleteSnapshotCall': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'UndeleteSnapshotResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'VerificationFailure': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'code': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'message': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'suite': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'check': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'VerificationReport': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'passed': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'exit_code': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'suites': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'checks': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'failures': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'VerifyProposalCall': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'revision': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'readiness': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'VerifyProposalResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'revision': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'verification': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'readiness': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'VerifyRepositoryCall': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'refresh_verification_inputs': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'VerifyRepositoryResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'refreshed_verification_inputs': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'verification': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'WholeArtifactScope': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'WithdrawApplicationContentEdit': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'target': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'WorkflowContext': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'WorkflowContinuation': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'operation': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'context': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'required_inputs': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'WorkflowOutcome': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'WorkflowResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'context': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'proposal': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'revision': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'status': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'next_operations': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'outcome': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'WorkflowStatusCall': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'context': {'title': None, 'description': None, 'has_default': False, 'default': None}}}}) +_SCHEMA = json.loads('{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"https://coding-standards.local/contracts/standards-engine/a2-v32","title":"Standards Engine A2 contract","description":"Canonical typed contract for snapshot lifecycle, controlled authoring, navigation, inspection, and immutable standards-change analysis.","oneOf":[{"$ref":"#/$defs/AgentRouteResult"},{"$ref":"#/$defs/AnalyzeCall"},{"$ref":"#/$defs/AnalyzeProposalCall"},{"$ref":"#/$defs/ApplicationInspectCall"},{"$ref":"#/$defs/ApplicationQueryCall"},{"$ref":"#/$defs/ApplicationReadCall"},{"$ref":"#/$defs/ApplicationReadManyCall"},{"$ref":"#/$defs/ApplicationReadManyResult"},{"$ref":"#/$defs/ApplicationReadResult"},{"$ref":"#/$defs/ApplicationRecoveryRequiredResult"},{"$ref":"#/$defs/ApplicationRejectedResult"},{"$ref":"#/$defs/ApplicationRelatedResult"},{"$ref":"#/$defs/ApplicationRouteResult"},{"$ref":"#/$defs/ApplicationRoutingFactsResult"},{"$ref":"#/$defs/ApplyCall"},{"$ref":"#/$defs/ApplyProposalCall"},{"$ref":"#/$defs/ApplyProposalResult"},{"$ref":"#/$defs/CompactReadResult"},{"$ref":"#/$defs/CompleteResult"},{"$ref":"#/$defs/CreateProposalCall"},{"$ref":"#/$defs/CreateProposalResult"},{"$ref":"#/$defs/CreateSnapshotCall"},{"$ref":"#/$defs/CreateSnapshotResult"},{"$ref":"#/$defs/DeleteSnapshotCall"},{"$ref":"#/$defs/DeleteSnapshotResult"},{"$ref":"#/$defs/FindProposalsCall"},{"$ref":"#/$defs/FindProposalsResult"},{"$ref":"#/$defs/FindSnapshotsCall"},{"$ref":"#/$defs/FindSnapshotsResult"},{"$ref":"#/$defs/InspectCall"},{"$ref":"#/$defs/InspectionResult"},{"$ref":"#/$defs/MaintainEvidenceCall"},{"$ref":"#/$defs/MaintainEvidenceResult"},{"$ref":"#/$defs/NavigationIndexesResult"},{"$ref":"#/$defs/OperationalReadResult"},{"$ref":"#/$defs/PendingResult"},{"$ref":"#/$defs/PrepareCall"},{"$ref":"#/$defs/ProposeCall"},{"$ref":"#/$defs/ProvenanceReadResult"},{"$ref":"#/$defs/QueryCall"},{"$ref":"#/$defs/QueryProposalCall"},{"$ref":"#/$defs/QueryProposalResult"},{"$ref":"#/$defs/QueryResult"},{"$ref":"#/$defs/ReadCall"},{"$ref":"#/$defs/ReadManyCall"},{"$ref":"#/$defs/ReadManyResult"},{"$ref":"#/$defs/ReadResult"},{"$ref":"#/$defs/RecoverApplicationCall"},{"$ref":"#/$defs/RecoverApplicationResult"},{"$ref":"#/$defs/RecoverCall"},{"$ref":"#/$defs/RejectedResult"},{"$ref":"#/$defs/RelatedCall"},{"$ref":"#/$defs/RelatedResult"},{"$ref":"#/$defs/ResolveCall"},{"$ref":"#/$defs/ResolveWorkflowCall"},{"$ref":"#/$defs/ResumeCall"},{"$ref":"#/$defs/ReviewCall"},{"$ref":"#/$defs/ReviewProposalCall"},{"$ref":"#/$defs/ReviewProposalResult"},{"$ref":"#/$defs/ReviseCall"},{"$ref":"#/$defs/ReviseProposalCall"},{"$ref":"#/$defs/ReviseProposalResult"},{"$ref":"#/$defs/RouteCall"},{"$ref":"#/$defs/RoutingFactsCall"},{"$ref":"#/$defs/RoutingFactsResult"},{"$ref":"#/$defs/UndeleteSnapshotCall"},{"$ref":"#/$defs/UndeleteSnapshotResult"},{"$ref":"#/$defs/VerifyProposalCall"},{"$ref":"#/$defs/VerifyProposalResult"},{"$ref":"#/$defs/VerifyRepositoryCall"},{"$ref":"#/$defs/VerifyRepositoryResult"},{"$ref":"#/$defs/WorkflowResult"},{"$ref":"#/$defs/WorkflowStatusCall"}],"$defs":{"NonEmptyString":{"type":"string","minLength":1},"CanonicalId":{"type":"string","pattern":"^[A-Za-z0-9][A-Za-z0-9._:/-]*$"},"EdgeId":{"type":"string","minLength":1},"Digest":{"type":"string","pattern":"^sha256:[0-9a-f]{64}$"},"ObligationId":{"type":"string","pattern":"^obligation:sha256:[0-9a-f]{64}$"},"ImpactTraceId":{"type":"string","pattern":"^impact-trace:sha256:[0-9a-f]{64}$"},"FactRequirementId":{"type":"string","pattern":"^fact-requirement:sha256:[0-9a-f]{64}$"},"ScalarValue":{"oneOf":[{"type":"boolean"},{"type":"integer"},{"type":"string"},{"type":"null"}]},"FactValue":{"oneOf":[{"type":"object","required":["type","state","value"],"properties":{"type":{"const":"boolean"},"state":{"const":"known"},"value":{"type":"boolean"}},"additionalProperties":false},{"type":"object","required":["type","state","value"],"properties":{"type":{"enum":["boolean","enum","string","string-set","enum-set","canonical-id"]},"state":{"const":"known"},"value":{"type":"null"}},"additionalProperties":false},{"type":"object","required":["type","state","value"],"properties":{"type":{"enum":["enum","string","canonical-id"]},"state":{"const":"known"},"value":{"type":"string"}},"additionalProperties":false},{"type":"object","required":["type","state","value"],"properties":{"type":{"enum":["string-set","enum-set"]},"state":{"const":"known"},"value":{"type":"array","items":{"type":"string"},"uniqueItems":true}},"additionalProperties":false},{"type":"object","required":["type","state"],"properties":{"type":{"enum":["boolean","enum","string","string-set","enum-set","canonical-id"]},"state":{"enum":["known-absent","unknown"]}},"additionalProperties":false}]},"FactSet":{"type":"object","additionalProperties":{"$ref":"#/$defs/FactValue"}},"StructuredScope":{"type":"object","required":["kind","heading_path"],"properties":{"kind":{"const":"structured"},"heading_path":{"type":"array","minItems":1,"items":{"$ref":"#/$defs/NonEmptyString"}}},"additionalProperties":false},"WholeArtifactScope":{"type":"object","required":["kind"],"properties":{"kind":{"const":"whole-artifact"}},"additionalProperties":false},"ReviewScope":{"oneOf":[{"$ref":"#/$defs/StructuredScope"},{"$ref":"#/$defs/WholeArtifactScope"}]},"AllExpression":{"type":"object","required":["operator","expressions"],"properties":{"operator":{"const":"all"},"expressions":{"type":"array","minItems":1,"items":{"$ref":"#/$defs/ApplicabilityExpression"}}},"additionalProperties":false},"AnyExpression":{"type":"object","required":["operator","expressions"],"properties":{"operator":{"const":"any"},"expressions":{"type":"array","minItems":1,"items":{"$ref":"#/$defs/ApplicabilityExpression"}}},"additionalProperties":false},"NotExpression":{"type":"object","required":["operator","expression"],"properties":{"operator":{"const":"not"},"expression":{"$ref":"#/$defs/ApplicabilityExpression"}},"additionalProperties":false},"EqualsExpression":{"type":"object","required":["operator","fact","value"],"properties":{"operator":{"const":"equals"},"fact":{"$ref":"#/$defs/CanonicalId"},"value":{"$ref":"#/$defs/ScalarValue"}},"additionalProperties":false},"InExpression":{"type":"object","required":["operator","fact","values"],"properties":{"operator":{"const":"in"},"fact":{"$ref":"#/$defs/CanonicalId"},"values":{"type":"array","minItems":1,"uniqueItems":true,"items":{"$ref":"#/$defs/ScalarValue"}}},"additionalProperties":false},"ContainsExpression":{"type":"object","required":["operator","fact","value"],"properties":{"operator":{"const":"contains"},"fact":{"$ref":"#/$defs/CanonicalId"},"value":{"$ref":"#/$defs/ScalarValue"}},"additionalProperties":false},"ExistsExpression":{"type":"object","required":["operator","fact"],"properties":{"operator":{"const":"exists"},"fact":{"$ref":"#/$defs/CanonicalId"}},"additionalProperties":false},"AlwaysExpression":{"type":"object","required":["operator"],"properties":{"operator":{"const":"always"}},"additionalProperties":false},"ApplicabilityExpression":{"oneOf":[{"$ref":"#/$defs/AlwaysExpression"},{"$ref":"#/$defs/AllExpression"},{"$ref":"#/$defs/AnyExpression"},{"$ref":"#/$defs/NotExpression"},{"$ref":"#/$defs/EqualsExpression"},{"$ref":"#/$defs/InExpression"},{"$ref":"#/$defs/ContainsExpression"},{"$ref":"#/$defs/ExistsExpression"}]},"GeneralSelectionReason":{"type":"object","required":["kind"],"properties":{"kind":{"enum":["routing-fact","requires","specializes","changed-policy","question","audit-coverage","unmapped-normative-change","structured-scope-analysis-unsupported","navigation-index-change","supporting-content-change"]},"source":{"$ref":"#/$defs/CanonicalId"},"fact":{"$ref":"#/$defs/CanonicalId"},"edge":{"$ref":"#/$defs/EdgeId"},"question":{"$ref":"#/$defs/CanonicalId"}},"additionalProperties":false},"PolicyImpactSelectionReason":{"type":"object","required":["kind","source","edge","relation","evidence_owner","traces"],"properties":{"kind":{"const":"policy-impact-edge"},"source":{"$ref":"#/$defs/CanonicalId"},"edge":{"$ref":"#/$defs/EdgeId"},"relation":{"$ref":"#/$defs/CanonicalId"},"evidence_owner":{"$ref":"#/$defs/CanonicalId"},"traces":{"type":"array","minItems":1,"uniqueItems":true,"items":{"$ref":"#/$defs/ImpactTraceReference"}}},"additionalProperties":false},"SelectionReason":{"oneOf":[{"$ref":"#/$defs/GeneralSelectionReason"},{"$ref":"#/$defs/PolicyImpactSelectionReason"}]},"ImpactTraceReference":{"type":"object","required":["id","graph","applicability"],"properties":{"id":{"$ref":"#/$defs/ImpactTraceId"},"graph":{"enum":["accepted","proposed"]},"applicability":{"enum":["true","false","unknown"]}},"additionalProperties":false},"ConsumerReviewObligationReadingReason":{"type":"object","required":["kind","obligation"],"properties":{"kind":{"const":"consumer-review-obligation"},"obligation":{"$ref":"#/$defs/ObligationId"}},"additionalProperties":false},"RoutingBaseReadingReason":{"type":"object","required":["kind","projection"],"properties":{"kind":{"const":"routing-base"},"projection":{"$ref":"#/$defs/CanonicalId"}},"additionalProperties":false},"RoutingRuleReadingReason":{"type":"object","required":["kind","rule","facts"],"properties":{"kind":{"const":"routing-rule"},"rule":{"$ref":"#/$defs/CanonicalId"},"facts":{"type":"array","uniqueItems":true,"items":{"$ref":"#/$defs/CanonicalId"}}},"additionalProperties":false},"RequiresReadingReason":{"type":"object","required":["kind","edge","source"],"properties":{"kind":{"const":"requires"},"edge":{"$ref":"#/$defs/EdgeId"},"source":{"$ref":"#/$defs/CanonicalId"}},"additionalProperties":false},"SpecializesReadingReason":{"type":"object","required":["kind","edge","source"],"properties":{"kind":{"const":"specializes"},"edge":{"$ref":"#/$defs/EdgeId"},"source":{"$ref":"#/$defs/CanonicalId"}},"additionalProperties":false},"ReadingPlanReason":{"oneOf":[{"$ref":"#/$defs/ConsumerReviewObligationReadingReason"},{"$ref":"#/$defs/RoutingBaseReadingReason"},{"$ref":"#/$defs/RoutingRuleReadingReason"},{"$ref":"#/$defs/RequiresReadingReason"},{"$ref":"#/$defs/SpecializesReadingReason"}]},"ReadingPlanEntry":{"type":"object","required":["target","scope","authority","reasons","state"],"properties":{"target":{"$ref":"#/$defs/CanonicalId"},"scope":{"$ref":"#/$defs/ReviewScope"},"authority":{"enum":["normative","projection","contextual","evidence"]},"reasons":{"type":"array","minItems":1,"uniqueItems":true,"items":{"$ref":"#/$defs/ReadingPlanReason"}},"state":{"enum":["selected","conditional","unresolved"]}},"additionalProperties":false},"RouteRequest":{"type":"object","required":["kind","facts"],"properties":{"kind":{"const":"route"},"facts":{"$ref":"#/$defs/FactSet"}},"additionalProperties":false},"ReadRequest":{"type":"object","required":["kind","target"],"properties":{"kind":{"const":"read"},"target":{"$ref":"#/$defs/CanonicalId"},"include_routing":{"type":"boolean"},"include_coverage":{"type":"boolean","description":"Include current repository attestation status for registered policy units in this read scope."}},"additionalProperties":false},"RelatedRequest":{"type":"object","required":["kind","target","groups","direction","transitive"],"properties":{"kind":{"const":"related"},"target":{"$ref":"#/$defs/CanonicalId"},"groups":{"type":"array","minItems":1,"uniqueItems":true,"items":{"$ref":"#/$defs/CanonicalId"}},"direction":{"enum":["incoming","outgoing","both"]},"transitive":{"type":"boolean","default":false}},"additionalProperties":false},"QueryRequest":{"oneOf":[{"$ref":"#/$defs/RouteRequest"},{"$ref":"#/$defs/ReadRequest"},{"$ref":"#/$defs/RelatedRequest"}]},"PolicyUnitDeclaration":{"type":"object","required":["kind","id","module","heading_path","semantic_revision","lifecycle"],"properties":{"kind":{"const":"policy-unit"},"id":{"$ref":"#/$defs/CanonicalId"},"module":{"$ref":"#/$defs/CanonicalId"},"heading_path":{"type":"array","minItems":1,"items":{"$ref":"#/$defs/NonEmptyString"}},"semantic_revision":{"type":"integer","minimum":1},"lifecycle":{"const":"active"},"aliases":{"type":"array","uniqueItems":true,"items":{"$ref":"#/$defs/CanonicalId"}},"predecessors":{"type":"array","uniqueItems":true,"items":{"$ref":"#/$defs/CanonicalId"}},"successors":{"type":"array","uniqueItems":true,"items":{"$ref":"#/$defs/CanonicalId"}}},"additionalProperties":false},"CanonicalModuleDeclaration":{"type":"object","required":["kind","id","role","level","applies_when","does_not_apply_when","requires","specializes","verification"],"properties":{"kind":{"const":"canonical-module"},"id":{"$ref":"#/$defs/CanonicalId"},"role":{"enum":["core","router","workflow","profile","topic","reference"]},"level":{"enum":["MUST","SHOULD","PROFILE","REFERENCE"]},"applies_when":{"$ref":"#/$defs/NonEmptyString"},"does_not_apply_when":{"$ref":"#/$defs/NonEmptyString"},"requires":{"type":"array","uniqueItems":true,"items":{"$ref":"#/$defs/CanonicalId"}},"specializes":{"type":"array","uniqueItems":true,"items":{"$ref":"#/$defs/CanonicalId"}},"verification":{"$ref":"#/$defs/NonEmptyString"}},"additionalProperties":false},"PolicyRelationshipInspection":{"type":"object","required":["relationship_kind","applicability","source_scope","consumer_scope","propagation","evidence_owner","rationale"],"properties":{"relationship_kind":{"enum":["normative-consumer","router-projection","prompt-projection","template-projection","reference-projection","fixture-projection","enforcement-suite-projection","documentation-projection","implementation-projection"]},"applicability":{"$ref":"#/$defs/ApplicabilityExpression"},"source_scope":{"oneOf":[{"$ref":"#/$defs/ReviewScope"},{"type":"null"}]},"consumer_scope":{"oneOf":[{"$ref":"#/$defs/ReviewScope"},{"type":"null"}]},"propagation":{"const":"source-to-consumer"},"evidence_owner":{"$ref":"#/$defs/CanonicalId"},"rationale":{"$ref":"#/$defs/NonEmptyString"}},"additionalProperties":false},"SemanticProposal":{"type":"object","required":["policy","accepted_semantic_revision","proposed_semantic_revision","intent","structural_digest"],"properties":{"policy":{"$ref":"#/$defs/CanonicalId"},"accepted_semantic_revision":{"oneOf":[{"type":"integer","minimum":1},{"type":"null"}]},"proposed_semantic_revision":{"type":"integer","minimum":1},"intent":{"$ref":"#/$defs/NonEmptyString"},"structural_digest":{"$ref":"#/$defs/Digest"}},"additionalProperties":false},"ChangeDescriptor":{"type":"object","required":["kind","accepted_ids","proposed_ids","scope"],"properties":{"kind":{"enum":["module","modification","addition","removal","move","split","merge","navigation-index","supporting-content"]},"accepted_ids":{"type":"array","uniqueItems":true,"items":{"$ref":"#/$defs/CanonicalId"}},"proposed_ids":{"type":"array","uniqueItems":true,"items":{"$ref":"#/$defs/CanonicalId"}},"scope":{"$ref":"#/$defs/ReviewScope"},"accepted_module":{"$ref":"#/$defs/CanonicalId"},"proposed_module":{"$ref":"#/$defs/CanonicalId"}},"additionalProperties":false},"ChangedPolicyUnit":{"type":"object","required":["policy","change_kind","classification","accepted_representation_digest","proposed_representation_digest","accepted_structural_digest","proposed_structural_digest","accepted_semantic_revision","proposed_semantic_revision","semantic_state","scope"],"properties":{"policy":{"$ref":"#/$defs/CanonicalId"},"change_kind":{"enum":["modification","addition","removal","move","split-predecessor","split-successor","merge-predecessor","merge-successor"]},"classification":{"enum":["unchanged","representation-only-candidate","possibly-semantically-changed","semantically-changed","unresolved"]},"accepted_representation_digest":{"oneOf":[{"$ref":"#/$defs/Digest"},{"type":"null"}]},"proposed_representation_digest":{"oneOf":[{"$ref":"#/$defs/Digest"},{"type":"null"}]},"accepted_structural_digest":{"oneOf":[{"$ref":"#/$defs/Digest"},{"type":"null"}]},"proposed_structural_digest":{"oneOf":[{"$ref":"#/$defs/Digest"},{"type":"null"}]},"accepted_semantic_revision":{"oneOf":[{"type":"integer","minimum":1},{"type":"null"}]},"proposed_semantic_revision":{"oneOf":[{"type":"integer","minimum":1},{"type":"null"}]},"semantic_state":{"enum":["accepted-unchanged","proposed","removed","unresolved"]},"scope":{"$ref":"#/$defs/ReviewScope"}},"additionalProperties":false},"Question":{"type":"object","required":["id","kind","prompt","state","permitted_answers"],"properties":{"id":{"$ref":"#/$defs/CanonicalId"},"kind":{"enum":["applicability-fact","normative-classification","identity-resolution","scope-resolution"]},"prompt":{"$ref":"#/$defs/NonEmptyString"},"state":{"enum":["required","answered","blocked"]},"permitted_answers":{"type":"array","minItems":1,"uniqueItems":true,"items":{"$ref":"#/$defs/NonEmptyString"}}},"additionalProperties":false},"ConsumerReviewContract":{"type":"object","required":["kind","id","version","permitted_dispositions","evidence_contract","authorization_capability","semantics"],"properties":{"kind":{"const":"consumer-review-contract"},"id":{"$ref":"#/$defs/CanonicalId"},"version":{"type":"integer","minimum":1},"permitted_dispositions":{"type":"array","minItems":1,"uniqueItems":true,"items":{"enum":["updated","reviewed-no-change","not-applicable","blocked"]}},"evidence_contract":{"$ref":"#/$defs/CanonicalId"},"authorization_capability":{"$ref":"#/$defs/CanonicalId"},"semantics":{"$ref":"#/$defs/NonEmptyString"}},"additionalProperties":false},"DecisionDependency":{"type":"object","required":["class","identity","digest"],"properties":{"class":{"enum":["policy-unit","semantic-revision","structure","representation","module-locator","applicability-fact","relationship","audit","exception","evidence","provider-contract","applicability-contract","analysis-contract"]},"identity":{"$ref":"#/$defs/NonEmptyString"},"digest":{"$ref":"#/$defs/Digest"}},"additionalProperties":false},"DecisionFingerprint":{"type":"object","required":["decision_kind","decision_contract","schema_version","dependencies"],"properties":{"decision_kind":{"$ref":"#/$defs/CanonicalId"},"decision_contract":{"$ref":"#/$defs/CanonicalId"},"schema_version":{"const":1},"dependencies":{"type":"array","minItems":1,"items":{"$ref":"#/$defs/DecisionDependency"}}},"additionalProperties":false},"FactValueContract":{"type":"object","required":["type","states","nullable"],"properties":{"type":{"enum":["boolean","enum","string","string-set","enum-set","canonical-id"]},"states":{"const":["known","known-absent"]},"nullable":{"type":"boolean"},"values":{"type":"array","minItems":1,"uniqueItems":true,"items":{"type":"string"}}},"additionalProperties":false},"EvidenceReference":{"type":"object","required":["id","digest","provider_contract","provider_contract_version"],"properties":{"id":{"$ref":"#/$defs/CanonicalId"},"digest":{"$ref":"#/$defs/Digest"},"provider_contract":{"$ref":"#/$defs/CanonicalId"},"provider_contract_version":{"$ref":"#/$defs/NonEmptyString"}},"additionalProperties":false},"CompletionProof":{"type":"object","required":["required_coverage_subjects","certificate_subjects","reached_consumer_obligations","disposition_obligations","required_fact_requirements","observed_fact_requirements","non_consumer_obligations_resolved","applicability_resolved","authorization_valid","evidence_valid"],"properties":{"required_coverage_subjects":{"type":"array","uniqueItems":true,"items":{"$ref":"#/$defs/CanonicalId"}},"certificate_subjects":{"type":"array","uniqueItems":true,"items":{"$ref":"#/$defs/CanonicalId"}},"reached_consumer_obligations":{"type":"array","uniqueItems":true,"items":{"$ref":"#/$defs/ObligationId"}},"disposition_obligations":{"type":"array","uniqueItems":true,"items":{"$ref":"#/$defs/ObligationId"}},"required_fact_requirements":{"type":"array","uniqueItems":true,"items":{"$ref":"#/$defs/FactRequirementId"}},"observed_fact_requirements":{"type":"array","uniqueItems":true,"items":{"$ref":"#/$defs/FactRequirementId"}},"non_consumer_obligations_resolved":{"const":true},"applicability_resolved":{"const":true},"authorization_valid":{"const":true},"evidence_valid":{"const":true}},"additionalProperties":false},"Timestamp":{"type":"integer","minimum":0},"SnapshotId":{"type":"string","pattern":"^snapshot:v1:[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"},"AnalysisId":{"type":"string","pattern":"^analysis:sha256:[0-9a-f]{64}$"},"ProposalId":{"type":"string","pattern":"^proposal:v1:[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"},"ProposalRevisionId":{"type":"string","pattern":"^proposal-revision:sha256:[0-9a-f]{64}$"},"ReadinessId":{"type":"string","pattern":"^readiness:sha256:[0-9a-f]{64}$"},"ApplicationId":{"type":"string","pattern":"^application:sha256:[0-9a-f]{64}$"},"ChildId":{"type":"string","pattern":"^sha256:[0-9a-f]{64}$"},"AuthorizationId":{"type":"string","pattern":"^authorization:sha256:[0-9a-f]{64}$"},"SnapshotHandle":{"type":"object","required":["kind","id","schema_version"],"properties":{"kind":{"const":"snapshot-handle"},"id":{"$ref":"#/$defs/SnapshotId"},"schema_version":{"const":5}},"additionalProperties":false},"AnalysisHandle":{"type":"object","required":["kind","id","schema_version"],"properties":{"kind":{"const":"analysis-handle"},"id":{"$ref":"#/$defs/AnalysisId"},"schema_version":{"const":7}},"additionalProperties":false},"ProposalHandle":{"type":"object","required":["kind","id","schema_version"],"properties":{"kind":{"const":"proposal-handle"},"id":{"$ref":"#/$defs/ProposalId"},"schema_version":{"const":1}},"additionalProperties":false},"ProposalRevisionHandle":{"type":"object","required":["kind","id","schema_version"],"properties":{"kind":{"const":"proposal-revision-handle"},"id":{"$ref":"#/$defs/ProposalRevisionId"},"schema_version":{"const":1}},"additionalProperties":false},"ReadinessHandle":{"type":"object","required":["kind","id","schema_version"],"properties":{"kind":{"const":"readiness-handle"},"id":{"$ref":"#/$defs/ReadinessId"},"schema_version":{"const":1}},"additionalProperties":false},"ApplicationHandle":{"type":"object","required":["kind","id","schema_version"],"properties":{"kind":{"const":"application-handle"},"id":{"$ref":"#/$defs/ApplicationId"},"schema_version":{"const":1}},"additionalProperties":false},"SnapshotChildHandle":{"type":"object","required":["kind","snapshot","child_kind","child_id","schema_version"],"properties":{"kind":{"const":"snapshot-child-handle"},"snapshot":{"$ref":"#/$defs/SnapshotHandle"},"child_kind":{"enum":["policy","relationship"]},"child_id":{"$ref":"#/$defs/NonEmptyString"},"schema_version":{"const":5}},"additionalProperties":false},"AnalysisChildHandle":{"type":"object","required":["kind","analysis","child_kind","child_id","schema_version"],"properties":{"kind":{"const":"analysis-child-handle"},"analysis":{"$ref":"#/$defs/AnalysisHandle"},"child_kind":{"enum":["context","fact-requirement","fact-observation","obligation","coverage-requirement","coverage-certificate"]},"child_id":{"$ref":"#/$defs/ChildId"},"schema_version":{"const":7}},"additionalProperties":false},"AnalysisMaterialHandle":{"oneOf":[{"$ref":"#/$defs/SnapshotHandle"},{"$ref":"#/$defs/ProposalRevisionHandle"}]},"InspectableHandle":{"oneOf":[{"$ref":"#/$defs/SnapshotHandle"},{"$ref":"#/$defs/AnalysisHandle"},{"$ref":"#/$defs/SnapshotChildHandle"},{"$ref":"#/$defs/AnalysisChildHandle"}]},"ActiveSnapshotSummary":{"type":"object","required":["snapshot","lifecycle","source_revision","created_at"],"properties":{"snapshot":{"$ref":"#/$defs/SnapshotHandle"},"lifecycle":{"const":"active"},"source_revision":{"$ref":"#/$defs/NonEmptyString"},"created_at":{"$ref":"#/$defs/Timestamp"}},"additionalProperties":false},"QuarantinedSnapshotSummary":{"type":"object","required":["snapshot","lifecycle","source_revision","created_at","purge_deadline"],"properties":{"snapshot":{"$ref":"#/$defs/SnapshotHandle"},"lifecycle":{"const":"quarantined"},"source_revision":{"$ref":"#/$defs/NonEmptyString"},"created_at":{"$ref":"#/$defs/Timestamp"},"purge_deadline":{"$ref":"#/$defs/Timestamp"}},"additionalProperties":false},"SnapshotSummary":{"oneOf":[{"$ref":"#/$defs/ActiveSnapshotSummary"},{"$ref":"#/$defs/QuarantinedSnapshotSummary"}]},"CreateSnapshotCall":{"type":"object","required":["kind"],"properties":{"kind":{"const":"create-snapshot"}},"additionalProperties":false},"CreateSnapshotResult":{"type":"object","required":["kind","snapshot"],"properties":{"kind":{"const":"create-snapshot-result"},"snapshot":{"$ref":"#/$defs/ActiveSnapshotSummary"}},"additionalProperties":false},"FindSnapshotsCall":{"type":"object","required":["kind"],"properties":{"kind":{"const":"find-snapshots"},"lifecycle":{"enum":["active","quarantined"],"default":"active"},"after":{"$ref":"#/$defs/SnapshotHandle"},"limit":{"type":"integer","minimum":1,"default":50}},"additionalProperties":false},"FindSnapshotsResult":{"type":"object","required":["kind","snapshots"],"properties":{"kind":{"const":"find-snapshots-result"},"snapshots":{"type":"array","items":{"$ref":"#/$defs/SnapshotSummary"}},"continuation":{"$ref":"#/$defs/SnapshotHandle"}},"additionalProperties":false},"StandardsChangePurpose":{"type":"object","required":["summary","rationale","evidence"],"properties":{"summary":{"$ref":"#/$defs/NonEmptyString"},"rationale":{"$ref":"#/$defs/NonEmptyString"},"evidence":{"type":"array","minItems":1,"uniqueItems":true,"items":{"$ref":"#/$defs/EvidenceReference"}}},"additionalProperties":false},"StandardContent":{"type":"object","required":["id","title","role","level","applies_when","does_not_apply_when","verification","body"],"properties":{"id":{"$ref":"#/$defs/CanonicalId"},"title":{"$ref":"#/$defs/NonEmptyString"},"role":{"enum":["core","router","workflow","profile","topic","reference"]},"level":{"enum":["MUST","SHOULD","PROFILE","REFERENCE"]},"applies_when":{"$ref":"#/$defs/NonEmptyString"},"does_not_apply_when":{"$ref":"#/$defs/NonEmptyString"},"verification":{"$ref":"#/$defs/NonEmptyString"},"body":{"$ref":"#/$defs/NonEmptyString"}},"additionalProperties":false},"NewPolicyUnit":{"type":"object","required":["id","heading_chain","semantic_revision","intent","aliases","predecessors","successors"],"properties":{"id":{"$ref":"#/$defs/CanonicalId"},"heading_chain":{"type":"array","minItems":1,"items":{"$ref":"#/$defs/NonEmptyString"}},"semantic_revision":{"const":1},"intent":{"$ref":"#/$defs/NonEmptyString"},"aliases":{"type":"array","uniqueItems":true,"items":{"$ref":"#/$defs/CanonicalId"}},"predecessors":{"type":"array","uniqueItems":true,"items":{"$ref":"#/$defs/CanonicalId"}},"successors":{"type":"array","uniqueItems":true,"items":{"$ref":"#/$defs/CanonicalId"}}},"additionalProperties":false},"PreservePolicySemantics":{"type":"object","required":["kind","semantic_revision","intent"],"properties":{"kind":{"const":"preserve"},"semantic_revision":{"type":"integer","minimum":1},"intent":{"$ref":"#/$defs/NonEmptyString"}},"additionalProperties":false},"ChangePolicySemantics":{"type":"object","required":["kind","accepted_semantic_revision","proposed_semantic_revision","intent"],"properties":{"kind":{"const":"change"},"accepted_semantic_revision":{"type":"integer","minimum":1},"proposed_semantic_revision":{"type":"integer","minimum":1},"intent":{"$ref":"#/$defs/NonEmptyString"}},"additionalProperties":false},"PolicySemanticIntent":{"oneOf":[{"$ref":"#/$defs/PreservePolicySemantics"},{"$ref":"#/$defs/ChangePolicySemantics"}]},"CreateStandardEdit":{"type":"object","required":["kind","standard","requires","specializes","policy_units"],"properties":{"kind":{"const":"create-standard"},"standard":{"$ref":"#/$defs/StandardContent"},"requires":{"type":"array","uniqueItems":true,"items":{"$ref":"#/$defs/CanonicalId"}},"specializes":{"type":"array","uniqueItems":true,"items":{"$ref":"#/$defs/CanonicalId"}},"policy_units":{"type":"array","uniqueItems":true,"items":{"$ref":"#/$defs/NewPolicyUnit"}}},"additionalProperties":false},"ReviseStandardEdit":{"type":"object","required":["kind","standard"],"properties":{"kind":{"const":"revise-standard"},"standard":{"$ref":"#/$defs/StandardContent"},"scope_updates":{"type":"array","items":{"$ref":"#/$defs/PolicyScopeUpdate"}}},"additionalProperties":false},"RevisePolicyUnitEdit":{"type":"object","required":["kind","policy","title","body","semantics"],"properties":{"kind":{"const":"revise-policy-unit"},"policy":{"$ref":"#/$defs/CanonicalId"},"title":{"$ref":"#/$defs/NonEmptyString"},"body":{"$ref":"#/$defs/NonEmptyString"},"semantics":{"$ref":"#/$defs/PolicySemanticIntent"}},"additionalProperties":false},"MovePolicyUnitEdit":{"type":"object","required":["kind","policy","standard","semantics"],"properties":{"kind":{"const":"move-policy-unit"},"policy":{"$ref":"#/$defs/CanonicalId"},"standard":{"$ref":"#/$defs/CanonicalId"},"after_policy":{"$ref":"#/$defs/CanonicalId"},"semantics":{"$ref":"#/$defs/PolicySemanticIntent"}},"additionalProperties":false},"RetirePolicyUnitEdit":{"type":"object","required":["kind","policy","retired_semantic_revision","successors","relationship_dispositions","evidence"],"properties":{"kind":{"const":"retire-policy-unit"},"policy":{"$ref":"#/$defs/CanonicalId"},"retired_semantic_revision":{"type":"integer","minimum":1},"successors":{"type":"array","uniqueItems":true,"items":{"$ref":"#/$defs/CanonicalId"}},"relationship_dispositions":{"type":"array","uniqueItems":true,"items":{"$ref":"#/$defs/RelationshipDisposition"}},"evidence":{"type":"array","minItems":1,"uniqueItems":true,"items":{"$ref":"#/$defs/EvidenceReference"}}},"additionalProperties":false},"RetireStandardEdit":{"type":"object","required":["kind","standard","successors","relationship_dispositions","evidence"],"properties":{"kind":{"const":"retire-standard"},"standard":{"$ref":"#/$defs/CanonicalId"},"successors":{"type":"array","uniqueItems":true,"items":{"$ref":"#/$defs/CanonicalId"}},"relationship_dispositions":{"type":"array","uniqueItems":true,"items":{"$ref":"#/$defs/RelationshipDisposition"}},"evidence":{"type":"array","minItems":1,"uniqueItems":true,"items":{"$ref":"#/$defs/EvidenceReference"}}},"additionalProperties":false},"ReplaceStandardRelationshipsEdit":{"type":"object","required":["kind","standard","requires","specializes","rationale"],"properties":{"kind":{"const":"replace-standard-relationships"},"standard":{"$ref":"#/$defs/CanonicalId"},"requires":{"type":"array","uniqueItems":true,"items":{"$ref":"#/$defs/CanonicalId"}},"specializes":{"type":"array","uniqueItems":true,"items":{"$ref":"#/$defs/CanonicalId"}},"rationale":{"$ref":"#/$defs/NonEmptyString"}},"additionalProperties":false},"AuthoringTargetHandle":{"type":"object","required":["kind","snapshot","id","schema_version"],"properties":{"kind":{"const":"authoring-target-handle"},"snapshot":{"$ref":"#/$defs/SnapshotHandle"},"id":{"$ref":"#/$defs/ChildId"},"schema_version":{"const":5}},"additionalProperties":false},"RelationshipConsumer":{"oneOf":[{"$ref":"#/$defs/CanonicalId"},{"$ref":"#/$defs/AuthoringTargetHandle"}]},"PolicyRelationship":{"type":"object","required":["source_policy","consumer","relation","applicability","source_scope","consumer_scope","evidence_owner","rationale"],"properties":{"source_policy":{"$ref":"#/$defs/CanonicalId"},"consumer":{"$ref":"#/$defs/RelationshipConsumer"},"relation":{"enum":["normative-consumer","router-projection","prompt-projection","template-projection","reference-projection","fixture-projection","enforcement-suite-projection","documentation-projection","implementation-projection"]},"applicability":{"$ref":"#/$defs/ApplicabilityExpression"},"source_scope":{"oneOf":[{"$ref":"#/$defs/ReviewScope"},{"type":"null"}]},"consumer_scope":{"oneOf":[{"$ref":"#/$defs/ReviewScope"},{"type":"null"}]},"evidence_owner":{"$ref":"#/$defs/CanonicalId"},"rationale":{"$ref":"#/$defs/NonEmptyString"}},"additionalProperties":false},"PutPolicyRelationshipEdit":{"type":"object","required":["kind","relationship"],"properties":{"kind":{"const":"put-policy-relationship"},"relationship":{"$ref":"#/$defs/PolicyRelationship"}},"additionalProperties":false},"RemovePolicyRelationshipEdit":{"type":"object","required":["kind","relationship"],"properties":{"kind":{"const":"remove-policy-relationship"},"relationship":{"$ref":"#/$defs/PolicyRelationship"}},"additionalProperties":false},"ModuleRelationshipKey":{"type":"object","required":["kind","relation","source","target"],"properties":{"kind":{"const":"module-relationship"},"relation":{"enum":["requires","specializes"]},"source":{"$ref":"#/$defs/CanonicalId"},"target":{"$ref":"#/$defs/CanonicalId"}},"additionalProperties":false},"PolicyRelationshipKey":{"type":"object","required":["kind","source_policy","consumer","relation"],"properties":{"kind":{"const":"policy-relationship"},"source_policy":{"$ref":"#/$defs/CanonicalId"},"consumer":{"$ref":"#/$defs/RelationshipConsumer"},"relation":{"$ref":"#/$defs/CanonicalId"}},"additionalProperties":false},"RelationshipKey":{"oneOf":[{"$ref":"#/$defs/ModuleRelationshipKey"},{"$ref":"#/$defs/PolicyRelationshipKey"}]},"RelationshipDisposition":{"type":"object","required":["relationship","disposition","rationale","evidence"],"properties":{"relationship":{"$ref":"#/$defs/RelationshipKey"},"disposition":{"enum":["remove","retarget"]},"replacement_consumer":{"$ref":"#/$defs/RelationshipConsumer"},"rationale":{"$ref":"#/$defs/NonEmptyString"},"evidence":{"type":"array","minItems":1,"uniqueItems":true,"items":{"$ref":"#/$defs/EvidenceReference"}}},"additionalProperties":false},"StandardEdit":{"oneOf":[{"$ref":"#/$defs/CreateStandardEdit"},{"$ref":"#/$defs/ReviseStandardEdit"},{"$ref":"#/$defs/RevisePolicyUnitEdit"},{"$ref":"#/$defs/MovePolicyUnitEdit"},{"$ref":"#/$defs/RetirePolicyUnitEdit"},{"$ref":"#/$defs/RetireStandardEdit"},{"$ref":"#/$defs/ReplaceStandardRelationshipsEdit"},{"$ref":"#/$defs/PutPolicyRelationshipEdit"},{"$ref":"#/$defs/RemovePolicyRelationshipEdit"},{"$ref":"#/$defs/PutRoutingRuleEdit"},{"$ref":"#/$defs/RemoveRoutingRuleEdit"},{"$ref":"#/$defs/PutRoutingFactEdit"},{"$ref":"#/$defs/RemoveRoutingFactEdit"},{"$ref":"#/$defs/AuditPolicyUnitEdit"},{"$ref":"#/$defs/RewriteNavigationIndexEdit"},{"$ref":"#/$defs/PutDecisionProvenanceEdit"},{"$ref":"#/$defs/RetireDecisionProvenanceEdit"},{"$ref":"#/$defs/ApproveApplicationContentEdit"},{"$ref":"#/$defs/WithdrawApplicationContentEdit"},{"$ref":"#/$defs/ReviseOperationalArtifactEdit"}]},"StandardsChangeSet":{"type":"object","required":["purpose","edits"],"properties":{"purpose":{"$ref":"#/$defs/StandardsChangePurpose"},"edits":{"type":"array","minItems":1,"uniqueItems":true,"items":{"$ref":"#/$defs/StandardEdit"}}},"additionalProperties":false},"ProposalSummary":{"type":"object","required":["proposal","head_revision"],"properties":{"proposal":{"$ref":"#/$defs/ProposalHandle"},"head_revision":{"$ref":"#/$defs/ProposalRevisionHandle"}},"additionalProperties":false},"CreateProposalCall":{"type":"object","required":["kind","base_snapshot","change_set"],"properties":{"kind":{"const":"create-proposal"},"base_snapshot":{"$ref":"#/$defs/SnapshotHandle"},"change_set":{"$ref":"#/$defs/StandardsChangeSet"}},"additionalProperties":false},"CreateProposalResult":{"type":"object","required":["kind","proposal","revision"],"properties":{"kind":{"const":"create-proposal-result"},"proposal":{"$ref":"#/$defs/ProposalHandle"},"revision":{"$ref":"#/$defs/ProposalRevisionHandle"}},"additionalProperties":false},"FindProposalsCall":{"type":"object","required":["kind"],"properties":{"kind":{"const":"find-proposals"},"after":{"$ref":"#/$defs/ProposalHandle"},"limit":{"type":"integer","minimum":1,"default":50}},"additionalProperties":false},"FindProposalsResult":{"type":"object","required":["kind","proposals"],"properties":{"kind":{"const":"find-proposals-result"},"proposals":{"type":"array","items":{"$ref":"#/$defs/ProposalSummary"}},"continuation":{"$ref":"#/$defs/ProposalHandle"}},"additionalProperties":false},"ReviseProposalCall":{"type":"object","required":["kind","expected_revision","change_set"],"properties":{"kind":{"const":"revise-proposal"},"expected_revision":{"$ref":"#/$defs/ProposalRevisionHandle"},"change_set":{"$ref":"#/$defs/StandardsChangeSet"}},"additionalProperties":false},"ReviseProposalResult":{"type":"object","required":["kind","proposal","revision"],"properties":{"kind":{"const":"revise-proposal-result"},"proposal":{"$ref":"#/$defs/ProposalHandle"},"revision":{"$ref":"#/$defs/ProposalRevisionHandle"}},"additionalProperties":false},"DeleteSnapshotCall":{"type":"object","required":["kind","snapshot"],"properties":{"kind":{"const":"delete-snapshot"},"snapshot":{"$ref":"#/$defs/SnapshotHandle"}},"additionalProperties":false},"DeleteSnapshotResult":{"type":"object","required":["kind","snapshot","purge_deadline"],"properties":{"kind":{"const":"delete-snapshot-result"},"snapshot":{"$ref":"#/$defs/SnapshotHandle"},"purge_deadline":{"$ref":"#/$defs/Timestamp"}},"additionalProperties":false},"UndeleteSnapshotCall":{"type":"object","required":["kind","snapshot"],"properties":{"kind":{"const":"undelete-snapshot"},"snapshot":{"$ref":"#/$defs/SnapshotHandle"}},"additionalProperties":false},"UndeleteSnapshotResult":{"type":"object","required":["kind","snapshot"],"properties":{"kind":{"const":"undelete-snapshot-result"},"snapshot":{"$ref":"#/$defs/ActiveSnapshotSummary"}},"additionalProperties":false},"QueryNextOperation":{"type":"object","required":["operation","request_kind","snapshot"],"properties":{"operation":{"const":"query"},"request_kind":{"enum":["route","read","related"]},"target":{"$ref":"#/$defs/CanonicalId"},"snapshot":{"$ref":"#/$defs/SnapshotHandle"}},"additionalProperties":false},"QueryProposalNextOperation":{"type":"object","required":["operation","request_kind","revision"],"properties":{"operation":{"const":"query_proposal"},"request_kind":{"enum":["route","read","related"]},"target":{"$ref":"#/$defs/CanonicalId"},"revision":{"$ref":"#/$defs/ProposalRevisionHandle"}},"additionalProperties":false},"ResolveNextOperation":{"type":"object","required":["operation","request_kind","analysis"],"properties":{"operation":{"const":"resolve"},"request_kind":{"enum":["provide-fact","consumer-disposition","impact-disposition","coverage-attestation"]},"target":{"$ref":"#/$defs/CanonicalId"},"work":{"$ref":"#/$defs/AnalysisChildHandle"},"analysis":{"$ref":"#/$defs/AnalysisHandle"}},"additionalProperties":false},"InspectNextOperation":{"type":"object","required":["operation","request_kind","handle"],"properties":{"operation":{"const":"inspect"},"request_kind":{"const":"inspect"},"handle":{"$ref":"#/$defs/InspectableHandle"}},"additionalProperties":false},"NextOperation":{"oneOf":[{"$ref":"#/$defs/QueryNextOperation"},{"$ref":"#/$defs/ResolveNextOperation"},{"$ref":"#/$defs/InspectNextOperation"},{"$ref":"#/$defs/FocusedQueryNextOperation"}]},"QueryCall":{"type":"object","required":["snapshot","request"],"properties":{"snapshot":{"$ref":"#/$defs/SnapshotHandle"},"request":{"$ref":"#/$defs/QueryRequest"}},"additionalProperties":false},"QueryProposalCall":{"type":"object","required":["revision","request"],"properties":{"revision":{"$ref":"#/$defs/ProposalRevisionHandle"},"request":{"$ref":"#/$defs/QueryRequest"}},"additionalProperties":false},"AnalyzeProposalCall":{"type":"object","required":["revision"],"properties":{"revision":{"$ref":"#/$defs/ProposalRevisionHandle"}},"additionalProperties":false},"ReviewDecision":{"type":"object","required":["owner","decision","rationale","evidence"],"properties":{"owner":{"enum":["consumer","impact","audit"]},"decision":{"const":"accept"},"rationale":{"$ref":"#/$defs/NonEmptyString"},"evidence":{"type":"array","minItems":1,"uniqueItems":true,"items":{"$ref":"#/$defs/EvidenceReference"}}},"additionalProperties":false},"ReviewProposalCall":{"type":"object","required":["kind","analysis","decisions"],"properties":{"kind":{"const":"review-proposal"},"analysis":{"$ref":"#/$defs/AnalysisHandle"},"decisions":{"type":"array","minItems":3,"maxItems":3,"uniqueItems":true,"items":{"$ref":"#/$defs/ReviewDecision"}},"prior_readiness":{"$ref":"#/$defs/ReadinessHandle"}},"additionalProperties":false},"ReviewProposalResult":{"type":"object","required":["kind","readiness","revision","status"],"properties":{"kind":{"const":"review-proposal-result"},"readiness":{"$ref":"#/$defs/ReadinessHandle"},"revision":{"$ref":"#/$defs/ProposalRevisionHandle"},"status":{"const":"ready"}},"additionalProperties":false},"ApplyProposalCall":{"type":"object","required":["kind","readiness"],"properties":{"kind":{"const":"apply-proposal"},"readiness":{"$ref":"#/$defs/ReadinessHandle"}},"additionalProperties":false},"ApplyProposalResult":{"type":"object","required":["kind","application","status"],"properties":{"kind":{"const":"apply-proposal-result"},"application":{"$ref":"#/$defs/ApplicationHandle"},"status":{"const":"applied"}},"additionalProperties":false},"RecoverApplicationCall":{"type":"object","required":["kind","readiness"],"properties":{"kind":{"const":"recover-application"},"readiness":{"$ref":"#/$defs/ReadinessHandle"}},"additionalProperties":false},"RecoverApplicationResult":{"type":"object","required":["kind","application","status"],"properties":{"kind":{"const":"recover-application-result"},"application":{"$ref":"#/$defs/ApplicationHandle"},"status":{"const":"applied"}},"additionalProperties":false},"ApplicationRecoveryRequiredResult":{"type":"object","required":["kind","application","status","code","outcome","message"],"properties":{"kind":{"const":"application-recovery-required-result"},"application":{"$ref":"#/$defs/ApplicationHandle"},"status":{"const":"recovery-required"},"code":{"enum":["APPLICATION.PUBLICATION_UNAVAILABLE","APPLICATION.OBSERVATION_UNAVAILABLE","APPLICATION.OUTCOME_PERSISTENCE_UNAVAILABLE","APPLICATION.RECOVERY_TARGET_UNCERTAIN","APPLICATION.RECOVERY_TARGET_DIVERGED"]},"outcome":{"const":"unavailable"},"message":{"$ref":"#/$defs/NonEmptyString"}},"additionalProperties":false},"PolicySummary":{"type":"object","required":["handle","authority","scope"],"properties":{"handle":{"$ref":"#/$defs/SnapshotChildHandle"},"authority":{"enum":["normative","projection","contextual","evidence"]},"scope":{"$ref":"#/$defs/ReviewScope"}},"additionalProperties":false},"RelationshipSummary":{"type":"object","required":["handle","source","target","relation","groups","direction","traversal_eligible","applicability"],"properties":{"handle":{"$ref":"#/$defs/SnapshotChildHandle"},"source":{"$ref":"#/$defs/CanonicalId"},"target":{"$ref":"#/$defs/CanonicalId"},"relation":{"$ref":"#/$defs/CanonicalId"},"groups":{"type":"array","items":{"$ref":"#/$defs/CanonicalId"},"minItems":1,"uniqueItems":true},"direction":{"enum":["incoming","outgoing"]},"traversal_eligible":{"type":"boolean"},"applicability":{"enum":["true","false","unknown","not-declared"]}},"additionalProperties":false},"ProposalPolicySummary":{"type":"object","required":["id","authority","scope"],"properties":{"id":{"$ref":"#/$defs/CanonicalId"},"authority":{"enum":["normative","projection","contextual","evidence"]},"scope":{"$ref":"#/$defs/ReviewScope"}},"additionalProperties":false},"ProposalRelationshipSummary":{"type":"object","required":["source","target","relation","groups","direction","traversal_eligible","applicability"],"properties":{"source":{"$ref":"#/$defs/CanonicalId"},"target":{"$ref":"#/$defs/CanonicalId"},"relation":{"$ref":"#/$defs/CanonicalId"},"groups":{"type":"array","items":{"$ref":"#/$defs/CanonicalId"},"minItems":1,"uniqueItems":true},"direction":{"enum":["incoming","outgoing"]},"traversal_eligible":{"type":"boolean"},"applicability":{"enum":["true","false","unknown","not-declared"]}},"additionalProperties":false},"RouteResult":{"type":"object","required":["kind","snapshot","reading_plan","unresolved_questions","next_operations"],"properties":{"kind":{"const":"route-result"},"snapshot":{"$ref":"#/$defs/SnapshotHandle"},"reading_plan":{"type":"array","items":{"$ref":"#/$defs/ReadingPlanEntry"}},"unresolved_questions":{"type":"array","items":{"$ref":"#/$defs/Question"}},"next_operations":{"type":"array","items":{"$ref":"#/$defs/NextOperation"}},"summary":{"type":"string"}},"additionalProperties":false},"ReadResult":{"type":"object","required":["kind","snapshot","policy","content","requires","specializes","related","next_operations"],"properties":{"kind":{"const":"read-result"},"snapshot":{"$ref":"#/$defs/SnapshotHandle"},"policy":{"$ref":"#/$defs/PolicySummary"},"content":{"type":"string"},"requires":{"type":"array","items":{"$ref":"#/$defs/CanonicalId"},"uniqueItems":true},"specializes":{"type":"array","items":{"$ref":"#/$defs/CanonicalId"},"uniqueItems":true},"related":{"type":"array","items":{"$ref":"#/$defs/RelationshipSummary"}},"next_operations":{"type":"array","items":{"$ref":"#/$defs/NextOperation"}},"summary":{"type":"string"},"routing":{"$ref":"#/$defs/RoutingConfiguration"},"coverage":{"$ref":"#/$defs/ReadCoverage"},"application_exposure":{"$ref":"#/$defs/ApplicationExposureState"},"provenance":{"type":"array","items":{"$ref":"#/$defs/CanonicalId"}}},"additionalProperties":false},"PolicyUnitMapping":{"type":"object","required":["state","policy_units"],"properties":{"state":{"enum":["exact-policy-unit","policy-units-present","incomplete"]},"reason":{"const":"no-policy-units"},"policy_units":{"type":"array","items":{"$ref":"#/$defs/CanonicalId"},"uniqueItems":true}},"additionalProperties":false},"RelatedResult":{"type":"object","required":["kind","snapshot","target","policy_unit_mapping","relationships","next_operations"],"properties":{"kind":{"const":"related-result"},"snapshot":{"$ref":"#/$defs/SnapshotHandle"},"target":{"$ref":"#/$defs/CanonicalId"},"authoring_target":{"$ref":"#/$defs/AuthoringTargetHandle"},"policy_unit_mapping":{"$ref":"#/$defs/PolicyUnitMapping"},"relationships":{"type":"array","items":{"$ref":"#/$defs/RelationshipSummary"}},"next_operations":{"type":"array","items":{"$ref":"#/$defs/NextOperation"}},"summary":{"type":"string"}},"additionalProperties":false},"QueryResult":{"oneOf":[{"$ref":"#/$defs/RouteResult"},{"$ref":"#/$defs/ReadResult"},{"$ref":"#/$defs/RelatedResult"},{"$ref":"#/$defs/NavigationIndexesResult"},{"$ref":"#/$defs/ProvenanceReadResult"},{"$ref":"#/$defs/OperationalReadResult"}]},"ProposalRouteResult":{"type":"object","required":["kind","revision","reading_plan","unresolved_questions","next_operations"],"properties":{"kind":{"const":"proposal-route-result"},"revision":{"$ref":"#/$defs/ProposalRevisionHandle"},"reading_plan":{"type":"array","items":{"$ref":"#/$defs/ReadingPlanEntry"}},"unresolved_questions":{"type":"array","items":{"$ref":"#/$defs/Question"}},"next_operations":{"type":"array","items":{"$ref":"#/$defs/QueryProposalNextOperation"}},"summary":{"type":"string"}},"additionalProperties":false},"ProposalReadResult":{"type":"object","required":["kind","revision","policy","content","requires","specializes","related","next_operations"],"properties":{"kind":{"const":"proposal-read-result"},"revision":{"$ref":"#/$defs/ProposalRevisionHandle"},"policy":{"$ref":"#/$defs/ProposalPolicySummary"},"content":{"type":"string"},"requires":{"type":"array","items":{"$ref":"#/$defs/CanonicalId"},"uniqueItems":true},"specializes":{"type":"array","items":{"$ref":"#/$defs/CanonicalId"},"uniqueItems":true},"related":{"type":"array","items":{"$ref":"#/$defs/ProposalRelationshipSummary"}},"next_operations":{"type":"array","items":{"$ref":"#/$defs/QueryProposalNextOperation"}},"summary":{"type":"string"},"routing":{"$ref":"#/$defs/RoutingConfiguration"},"coverage":{"$ref":"#/$defs/ReadCoverage"},"application_exposure":{"$ref":"#/$defs/ApplicationExposureState"},"provenance":{"type":"array","items":{"$ref":"#/$defs/CanonicalId"}}},"additionalProperties":false},"ProposalRelatedResult":{"type":"object","required":["kind","revision","target","policy_unit_mapping","relationships","next_operations"],"properties":{"kind":{"const":"proposal-related-result"},"revision":{"$ref":"#/$defs/ProposalRevisionHandle"},"target":{"$ref":"#/$defs/CanonicalId"},"authoring_target":{"$ref":"#/$defs/AuthoringTargetHandle"},"policy_unit_mapping":{"$ref":"#/$defs/PolicyUnitMapping"},"relationships":{"type":"array","items":{"$ref":"#/$defs/ProposalRelationshipSummary"}},"next_operations":{"type":"array","items":{"$ref":"#/$defs/QueryProposalNextOperation"}},"summary":{"type":"string"}},"additionalProperties":false},"QueryProposalResult":{"oneOf":[{"$ref":"#/$defs/ProposalRouteResult"},{"$ref":"#/$defs/ProposalReadResult"},{"$ref":"#/$defs/ProposalRelatedResult"},{"$ref":"#/$defs/NavigationIndexesResult"},{"$ref":"#/$defs/ProvenanceReadResult"},{"$ref":"#/$defs/OperationalReadResult"}]},"AnalysisRequest":{"type":"object","required":["kind","base_snapshot","proposed_snapshot","changes","semantic_proposals","contract_version"],"properties":{"kind":{"const":"analysis-request"},"base_snapshot":{"$ref":"#/$defs/SnapshotHandle"},"proposed_snapshot":{"$ref":"#/$defs/SnapshotHandle"},"changes":{"type":"array","items":{"$ref":"#/$defs/ChangeDescriptor"},"minItems":1},"semantic_proposals":{"type":"array","items":{"$ref":"#/$defs/SemanticProposal"},"uniqueItems":true},"prior_analysis":{"$ref":"#/$defs/AnalysisHandle"},"contract_version":{"const":6}},"additionalProperties":false},"PrepareCall":{"type":"object","required":["request"],"properties":{"request":{"$ref":"#/$defs/AnalysisRequest"}},"additionalProperties":false},"AnalysisContext":{"type":"object","required":["kind","handle","subjects","changes","semantic_proposals"],"properties":{"kind":{"const":"analysis-context"},"handle":{"$ref":"#/$defs/AnalysisChildHandle"},"subjects":{"type":"array","items":{"$ref":"#/$defs/ChangedPolicyUnit"},"uniqueItems":true},"changes":{"type":"array","items":{"$ref":"#/$defs/ChangeDescriptor"},"minItems":1,"uniqueItems":true},"semantic_proposals":{"type":"array","items":{"$ref":"#/$defs/SemanticProposal"},"uniqueItems":true}},"additionalProperties":false},"AuthorizationReference":{"type":"object","required":["id","issuer","capability","authority_digest"],"properties":{"id":{"$ref":"#/$defs/AuthorizationId"},"issuer":{"$ref":"#/$defs/CanonicalId"},"capability":{"$ref":"#/$defs/CanonicalId"},"authority_digest":{"$ref":"#/$defs/Digest"}},"additionalProperties":false},"ProviderReference":{"type":"object","required":["id","contract","contract_version","input_digest"],"properties":{"id":{"$ref":"#/$defs/CanonicalId"},"contract":{"$ref":"#/$defs/CanonicalId"},"contract_version":{"$ref":"#/$defs/NonEmptyString"},"input_digest":{"$ref":"#/$defs/Digest"}},"additionalProperties":false},"AuthorizationRecord":{"type":"object","required":["reference","issuer_semantic_revision","principal","action","subject_kind","subject_id","authorization_evidence","revocation_authority","revocation_authority_semantic_revision","revocation_evidence"],"properties":{"reference":{"$ref":"#/$defs/AuthorizationReference"},"issuer_semantic_revision":{"type":"integer","minimum":1},"principal":{"$ref":"#/$defs/CanonicalId"},"action":{"$ref":"#/$defs/CanonicalId"},"subject_kind":{"$ref":"#/$defs/CanonicalId"},"subject_id":{"$ref":"#/$defs/NonEmptyString"},"authorization_evidence":{"type":"array","items":{"$ref":"#/$defs/EvidenceReference"},"minItems":1,"uniqueItems":true},"revocation_authority":{"$ref":"#/$defs/CanonicalId"},"revocation_authority_semantic_revision":{"type":"integer","minimum":1},"revocation_evidence":{"type":"array","items":{"$ref":"#/$defs/EvidenceReference"},"minItems":1,"uniqueItems":true}},"additionalProperties":false},"DomainContractReference":{"type":"object","required":["id","version"],"properties":{"id":{"$ref":"#/$defs/CanonicalId"},"version":{"$ref":"#/$defs/NonEmptyString"}},"additionalProperties":false},"AnalysisExecutionContractView":{"type":"object","required":["authorization_authority_digest","providers"],"properties":{"authorization_authority_digest":{"oneOf":[{"$ref":"#/$defs/Digest"},{"type":"null"}]},"providers":{"type":"array","items":{"$ref":"#/$defs/ProviderReference"},"uniqueItems":true}},"additionalProperties":false},"FactRequirement":{"type":"object","required":["kind","handle","fact","fact_semantic_revision","fact_contract_digest","context","value_contract","answer_contract","evidence_contract","authorization_capability"],"properties":{"kind":{"const":"fact-requirement"},"handle":{"$ref":"#/$defs/AnalysisChildHandle"},"fact":{"$ref":"#/$defs/CanonicalId"},"fact_semantic_revision":{"type":"integer","minimum":1},"fact_contract_digest":{"$ref":"#/$defs/Digest"},"context":{"$ref":"#/$defs/AnalysisChildHandle"},"value_contract":{"$ref":"#/$defs/FactValueContract"},"answer_contract":{"$ref":"#/$defs/CanonicalId"},"evidence_contract":{"$ref":"#/$defs/CanonicalId"},"authorization_capability":{"$ref":"#/$defs/CanonicalId"}},"additionalProperties":false},"FactRequirementWork":{"type":"object","required":["requirement","prompt","dependent_programs"],"properties":{"requirement":{"$ref":"#/$defs/FactRequirement"},"prompt":{"$ref":"#/$defs/NonEmptyString"},"dependent_programs":{"type":"array","items":{"$ref":"#/$defs/NonEmptyString"},"minItems":1,"uniqueItems":true}},"additionalProperties":false},"FactObservation":{"type":"object","required":["kind","handle","requirement","value","evidence","authorization"],"properties":{"kind":{"const":"fact-observation"},"handle":{"$ref":"#/$defs/AnalysisChildHandle"},"requirement":{"$ref":"#/$defs/AnalysisChildHandle"},"value":{"$ref":"#/$defs/FactValue"},"evidence":{"type":"array","items":{"$ref":"#/$defs/EvidenceReference"},"minItems":1,"uniqueItems":true},"authorization":{"$ref":"#/$defs/AuthorizationReference"},"provider":{"$ref":"#/$defs/ProviderReference"}},"additionalProperties":false},"Obligation":{"type":"object","required":["handle","kind","target","scope","reasons","state","permitted_submissions","fingerprint"],"properties":{"handle":{"$ref":"#/$defs/AnalysisChildHandle"},"kind":{"enum":["consumer-review","impact-review","lifecycle-impact-review","audit-coverage","unmapped-normative-change"]},"target":{"$ref":"#/$defs/CanonicalId"},"scope":{"$ref":"#/$defs/ReviewScope"},"reasons":{"type":"array","items":{"$ref":"#/$defs/SelectionReason"},"minItems":1,"uniqueItems":true},"state":{"enum":["required","resolved","blocked"]},"applicability":{"enum":["true","false","unknown","not-declared"]},"permitted_submissions":{"type":"array","items":{"enum":["consumer-disposition","impact-disposition","coverage-attestation"]},"minItems":1,"uniqueItems":true},"review_contract":{"$ref":"#/$defs/ConsumerReviewContract"},"fingerprint":{"$ref":"#/$defs/DecisionFingerprint"}},"additionalProperties":false},"ProvideFactSubmission":{"type":"object","required":["kind","requirement","value","evidence"],"properties":{"kind":{"const":"provide-fact"},"requirement":{"$ref":"#/$defs/AnalysisChildHandle"},"value":{"$ref":"#/$defs/FactValue"},"evidence":{"type":"array","items":{"$ref":"#/$defs/EvidenceReference"},"minItems":1,"uniqueItems":true}},"additionalProperties":false},"ConsumerDispositionSubmission":{"type":"object","required":["kind","obligation","result","rationale","evidence","fingerprint"],"properties":{"kind":{"const":"consumer-disposition"},"obligation":{"$ref":"#/$defs/AnalysisChildHandle"},"result":{"enum":["updated","reviewed-no-change","not-applicable","blocked"]},"rationale":{"$ref":"#/$defs/NonEmptyString"},"evidence":{"type":"array","items":{"$ref":"#/$defs/EvidenceReference"},"minItems":1},"fingerprint":{"$ref":"#/$defs/DecisionFingerprint"}},"additionalProperties":false},"ImpactDispositionSubmission":{"type":"object","required":["kind","obligation","result","rationale","evidence","fingerprint"],"properties":{"kind":{"const":"impact-disposition"},"obligation":{"$ref":"#/$defs/AnalysisChildHandle"},"result":{"enum":["confirmed","resolved-no-impact","requires-change","blocked"]},"rationale":{"$ref":"#/$defs/NonEmptyString"},"evidence":{"type":"array","items":{"$ref":"#/$defs/EvidenceReference"},"minItems":1},"fingerprint":{"$ref":"#/$defs/DecisionFingerprint"}},"additionalProperties":false},"CoverageAttestationClaim":{"type":"object","required":["requirement","conclusion","evidence","explicit_exclusions","rationale","auditor_provenance"],"properties":{"requirement":{"$ref":"#/$defs/AnalysisChildHandle"},"conclusion":{"const":"complete"},"evidence":{"type":"array","items":{"$ref":"#/$defs/EvidenceReference"},"minItems":1,"uniqueItems":true},"explicit_exclusions":{"type":"array","items":{"$ref":"#/$defs/EvidenceReference"},"uniqueItems":true},"rationale":{"$ref":"#/$defs/NonEmptyString"},"auditor_provenance":{"$ref":"#/$defs/NonEmptyString"}},"additionalProperties":false},"CoverageAttestationSubmission":{"type":"object","required":["kind","claim"],"properties":{"kind":{"const":"coverage-attestation"},"claim":{"$ref":"#/$defs/CoverageAttestationClaim"}},"additionalProperties":false},"Submission":{"oneOf":[{"$ref":"#/$defs/ProvideFactSubmission"},{"$ref":"#/$defs/ConsumerDispositionSubmission"},{"$ref":"#/$defs/ImpactDispositionSubmission"},{"$ref":"#/$defs/CoverageAttestationSubmission"}]},"ResolveCall":{"type":"object","required":["analysis","submission"],"properties":{"analysis":{"$ref":"#/$defs/AnalysisHandle"},"submission":{"$ref":"#/$defs/Submission"}},"additionalProperties":false},"CoverageRequirement":{"type":"object","required":["kind","handle","subject","owner","semantic_revision","relationship_kinds","horizon","required_evidence_contract"],"properties":{"kind":{"const":"coverage-requirement"},"handle":{"$ref":"#/$defs/AnalysisChildHandle"},"subject":{"$ref":"#/$defs/CanonicalId"},"owner":{"$ref":"#/$defs/CanonicalId"},"semantic_revision":{"type":"integer","minimum":1},"relationship_kinds":{"type":"array","items":{"$ref":"#/$defs/CanonicalId"},"uniqueItems":true},"horizon":{"$ref":"#/$defs/CanonicalId"},"required_evidence_contract":{"$ref":"#/$defs/CanonicalId"}},"additionalProperties":false},"CoverageAttestation":{"type":"object","required":["kind","requirement","conclusion","evidence","explicit_exclusions","rationale","auditor_provenance","schema_version","authorization"],"properties":{"kind":{"const":"coverage-attestation"},"requirement":{"$ref":"#/$defs/AnalysisChildHandle"},"conclusion":{"const":"complete"},"evidence":{"type":"array","items":{"$ref":"#/$defs/EvidenceReference"},"minItems":1},"explicit_exclusions":{"type":"array","items":{"$ref":"#/$defs/EvidenceReference"}},"rationale":{"$ref":"#/$defs/NonEmptyString"},"auditor_provenance":{"$ref":"#/$defs/NonEmptyString"},"schema_version":{"const":4},"authorization":{"$ref":"#/$defs/AuthorizationReference"}},"additionalProperties":false},"CoverageCertificate":{"type":"object","required":["kind","handle","requirement","subject","owner","semantic_revision","horizon_digest","relationship_digest","evidence_digests","fact_schema_digest"],"properties":{"kind":{"const":"coverage-certificate"},"handle":{"$ref":"#/$defs/AnalysisChildHandle"},"requirement":{"$ref":"#/$defs/AnalysisChildHandle"},"subject":{"$ref":"#/$defs/CanonicalId"},"owner":{"$ref":"#/$defs/CanonicalId"},"semantic_revision":{"type":"integer","minimum":1},"horizon_digest":{"$ref":"#/$defs/Digest"},"relationship_digest":{"$ref":"#/$defs/Digest"},"evidence_digests":{"type":"array","items":{"$ref":"#/$defs/Digest"},"uniqueItems":true},"fact_schema_digest":{"$ref":"#/$defs/Digest"}},"additionalProperties":false},"DispositionRecord":{"type":"object","required":["obligation","kind","result","rationale","evidence","authorization","fingerprint"],"properties":{"obligation":{"$ref":"#/$defs/AnalysisChildHandle"},"kind":{"enum":["consumer-disposition","impact-disposition"]},"result":{"$ref":"#/$defs/NonEmptyString"},"rationale":{"$ref":"#/$defs/NonEmptyString"},"evidence":{"type":"array","items":{"$ref":"#/$defs/EvidenceReference"}},"authorization":{"$ref":"#/$defs/AuthorizationReference"},"fingerprint":{"$ref":"#/$defs/DecisionFingerprint"}},"additionalProperties":false},"AnalysisState":{"type":"object","required":["kind","handle","base_snapshot","proposed_reference","changes","semantic_proposals","fact_observations","dispositions","coverage_attestations","authorization_records","domain_contracts","execution_contracts","contract_version"],"properties":{"kind":{"const":"analysis-state"},"handle":{"$ref":"#/$defs/AnalysisHandle"},"base_snapshot":{"$ref":"#/$defs/SnapshotHandle"},"proposed_reference":{"$ref":"#/$defs/AnalysisMaterialHandle"},"changes":{"type":"array","items":{"$ref":"#/$defs/ChangeDescriptor"},"minItems":1,"uniqueItems":true},"semantic_proposals":{"type":"array","items":{"$ref":"#/$defs/SemanticProposal"},"uniqueItems":true},"fact_observations":{"type":"array","items":{"$ref":"#/$defs/FactObservation"},"uniqueItems":true},"dispositions":{"type":"array","items":{"$ref":"#/$defs/DispositionRecord"},"uniqueItems":true},"coverage_attestations":{"type":"array","items":{"$ref":"#/$defs/CoverageAttestation"},"uniqueItems":true},"authorization_records":{"type":"array","items":{"$ref":"#/$defs/AuthorizationRecord"},"uniqueItems":true},"domain_contracts":{"type":"array","items":{"$ref":"#/$defs/DomainContractReference"},"minItems":1,"uniqueItems":true},"execution_contracts":{"$ref":"#/$defs/AnalysisExecutionContractView"},"contract_version":{"const":7}},"additionalProperties":false},"PendingResult":{"type":"object","required":["kind","handle","status","context","changes","changed_units","obligations","fact_requirements","reading_plan","next_operations"],"properties":{"kind":{"const":"pending-result"},"handle":{"$ref":"#/$defs/AnalysisHandle"},"status":{"const":"needs-action"},"context":{"$ref":"#/$defs/AnalysisContext"},"changes":{"type":"array","items":{"$ref":"#/$defs/ChangeDescriptor"}},"changed_units":{"type":"array","items":{"$ref":"#/$defs/ChangedPolicyUnit"}},"obligations":{"type":"array","items":{"$ref":"#/$defs/Obligation"}},"fact_requirements":{"type":"array","items":{"$ref":"#/$defs/FactRequirementWork"}},"reading_plan":{"type":"array","items":{"$ref":"#/$defs/ReadingPlanEntry"}},"next_operations":{"type":"array","items":{"$ref":"#/$defs/NextOperation"}},"summary":{"type":"string"}},"additionalProperties":false},"CompleteResult":{"type":"object","required":["kind","handle","status","context","changes","changed_units","coverage_certificates","fact_observations","dispositions","reading_plan","completion"],"properties":{"kind":{"const":"complete-result"},"handle":{"$ref":"#/$defs/AnalysisHandle"},"status":{"const":"complete"},"context":{"$ref":"#/$defs/AnalysisContext"},"changes":{"type":"array","items":{"$ref":"#/$defs/ChangeDescriptor"}},"changed_units":{"type":"array","items":{"$ref":"#/$defs/ChangedPolicyUnit"}},"coverage_certificates":{"type":"array","items":{"$ref":"#/$defs/CoverageCertificate"},"uniqueItems":true},"fact_observations":{"type":"array","items":{"$ref":"#/$defs/FactObservation"},"uniqueItems":true},"dispositions":{"type":"array","items":{"$ref":"#/$defs/DispositionRecord"}},"reading_plan":{"type":"array","items":{"$ref":"#/$defs/ReadingPlanEntry"}},"completion":{"$ref":"#/$defs/CompletionProof"},"summary":{"type":"string"}},"additionalProperties":false},"RepositoryPath":{"type":"array","items":{"$ref":"#/$defs/NonEmptyString"},"minItems":1},"ProvenanceRecord":{"type":"object","required":["snapshot","path"],"properties":{"snapshot":{"$ref":"#/$defs/SnapshotHandle"},"path":{"$ref":"#/$defs/RepositoryPath"}},"additionalProperties":false},"SnapshotInspectionResult":{"type":"object","required":["kind","snapshot"],"properties":{"kind":{"const":"snapshot-inspection-result"},"snapshot":{"$ref":"#/$defs/SnapshotSummary"}},"additionalProperties":false},"PolicyInspectionResult":{"type":"object","required":["kind","policy","declaration","representation_digest","structural_digest","provenance"],"properties":{"kind":{"const":"policy-inspection-result"},"policy":{"$ref":"#/$defs/SnapshotChildHandle"},"declaration":{"oneOf":[{"$ref":"#/$defs/CanonicalModuleDeclaration"},{"$ref":"#/$defs/PolicyUnitDeclaration"}]},"representation_digest":{"$ref":"#/$defs/Digest"},"structural_digest":{"$ref":"#/$defs/Digest"},"provenance":{"$ref":"#/$defs/ProvenanceRecord"}},"additionalProperties":false},"RelationshipInspectionResult":{"type":"object","required":["kind","relationship","policy_semantics","provenance"],"properties":{"kind":{"const":"relationship-inspection-result"},"relationship":{"$ref":"#/$defs/RelationshipSummary"},"policy_semantics":{"oneOf":[{"$ref":"#/$defs/PolicyRelationshipInspection"},{"type":"null"}]},"provenance":{"$ref":"#/$defs/ProvenanceRecord"}},"additionalProperties":false},"AnalysisInspectionResult":{"type":"object","required":["kind","state"],"properties":{"kind":{"const":"analysis-inspection-result"},"state":{"$ref":"#/$defs/AnalysisState"}},"additionalProperties":false},"AnalysisChildArtifact":{"oneOf":[{"$ref":"#/$defs/AnalysisContext"},{"$ref":"#/$defs/FactRequirement"},{"$ref":"#/$defs/FactObservation"},{"$ref":"#/$defs/Obligation"},{"$ref":"#/$defs/CoverageRequirement"},{"$ref":"#/$defs/CoverageCertificate"}]},"AnalysisChildInspectionResult":{"type":"object","required":["kind","handle","artifact"],"properties":{"kind":{"const":"analysis-child-inspection-result"},"handle":{"$ref":"#/$defs/AnalysisChildHandle"},"artifact":{"$ref":"#/$defs/AnalysisChildArtifact"}},"additionalProperties":false},"InspectionResult":{"oneOf":[{"$ref":"#/$defs/SnapshotInspectionResult"},{"$ref":"#/$defs/PolicyInspectionResult"},{"$ref":"#/$defs/RelationshipInspectionResult"},{"$ref":"#/$defs/AnalysisInspectionResult"},{"$ref":"#/$defs/AnalysisChildInspectionResult"}]},"InspectCall":{"type":"object","required":["handle"],"properties":{"handle":{"$ref":"#/$defs/InspectableHandle"}},"additionalProperties":false},"RejectedResult":{"type":"object","required":["kind","code","outcome","message","details","next_operations"],"properties":{"kind":{"const":"rejected-result"},"code":{"$ref":"#/$defs/CanonicalId"},"outcome":{"enum":["invalid","unavailable","unsupported","unauthorized"]},"target":{"$ref":"#/$defs/NonEmptyString"},"message":{"$ref":"#/$defs/NonEmptyString"},"details":{"type":"object","additionalProperties":{"$ref":"#/$defs/ScalarValue"}},"next_operations":{"type":"array","items":{"$ref":"#/$defs/NextOperation"}}},"additionalProperties":false},"AuthoredRoutingRule":{"type":"object","required":["id","target","when","condition"],"properties":{"id":{"$ref":"#/$defs/CanonicalId"},"target":{"$ref":"#/$defs/CanonicalId"},"when":{"$ref":"#/$defs/ApplicabilityExpression"},"condition":{"$ref":"#/$defs/NonEmptyString"}},"additionalProperties":false},"AuthoredRoutingFact":{"type":"object","required":["id","semantic_revision","type","nullable","values","aliases","meaning","prompt"],"properties":{"id":{"$ref":"#/$defs/CanonicalId"},"semantic_revision":{"type":"integer","minimum":1},"type":{"enum":["boolean","enum","string","string-set","enum-set","canonical-id"]},"nullable":{"type":"boolean"},"values":{"type":"array","items":{"type":"string"},"uniqueItems":true},"aliases":{"type":"array","items":{"$ref":"#/$defs/CanonicalId"},"uniqueItems":true},"meaning":{"$ref":"#/$defs/NonEmptyString"},"prompt":{"$ref":"#/$defs/NonEmptyString"}},"additionalProperties":false},"PutRoutingRuleEdit":{"type":"object","required":["kind","rule","rationale"],"properties":{"kind":{"const":"put-routing-rule"},"rule":{"$ref":"#/$defs/AuthoredRoutingRule"},"rationale":{"$ref":"#/$defs/NonEmptyString"}},"additionalProperties":false},"RemoveRoutingRuleEdit":{"type":"object","required":["kind","rule","rationale"],"properties":{"kind":{"const":"remove-routing-rule"},"rule":{"$ref":"#/$defs/CanonicalId"},"rationale":{"$ref":"#/$defs/NonEmptyString"}},"additionalProperties":false},"PutRoutingFactEdit":{"type":"object","required":["kind","fact","rationale"],"properties":{"kind":{"const":"put-routing-fact"},"fact":{"$ref":"#/$defs/AuthoredRoutingFact"},"rationale":{"$ref":"#/$defs/NonEmptyString"}},"additionalProperties":false},"RemoveRoutingFactEdit":{"type":"object","required":["kind","fact","rationale"],"properties":{"kind":{"const":"remove-routing-fact"},"fact":{"$ref":"#/$defs/CanonicalId"},"rationale":{"$ref":"#/$defs/NonEmptyString"}},"additionalProperties":false},"VerificationFailure":{"type":"object","additionalProperties":false,"required":["code","message","suite","check"],"properties":{"code":{"$ref":"#/$defs/NonEmptyString"},"message":{"$ref":"#/$defs/NonEmptyString"},"suite":{"type":["string","null"]},"check":{"type":["string","null"]}}},"VerificationReport":{"type":"object","additionalProperties":false,"required":["passed","exit_code","suites","checks","failures"],"properties":{"passed":{"type":"boolean"},"exit_code":{"enum":[0,1,2,3,4]},"suites":{"type":"integer","minimum":0},"checks":{"type":"integer","minimum":0},"failures":{"type":"array","items":{"$ref":"#/$defs/VerificationFailure"}}}},"VerifyRepositoryCall":{"type":"object","additionalProperties":false,"required":["kind","refresh_verification_inputs"],"properties":{"kind":{"const":"verify-repository"},"refresh_verification_inputs":{"type":"boolean"}}},"VerifyRepositoryResult":{"type":"object","additionalProperties":false,"required":["kind","refreshed_verification_inputs","verification"],"properties":{"kind":{"const":"verify-repository-result"},"refreshed_verification_inputs":{"type":"boolean"},"verification":{"$ref":"#/$defs/VerificationReport"}}},"VerifyProposalCall":{"type":"object","additionalProperties":false,"required":["kind","revision"],"properties":{"kind":{"const":"verify-proposal"},"revision":{"$ref":"#/$defs/ProposalRevisionHandle"},"readiness":{"$ref":"#/$defs/ReadinessHandle"}}},"VerifyProposalResult":{"type":"object","additionalProperties":false,"required":["kind","revision","verification"],"properties":{"kind":{"const":"verify-proposal-result"},"revision":{"$ref":"#/$defs/ProposalRevisionHandle"},"verification":{"$ref":"#/$defs/VerificationReport"},"readiness":{"$ref":"#/$defs/ReadinessHandle"}}},"RoutingConfiguration":{"type":"object","additionalProperties":false,"required":["facts","rules"],"properties":{"facts":{"type":"array","items":{"$ref":"#/$defs/AuthoredRoutingFact"}},"rules":{"type":"array","items":{"$ref":"#/$defs/AuthoredRoutingRule"}}}},"PolicyCoverageStatus":{"type":"object","required":["subject","requirement_id","status"],"properties":{"subject":{"$ref":"#/$defs/CanonicalId"},"requirement_id":{"$ref":"#/$defs/Digest"},"status":{"enum":["current-attestation","review-required"]},"authority":{"$ref":"#/$defs/CoverageAuditAuthority"}},"additionalProperties":false},"ReadCoverage":{"type":"object","description":"Repository attestation status bound to this snapshot or proposal. Empty subjects means no registered policy units in scope, not complete coverage. Analysis-local attestations are not repository certificates.","required":["subjects"],"properties":{"subjects":{"type":"array","items":{"$ref":"#/$defs/PolicyCoverageStatus"}}},"additionalProperties":false},"AuditPolicyUnitEdit":{"type":"object","required":["kind","policy","rationale"],"properties":{"kind":{"const":"audit-policy-unit"},"policy":{"$ref":"#/$defs/CanonicalId"},"rationale":{"$ref":"#/$defs/NonEmptyString"}},"additionalProperties":false},"CoverageAuditAuthority":{"type":"object","required":["issuer","principal","authorization_id"],"properties":{"issuer":{"$ref":"#/$defs/NonEmptyString"},"principal":{"$ref":"#/$defs/NonEmptyString"},"authorization_id":{"$ref":"#/$defs/NonEmptyString"}},"additionalProperties":false},"EvidenceCheckRetirement":{"type":"object","additionalProperties":false,"required":["suite","check"],"properties":{"suite":{"type":"string","minLength":1},"check":{"type":"string","minLength":1}}},"EvidenceSuiteDescription":{"type":"object","additionalProperties":false,"required":["suite","description"],"properties":{"suite":{"type":"string","minLength":1},"description":{"type":"string","minLength":1}}},"EvidenceRelationshipUpdate":{"type":"object","additionalProperties":false,"required":["source_policy","consumer","relation","evidence_owner","rationale"],"properties":{"source_policy":{"type":"string","minLength":1},"consumer":{"type":"string","minLength":1},"relation":{"type":"string","minLength":1},"evidence_owner":{"type":"string","minLength":1},"rationale":{"type":"string","minLength":1}}},"EvidenceConsumerRegistration":{"type":"object","additionalProperties":false,"required":["path","artifact_kind","source_policies","relation","evidence_owner","rationale"],"properties":{"path":{"type":"string","minLength":1},"artifact_kind":{"type":"string","enum":["implementation-artifact","fixture"]},"source_policies":{"type":"array","items":{"type":"string","minLength":1},"minItems":1,"uniqueItems":true},"relation":{"type":"string","enum":["implementation-projection","fixture-projection"]},"evidence_owner":{"type":"string","minLength":1},"rationale":{"type":"string","minLength":1}}},"EvidenceMaintenancePlan":{"type":"object","additionalProperties":false,"required":["prune_stale_certificates","retire_suites","retire_checks","retire_inputs","suite_descriptions","replacement_evidence_owner","replacement_evidence_rationale","relationship_updates","consumer_registrations"],"properties":{"prune_stale_certificates":{"type":"boolean"},"retire_suites":{"type":"array","items":{"type":"string","minLength":1},"uniqueItems":true},"retire_checks":{"type":"array","items":{"$ref":"#/$defs/EvidenceCheckRetirement"}},"retire_inputs":{"type":"array","items":{"type":"string","minLength":1},"uniqueItems":true},"suite_descriptions":{"type":"array","items":{"$ref":"#/$defs/EvidenceSuiteDescription"}},"replacement_evidence_owner":{"type":"string","minLength":1},"replacement_evidence_rationale":{"type":"string","minLength":1},"relationship_updates":{"type":"array","items":{"$ref":"#/$defs/EvidenceRelationshipUpdate"}},"consumer_registrations":{"type":"array","items":{"$ref":"#/$defs/EvidenceConsumerRegistration"}},"unregister_policy_subjects":{"type":"array","items":{"type":"string","minLength":1},"uniqueItems":true,"description":"Remove selected review-subject registrations and their source relationships while preserving normative Markdown."}}},"MaintainEvidenceCall":{"type":"object","additionalProperties":false,"required":["kind","expected_revision","evidence","plan","apply"],"properties":{"kind":{"const":"maintain-evidence"},"expected_revision":{"type":"string","minLength":1},"evidence":{"type":"array","items":{"$ref":"#/$defs/EvidenceReference"},"minItems":1},"plan":{"$ref":"#/$defs/EvidenceMaintenancePlan"},"apply":{"type":"boolean"}}},"MaintainEvidenceResult":{"type":"object","additionalProperties":false,"required":["kind","applied","changed_files","removed_files","verification"],"properties":{"kind":{"const":"maintain-evidence-result"},"applied":{"type":"boolean"},"changed_files":{"type":"array","items":{"type":"string","minLength":1}},"removed_files":{"type":"array","items":{"type":"string","minLength":1}},"verification":{"$ref":"#/$defs/VerificationReport"}}},"RouteCall":{"type":"object","required":["facts"],"properties":{"facts":{"$ref":"#/$defs/FactSet"},"snapshot":{"$ref":"#/$defs/SnapshotHandle"}},"additionalProperties":false},"ReadCall":{"type":"object","required":["target"],"properties":{"target":{"$ref":"#/$defs/CanonicalId"},"include_routing":{"type":"boolean"},"include_coverage":{"type":"boolean","description":"Include current repository attestation status for registered policy units in this read scope."},"snapshot":{"$ref":"#/$defs/SnapshotHandle"},"detail":{"enum":["compact","full"],"description":"Compact preserves exact policy and essential authority; full includes all relationship rows."}},"additionalProperties":false},"RelatedCall":{"type":"object","required":["target","groups","direction","transitive"],"properties":{"target":{"$ref":"#/$defs/CanonicalId"},"groups":{"type":"array","minItems":1,"uniqueItems":true,"items":{"$ref":"#/$defs/CanonicalId"}},"direction":{"enum":["incoming","outgoing","both"]},"transitive":{"type":"boolean","default":false},"snapshot":{"$ref":"#/$defs/SnapshotHandle"}},"additionalProperties":false},"CompactReadResult":{"type":"object","required":["kind","snapshot","policy","content","requires","specializes","next_operations","detail"],"properties":{"kind":{"const":"compact-read-result"},"snapshot":{"$ref":"#/$defs/SnapshotHandle"},"policy":{"$ref":"#/$defs/PolicySummary"},"content":{"type":"string"},"requires":{"type":"array","items":{"$ref":"#/$defs/CanonicalId"},"uniqueItems":true},"specializes":{"type":"array","items":{"$ref":"#/$defs/CanonicalId"},"uniqueItems":true},"next_operations":{"type":"array","items":{"$ref":"#/$defs/NextOperation"}},"summary":{"type":"string"},"routing":{"$ref":"#/$defs/RoutingConfiguration"},"coverage":{"$ref":"#/$defs/ReadCoverage"},"detail":{"const":"compact"},"application_exposure":{"$ref":"#/$defs/ApplicationExposureState"},"provenance":{"type":"array","items":{"$ref":"#/$defs/CanonicalId"}}},"additionalProperties":false},"RoutingFactsCall":{"type":"object","additionalProperties":false,"required":[],"properties":{"snapshot":{"$ref":"#/$defs/SnapshotHandle"}}},"RoutingFactsResult":{"type":"object","additionalProperties":false,"required":["kind","snapshot","facts"],"properties":{"kind":{"const":"routing-facts-result"},"snapshot":{"$ref":"#/$defs/SnapshotHandle"},"facts":{"type":"array","items":{"$ref":"#/$defs/AuthoredRoutingFact"}}}},"RoutingQuestion":{"type":"object","additionalProperties":false,"required":["id","kind","prompt","state","fact"],"properties":{"id":{"$ref":"#/$defs/CanonicalId"},"kind":{"const":"applicability-fact"},"prompt":{"$ref":"#/$defs/NonEmptyString"},"state":{"const":"required"},"fact":{"$ref":"#/$defs/AuthoredRoutingFact"}}},"RoutingRuleExplanation":{"type":"object","additionalProperties":false,"required":["id","target","when","state"],"properties":{"id":{"$ref":"#/$defs/CanonicalId"},"target":{"$ref":"#/$defs/CanonicalId"},"when":{"$ref":"#/$defs/ApplicabilityExpression"},"state":{"enum":["selected","unresolved"]}}},"AgentRouteResult":{"type":"object","required":["kind","snapshot","reading_plan","unresolved_questions","next_operations","facts","rules"],"properties":{"kind":{"const":"agent-route-result"},"snapshot":{"$ref":"#/$defs/SnapshotHandle"},"reading_plan":{"type":"array","items":{"$ref":"#/$defs/ReadingPlanEntry"}},"unresolved_questions":{"type":"array","items":{"$ref":"#/$defs/RoutingQuestion"}},"next_operations":{"type":"array","items":{"$ref":"#/$defs/NextOperation"}},"summary":{"type":"string"},"facts":{"$ref":"#/$defs/FactSet"},"rules":{"type":"array","items":{"$ref":"#/$defs/RoutingRuleExplanation"}}},"additionalProperties":false},"WorkflowContext":{"oneOf":[{"$ref":"#/$defs/ProposalRevisionHandle"},{"$ref":"#/$defs/AnalysisHandle"},{"$ref":"#/$defs/ReadinessHandle"}]},"ProposeCall":{"type":"object","additionalProperties":false,"properties":{"snapshot":{"$ref":"#/$defs/SnapshotHandle"},"change_set":{"$ref":"#/$defs/StandardsChangeSet"}},"required":["change_set"]},"ReviseCall":{"type":"object","additionalProperties":false,"properties":{"context":{"$ref":"#/$defs/WorkflowContext"},"change_set":{"$ref":"#/$defs/StandardsChangeSet"}},"required":["context","change_set"]},"AnalyzeCall":{"type":"object","additionalProperties":false,"properties":{"context":{"$ref":"#/$defs/WorkflowContext"}},"required":["context"]},"ResolveWorkflowCall":{"type":"object","additionalProperties":false,"properties":{"context":{"$ref":"#/$defs/WorkflowContext"},"submission":{"$ref":"#/$defs/Submission"}},"required":["context","submission"]},"ReviewCall":{"type":"object","additionalProperties":false,"properties":{"context":{"$ref":"#/$defs/WorkflowContext"},"decisions":{"type":"array","minItems":3,"maxItems":3,"uniqueItems":true,"items":{"$ref":"#/$defs/ReviewDecision"}}},"required":["context","decisions"]},"ApplyCall":{"type":"object","additionalProperties":false,"properties":{"context":{"$ref":"#/$defs/WorkflowContext"}},"required":["context"]},"RecoverCall":{"type":"object","additionalProperties":false,"properties":{"context":{"$ref":"#/$defs/WorkflowContext"}},"required":["context"]},"WorkflowStatusCall":{"type":"object","additionalProperties":false,"properties":{"context":{"$ref":"#/$defs/WorkflowContext"}},"required":["context"]},"ResumeCall":{"type":"object","additionalProperties":false,"properties":{"context":{"$ref":"#/$defs/WorkflowContext"}},"required":["context"]},"WorkflowContinuation":{"type":"object","additionalProperties":false,"properties":{"operation":{"enum":["revise","analyze","resolve_workflow","review","apply","recover","workflow_status","resume"]},"context":{"$ref":"#/$defs/WorkflowContext"},"required_inputs":{"type":"array","uniqueItems":true,"items":{"enum":["change_set","submission","decisions"]}}},"required":["operation","context","required_inputs"]},"WorkflowOutcome":{"oneOf":[{"$ref":"#/$defs/CreateProposalResult"},{"$ref":"#/$defs/ReviseProposalResult"},{"$ref":"#/$defs/PendingResult"},{"$ref":"#/$defs/CompleteResult"},{"$ref":"#/$defs/ReviewProposalResult"},{"$ref":"#/$defs/ApplyProposalResult"},{"$ref":"#/$defs/ApplicationRecoveryRequiredResult"},{"$ref":"#/$defs/RecoverApplicationResult"},{"$ref":"#/$defs/RejectedResult"}]},"WorkflowResult":{"type":"object","additionalProperties":false,"properties":{"kind":{"const":"workflow-result"},"context":{"$ref":"#/$defs/WorkflowContext"},"proposal":{"$ref":"#/$defs/ProposalHandle"},"revision":{"$ref":"#/$defs/ProposalRevisionHandle"},"status":{"enum":["draft","needs-action","complete","requires-change","ready","recovery-required","applied","rejected","stale"]},"next_operations":{"type":"array","items":{"$ref":"#/$defs/WorkflowContinuation"}},"outcome":{"$ref":"#/$defs/WorkflowOutcome"}},"required":["kind","context","proposal","revision","status","next_operations"]},"FocusedQueryNextOperation":{"type":"object","required":["operation","request_kind","snapshot"],"properties":{"operation":{"enum":["route","read","related"]},"request_kind":{"enum":["route","read","related"]},"target":{"$ref":"#/$defs/CanonicalId"},"snapshot":{"$ref":"#/$defs/SnapshotHandle"}},"additionalProperties":false},"RewriteNavigationIndexEdit":{"type":"object","required":["kind","entrypoint","destinations","rationale"],"properties":{"kind":{"const":"rewrite-navigation-index"},"entrypoint":{"$ref":"#/$defs/AuthoringTargetHandle"},"destinations":{"type":"array","items":{"$ref":"#/$defs/CanonicalId"},"minItems":1,"uniqueItems":true},"rationale":{"$ref":"#/$defs/NonEmptyString"},"retargets":{"type":"array","items":{"$ref":"#/$defs/NavigationRetarget"},"uniqueItems":true}},"additionalProperties":false},"NavigationIndexEntry":{"type":"object","required":["id","entrypoint","destinations"],"properties":{"id":{"$ref":"#/$defs/CanonicalId"},"entrypoint":{"$ref":"#/$defs/AuthoringTargetHandle"},"destinations":{"type":"array","items":{"$ref":"#/$defs/CanonicalId"},"uniqueItems":true},"content":{"$ref":"#/$defs/NonEmptyString"}},"additionalProperties":false},"NavigationIndexesResult":{"type":"object","required":["kind","authority","indexes","next_operations"],"properties":{"kind":{"const":"navigation-indexes-result"},"authority":{"oneOf":[{"$ref":"#/$defs/SnapshotHandle"},{"$ref":"#/$defs/ProposalRevisionHandle"}]},"indexes":{"type":"array","items":{"$ref":"#/$defs/NavigationIndexEntry"},"minItems":1},"next_operations":{"type":"array","items":{"$ref":"#/$defs/NextOperation"},"maxItems":0}},"additionalProperties":false},"NavigationRetarget":{"type":"object","required":["entrypoint","standard"],"properties":{"entrypoint":{"$ref":"#/$defs/AuthoringTargetHandle"},"standard":{"$ref":"#/$defs/CanonicalId"}},"additionalProperties":false},"ApplicationNextOperation":{"type":"object","additionalProperties":false,"required":["operation","snapshot"],"properties":{"operation":{"enum":["read","related","routing_facts","route","query","inspect"]},"snapshot":{"$ref":"#/$defs/SnapshotHandle"},"target":{"$ref":"#/$defs/CanonicalId"},"handle":{"$ref":"#/$defs/SnapshotChildHandle"}}},"ApplicationRejectedResult":{"type":"object","additionalProperties":false,"required":["kind","purpose","code","outcome","message","next_operations"],"properties":{"kind":{"const":"application-rejected-result"},"purpose":{"const":"application"},"code":{"enum":["APPLICATION.CONTENT_UNAVAILABLE","APPLICATION.INPUT_INVALID","APPLICATION.OPERATION_UNAVAILABLE","APPLICATION.INTERNAL_UNAVAILABLE","APPLICATION.UNSUPPORTED_CAPTURE","APPLICATION.RESULT_LIMIT"]},"outcome":{"enum":["invalid","unsupported","unavailable"]},"message":{"type":"string"},"next_operations":{"type":"array","items":{"$ref":"#/$defs/ApplicationNextOperation"}}}},"ApplicationPolicy":{"type":"object","additionalProperties":false,"required":["id","handle","role","level"],"properties":{"id":{"$ref":"#/$defs/CanonicalId"},"handle":{"$ref":"#/$defs/SnapshotChildHandle"},"role":{"enum":["core","router","topic","workflow","profile","reference","prompt","template"]},"level":{"enum":["MUST","SHOULD","PROFILE","REFERENCE"]}}},"ApplicationRelationship":{"type":"object","additionalProperties":false,"required":["handle","source","target","relation","groups","direction"],"properties":{"handle":{"$ref":"#/$defs/SnapshotChildHandle"},"source":{"$ref":"#/$defs/CanonicalId"},"target":{"$ref":"#/$defs/CanonicalId"},"relation":{"type":"string"},"groups":{"type":"array","items":{"$ref":"#/$defs/CanonicalId"}},"direction":{"enum":["incoming","outgoing"]}}},"ApplicationReadResult":{"type":"object","additionalProperties":false,"required":["kind","purpose","snapshot","policy","content","scope","requires","specializes","next_operations"],"properties":{"kind":{"const":"application-read-result"},"purpose":{"const":"application"},"snapshot":{"$ref":"#/$defs/SnapshotHandle"},"policy":{"$ref":"#/$defs/ApplicationPolicy"},"content":{"type":"string"},"scope":{"$ref":"#/$defs/ReviewScope"},"requires":{"type":"array","items":{"$ref":"#/$defs/CanonicalId"}},"specializes":{"type":"array","items":{"$ref":"#/$defs/CanonicalId"}},"related":{"type":"array","items":{"$ref":"#/$defs/ApplicationRelationship"}},"next_operations":{"type":"array","items":{"$ref":"#/$defs/ApplicationNextOperation"}}}},"ApplicationRelatedResult":{"type":"object","additionalProperties":false,"required":["kind","purpose","snapshot","target","relationships","next_operations"],"properties":{"kind":{"const":"application-related-result"},"purpose":{"const":"application"},"snapshot":{"$ref":"#/$defs/SnapshotHandle"},"target":{"$ref":"#/$defs/CanonicalId"},"relationships":{"type":"array","items":{"$ref":"#/$defs/ApplicationRelationship"}},"next_operations":{"type":"array","items":{"$ref":"#/$defs/ApplicationNextOperation"}}}},"ApplicationReadingEntry":{"type":"object","additionalProperties":false,"required":["target","scope","authority","state"],"properties":{"target":{"$ref":"#/$defs/CanonicalId"},"scope":{"$ref":"#/$defs/ReviewScope"},"authority":{"enum":["normative","contextual"]},"state":{"const":"selected"}}},"ApplicationQuestion":{"type":"object","additionalProperties":false,"required":["fact"],"properties":{"fact":{"$ref":"#/$defs/AuthoredRoutingFact"}}},"ApplicationRouteResult":{"type":"object","additionalProperties":false,"required":["kind","purpose","snapshot","status","reading_plan","unresolved_questions","next_operations"],"properties":{"kind":{"const":"application-route-result"},"purpose":{"const":"application"},"snapshot":{"$ref":"#/$defs/SnapshotHandle"},"status":{"enum":["complete","needs-facts"]},"reading_plan":{"type":"array","items":{"$ref":"#/$defs/ApplicationReadingEntry"}},"unresolved_questions":{"type":"array","items":{"$ref":"#/$defs/ApplicationQuestion"}},"next_operations":{"type":"array","items":{"$ref":"#/$defs/ApplicationNextOperation"}}}},"ApplicationRoutingFactsResult":{"type":"object","additionalProperties":false,"required":["kind","purpose","snapshot","facts","next_operations"],"properties":{"kind":{"const":"application-routing-facts-result"},"purpose":{"const":"application"},"snapshot":{"$ref":"#/$defs/SnapshotHandle"},"facts":{"type":"array","items":{"$ref":"#/$defs/AuthoredRoutingFact"}},"next_operations":{"type":"array","items":{"$ref":"#/$defs/ApplicationNextOperation"}}}},"ApplicationReadCall":{"type":"object","additionalProperties":false,"required":["target"],"properties":{"target":{"$ref":"#/$defs/CanonicalId"},"snapshot":{"$ref":"#/$defs/SnapshotHandle"},"detail":{"enum":["compact","full"]}}},"ApplicationReadRequest":{"type":"object","additionalProperties":false,"required":["kind","target"],"properties":{"kind":{"const":"read"},"target":{"$ref":"#/$defs/CanonicalId"},"detail":{"enum":["compact","full"]}}},"ApplicationQueryRequest":{"oneOf":[{"$ref":"#/$defs/RouteRequest"},{"$ref":"#/$defs/ApplicationReadRequest"},{"$ref":"#/$defs/RelatedRequest"}]},"ApplicationQueryCall":{"type":"object","additionalProperties":false,"required":["snapshot","request"],"properties":{"snapshot":{"$ref":"#/$defs/SnapshotHandle"},"request":{"$ref":"#/$defs/ApplicationQueryRequest"}}},"ApplicationInspectCall":{"type":"object","additionalProperties":false,"required":["handle"],"properties":{"handle":{"$ref":"#/$defs/SnapshotChildHandle"}}},"AuthoredDecisionProvenance":{"type":"object","additionalProperties":false,"required":["id","subject","origin","rationale","evidence"],"properties":{"id":{"$ref":"#/$defs/CanonicalId"},"subject":{"$ref":"#/$defs/CanonicalId"},"origin":{"enum":["documented-original","reconstructed-history","current-justification","unrecorded"]},"rationale":{"type":"string"},"evidence":{"type":"array","items":{"$ref":"#/$defs/EvidenceReference"}},"assumptions":{"type":"array","items":{"type":"string"}},"limits":{"type":"array","items":{"type":"string"}},"alternatives":{"type":"array","items":{"type":"string"}},"reconsideration":{"type":"array","items":{"type":"string"}},"supersedes":{"type":"array","items":{"type":"string"}}}},"DecisionProvenanceRecord":{"type":"object","additionalProperties":false,"required":["id","subject","origin","rationale","evidence","assumptions","limits","alternatives","reconsideration","supersedes","subject_binding","retired"],"properties":{"id":{"$ref":"#/$defs/CanonicalId"},"subject":{"$ref":"#/$defs/CanonicalId"},"origin":{"enum":["documented-original","reconstructed-history","current-justification","unrecorded"]},"rationale":{"type":"string"},"evidence":{"type":"array","items":{"$ref":"#/$defs/EvidenceReference"}},"assumptions":{"type":"array","items":{"type":"string"}},"limits":{"type":"array","items":{"type":"string"}},"alternatives":{"type":"array","items":{"type":"string"}},"reconsideration":{"type":"array","items":{"type":"string"}},"supersedes":{"type":"array","items":{"type":"string"}},"subject_binding":{"$ref":"#/$defs/Digest"},"retired":{"type":"boolean"}}},"ApplicationExposureState":{"enum":["unreviewed","current","needs-review"]},"ProvenanceReadResult":{"type":"object","additionalProperties":false,"required":["kind","authority","record","state","next_operations"],"properties":{"kind":{"const":"provenance-read-result"},"authority":{"oneOf":[{"$ref":"#/$defs/SnapshotHandle"},{"$ref":"#/$defs/ProposalRevisionHandle"}]},"record":{"$ref":"#/$defs/DecisionProvenanceRecord"},"state":{"enum":["current","needs-review","retired"]},"next_operations":{"type":"array","items":{"$ref":"#/$defs/NextOperation"}}}},"OperationalReadResult":{"type":"object","additionalProperties":false,"required":["kind","authority","target","canonical_id","role","content","application_exposure","next_operations"],"properties":{"kind":{"const":"operational-read-result"},"authority":{"oneOf":[{"$ref":"#/$defs/SnapshotHandle"},{"$ref":"#/$defs/ProposalRevisionHandle"}]},"target":{"$ref":"#/$defs/AuthoringTargetHandle"},"canonical_id":{"$ref":"#/$defs/CanonicalId"},"role":{"enum":["prompt","template"]},"content":{"type":"string"},"application_exposure":{"$ref":"#/$defs/ApplicationExposureState"},"next_operations":{"type":"array","items":{"$ref":"#/$defs/NextOperation"}}}},"PutDecisionProvenanceEdit":{"type":"object","additionalProperties":false,"required":["kind","record"],"properties":{"kind":{"const":"put-provenance"},"record":{"$ref":"#/$defs/AuthoredDecisionProvenance"}}},"RetireDecisionProvenanceEdit":{"type":"object","additionalProperties":false,"required":["kind","id"],"properties":{"kind":{"const":"retire-provenance"},"id":{"$ref":"#/$defs/CanonicalId"}}},"ApproveApplicationContentEdit":{"type":"object","additionalProperties":false,"required":["kind","target"],"properties":{"kind":{"const":"approve-application-content"},"target":{"oneOf":[{"$ref":"#/$defs/CanonicalId"},{"$ref":"#/$defs/AuthoringTargetHandle"}]}}},"WithdrawApplicationContentEdit":{"type":"object","additionalProperties":false,"required":["kind","target"],"properties":{"kind":{"const":"withdraw-application-content"},"target":{"oneOf":[{"$ref":"#/$defs/CanonicalId"},{"$ref":"#/$defs/AuthoringTargetHandle"}]}}},"ReviseOperationalArtifactEdit":{"type":"object","additionalProperties":false,"required":["kind","target","title","body"],"properties":{"kind":{"const":"revise-operational-artifact"},"target":{"$ref":"#/$defs/AuthoringTargetHandle"},"title":{"$ref":"#/$defs/NonEmptyString"},"body":{"type":"string"}}},"PolicyScopeUpdate":{"type":"object","additionalProperties":false,"required":["policy","heading_path","semantics"],"properties":{"policy":{"$ref":"#/$defs/CanonicalId"},"heading_path":{"type":"array","minItems":1,"items":{"$ref":"#/$defs/NonEmptyString"}},"semantics":{"$ref":"#/$defs/PolicySemanticIntent"}}},"ReadManyItem":{"type":"object","required":["target"],"properties":{"target":{"$ref":"#/$defs/CanonicalId"},"include_routing":{"type":"boolean"},"include_coverage":{"type":"boolean","description":"Include current repository attestation status for registered policy units in this read scope."},"detail":{"enum":["compact","full"],"description":"Compact preserves exact policy and essential authority; full includes all relationship rows."}},"additionalProperties":false},"ReadManyCall":{"type":"object","additionalProperties":false,"required":["snapshot","items"],"description":"Read 1–32 selected items from one explicit snapshot, preserving order. The complete JSON result is limited to 2 MiB; any failed item rejects the entire request.","properties":{"snapshot":{"$ref":"#/$defs/SnapshotHandle"},"items":{"type":"array","minItems":1,"maxItems":32,"uniqueItems":true,"items":{"$ref":"#/$defs/ReadManyItem"}}}},"ReadManyResult":{"type":"object","additionalProperties":false,"required":["kind","snapshot","items"],"properties":{"kind":{"const":"read-many-result"},"snapshot":{"$ref":"#/$defs/SnapshotHandle"},"items":{"type":"array","minItems":1,"maxItems":32,"items":{"oneOf":[{"$ref":"#/$defs/CompactReadResult"},{"$ref":"#/$defs/ReadResult"},{"$ref":"#/$defs/NavigationIndexesResult"},{"$ref":"#/$defs/ProvenanceReadResult"},{"$ref":"#/$defs/OperationalReadResult"}]}}}},"ApplicationReadManyItem":{"type":"object","additionalProperties":false,"required":["target"],"properties":{"target":{"$ref":"#/$defs/CanonicalId"},"detail":{"enum":["compact","full"]}}},"ApplicationReadManyCall":{"type":"object","additionalProperties":false,"required":["snapshot","items"],"description":"Read 1–32 selected items from one explicit snapshot, preserving order. The complete JSON result is limited to 2 MiB; any failed item rejects the entire request.","properties":{"snapshot":{"$ref":"#/$defs/SnapshotHandle"},"items":{"type":"array","minItems":1,"maxItems":32,"uniqueItems":true,"items":{"$ref":"#/$defs/ApplicationReadManyItem"}}}},"ApplicationReadManyResult":{"type":"object","additionalProperties":false,"required":["kind","snapshot","items","purpose"],"properties":{"kind":{"const":"application-read-many-result"},"snapshot":{"$ref":"#/$defs/SnapshotHandle"},"items":{"type":"array","minItems":1,"maxItems":32,"items":{"oneOf":[{"$ref":"#/$defs/ApplicationReadResult"}]}},"purpose":{"const":"application"}}}}}') +DEFINITION_METADATA = freeze_json({'ActiveSnapshotSummary': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'lifecycle': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'source_revision': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'created_at': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'AgentRouteResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'reading_plan': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'unresolved_questions': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'next_operations': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'summary': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'facts': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'rules': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'AllExpression': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'operator': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'expressions': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'AlwaysExpression': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'operator': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'AnalysisChildArtifact': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'AnalysisChildHandle': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'analysis': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'child_kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'child_id': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'schema_version': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'AnalysisChildInspectionResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'handle': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'artifact': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'AnalysisContext': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'handle': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'subjects': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'changes': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'semantic_proposals': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'AnalysisExecutionContractView': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'authorization_authority_digest': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'providers': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'AnalysisHandle': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'id': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'schema_version': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'AnalysisId': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'AnalysisInspectionResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'state': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'AnalysisMaterialHandle': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'AnalysisRequest': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'base_snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'proposed_snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'changes': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'semantic_proposals': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'prior_analysis': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'contract_version': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'AnalysisState': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'handle': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'base_snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'proposed_reference': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'changes': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'semantic_proposals': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'fact_observations': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'dispositions': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'coverage_attestations': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'authorization_records': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'domain_contracts': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'execution_contracts': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'contract_version': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'AnalyzeCall': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'context': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'AnalyzeProposalCall': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'revision': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'AnyExpression': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'operator': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'expressions': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ApplicabilityExpression': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'ApplicationExposureState': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'ApplicationHandle': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'id': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'schema_version': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ApplicationId': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'ApplicationInspectCall': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'handle': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ApplicationNextOperation': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'operation': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'target': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'handle': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ApplicationPolicy': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'id': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'handle': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'role': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'level': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ApplicationQueryCall': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'request': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ApplicationQueryRequest': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'ApplicationQuestion': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'fact': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ApplicationReadCall': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'target': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'detail': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ApplicationReadManyCall': {'title': None, 'description': 'Read 1–32 selected items from one explicit snapshot, preserving order. The complete JSON result is limited to 2 MiB; any failed item rejects the entire request.', 'has_default': False, 'default': None, 'properties': {'snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'items': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ApplicationReadManyItem': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'target': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'detail': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ApplicationReadManyResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'items': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'purpose': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ApplicationReadRequest': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'target': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'detail': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ApplicationReadResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'purpose': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'policy': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'content': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'scope': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'requires': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'specializes': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'related': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'next_operations': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ApplicationReadingEntry': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'target': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'scope': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'authority': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'state': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ApplicationRecoveryRequiredResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'application': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'status': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'code': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'outcome': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'message': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ApplicationRejectedResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'purpose': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'code': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'outcome': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'message': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'next_operations': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ApplicationRelatedResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'purpose': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'target': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'relationships': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'next_operations': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ApplicationRelationship': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'handle': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'source': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'target': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'relation': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'groups': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'direction': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ApplicationRouteResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'purpose': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'status': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'reading_plan': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'unresolved_questions': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'next_operations': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ApplicationRoutingFactsResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'purpose': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'facts': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'next_operations': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ApplyCall': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'context': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ApplyProposalCall': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'readiness': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ApplyProposalResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'application': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'status': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ApproveApplicationContentEdit': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'target': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'AuditPolicyUnitEdit': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'policy': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'rationale': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'AuthoredDecisionProvenance': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'id': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'subject': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'origin': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'rationale': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'evidence': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'assumptions': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'limits': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'alternatives': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'reconsideration': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'supersedes': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'AuthoredRoutingFact': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'id': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'semantic_revision': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'type': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'nullable': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'values': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'aliases': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'meaning': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'prompt': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'AuthoredRoutingRule': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'id': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'target': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'when': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'condition': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'AuthoringTargetHandle': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'id': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'schema_version': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'AuthorizationId': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'AuthorizationRecord': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'reference': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'issuer_semantic_revision': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'principal': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'action': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'subject_kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'subject_id': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'authorization_evidence': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'revocation_authority': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'revocation_authority_semantic_revision': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'revocation_evidence': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'AuthorizationReference': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'id': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'issuer': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'capability': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'authority_digest': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'CanonicalId': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'CanonicalModuleDeclaration': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'id': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'role': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'level': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'applies_when': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'does_not_apply_when': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'requires': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'specializes': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'verification': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ChangeDescriptor': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'accepted_ids': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'proposed_ids': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'scope': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'accepted_module': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'proposed_module': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ChangePolicySemantics': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'accepted_semantic_revision': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'proposed_semantic_revision': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'intent': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ChangedPolicyUnit': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'policy': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'change_kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'classification': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'accepted_representation_digest': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'proposed_representation_digest': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'accepted_structural_digest': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'proposed_structural_digest': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'accepted_semantic_revision': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'proposed_semantic_revision': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'semantic_state': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'scope': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ChildId': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'CompactReadResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'policy': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'content': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'requires': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'specializes': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'next_operations': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'summary': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'routing': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'coverage': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'detail': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'application_exposure': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'provenance': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'CompleteResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'handle': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'status': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'context': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'changes': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'changed_units': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'coverage_certificates': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'fact_observations': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'dispositions': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'reading_plan': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'completion': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'summary': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'CompletionProof': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'required_coverage_subjects': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'certificate_subjects': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'reached_consumer_obligations': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'disposition_obligations': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'required_fact_requirements': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'observed_fact_requirements': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'non_consumer_obligations_resolved': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'applicability_resolved': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'authorization_valid': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'evidence_valid': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ConsumerDispositionSubmission': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'obligation': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'result': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'rationale': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'evidence': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'fingerprint': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ConsumerReviewContract': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'id': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'version': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'permitted_dispositions': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'evidence_contract': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'authorization_capability': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'semantics': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ConsumerReviewObligationReadingReason': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'obligation': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ContainsExpression': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'operator': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'fact': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'value': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'CoverageAttestation': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'requirement': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'conclusion': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'evidence': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'explicit_exclusions': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'rationale': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'auditor_provenance': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'schema_version': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'authorization': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'CoverageAttestationClaim': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'requirement': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'conclusion': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'evidence': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'explicit_exclusions': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'rationale': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'auditor_provenance': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'CoverageAttestationSubmission': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'claim': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'CoverageAuditAuthority': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'issuer': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'principal': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'authorization_id': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'CoverageCertificate': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'handle': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'requirement': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'subject': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'owner': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'semantic_revision': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'horizon_digest': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'relationship_digest': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'evidence_digests': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'fact_schema_digest': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'CoverageRequirement': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'handle': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'subject': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'owner': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'semantic_revision': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'relationship_kinds': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'horizon': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'required_evidence_contract': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'CreateProposalCall': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'base_snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'change_set': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'CreateProposalResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'proposal': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'revision': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'CreateSnapshotCall': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'CreateSnapshotResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'CreateStandardEdit': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'standard': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'requires': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'specializes': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'policy_units': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'DecisionDependency': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'class': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'identity': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'digest': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'DecisionFingerprint': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'decision_kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'decision_contract': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'schema_version': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'dependencies': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'DecisionProvenanceRecord': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'id': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'subject': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'origin': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'rationale': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'evidence': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'assumptions': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'limits': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'alternatives': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'reconsideration': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'supersedes': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'subject_binding': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'retired': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'DeleteSnapshotCall': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'DeleteSnapshotResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'purge_deadline': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'Digest': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'DispositionRecord': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'obligation': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'result': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'rationale': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'evidence': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'authorization': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'fingerprint': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'DomainContractReference': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'id': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'version': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'EdgeId': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'EqualsExpression': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'operator': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'fact': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'value': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'EvidenceCheckRetirement': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'suite': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'check': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'EvidenceConsumerRegistration': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'path': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'artifact_kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'source_policies': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'relation': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'evidence_owner': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'rationale': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'EvidenceMaintenancePlan': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'prune_stale_certificates': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'retire_suites': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'retire_checks': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'retire_inputs': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'suite_descriptions': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'replacement_evidence_owner': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'replacement_evidence_rationale': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'relationship_updates': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'consumer_registrations': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'unregister_policy_subjects': {'title': None, 'description': 'Remove selected review-subject registrations and their source relationships while preserving normative Markdown.', 'has_default': False, 'default': None}}}, 'EvidenceReference': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'id': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'digest': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'provider_contract': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'provider_contract_version': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'EvidenceRelationshipUpdate': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'source_policy': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'consumer': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'relation': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'evidence_owner': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'rationale': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'EvidenceSuiteDescription': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'suite': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'description': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ExistsExpression': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'operator': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'fact': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'FactObservation': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'handle': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'requirement': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'value': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'evidence': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'authorization': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'provider': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'FactRequirement': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'handle': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'fact': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'fact_semantic_revision': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'fact_contract_digest': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'context': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'value_contract': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'answer_contract': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'evidence_contract': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'authorization_capability': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'FactRequirementId': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'FactRequirementWork': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'requirement': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'prompt': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'dependent_programs': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'FactSet': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'FactValue': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'FactValueContract': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'type': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'states': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'nullable': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'values': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'FindProposalsCall': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'after': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'limit': {'title': None, 'description': None, 'has_default': True, 'default': 50}}}, 'FindProposalsResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'proposals': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'continuation': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'FindSnapshotsCall': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'lifecycle': {'title': None, 'description': None, 'has_default': True, 'default': 'active'}, 'after': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'limit': {'title': None, 'description': None, 'has_default': True, 'default': 50}}}, 'FindSnapshotsResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'snapshots': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'continuation': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'FocusedQueryNextOperation': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'operation': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'request_kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'target': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'GeneralSelectionReason': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'source': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'fact': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'edge': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'question': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ImpactDispositionSubmission': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'obligation': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'result': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'rationale': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'evidence': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'fingerprint': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ImpactTraceId': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'ImpactTraceReference': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'id': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'graph': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'applicability': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'InExpression': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'operator': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'fact': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'values': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'InspectCall': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'handle': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'InspectNextOperation': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'operation': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'request_kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'handle': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'InspectableHandle': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'InspectionResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'MaintainEvidenceCall': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'expected_revision': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'evidence': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'plan': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'apply': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'MaintainEvidenceResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'applied': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'changed_files': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'removed_files': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'verification': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ModuleRelationshipKey': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'relation': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'source': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'target': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'MovePolicyUnitEdit': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'policy': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'standard': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'after_policy': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'semantics': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'NavigationIndexEntry': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'id': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'entrypoint': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'destinations': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'content': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'NavigationIndexesResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'authority': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'indexes': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'next_operations': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'NavigationRetarget': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'entrypoint': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'standard': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'NewPolicyUnit': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'id': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'heading_chain': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'semantic_revision': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'intent': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'aliases': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'predecessors': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'successors': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'NextOperation': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'NonEmptyString': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'NotExpression': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'operator': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'expression': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'Obligation': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'handle': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'target': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'scope': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'reasons': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'state': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'applicability': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'permitted_submissions': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'review_contract': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'fingerprint': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ObligationId': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'OperationalReadResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'authority': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'target': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'canonical_id': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'role': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'content': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'application_exposure': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'next_operations': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'PendingResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'handle': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'status': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'context': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'changes': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'changed_units': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'obligations': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'fact_requirements': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'reading_plan': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'next_operations': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'summary': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'PolicyCoverageStatus': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'subject': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'requirement_id': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'status': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'authority': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'PolicyImpactSelectionReason': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'source': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'edge': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'relation': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'evidence_owner': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'traces': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'PolicyInspectionResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'policy': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'declaration': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'representation_digest': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'structural_digest': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'provenance': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'PolicyRelationship': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'source_policy': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'consumer': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'relation': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'applicability': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'source_scope': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'consumer_scope': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'evidence_owner': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'rationale': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'PolicyRelationshipInspection': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'relationship_kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'applicability': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'source_scope': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'consumer_scope': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'propagation': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'evidence_owner': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'rationale': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'PolicyRelationshipKey': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'source_policy': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'consumer': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'relation': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'PolicyScopeUpdate': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'policy': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'heading_path': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'semantics': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'PolicySemanticIntent': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'PolicySummary': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'handle': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'authority': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'scope': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'PolicyUnitDeclaration': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'id': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'module': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'heading_path': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'semantic_revision': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'lifecycle': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'aliases': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'predecessors': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'successors': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'PolicyUnitMapping': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'state': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'reason': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'policy_units': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'PrepareCall': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'request': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'PreservePolicySemantics': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'semantic_revision': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'intent': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ProposalHandle': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'id': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'schema_version': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ProposalId': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'ProposalPolicySummary': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'id': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'authority': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'scope': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ProposalReadResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'revision': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'policy': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'content': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'requires': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'specializes': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'related': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'next_operations': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'summary': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'routing': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'coverage': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'application_exposure': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'provenance': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ProposalRelatedResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'revision': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'target': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'authoring_target': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'policy_unit_mapping': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'relationships': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'next_operations': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'summary': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ProposalRelationshipSummary': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'source': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'target': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'relation': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'groups': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'direction': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'traversal_eligible': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'applicability': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ProposalRevisionHandle': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'id': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'schema_version': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ProposalRevisionId': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'ProposalRouteResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'revision': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'reading_plan': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'unresolved_questions': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'next_operations': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'summary': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ProposalSummary': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'proposal': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'head_revision': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ProposeCall': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'change_set': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ProvenanceReadResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'authority': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'record': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'state': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'next_operations': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ProvenanceRecord': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'path': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ProvideFactSubmission': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'requirement': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'value': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'evidence': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ProviderReference': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'id': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'contract': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'contract_version': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'input_digest': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'PutDecisionProvenanceEdit': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'record': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'PutPolicyRelationshipEdit': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'relationship': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'PutRoutingFactEdit': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'fact': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'rationale': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'PutRoutingRuleEdit': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'rule': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'rationale': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'QuarantinedSnapshotSummary': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'lifecycle': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'source_revision': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'created_at': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'purge_deadline': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'QueryCall': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'request': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'QueryNextOperation': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'operation': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'request_kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'target': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'QueryProposalCall': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'revision': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'request': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'QueryProposalNextOperation': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'operation': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'request_kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'target': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'revision': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'QueryProposalResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'QueryRequest': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'QueryResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'Question': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'id': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'prompt': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'state': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'permitted_answers': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ReadCall': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'target': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'include_routing': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'include_coverage': {'title': None, 'description': 'Include current repository attestation status for registered policy units in this read scope.', 'has_default': False, 'default': None}, 'snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'detail': {'title': None, 'description': 'Compact preserves exact policy and essential authority; full includes all relationship rows.', 'has_default': False, 'default': None}}}, 'ReadCoverage': {'title': None, 'description': 'Repository attestation status bound to this snapshot or proposal. Empty subjects means no registered policy units in scope, not complete coverage. Analysis-local attestations are not repository certificates.', 'has_default': False, 'default': None, 'properties': {'subjects': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ReadManyCall': {'title': None, 'description': 'Read 1–32 selected items from one explicit snapshot, preserving order. The complete JSON result is limited to 2 MiB; any failed item rejects the entire request.', 'has_default': False, 'default': None, 'properties': {'snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'items': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ReadManyItem': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'target': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'include_routing': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'include_coverage': {'title': None, 'description': 'Include current repository attestation status for registered policy units in this read scope.', 'has_default': False, 'default': None}, 'detail': {'title': None, 'description': 'Compact preserves exact policy and essential authority; full includes all relationship rows.', 'has_default': False, 'default': None}}}, 'ReadManyResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'items': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ReadRequest': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'target': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'include_routing': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'include_coverage': {'title': None, 'description': 'Include current repository attestation status for registered policy units in this read scope.', 'has_default': False, 'default': None}}}, 'ReadResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'policy': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'content': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'requires': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'specializes': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'related': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'next_operations': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'summary': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'routing': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'coverage': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'application_exposure': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'provenance': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ReadinessHandle': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'id': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'schema_version': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ReadinessId': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'ReadingPlanEntry': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'target': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'scope': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'authority': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'reasons': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'state': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ReadingPlanReason': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'RecoverApplicationCall': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'readiness': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'RecoverApplicationResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'application': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'status': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'RecoverCall': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'context': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'RejectedResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'code': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'outcome': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'target': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'message': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'details': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'next_operations': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'RelatedCall': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'target': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'groups': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'direction': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'transitive': {'title': None, 'description': None, 'has_default': True, 'default': False}, 'snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'RelatedRequest': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'target': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'groups': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'direction': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'transitive': {'title': None, 'description': None, 'has_default': True, 'default': False}}}, 'RelatedResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'target': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'authoring_target': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'policy_unit_mapping': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'relationships': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'next_operations': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'summary': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'RelationshipConsumer': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'RelationshipDisposition': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'relationship': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'disposition': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'replacement_consumer': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'rationale': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'evidence': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'RelationshipInspectionResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'relationship': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'policy_semantics': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'provenance': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'RelationshipKey': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'RelationshipSummary': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'handle': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'source': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'target': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'relation': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'groups': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'direction': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'traversal_eligible': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'applicability': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'RemovePolicyRelationshipEdit': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'relationship': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'RemoveRoutingFactEdit': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'fact': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'rationale': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'RemoveRoutingRuleEdit': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'rule': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'rationale': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ReplaceStandardRelationshipsEdit': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'standard': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'requires': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'specializes': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'rationale': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'RepositoryPath': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'RequiresReadingReason': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'edge': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'source': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ResolveCall': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'analysis': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'submission': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ResolveNextOperation': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'operation': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'request_kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'target': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'work': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'analysis': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ResolveWorkflowCall': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'context': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'submission': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ResumeCall': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'context': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'RetireDecisionProvenanceEdit': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'id': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'RetirePolicyUnitEdit': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'policy': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'retired_semantic_revision': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'successors': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'relationship_dispositions': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'evidence': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'RetireStandardEdit': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'standard': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'successors': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'relationship_dispositions': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'evidence': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ReviewCall': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'context': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'decisions': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ReviewDecision': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'owner': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'decision': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'rationale': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'evidence': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ReviewProposalCall': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'analysis': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'decisions': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'prior_readiness': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ReviewProposalResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'readiness': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'revision': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'status': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ReviewScope': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'ReviseCall': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'context': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'change_set': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ReviseOperationalArtifactEdit': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'target': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'title': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'body': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'RevisePolicyUnitEdit': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'policy': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'title': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'body': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'semantics': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ReviseProposalCall': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'expected_revision': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'change_set': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ReviseProposalResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'proposal': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'revision': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ReviseStandardEdit': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'standard': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'scope_updates': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'RewriteNavigationIndexEdit': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'entrypoint': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'destinations': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'rationale': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'retargets': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'RouteCall': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'facts': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'RouteRequest': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'facts': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'RouteResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'reading_plan': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'unresolved_questions': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'next_operations': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'summary': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'RoutingBaseReadingReason': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'projection': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'RoutingConfiguration': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'facts': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'rules': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'RoutingFactsCall': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'RoutingFactsResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'facts': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'RoutingQuestion': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'id': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'prompt': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'state': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'fact': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'RoutingRuleExplanation': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'id': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'target': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'when': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'state': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'RoutingRuleReadingReason': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'rule': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'facts': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ScalarValue': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'SelectionReason': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'SemanticProposal': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'policy': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'accepted_semantic_revision': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'proposed_semantic_revision': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'intent': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'structural_digest': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'SnapshotChildHandle': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'child_kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'child_id': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'schema_version': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'SnapshotHandle': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'id': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'schema_version': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'SnapshotId': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'SnapshotInspectionResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'SnapshotSummary': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'SpecializesReadingReason': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'edge': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'source': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'StandardContent': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'id': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'title': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'role': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'level': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'applies_when': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'does_not_apply_when': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'verification': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'body': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'StandardEdit': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'StandardsChangePurpose': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'summary': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'rationale': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'evidence': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'StandardsChangeSet': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'purpose': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'edits': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'StructuredScope': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'heading_path': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'Submission': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'Timestamp': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'UndeleteSnapshotCall': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'UndeleteSnapshotResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'VerificationFailure': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'code': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'message': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'suite': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'check': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'VerificationReport': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'passed': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'exit_code': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'suites': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'checks': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'failures': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'VerifyProposalCall': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'revision': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'readiness': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'VerifyProposalResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'revision': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'verification': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'readiness': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'VerifyRepositoryCall': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'refresh_verification_inputs': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'VerifyRepositoryResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'refreshed_verification_inputs': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'verification': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'WholeArtifactScope': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'WithdrawApplicationContentEdit': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'target': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'WorkflowContext': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'WorkflowContinuation': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'operation': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'context': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'required_inputs': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'WorkflowOutcome': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'WorkflowResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'context': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'proposal': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'revision': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'status': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'next_operations': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'outcome': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'WorkflowStatusCall': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'context': {'title': None, 'description': None, 'has_default': False, 'default': None}}}}) @dataclass(frozen=True, slots=True) class ActiveSnapshotSummary: @@ -611,6 +611,82 @@ def from_value(cls, value: object) -> ApplicationReadCall: def as_contract(self) -> dict[str, object]: return model_as_contract(self) +@dataclass(frozen=True, slots=True) +class ApplicationReadManyCall: + 'Read 1–32 selected items from one explicit snapshot, preserving order. The complete JSON result is limited to 2 MiB; any failed item rejects the entire request.' + __definition__: ClassVar[str] = 'ApplicationReadManyCall' + __contract_fields__: ClassVar = MappingProxyType({ + 'snapshot': 'snapshot', + 'items': 'items', + }) + snapshot: SnapshotHandle + items: tuple[ApplicationReadManyItem, ...] + + def __post_init__(self) -> None: + _RUNTIME.normalize_model(self) + + @classmethod + def from_value(cls, value: object) -> ApplicationReadManyCall: + selected = _RUNTIME.decode(cls.__definition__, value) + if not isinstance(selected, cls): + raise TypeError('decoded value has the wrong generated type') + return selected + + def as_contract(self) -> dict[str, object]: + return model_as_contract(self) + +@dataclass(frozen=True, slots=True) +class ApplicationReadManyItem: + '' + __definition__: ClassVar[str] = 'ApplicationReadManyItem' + __contract_fields__: ClassVar = MappingProxyType({ + 'target': 'target', + 'detail': 'detail', + }) + target: CanonicalId + detail: Literal['compact', 'full'] | MissingValue = MISSING + + def __post_init__(self) -> None: + _RUNTIME.normalize_model(self) + + @classmethod + def from_value(cls, value: object) -> ApplicationReadManyItem: + selected = _RUNTIME.decode(cls.__definition__, value) + if not isinstance(selected, cls): + raise TypeError('decoded value has the wrong generated type') + return selected + + def as_contract(self) -> dict[str, object]: + return model_as_contract(self) + +@dataclass(frozen=True, slots=True) +class ApplicationReadManyResult: + '' + __definition__: ClassVar[str] = 'ApplicationReadManyResult' + __contract_fields__: ClassVar = MappingProxyType({ + 'kind': 'kind', + 'snapshot': 'snapshot', + 'items': 'items', + 'purpose': 'purpose', + }) + kind: Literal['application-read-many-result'] + snapshot: SnapshotHandle + items: tuple[ApplicationReadResult, ...] + purpose: Literal['application'] + + def __post_init__(self) -> None: + _RUNTIME.normalize_model(self) + + @classmethod + def from_value(cls, value: object) -> ApplicationReadManyResult: + selected = _RUNTIME.decode(cls.__definition__, value) + if not isinstance(selected, cls): + raise TypeError('decoded value has the wrong generated type') + return selected + + def as_contract(self) -> dict[str, object]: + return model_as_contract(self) + @dataclass(frozen=True, slots=True) class ApplicationReadRequest: '' @@ -751,7 +827,7 @@ class ApplicationRejectedResult: }) kind: Literal['application-rejected-result'] purpose: Literal['application'] - code: Literal['APPLICATION.CONTENT_UNAVAILABLE', 'APPLICATION.INPUT_INVALID', 'APPLICATION.OPERATION_UNAVAILABLE', 'APPLICATION.INTERNAL_UNAVAILABLE', 'APPLICATION.UNSUPPORTED_CAPTURE'] + code: Literal['APPLICATION.CONTENT_UNAVAILABLE', 'APPLICATION.INPUT_INVALID', 'APPLICATION.OPERATION_UNAVAILABLE', 'APPLICATION.INTERNAL_UNAVAILABLE', 'APPLICATION.UNSUPPORTED_CAPTURE', 'APPLICATION.RESULT_LIMIT'] outcome: Literal['invalid', 'unsupported', 'unavailable'] message: str next_operations: tuple[ApplicationNextOperation, ...] @@ -4215,6 +4291,84 @@ def from_value(cls, value: object) -> ReadCoverage: def as_contract(self) -> dict[str, object]: return model_as_contract(self) +@dataclass(frozen=True, slots=True) +class ReadManyCall: + 'Read 1–32 selected items from one explicit snapshot, preserving order. The complete JSON result is limited to 2 MiB; any failed item rejects the entire request.' + __definition__: ClassVar[str] = 'ReadManyCall' + __contract_fields__: ClassVar = MappingProxyType({ + 'snapshot': 'snapshot', + 'items': 'items', + }) + snapshot: SnapshotHandle + items: tuple[ReadManyItem, ...] + + def __post_init__(self) -> None: + _RUNTIME.normalize_model(self) + + @classmethod + def from_value(cls, value: object) -> ReadManyCall: + selected = _RUNTIME.decode(cls.__definition__, value) + if not isinstance(selected, cls): + raise TypeError('decoded value has the wrong generated type') + return selected + + def as_contract(self) -> dict[str, object]: + return model_as_contract(self) + +@dataclass(frozen=True, slots=True) +class ReadManyItem: + '' + __definition__: ClassVar[str] = 'ReadManyItem' + __contract_fields__: ClassVar = MappingProxyType({ + 'target': 'target', + 'include_routing': 'include_routing', + 'include_coverage': 'include_coverage', + 'detail': 'detail', + }) + target: CanonicalId + include_routing: bool | MissingValue = MISSING + include_coverage: bool | MissingValue = MISSING + detail: Literal['compact', 'full'] | MissingValue = MISSING + + def __post_init__(self) -> None: + _RUNTIME.normalize_model(self) + + @classmethod + def from_value(cls, value: object) -> ReadManyItem: + selected = _RUNTIME.decode(cls.__definition__, value) + if not isinstance(selected, cls): + raise TypeError('decoded value has the wrong generated type') + return selected + + def as_contract(self) -> dict[str, object]: + return model_as_contract(self) + +@dataclass(frozen=True, slots=True) +class ReadManyResult: + '' + __definition__: ClassVar[str] = 'ReadManyResult' + __contract_fields__: ClassVar = MappingProxyType({ + 'kind': 'kind', + 'snapshot': 'snapshot', + 'items': 'items', + }) + kind: Literal['read-many-result'] + snapshot: SnapshotHandle + items: tuple[CompactReadResult | ReadResult | NavigationIndexesResult | ProvenanceReadResult | OperationalReadResult, ...] + + def __post_init__(self) -> None: + _RUNTIME.normalize_model(self) + + @classmethod + def from_value(cls, value: object) -> ReadManyResult: + selected = _RUNTIME.decode(cls.__definition__, value) + if not isinstance(selected, cls): + raise TypeError('decoded value has the wrong generated type') + return selected + + def as_contract(self) -> dict[str, object]: + return model_as_contract(self) + @dataclass(frozen=True, slots=True) class ReadRequest: '' @@ -6167,6 +6321,9 @@ def as_contract(self) -> dict[str, object]: 'ApplicationQueryCall': ApplicationQueryCall, 'ApplicationQuestion': ApplicationQuestion, 'ApplicationReadCall': ApplicationReadCall, + 'ApplicationReadManyCall': ApplicationReadManyCall, + 'ApplicationReadManyItem': ApplicationReadManyItem, + 'ApplicationReadManyResult': ApplicationReadManyResult, 'ApplicationReadRequest': ApplicationReadRequest, 'ApplicationReadResult': ApplicationReadResult, 'ApplicationReadingEntry': ApplicationReadingEntry, @@ -6288,6 +6445,9 @@ def as_contract(self) -> dict[str, object]: 'Question': Question, 'ReadCall': ReadCall, 'ReadCoverage': ReadCoverage, + 'ReadManyCall': ReadManyCall, + 'ReadManyItem': ReadManyItem, + 'ReadManyResult': ReadManyResult, 'ReadRequest': ReadRequest, 'ReadResult': ReadResult, 'ReadinessHandle': ReadinessHandle, @@ -6393,6 +6553,9 @@ def decode_contract(definition: str, value: object) -> object: 'ApplicationQueryRequest', 'ApplicationQuestion', 'ApplicationReadCall', + 'ApplicationReadManyCall', + 'ApplicationReadManyItem', + 'ApplicationReadManyResult', 'ApplicationReadRequest', 'ApplicationReadResult', 'ApplicationReadingEntry', @@ -6534,6 +6697,9 @@ def decode_contract(definition: str, value: object) -> object: 'Question', 'ReadCall', 'ReadCoverage', + 'ReadManyCall', + 'ReadManyItem', + 'ReadManyResult', 'ReadRequest', 'ReadResult', 'ReadinessHandle', diff --git a/tools/standards_engine/standards_engine/agent_navigation.py b/tools/standards_engine/standards_engine/agent_navigation.py index 8fd70759..c1b8f9c5 100644 --- a/tools/standards_engine/standards_engine/agent_navigation.py +++ b/tools/standards_engine/standards_engine/agent_navigation.py @@ -2,9 +2,15 @@ from __future__ import annotations +import json + from . import _generated_contract as contract +# This is a serialized result bound, not a total interpreter-memory promise. +READ_MANY_RESULT_BYTES = 2 * 1024 * 1024 + + def focused_continuations(value): """Project native query hints onto the corresponding focused operations.""" return { @@ -57,6 +63,11 @@ def navigate(engine, operation: str, call): } ) ) + return present_read(result, detail) + + +def present_read(result, detail): + """One single-item presentation for independent and grouped reads.""" value = focused_continuations(result.as_contract()) if isinstance(result, contract.ReadResult) and detail == "compact": del value["related"] @@ -65,6 +76,55 @@ def navigate(engine, operation: str, call): return type(result).from_value(value) +def read_many(engine, call, compiled, *, application_view=None): + """Read a bounded requested set from one already-verified immutable input. + + Lifecycle observations remain current throughout the operation. Results stay + private until the complete ordered set and final lifecycle check succeed. + The existing domain projection owns each item's content and purpose. + """ + snapshot_id = engine._snapshot_id(call.snapshot) + application = application_view is not None + value = { + "kind": "application-read-many-result" if application else "read-many-result", + "snapshot": call.snapshot.as_contract(), + "items": [], + } + if application: + value["purpose"] = "application" + # Default JSON separators/escaping match the current MCP text encoding. The + # fixed envelope's empty array is replaced by these item encodings. + size = len(json.dumps(value).encode("utf-8")) + for item in call.items: + engine._snapshots.snapshot(snapshot_id) + arguments = item.as_contract() + detail = arguments.pop("detail", "compact") + if application: + result = application_view.read(arguments["target"], detail) + else: + result = engine._read( + call.snapshot, compiled, + contract.ReadRequest.from_value({"kind": "read", **arguments}), + ) + if isinstance(result, contract.RejectedResult): + return result + result = present_read(result, detail) + output = result.as_contract() + size += len(json.dumps(output).encode("utf-8")) + (2 if value["items"] else 0) + if size > READ_MANY_RESULT_BYTES: + if application: + from .context_projection import application_rejection + return application_rejection("APPLICATION.RESULT_LIMIT", "unsupported") + return engine._reject( + "READ_MANY.RESULT_LIMIT", "unsupported", + "Select fewer items or narrower policy scopes; the complete JSON result is limited to 2 MiB.", + ) + value["items"].append(output) + engine._snapshots.snapshot(snapshot_id) + model = contract.ApplicationReadManyResult if application else contract.ReadManyResult + return model.from_value(value) + + def fact_definitions(router): fields = ( "id", diff --git a/tools/standards_engine/standards_engine/context_projection.py b/tools/standards_engine/standards_engine/context_projection.py index d2c5d234..395f0acd 100644 --- a/tools/standards_engine/standards_engine/context_projection.py +++ b/tools/standards_engine/standards_engine/context_projection.py @@ -26,6 +26,7 @@ class Purpose(str, Enum): APPLICATION_CALLS = { "route": c.RouteCall, "read": c.ApplicationReadCall, + "read_many": c.ApplicationReadManyCall, "related": c.RelatedCall, "routing_facts": c.RoutingFactsCall, "query": c.ApplicationQueryCall, @@ -36,6 +37,7 @@ class Purpose(str, Enum): def application_rejection(code: str = "APPLICATION.CONTENT_UNAVAILABLE", outcome: str = "unavailable"): messages = { "APPLICATION.CONTENT_UNAVAILABLE": "The requested guidance is awaiting application publication.", + "APPLICATION.RESULT_LIMIT": "Select fewer items or narrower policy scopes within the 2 MiB reading limit.", "APPLICATION.INPUT_INVALID": "Supply arguments from this interface's published contract.", "APPLICATION.OPERATION_UNAVAILABLE": "This interface provides application navigation operations.", "APPLICATION.INTERNAL_UNAVAILABLE": "The requested application observation could not be established.", @@ -247,6 +249,9 @@ def application_dispatch(engine: StandardsEngine, operation: str, call): values = checked.request.as_contract() operation = values.pop("kind") checked = checked.request + if operation == "read_many": + from .agent_navigation import read_many + return read_many(engine, checked, compiled, application_view=view) if operation == "read": return view.read(values["target"], values.get("detail", "compact")) if operation == "related": diff --git a/tools/standards_engine/standards_engine/engine.py b/tools/standards_engine/standards_engine/engine.py index 806a8e4f..de80f333 100644 --- a/tools/standards_engine/standards_engine/engine.py +++ b/tools/standards_engine/standards_engine/engine.py @@ -125,6 +125,8 @@ RoutingFactsResult, AgentRouteResult, ReadCall, + ReadManyCall, + ReadManyResult, RelatedCall, CompactReadResult, AnalyzeProposalCall, @@ -1024,6 +1026,17 @@ def read(self, call: ReadCall) -> ReadResult | CompactReadResult | RejectedResul return navigate(self, "read", call) + @public_operation + def read_many(self, call: ReadManyCall) -> ReadManyResult | RejectedResult: + """One verified snapshot supplies the complete bounded reading set.""" + from .agent_navigation import read_many + + try: + compiled = self._compiled_snapshot(self._snapshot_id(call.snapshot)) + return read_many(self, call, compiled) + except self._domain_errors() as error: + return self._domain_rejection(error) + @public_operation def related(self, call: RelatedCall) -> RelatedResult | RejectedResult: from .agent_navigation import navigate diff --git a/tools/standards_engine/standards_engine/mcp.py b/tools/standards_engine/standards_engine/mcp.py index afab5b21..90df4007 100644 --- a/tools/standards_engine/standards_engine/mcp.py +++ b/tools/standards_engine/standards_engine/mcp.py @@ -25,6 +25,7 @@ PROTOCOL_VERSION = "2025-11-25" READ_ONLY_OPERATIONS = frozenset( { + "read_many", "workflow_status", "resume", "find_snapshots", @@ -38,6 +39,7 @@ { "route", "read", + "read_many", "related", "routing_facts", "inspect", @@ -59,6 +61,7 @@ # type renderer. This is generated documentation, never a second validator. INPUT_CONTRACT_DESCRIPTIONS = frozenset({"propose", "revise", "resolve_workflow"}) DESCRIPTIONS = { + "read_many": "Read 1–32 selected items from one explicit snapshot in request order. Each item accepts the single-read options. The complete JSON result is limited to 2 MiB; a failed item rejects the whole request. Use the snapshot returned by route or read.", "propose": "Create a proposal from explicit change intent and immediately analyze it. Reuse returned context. Omit snapshot to capture accepted authority. Stops at missing evidence or decisions; never reviews or applies automatically.", "revise": "Revise the exact proposal referenced by context and analyze the new revision. Supply an atomic change set. Stale contexts cannot select a newer head implicitly.", "analyze": "Analyze the exact draft context and return pending requirements or complete analysis with a new context.", @@ -95,6 +98,7 @@ APPLICATION_DESCRIPTIONS = { + "read_many": "Read 1–32 selected reviewed items from one explicit snapshot in order. Each item supplies target and optional detail. The complete JSON result is limited to 2 MiB; an unavailable item rejects the whole request.", "route": "Select applicable guidance from registered facts and a complete qualified dependency closure. Reuse the returned snapshot.", "read": "Read a reviewed standard, example, or operational aid by identity. Full detail adds permitted relationships.", "related": "Discover selected relationships among qualified guidance and examples in one snapshot.", diff --git a/tools/standards_engine/standards_engine/rendering.py b/tools/standards_engine/standards_engine/rendering.py index 485234f4..84897da4 100644 --- a/tools/standards_engine/standards_engine/rendering.py +++ b/tools/standards_engine/standards_engine/rendering.py @@ -1,5 +1,6 @@ from __future__ import annotations +import json from typing import Callable, Mapping, Protocol @@ -11,11 +12,11 @@ def render_text(value: ContractValue | Mapping[str, object]) -> str: """Render a deterministic human projection of one typed engine result.""" contract = value.as_contract() if hasattr(value, "as_contract") else dict(value) kind = str(contract.get("kind", "unknown")) + if kind in {"read-many-result", "application-read-many-result"}: + return json.dumps(contract) + "\n" if contract.get("purpose") == "application": - import json return json.dumps(contract, ensure_ascii=False, indent=2) + "\n" if kind in {"provenance-read-result", "operational-read-result"}: - import json return json.dumps(contract, ensure_ascii=False, indent=2) + "\n" if kind == "fact-observation": return _observation(contract) diff --git a/tools/standards_engine/standards_engine/tools.py b/tools/standards_engine/standards_engine/tools.py index 4bbe3861..92a11082 100644 --- a/tools/standards_engine/standards_engine/tools.py +++ b/tools/standards_engine/standards_engine/tools.py @@ -360,6 +360,12 @@ def read(self, arguments: object) -> dict[str, object]: return call return self._result("read", self._engine.read(call)) + def read_many(self, arguments: object) -> dict[str, object]: + call = self._call_or_rejection("read_many", arguments, generated_contract.ReadManyCall) + if isinstance(call, dict): + return call + return self._result("read_many", self._engine.read_many(call)) + def related(self, arguments: object) -> dict[str, object]: call = self._call_or_rejection("related", arguments, generated_contract.RelatedCall) if isinstance(call, dict): diff --git a/tools/standards_engine/tests/codex_navigation_client.py b/tools/standards_engine/tests/codex_navigation_client.py index 641f2cad..d1d3a807 100644 --- a/tools/standards_engine/tests/codex_navigation_client.py +++ b/tools/standards_engine/tests/codex_navigation_client.py @@ -133,6 +133,13 @@ async def call(name, arguments): assert read["kind"] == "compact-read-result", read assert read["snapshot"] == routed["snapshot"] assert all(i["operation"] in toolmap for i in read["next_operations"]) + grouped = await call("read_many", { + "snapshot": routed["snapshot"], + "items": [{"target": op["target"]}, {"target": op["target"], "detail": "full"}], + }) + assert grouped["kind"] == "read-many-result", grouped + assert grouped["items"][0] == read + assert all(item["snapshot"] == routed["snapshot"] for item in grouped["items"]) print( "Codex route -> read: available continuations, same snapshot, exact content returned", flush=True, diff --git a/tools/standards_engine/tests/mcp_workflow_client.py b/tools/standards_engine/tests/mcp_workflow_client.py index db3e4215..bb4b52ce 100644 --- a/tools/standards_engine/tests/mcp_workflow_client.py +++ b/tools/standards_engine/tests/mcp_workflow_client.py @@ -266,12 +266,20 @@ async def call(client, name, arguments, *, error=False): await client.initialize() application_catalog = await client.list_tools() application_names = {tool.name for tool in application_catalog.tools} - assert {"route", "read", "related", "routing_facts", "inspect"} <= application_names - assert application_names <= {"route", "read", "related", "routing_facts", "inspect", "query"} + assert {"route", "read", "read_many", "related", "routing_facts", "inspect"} <= application_names + assert application_names <= {"route", "read", "read_many", "related", "routing_facts", "inspect", "query"} visible = await call(client, "read", {"target": selected, "detail": "full"}) assert visible["kind"] == "application-read-result", visible assert "This is an isolated workflow test reference." in visible["content"] assert "AUTHORING_SDK_MARKER_843015" not in json.dumps(visible) + grouped = await call(client, "read_many", { + "snapshot": visible["snapshot"], + "items": [{"target": selected, "detail": "full"}, {"target": selected}], + }) + assert grouped["kind"] == "application-read-many-result", grouped + assert grouped["items"][0] == visible + assert all(item["snapshot"] == visible["snapshot"] for item in grouped["items"]) + assert "AUTHORING_SDK_MARKER_843015" not in json.dumps(grouped) hidden = await call(client, "read", {"target": "provenance.purpose-client"}, error=True) assert hidden["code"] == "APPLICATION.CONTENT_UNAVAILABLE", hidden diff --git a/tools/standards_engine/tests/test_purpose_projection.py b/tools/standards_engine/tests/test_purpose_projection.py index 2ef2eb62..a4e364e1 100644 --- a/tools/standards_engine/tests/test_purpose_projection.py +++ b/tools/standards_engine/tests/test_purpose_projection.py @@ -209,7 +209,7 @@ def test_catalog_has_no_authoring_schema_closure(self): for advanced in (False, True): catalog = tool_catalog(ROOT, purpose="application", advanced=advanced) names = {tool["name"] for tool in catalog} - self.assertLessEqual(names, {"route", "read", "related", "routing_facts", "query", "inspect"}) + self.assertLessEqual(names, {"route", "read", "read_many", "related", "routing_facts", "query", "inspect"}) serialized = json.dumps(catalog) for hidden in ("rationale", "ChangePurpose", "DecisionProvenanceRecord", "ProposalRevisionHandle"): self.assertNotIn(hidden, serialized) diff --git a/tools/standards_engine/tests/test_purpose_transport.py b/tools/standards_engine/tests/test_purpose_transport.py index ac66e6f4..c5cca5ed 100644 --- a/tools/standards_engine/tests/test_purpose_transport.py +++ b/tools/standards_engine/tests/test_purpose_transport.py @@ -75,7 +75,7 @@ def test_two_cold_processes_preserve_exact_application_read(self): def test_cli_catalog_schema_example_and_denial_share_the_purpose(self): listing = self.cli("application", "--list") self.assertEqual(listing.returncode, 0, listing.stderr) - self.assertEqual(set(listing.stdout.splitlines()), {"route", "read", "related", "routing_facts", "query", "inspect"}) + self.assertEqual(set(listing.stdout.splitlines()), {"route", "read", "read_many", "related", "routing_facts", "query", "inspect"}) for option in ("--schema", "--example"): result = self.cli("application", option, "read") self.assertEqual(result.returncode, 0, result.stderr) @@ -106,7 +106,7 @@ def request(identifier, method, params): self.assertEqual(process.stderr, "") self.assertNotIn(PRIVATE, process.stdout) values = {value["id"]: value for value in map(json.loads, process.stdout.splitlines())} - self.assertEqual({tool["name"] for tool in values[2]["result"]["tools"]}, {"route", "read", "related", "routing_facts", "query", "inspect"}) + self.assertEqual({tool["name"] for tool in values[2]["result"]["tools"]}, {"route", "read", "read_many", "related", "routing_facts", "query", "inspect"}) allowed = values[3]["result"] self.assertFalse(allowed["isError"]) self.assertEqual(allowed["structuredContent"]["content"], self.expected) diff --git a/tools/standards_engine/tests/test_read_many.py b/tools/standards_engine/tests/test_read_many.py new file mode 100644 index 00000000..c9b10628 --- /dev/null +++ b/tools/standards_engine/tests/test_read_many.py @@ -0,0 +1,222 @@ +"""Grouped reads through the actual purpose projection, SQLite and transports.""" +from __future__ import annotations + +from contextlib import closing +from copy import deepcopy +import hashlib +import json +import os +from pathlib import Path +import shutil +import sqlite3 +import subprocess +import sys +import tempfile +import unittest +from unittest.mock import patch + +from tools.standards_engine.standards_engine import AgentToolFacade, StandardsEngine, render_text +from tools.standards_engine.standards_engine import _generated_contract as c +from tools.standards_engine.standards_engine import agent_navigation +from tools.standards_engine.standards_engine.context_projection import ApplicationView +from tools.standards_engine.standards_engine.compiled_cache import CompiledSnapshotCache +from tools.standards_engine.standards_engine.mcp import tool_catalog +from tools.standards_engine.tests import test_purpose_projection as fixture +from tools.standards_snapshots.standards_snapshots import CapturedContent, SnapshotFile, SnapshotId, SnapshotPath + +ROOT = Path(__file__).resolve().parents[3] + + +class ReadManyTest(unittest.TestCase): + @classmethod + def setUpClass(cls): + fixture.PurposeProjectionTest.setUpClass() + cls.files = fixture.PurposeProjectionTest.files + cls.reference = fixture.PurposeProjectionTest.reference + cls.interface = AgentToolFacade.load_interface(ROOT) + + @classmethod + def tearDownClass(cls): + fixture.PurposeProjectionTest.tearDownClass() + + def setUp(self): + self.temp = tempfile.TemporaryDirectory(prefix="read-many-") + self.addCleanup(self.temp.cleanup) + self.root = Path(self.temp.name) + for relative in ("a1-contract.schema.json", "a1-interface.toml", "generated/agent-tools.json", "examples/a1-examples.json"): + path = Path("tools/standards_engine/contracts") / relative + destination = self.root / path + destination.parent.mkdir(parents=True, exist_ok=True) + shutil.copyfile(ROOT / path, destination) + self.store = self.root / ".standards-engine/snapshots-v1.sqlite3" + self.cache = CompiledSnapshotCache(self.root, "application") + self.addCleanup(self.cache.close) + self.app_engine = StandardsEngine.open_repository(self.root, purpose="application", compiled_cache=self.cache) + self.addCleanup(self.app_engine.close) + capture = CapturedContent("read-many-fixture", ( + SnapshotFile(SnapshotPath.parse(path), data) for path, data in self.files.items() + )) + created = self.app_engine._snapshots.create_snapshot(capture) + self.snapshot = self.app_engine._snapshot_handle(created.snapshot) + self.app = AgentToolFacade(self.app_engine, self.interface) + self.author_engine = StandardsEngine.open_repository(self.root, purpose="authoring") + self.addCleanup(self.author_engine.close) + self.author = AgentToolFacade(self.author_engine, self.interface) + + def call(self, facade=None, items=None, **extra): + return (facade or self.app).read_many({"snapshot": self.snapshot, + "items": items if items is not None else [{"target": "core"}, {"target": "router", "detail": "full"}], **extra}) + + def test_application_results_equal_independent_reads_with_one_durable_load(self): + items = [{"target": "core"}, {"target": self.reference, "detail": "full"}, {"target": "router"}] + expected = [self.app.read({"snapshot": self.snapshot, **item}) for item in items] + with patch.object(self.app_engine._snapshots, "load_content", wraps=self.app_engine._snapshots.load_content) as load: + result = self.call(items=items) + self.assertEqual(result["kind"], "application-read-many-result", result) + self.assertEqual(result["items"], expected) + self.assertEqual(result["snapshot"], self.snapshot) + self.assertEqual(load.call_count, 1) + self.assertNotIn(fixture.PRIVATE, json.dumps(result)) + result["items"][0]["content"] = "caller mutation" + self.assertEqual(self.call(items=items)["items"], expected) + + def test_authoring_preserves_all_single_read_result_variants(self): + items = [{"target": "core"}, {"target": "core", "detail": "full", "include_coverage": True}, + {"target": "router", "include_routing": True}, {"target": "provenance.fixture"}, + {"target": "prompts/planning.md"}, {"target": "navigation-indexes"}] + expected = [self.author.read({"snapshot": self.snapshot, **item}) for item in items] + with patch.object(self.author_engine._snapshots, "load_content", wraps=self.author_engine._snapshots.load_content) as load: + result = self.call(self.author, items) + self.assertEqual(result["kind"], "read-many-result", result) + self.assertEqual(result["items"], expected) + self.assertEqual(load.call_count, 1) + self.assertEqual(result["items"][3]["record"]["rationale"], fixture.PRIVATE) + self.assertEqual(json.loads(render_text(result)), result) + + def test_empty_duplicate_oversized_missing_snapshot_and_privileged_requests_reject_before_load(self): + for value in [ + {"snapshot": self.snapshot, "items": []}, + {"snapshot": self.snapshot, "items": [{"target": "core"}] * 2}, + {"snapshot": self.snapshot, "items": [{"target": f"fixture.{i}"} for i in range(33)]}, + {"items": [{"target": "core"}]}, + {"snapshot": self.snapshot, "items": [{"target": "core", "purpose": "authoring"}]}, + {"snapshot": self.snapshot, "items": [{"target": "core", "include_coverage": True}]}, + {"snapshot": self.snapshot, "items": [{"target": "core", "snapshot": self.snapshot}]}, + ]: + with self.subTest(value=value), patch.object(self.app_engine, "_compiled_snapshot", side_effect=AssertionError("unexpected load")): + result = self.app.read_many(value) + self.assertEqual(result["code"], "APPLICATION.INPUT_INVALID", result) + self.assertNotIn("items", result) + + def test_unknown_or_private_item_rejects_whole_set_without_partial_data(self): + for target in ("does.not.exist", "provenance.fixture"): + result = self.call(items=[{"target": "core"}, {"target": target}]) + self.assertEqual(result["code"], "APPLICATION.CONTENT_UNAVAILABLE", result) + self.assertNotIn(fixture.PUBLIC, json.dumps(result)) + self.assertNotIn(fixture.PRIVATE, json.dumps(result)) + self.assertNotIn("items", result) + result = self.call(self.author, [{"target": "core"}, {"target": "does.not.exist"}]) + self.assertEqual(result["kind"], "rejected-result", result) + self.assertNotIn("items", result) + + def test_native_application_dispatch_cannot_admit_authoring_items(self): + call = c.ReadManyCall.from_value({"snapshot": self.snapshot, "items": [{"target": "core", "include_routing": True}]}) + result = self.app_engine.read_many(call).as_contract() + self.assertEqual(result["code"], "APPLICATION.INPUT_INVALID", result) + + def test_exact_serialized_budget_in_both_purposes(self): + for facade in (self.app, self.author): + expected = self.call(facade) + size = len(json.dumps(expected).encode("utf-8")) + with patch.object(agent_navigation, "READ_MANY_RESULT_BYTES", size): + self.assertEqual(self.call(facade), expected) + with patch.object(agent_navigation, "READ_MANY_RESULT_BYTES", size - 1): + rejected = self.call(facade) + self.assertIn(rejected["code"], {"READ_MANY.RESULT_LIMIT", "APPLICATION.RESULT_LIMIT"}) + self.assertNotIn("items", rejected) + + def test_lifecycle_change_between_items_and_after_last_item_rejects(self): + for at in (1, 2): + snapshot_id = SnapshotId(self.snapshot["id"]) + original = ApplicationView.read + count = 0 + def read(view, *args, **kwargs): + nonlocal count + value = original(view, *args, **kwargs) + count += 1 + if count == at: + self.app_engine._snapshots.delete_snapshot(snapshot_id) + return value + with patch.object(ApplicationView, "read", read): + result = self.call() + self.assertEqual(result["kind"], "application-rejected-result", result) + self.assertNotIn("items", result) + self.app_engine._snapshots.undelete_snapshot(snapshot_id) + + def test_each_new_operation_rechecks_integrity_even_with_warm_cache(self): + self.call() + with closing(sqlite3.connect(self.store)) as connection, connection: + sql = connection.execute("SELECT sql FROM sqlite_schema WHERE name='content_files_no_update'").fetchone()[0] + connection.execute("DROP TRIGGER content_files_no_update") + data = b"corrupt" + connection.execute("UPDATE content_files SET raw_bytes=?,byte_length=?,sha256=? WHERE logical_path=?", + (data, len(data), hashlib.sha256(data).hexdigest(), "CORE-STANDARDS.md")) + connection.execute(sql) + result = self.call() + self.assertEqual(result["kind"], "application-rejected-result", result) + self.assertNotIn("items", result) + self.assertEqual(self.cache.statistics["hits"], 0) + + def test_explicit_snapshot_never_captures_main_and_survives_reopening(self): + with patch.object(self.app_engine, "_capture_snapshot", side_effect=AssertionError("unexpected capture")): + expected = self.call() + with StandardsEngine.open_repository(self.root, purpose="application") as engine: + reopened = AgentToolFacade(engine, self.interface) + self.assertEqual(self.call(reopened), expected) + + def test_32_item_boundary_and_order(self): + # The authoring corpus owns enough actual identities to exercise the cap. + compiled = self.author_engine._compiled_snapshot(SnapshotId(self.snapshot["id"])) + items = [{"target": module.module_id} for module in compiled.corpus.modules[:32]] + result = self.call(self.author, items) + self.assertEqual(result["kind"], "read-many-result", result) + self.assertEqual(len(result["items"]), 32) + self.assertEqual([value["policy"]["handle"]["child_id"] for value in result["items"]], [item["target"] for item in items]) + + def test_schema_discovery_is_purpose_specific(self): + for purpose in ("application", "authoring"): + catalog = {item["name"]: item for item in tool_catalog(self.root, purpose=purpose, interface=self.interface)} + tool = catalog["read_many"] + self.assertTrue(tool["annotations"]["readOnlyHint"]) + if purpose == "application": + encoded = json.dumps(tool) + for hidden in ("ChangePurpose", "DecisionProvenanceRecord", "rationale", "include_coverage"): + self.assertNotIn(hidden, encoded) + + def test_real_cli_and_stdio_return_identical_complete_domain_values(self): + arguments = {"snapshot": self.snapshot, "items": [{"target": "core"}, {"target": "router", "detail": "full"}]} + expected = self.call() + env = {**os.environ, "PYTHONPATH": str(ROOT)} + cli = subprocess.run([sys.executable, "-P", str(ROOT / ".agents/skills/standards-engine/scripts/invoke.py"), + "--repo-root", str(self.root), "--purpose", "application", "read_many"], + input=json.dumps(arguments), text=True, capture_output=True, env=env, timeout=60) + self.assertEqual(cli.returncode, 0, cli.stderr) + self.assertEqual(json.loads(cli.stdout), expected) + def message(i, method, params): + return {"jsonrpc": "2.0", "id": i, "method": method, "params": params} + messages = [message(1, "initialize", {"protocolVersion": "2025-11-25", "capabilities": {}, "clientInfo": {"name": "multi-read-fixture", "version": "1"}}), + {"jsonrpc": "2.0", "method": "notifications/initialized"}, + message(2, "tools/call", {"name": "read_many", "arguments": arguments}), + message(3, "tools/call", {"name": "read_many", "arguments": {**arguments, "items": [{"target": "core"}, {"target": "provenance.fixture"}]}})] + command = [sys.executable, "-P", "-m", "tools.standards_engine.standards_engine.mcp", "--repo-root", str(self.root), "--purpose", "application"] + for _ in range(2): + response = subprocess.run(command, input="".join(json.dumps(m) + "\n" for m in messages), text=True, capture_output=True, env=env, timeout=60) + self.assertEqual(response.returncode, 0, response.stderr) + self.assertNotIn(fixture.PRIVATE, response.stdout) + values = {value["id"]: value for value in map(json.loads, response.stdout.splitlines())} + returned = values[2]["result"] + self.assertFalse(returned["isError"]) + self.assertEqual(returned["structuredContent"], expected) + self.assertEqual(json.loads(returned["content"][0]["text"]), expected) + self.assertTrue(values[3]["result"]["isError"]) + self.assertNotIn("items", values[3]["result"]["structuredContent"]) From 2e034f5dcc10bdd97e0d9b21e1edc6672f80c996 Mon Sep 17 00:00:00 2001 From: MrScripty Date: Thu, 24 Sep 2026 11:23:49 -0700 Subject: [PATCH 15/26] perf(engine): reuse exact draft projections --- .../reports/performance-proposal-reuse.md | 234 ++++++++ .../performance-proposal-reuse/admission.md | 83 +++ .../baseline-final.json | 528 ++++++++++++++++++ .../candidate-final.json | 486 ++++++++++++++++ .../performance-proposal-reuse/comparison.csv | 12 + .../environment.json | 33 ++ .../measure_proposal_stdio.py | 76 +++ .../measure_proposals.py | 92 +++ .../sequence-totals.json | 32 ++ .../source-binding.json | 32 ++ .../stdio-final.json | 330 +++++++++++ .../structural.json | 11 + .../verification.json | 312 +++++++++++ .../warm-recovery-final.json | 42 ++ .../generated/suite-inputs.json | 10 +- tools/standards_engine/PURPOSE-SEPARATION.md | 37 +- .../standards_engine/compiled_cache.py | 102 +++- .../standards_engine/engine.py | 8 +- .../standards_engine/logical_authoring.py | 16 + .../standards_engine/operation_materials.py | 2 +- .../tests/test_nested_materials.py | 4 +- .../tests/test_proposal_reuse.py | 397 +++++++++++++ 22 files changed, 2853 insertions(+), 26 deletions(-) create mode 100644 docs/plans/purpose-separated-standards-engine/reports/performance-proposal-reuse.md create mode 100644 docs/plans/purpose-separated-standards-engine/reports/performance-proposal-reuse/admission.md create mode 100644 docs/plans/purpose-separated-standards-engine/reports/performance-proposal-reuse/baseline-final.json create mode 100644 docs/plans/purpose-separated-standards-engine/reports/performance-proposal-reuse/candidate-final.json create mode 100644 docs/plans/purpose-separated-standards-engine/reports/performance-proposal-reuse/comparison.csv create mode 100644 docs/plans/purpose-separated-standards-engine/reports/performance-proposal-reuse/environment.json create mode 100644 docs/plans/purpose-separated-standards-engine/reports/performance-proposal-reuse/measure_proposal_stdio.py create mode 100644 docs/plans/purpose-separated-standards-engine/reports/performance-proposal-reuse/measure_proposals.py create mode 100644 docs/plans/purpose-separated-standards-engine/reports/performance-proposal-reuse/sequence-totals.json create mode 100644 docs/plans/purpose-separated-standards-engine/reports/performance-proposal-reuse/source-binding.json create mode 100644 docs/plans/purpose-separated-standards-engine/reports/performance-proposal-reuse/stdio-final.json create mode 100644 docs/plans/purpose-separated-standards-engine/reports/performance-proposal-reuse/structural.json create mode 100644 docs/plans/purpose-separated-standards-engine/reports/performance-proposal-reuse/verification.json create mode 100644 docs/plans/purpose-separated-standards-engine/reports/performance-proposal-reuse/warm-recovery-final.json create mode 100644 tools/standards_engine/tests/test_proposal_reuse.py diff --git a/docs/plans/purpose-separated-standards-engine/reports/performance-proposal-reuse.md b/docs/plans/purpose-separated-standards-engine/reports/performance-proposal-reuse.md new file mode 100644 index 00000000..1bb6d3df --- /dev/null +++ b/docs/plans/purpose-separated-standards-engine/reports/performance-proposal-reuse.md @@ -0,0 +1,234 @@ +# Exact draft-projection reuse — implementation and evidence + +**Status:** implemented and locally verified; supported installed qualification and independent review remain separate. + +**Branch:** `implementation/purpose-separated-standards-engine` +**Source base:** `2dd2ce1b`, the latest delivered capture/multi-read increment. +**Implementation commit:** `443d38e1`; existing test-spy adaptation: `68eb97c0`. +**Evidence date:** September 24, 2026. + +## Target selection and bounded scope + +The largest measured remaining consumer delay was repeated reconstruction of an +unchanged draft's complete edit history. The baseline at this source, after the +capture and multi-read improvements, still spent about 2.55 seconds on a twelve-edit +draft read and 2.66 seconds on status. Each read rebuilt twelve manifests and +compiled the final candidate. This outweighed the earlier approximately 0.1-second +schema-decoder opportunity. The [admission](performance-proposal-reuse/admission.md) +records the scope, applicable standards and owner boundaries. + +This increment retains the pure projection of an exact immutable proposal revision +inside the existing bounded compilation cache. It improves repeated draft navigation +and workflow analysis, rather than changing test workloads or standards content. +Incremental successor construction, schema-decoder changes, public API changes and +additional cache services are outside the scope. A new revision still performs +complete replay from its original accepted base. + +The remote branch observed at task start was `bac7dc3d`. The newer capture/multi-read +work was present in the previous delivered ZIP, not in that remote observation. +This implementation preserves and builds on that delivery. The new package supplies +both an incremental patch from `2dd2ce1b` and a cumulative patch/bundle from `bac7dc3d`. +No remote ref, real accepted main, installed store or Codex configuration was changed. + +## Design and ownership + +### One shared bounded retention owner + +`CompiledSnapshotCache` now admits a tagged mix of accepted-snapshot compilation +and exact draft projections under its existing **two-entry / 32 MiB** total budget. +There is no second unbounded proposal map. Entries compete under the existing LRU; +disabled retention, unaccountable state, oversized entries and eviction use ordinary +full reconstruction with the same behavior. + +The draft key binds exact frozen base bytes and paths, the existing canonical +encoding of the entire revision identity material, and the installed replay recipe. +Revision material includes the original base snapshot, repository membership, +proposal identity, ordinal and complete logical program. Neither the mutable head +nor a caller-supplied digest substitutes for that material. Logical Authoring exposes +a replay identity only for its exact stateless installed owner; changed recipes +miss, and stateful/closure-based adaptations remain cold consumers. + +The cache returns shared read-only compiled/source structures. Its semantic-intent +maps are copied at admission and again for each hit, preserving operation ownership. +Current result envelopes and continuations are constructed afresh. The new regression +suite verifies mutations to caller results and intent maps cannot poison later reads. + +### Validation remains before reuse + +`query_proposal` reads and validates the actual stored revision and root first. +The first proposal material access in every public operation performs the existing +complete base-content load and identity verification before lookup. Subsequent uses +inside that operation retain its existing lifecycle observations. + +The private Engine projection helper accepts an explicit reuse selection. Draft +navigation and the existing `ProposalMaterials` workflow path select it. Review, +physical candidate verification, application and recovery keep their fresh existing +replay paths. Their permissions, verification, conditional writes and observation +semantics do not depend on the cache. + +Every status request still evaluates its current decision state. Current proposal +head, lifecycle, evidence and authorization checks remain at their existing +boundaries. A cached prospective revision after a failed conditional publication +is computation only: consumers still require a real stored revision/root. + +### Failure, history and lifetime behavior + +| Event | Behavior | +| --- | --- | +| Accepted main advances | New captures observe the new revision; an existing draft keeps its original base. | +| Exact old draft requested after later revisions | Return that historical material; current status may be stale. | +| Process replacement or cache disabled | Load and verify durable inputs, then replay normally. | +| Base quarantine/purge/corruption or revision corruption | Current validation rejects before retained material can answer. | +| Store missing/replaced | The current store must supply the actual revision and valid base. | +| Evidence or permission changes | Existing live checks decide; no result or decision is cached. | +| New prospective revision fails publication | Retention grants no stored identity, readiness or application status. | +| Compiler failure | Return the normal failure; retain no failed projection. | +| Owner closes | Release snapshot and draft entries together. | + +The existing capture still performs two independent compiles and compares frozen +closure/signatures. The new implementation adds no persistence format, compatibility +branch, cross-purpose exposure, transport lifetime or shared SQLite connection. + +## Measured consumer gain + +The final paired workloads use the same host, isolated executable and core +dependencies, and one fixed disposable source/store at `2dd2ce1b`. The captured +corpus has **438 files / 3,796,413 source bytes**, with content identity: + +`snapshot-content:sha256:7fe09d2cadb34a547b52362239268dd86ab43ed9c679b9768e20644a87e1ec5b` + +The synthetic non-normative reference has real stored revisions with 1, 4 and 12 +change sets. Queries and status request exact retained revisions; the first two +statuses are correctly stale after later revisions, while the twelfth is complete. +Both implementations return exactly equal complete values for the same requests. +Preparation and initial snapshot capture are excluded from operation timings. + +### Repeated in-process MCP dispatch + +Each history length has three repeated query/status observations after its initial +cold projection. Lower-level counters instrument loaders and manifest/compiler +owners without replacing the installed compiler recipe used by retention. + +| Change sets | Operation | Baseline median | Candidate median | Speedup | +| --- | --- | ---: | ---: | ---: | +| 1 | `query_proposal` | 0.587 s | 0.203 s | 2.90x | +| 1 | `workflow_status` | 0.714 s | 0.305 s | 2.34x | +| 4 | `query_proposal` | 1.195 s | 0.187 s | 6.39x | +| 4 | `workflow_status` | 1.264 s | 0.288 s | 4.40x | +| 12 | `query_proposal` | 2.648 s | 0.189 s | 14.04x | +| 12 | `workflow_status` | 2.807 s | 0.284 s | 9.87x | + +On twelve-edit warm queries, manifest rebuilds fall **12 to 0** and full compiler +calls **1 to 0**. Complete durable loads stay **1 to 1** for every independent call. +Status keeps **one fresh decision evaluation** per call. The same observations +hold at the shorter history lengths. This is removal of repeated derivation, not +removal of the material integrity proof or of decision evaluation. + +### Real MCP subprocesses + +Three new server sequences per implementation alternate baseline/candidate order. +Each contains initialization and three draft-read/status pairs for the same +stored twelve-edit revision. The first draft read includes cold reconstruction; +the repeated rows aggregate six observations from three process sequences. +Structured responses and JSON text encodings are compared exactly. + +| Actual stdio operation | Baseline median | Candidate median | Speedup | +| --- | ---: | ---: | ---: | +| MCP initialization | 0.616 s | 0.626 s | 0.98x | +| First draft read, cold projection | 2.817 s | 2.801 s | 1.01x | +| Repeated query_proposal | 2.596 s | 0.192 s | 13.49x | +| Repeated workflow_status | 2.705 s | 0.287 s | 9.44x | + +Startup plus three query/status pairs takes a median 16.800 s before and 4.685 s after (72.1% less elapsed time). Totals are formed per sequence before aggregation. + +Cold reconstruction and admission still have a cost. These changes are intended +for repeated inspection/status and reuse of already-derived prospective material, +not an assertion that first construction or every new revision becomes constant +cost. Reading the stored program, forming an exact key and evaluating current +status still depend on the material and decision scope. + +The representative base plus projection retains at most **13,616,068 accounted +bytes** in two entries, with no eviction in the measured sequences. The total +budget remains 32 MiB. This is conservative cache-owned accounting, not process +RSS or transient compiler-memory measurement. Bounds and close behavior are +verified separately. No full-suite or installed Codex speedup is inferred. + +[Comparison CSV](performance-proposal-reuse/comparison.csv), +[baseline counts](performance-proposal-reuse/baseline-final.json), +[candidate counts](performance-proposal-reuse/candidate-final.json), +[actual stdio observations](performance-proposal-reuse/stdio-final.json) and +[sequence totals](performance-proposal-reuse/sequence-totals.json) retain samples, +ranges, output hashes and exact interpretation. Sample sizes establish local +medians/ranges rather than tail-latency guarantees. No test jobs ran concurrently +with the final comparisons. Fresh processes do not imply cold OS caches. + +## Correctness evidence + +The full discovered Engine campaign ran **232 tests**. It found one old instrumentation +callback that did not accept the new private `reuse` keyword. Its entire eleven-test +module passed after forwarding that keyword; all original independence assertions +remain. The twenty-one new projection-reuse regressions were also rerun successfully +against the final source. Production runtime bytes are unchanged across that fixture +repair. Thus all **232 distinct Engine tests have passing evidence**, rather than +one falsely reported all-green initial run. + +The eleven supporting suites ran **450 tests: 449 passed and one existing +interpreter-dependent skip**. Combined unique population: **682 tests**, with passing +evidence for **681** and one skip. Qualification logs retain the initial failure +and both complete corrected/final module reruns. + +The added regressions cover exact output and operation counts, fresh status, +historical/stale heads, caller mutation, current base and revision integrity, +quarantine/purge, missing/replaced stores, shared bounds and failure cleanup, +compiler-recipe changes, unpublished prospective records, main advancement and +cold readback, invalid evidence, authorization-triggered quarantine, independent +review replay, purpose restriction, two-pass capture and fresh stdio processes. +Existing multi-read, capture, publication and recovery tests remain in the full +population. An additional unchanged real audit/recovery scenario passed with a +warm first cache and cold independent second store; its original live-evidence, +interrupted-publication and readback assertions remain intact. + +[Verification inventory](performance-proposal-reuse/verification.json), +[warm recovery](performance-proposal-reuse/warm-recovery-final.json) and +[source binding](performance-proposal-reuse/source-binding.json) distinguish the +observations. The separate [structural checkpoint](performance-proposal-reuse/structural.json) +passed **73 suites / 121 checks** against the final source. Structure and freshness +do not certify prose quality or independent implementation review. A post-commit +check is retained separately in the delivery evidence. + +## Qualification limits and handoff + +The environment is isolated Python **3.13.5**, outside supported 3.11/3.12, with +`rpds-py 2026.5.1` rather than locked `2026.6.3`. Other exact versions and executable +identity are in [environment](performance-proposal-reuse/environment.json). +Python 3.11 grammar parsing is supporting syntax evidence, not execution there. +Official SDK/configured-client and independent review were unavailable; the new +increment requires its own supported qualification rather than inheriting a prior +revision's review. Actual raw MCP execution is reported for what it proves. + +Normative standards, reference/operational guidance, public Engine wire schemas, +persisted formats and locks remain unchanged from `2dd2ce1b`. The earlier delivered +capture/multi-read changes remain intact. This increment is not global acceptance +of the standards-content migration or of every proposed optimization. + +## Reproduction + +Use the supported locked environment with separate baseline (`2dd2ce1b`) and +candidate implementations. Create one disposable common workload from the baseline; +its private local main is the baseline candidate, not the user's accepted branch. +The workload directory must be new. Drivers write only their selected fixtures and +measurement files. Run sequentially: + +```bash +python measure_proposals.py --source /path/to/baseline --fixture /tmp/draft-probe/repo --output /tmp/prepared.json --prepare +python measure_proposals.py --source /path/to/baseline --fixture /tmp/draft-probe/repo --output baseline.json --repeats 3 +python measure_proposals.py --source /path/to/candidate --fixture /tmp/draft-probe/repo --output candidate.json --repeats 3 +python measure_proposal_stdio.py --baseline /path/to/baseline --candidate /path/to/candidate --fixture /tmp/draft-probe/repo --output stdio.json --repeats 3 +``` + +[Dispatch/history driver](performance-proposal-reuse/measure_proposals.py) and +[stdio driver](performance-proposal-reuse/measure_proposal_stdio.py) assert expected +results; the final comparison additionally checks baseline/candidate output hashes. +The ZIP includes exact Git CLI commits, incremental/cumulative patches, a bundle, +application instructions and file checksums. Use one application method and restart +the MCP process for the new installed recipe and empty initial cache. diff --git a/docs/plans/purpose-separated-standards-engine/reports/performance-proposal-reuse/admission.md b/docs/plans/purpose-separated-standards-engine/reports/performance-proposal-reuse/admission.md new file mode 100644 index 00000000..4c24999d --- /dev/null +++ b/docs/plans/purpose-separated-standards-engine/reports/performance-proposal-reuse/admission.md @@ -0,0 +1,83 @@ +# Exact proposal-revision reuse: bounded admission + +Status: implemented, measured and locally verified. Supported installed qualification +and independent review remain separate. + +Source base: `2dd2ce1b`, the latest delivered capture/multi-read increment. The +observed published branch remains `bac7dc3d`. Preserve the newer delivered work; +this increment is layered on top of it. The ZIP will identify both application +bases explicitly. The existing overall plan and standards-content guide retain +their separate acceptance states. + +## Requested result and deciding evidence + +The user prioritizes consumer latency. After capture and grouped-read work, +repeated draft inspection/status are the largest measured remaining opportunity. +A fresh same-host baseline of 1, 4 and 12 reference edits finds 12-change draft +reads at 2.55 seconds and status at 2.66 seconds. Each repeats 12 manifest refreshes +and full candidate compilation for an unchanged exact revision. Schema-decoder +selection has a smaller prior estimated opportunity and is outside this slice. + +Keep one bounded increment: reuse the pure exact revision projection in the +existing Engine-owned retention mechanism, after current revision/root and full +base-content checks. Test exact outputs, decision boundaries and failure paths; +compare current and candidate consumer operations on the same stored workload. + +## Applicable guidance and objective preservation + +Core and Router select Implementation, Verification and its oracle guidance, +Performance, Development Proportionality, Architecture with Immutable Results And +Replay, Contracts, Security, Concurrency, Documentation and Commit; the Library +profile applies. Persistence mechanisms and wire schemas remain unchanged and +are regression boundaries, not new migration work. Existing grounded scope, +positive action framing, coherent ownership, actual consumer evidence and ordinary +repair-before-replanning practices govern this slice. + +Use the existing shared two-entry / 32 MiB budget. Exact original base content, +full logical program, original membership, revision identity and installed replay +recipe distinguish entries. Authoring validates stored revisions and current roots +before use. Authoritative status, evidence, authorization, head selection and each +analysis evaluation remain live. An unpublished prospective projection supplies +computation only. Capture compiles twice independently; review, candidate +verification, publication and recovery keep their existing fresh replay paths. + +Original-base semantics are retained; this is not incremental successor replay. +A miss or restart performs complete replay. The owner releases entries at close. +Application interfaces cannot use the authoring cache or its projection path. +Compiled/source interfaces are read-only; caller-owned semantic intent maps are +copied at admission and on reuse. There is no additional store, global cache, +response cache, executor or compatibility layer. + +## Write set + +- `tools/standards_engine/standards_engine/compiled_cache.py` +- `tools/standards_engine/standards_engine/logical_authoring.py` +- `tools/standards_engine/standards_engine/engine.py` +- `tools/standards_engine/standards_engine/operation_materials.py` +- `tools/standards_engine/tests/test_proposal_reuse.py` +- The existing `test_nested_materials.py` spy, updated to forward the current + internal call signature while retaining all reentry assertions. +- `tools/standards_engine/PURPOSE-SEPARATION.md` +- This report, sibling implementation report and reproducible evidence. +- The existing generated suite-input manifest, regenerated by its Engine owner. + +Normative bodies, reference/operational guidance, public contracts, locks, actual +installed stores/configuration and accepted main remain untouched. Git changes +use the existing dedicated branch and Git CLI; deliver a ZIP rather than modifying +remote authority. + +## Composition and stopping boundary + +The existing cache owns retention cost and lifetime. Logical Authoring identifies +its installed replay recipe and owns exact reconstruction; Engine composition +selects reuse only for draft navigation and operation-local workflow material. +Authoring and Snapshots retain identity, current lifecycle, conditional publication +and integrity. Callers acquire no knowledge of manifests, private file paths or +cache keys. Removing the new reuse restores complete correct cold reconstruction. + +A wording or local test repair stays within the slice. Replan only for evidence +that changes the promised replay/authority semantics, an independently owned +boundary or the adequacy of the shared budget. Finish after current-source output +comparisons, failure-boundary regressions, full selected package populations and +separate structural checks. Local unsupported interpreter evidence remains +explicitly distinct from supported installed and independent-review qualification. diff --git a/docs/plans/purpose-separated-standards-engine/reports/performance-proposal-reuse/baseline-final.json b/docs/plans/purpose-separated-standards-engine/reports/performance-proposal-reuse/baseline-final.json new file mode 100644 index 00000000..f765bfb1 --- /dev/null +++ b/docs/plans/purpose-separated-standards-engine/reports/performance-proposal-reuse/baseline-final.json @@ -0,0 +1,528 @@ +{ + "source": "/mnt/data/projection-work/baseline", + "head": "2dd2ce1bd8e1129a5662be7c76bf864778fb2010", + "python": "3.13.5 (main, Jul 15 2026, 20:25:40) [GCC 14.2.0]", + "executable_sha256": "17b78e0a93175e86f9ac03141924fd7a7f0c0c52e66b34bfa0de20ffef989df1", + "packages": { + "jsonschema": "4.26.0", + "rpds-py": "2026.5.1" + }, + "observations": [ + { + "history": 1, + "iteration": 0, + "operation": "query_proposal", + "wall_seconds": 0.8252453310001329, + "cpu_seconds": 0.825256996, + "counts": { + "durable_loads": 1, + "full_compiles": 2, + "manifest_refreshes": 1 + }, + "result_sha256": "aff0ad86d75b9ccbc3f49b0df358912bcb2dcd27bb1302377b14dc6c2597a0aa", + "cache": { + "entries": 1, + "accounted_bytes": 6516576, + "hits": 0, + "misses": 1, + "evictions": 0, + "uncached": 0 + } + }, + { + "history": 1, + "iteration": 0, + "operation": "workflow_status", + "wall_seconds": 0.6772969569999532, + "cpu_seconds": 0.6771146009999998, + "counts": { + "durable_loads": 1, + "manifest_refreshes": 1, + "full_compiles": 1, + "decision_evaluations": 1 + }, + "result_sha256": "c0d7c5042771a21a45efcd35c0ac683794935c39f8d9d2febbdf116318a124ea", + "cache": { + "entries": 1, + "accounted_bytes": 6516576, + "hits": 1, + "misses": 1, + "evictions": 0, + "uncached": 0 + } + }, + { + "history": 1, + "iteration": 1, + "operation": "query_proposal", + "wall_seconds": 0.5871132489999127, + "cpu_seconds": 0.5871066060000003, + "counts": { + "durable_loads": 1, + "manifest_refreshes": 1, + "full_compiles": 1 + }, + "result_sha256": "aff0ad86d75b9ccbc3f49b0df358912bcb2dcd27bb1302377b14dc6c2597a0aa", + "cache": { + "entries": 1, + "accounted_bytes": 6516576, + "hits": 2, + "misses": 1, + "evictions": 0, + "uncached": 0 + } + }, + { + "history": 1, + "iteration": 1, + "operation": "workflow_status", + "wall_seconds": 0.7331052619999809, + "cpu_seconds": 0.7331184679999998, + "counts": { + "durable_loads": 1, + "manifest_refreshes": 1, + "full_compiles": 1, + "decision_evaluations": 1 + }, + "result_sha256": "c0d7c5042771a21a45efcd35c0ac683794935c39f8d9d2febbdf116318a124ea", + "cache": { + "entries": 1, + "accounted_bytes": 6516576, + "hits": 3, + "misses": 1, + "evictions": 0, + "uncached": 0 + } + }, + { + "history": 1, + "iteration": 2, + "operation": "query_proposal", + "wall_seconds": 0.577514625999811, + "cpu_seconds": 0.5775044819999997, + "counts": { + "durable_loads": 1, + "manifest_refreshes": 1, + "full_compiles": 1 + }, + "result_sha256": "aff0ad86d75b9ccbc3f49b0df358912bcb2dcd27bb1302377b14dc6c2597a0aa", + "cache": { + "entries": 1, + "accounted_bytes": 6516576, + "hits": 4, + "misses": 1, + "evictions": 0, + "uncached": 0 + } + }, + { + "history": 1, + "iteration": 2, + "operation": "workflow_status", + "wall_seconds": 0.674513399000034, + "cpu_seconds": 0.6745039559999997, + "counts": { + "durable_loads": 1, + "manifest_refreshes": 1, + "full_compiles": 1, + "decision_evaluations": 1 + }, + "result_sha256": "c0d7c5042771a21a45efcd35c0ac683794935c39f8d9d2febbdf116318a124ea", + "cache": { + "entries": 1, + "accounted_bytes": 6516576, + "hits": 5, + "misses": 1, + "evictions": 0, + "uncached": 0 + } + }, + { + "history": 1, + "iteration": 3, + "operation": "query_proposal", + "wall_seconds": 0.5973127830000067, + "cpu_seconds": 0.5973147769999994, + "counts": { + "durable_loads": 1, + "manifest_refreshes": 1, + "full_compiles": 1 + }, + "result_sha256": "aff0ad86d75b9ccbc3f49b0df358912bcb2dcd27bb1302377b14dc6c2597a0aa", + "cache": { + "entries": 1, + "accounted_bytes": 6516576, + "hits": 6, + "misses": 1, + "evictions": 0, + "uncached": 0 + } + }, + { + "history": 1, + "iteration": 3, + "operation": "workflow_status", + "wall_seconds": 0.7142770100001599, + "cpu_seconds": 0.7142709710000004, + "counts": { + "durable_loads": 1, + "manifest_refreshes": 1, + "full_compiles": 1, + "decision_evaluations": 1 + }, + "result_sha256": "c0d7c5042771a21a45efcd35c0ac683794935c39f8d9d2febbdf116318a124ea", + "cache": { + "entries": 1, + "accounted_bytes": 6516576, + "hits": 7, + "misses": 1, + "evictions": 0, + "uncached": 0 + } + }, + { + "history": 4, + "iteration": 0, + "operation": "query_proposal", + "wall_seconds": 1.3974846010000874, + "cpu_seconds": 1.397368191, + "counts": { + "durable_loads": 1, + "full_compiles": 2, + "manifest_refreshes": 4 + }, + "result_sha256": "b41fa65585b1290f248a241da37493c2ee619a90b98b2db77c19afda0db0ee7f", + "cache": { + "entries": 1, + "accounted_bytes": 6516240, + "hits": 0, + "misses": 1, + "evictions": 0, + "uncached": 0 + } + }, + { + "history": 4, + "iteration": 0, + "operation": "workflow_status", + "wall_seconds": 1.2615727759998663, + "cpu_seconds": 1.2597261150000003, + "counts": { + "durable_loads": 1, + "manifest_refreshes": 4, + "full_compiles": 1, + "decision_evaluations": 1 + }, + "result_sha256": "5a3813efa7e83b83ca2576985a2853293633668eb178a0b7fe53d33a09236214", + "cache": { + "entries": 1, + "accounted_bytes": 6516240, + "hits": 1, + "misses": 1, + "evictions": 0, + "uncached": 0 + } + }, + { + "history": 4, + "iteration": 1, + "operation": "query_proposal", + "wall_seconds": 1.1949334420000923, + "cpu_seconds": 1.1948195949999985, + "counts": { + "durable_loads": 1, + "manifest_refreshes": 4, + "full_compiles": 1 + }, + "result_sha256": "b41fa65585b1290f248a241da37493c2ee619a90b98b2db77c19afda0db0ee7f", + "cache": { + "entries": 1, + "accounted_bytes": 6516240, + "hits": 2, + "misses": 1, + "evictions": 0, + "uncached": 0 + } + }, + { + "history": 4, + "iteration": 1, + "operation": "workflow_status", + "wall_seconds": 1.2641281300000173, + "cpu_seconds": 1.2639281780000005, + "counts": { + "durable_loads": 1, + "manifest_refreshes": 4, + "full_compiles": 1, + "decision_evaluations": 1 + }, + "result_sha256": "5a3813efa7e83b83ca2576985a2853293633668eb178a0b7fe53d33a09236214", + "cache": { + "entries": 1, + "accounted_bytes": 6516240, + "hits": 3, + "misses": 1, + "evictions": 0, + "uncached": 0 + } + }, + { + "history": 4, + "iteration": 2, + "operation": "query_proposal", + "wall_seconds": 1.265096627000048, + "cpu_seconds": 1.2650780259999994, + "counts": { + "durable_loads": 1, + "manifest_refreshes": 4, + "full_compiles": 1 + }, + "result_sha256": "b41fa65585b1290f248a241da37493c2ee619a90b98b2db77c19afda0db0ee7f", + "cache": { + "entries": 1, + "accounted_bytes": 6516240, + "hits": 4, + "misses": 1, + "evictions": 0, + "uncached": 0 + } + }, + { + "history": 4, + "iteration": 2, + "operation": "workflow_status", + "wall_seconds": 1.278719454000111, + "cpu_seconds": 1.27864192, + "counts": { + "durable_loads": 1, + "manifest_refreshes": 4, + "full_compiles": 1, + "decision_evaluations": 1 + }, + "result_sha256": "5a3813efa7e83b83ca2576985a2853293633668eb178a0b7fe53d33a09236214", + "cache": { + "entries": 1, + "accounted_bytes": 6516240, + "hits": 5, + "misses": 1, + "evictions": 0, + "uncached": 0 + } + }, + { + "history": 4, + "iteration": 3, + "operation": "query_proposal", + "wall_seconds": 1.1562655379998432, + "cpu_seconds": 1.1561566700000014, + "counts": { + "durable_loads": 1, + "manifest_refreshes": 4, + "full_compiles": 1 + }, + "result_sha256": "b41fa65585b1290f248a241da37493c2ee619a90b98b2db77c19afda0db0ee7f", + "cache": { + "entries": 1, + "accounted_bytes": 6516240, + "hits": 6, + "misses": 1, + "evictions": 0, + "uncached": 0 + } + }, + { + "history": 4, + "iteration": 3, + "operation": "workflow_status", + "wall_seconds": 1.2626330069999767, + "cpu_seconds": 1.2609624739999994, + "counts": { + "durable_loads": 1, + "manifest_refreshes": 4, + "full_compiles": 1, + "decision_evaluations": 1 + }, + "result_sha256": "5a3813efa7e83b83ca2576985a2853293633668eb178a0b7fe53d33a09236214", + "cache": { + "entries": 1, + "accounted_bytes": 6516240, + "hits": 7, + "misses": 1, + "evictions": 0, + "uncached": 0 + } + }, + { + "history": 12, + "iteration": 0, + "operation": "query_proposal", + "wall_seconds": 3.0216830789997857, + "cpu_seconds": 3.0213914089999996, + "counts": { + "durable_loads": 1, + "full_compiles": 2, + "manifest_refreshes": 12 + }, + "result_sha256": "ff3f61183c458b2f5685429be6545cc2c2cb9a2b2ffd3750e3d1bb8306016cc8", + "cache": { + "entries": 1, + "accounted_bytes": 6516208, + "hits": 0, + "misses": 1, + "evictions": 0, + "uncached": 0 + } + }, + { + "history": 12, + "iteration": 0, + "operation": "workflow_status", + "wall_seconds": 2.8113570130001335, + "cpu_seconds": 2.8113040950000006, + "counts": { + "durable_loads": 1, + "manifest_refreshes": 12, + "full_compiles": 1, + "decision_evaluations": 1 + }, + "result_sha256": "142d5c70bf22a93e54216fc2da7bdb05560c79bb4fe581772d71ee0db3fddb95", + "cache": { + "entries": 1, + "accounted_bytes": 6516208, + "hits": 1, + "misses": 1, + "evictions": 0, + "uncached": 0 + } + }, + { + "history": 12, + "iteration": 1, + "operation": "query_proposal", + "wall_seconds": 2.6934243580001294, + "cpu_seconds": 2.6923423090000007, + "counts": { + "durable_loads": 1, + "manifest_refreshes": 12, + "full_compiles": 1 + }, + "result_sha256": "ff3f61183c458b2f5685429be6545cc2c2cb9a2b2ffd3750e3d1bb8306016cc8", + "cache": { + "entries": 1, + "accounted_bytes": 6516208, + "hits": 2, + "misses": 1, + "evictions": 0, + "uncached": 0 + } + }, + { + "history": 12, + "iteration": 1, + "operation": "workflow_status", + "wall_seconds": 2.995833120000043, + "cpu_seconds": 2.995540836, + "counts": { + "durable_loads": 1, + "manifest_refreshes": 12, + "full_compiles": 1, + "decision_evaluations": 1 + }, + "result_sha256": "142d5c70bf22a93e54216fc2da7bdb05560c79bb4fe581772d71ee0db3fddb95", + "cache": { + "entries": 1, + "accounted_bytes": 6516208, + "hits": 3, + "misses": 1, + "evictions": 0, + "uncached": 0 + } + }, + { + "history": 12, + "iteration": 2, + "operation": "query_proposal", + "wall_seconds": 2.6479470550000315, + "cpu_seconds": 2.647566284, + "counts": { + "durable_loads": 1, + "manifest_refreshes": 12, + "full_compiles": 1 + }, + "result_sha256": "ff3f61183c458b2f5685429be6545cc2c2cb9a2b2ffd3750e3d1bb8306016cc8", + "cache": { + "entries": 1, + "accounted_bytes": 6516208, + "hits": 4, + "misses": 1, + "evictions": 0, + "uncached": 0 + } + }, + { + "history": 12, + "iteration": 2, + "operation": "workflow_status", + "wall_seconds": 2.575289874999953, + "cpu_seconds": 2.575092601999998, + "counts": { + "durable_loads": 1, + "manifest_refreshes": 12, + "full_compiles": 1, + "decision_evaluations": 1 + }, + "result_sha256": "142d5c70bf22a93e54216fc2da7bdb05560c79bb4fe581772d71ee0db3fddb95", + "cache": { + "entries": 1, + "accounted_bytes": 6516208, + "hits": 5, + "misses": 1, + "evictions": 0, + "uncached": 0 + } + }, + { + "history": 12, + "iteration": 3, + "operation": "query_proposal", + "wall_seconds": 2.5372157290000814, + "cpu_seconds": 2.5371333149999984, + "counts": { + "durable_loads": 1, + "manifest_refreshes": 12, + "full_compiles": 1 + }, + "result_sha256": "ff3f61183c458b2f5685429be6545cc2c2cb9a2b2ffd3750e3d1bb8306016cc8", + "cache": { + "entries": 1, + "accounted_bytes": 6516208, + "hits": 6, + "misses": 1, + "evictions": 0, + "uncached": 0 + } + }, + { + "history": 12, + "iteration": 3, + "operation": "workflow_status", + "wall_seconds": 2.806694661000165, + "cpu_seconds": 2.806585959000003, + "counts": { + "durable_loads": 1, + "manifest_refreshes": 12, + "full_compiles": 1, + "decision_evaluations": 1 + }, + "result_sha256": "142d5c70bf22a93e54216fc2da7bdb05560c79bb4fe581772d71ee0db3fddb95", + "cache": { + "entries": 1, + "accounted_bytes": 6516208, + "hits": 7, + "misses": 1, + "evictions": 0, + "uncached": 0 + } + } + ] +} diff --git a/docs/plans/purpose-separated-standards-engine/reports/performance-proposal-reuse/candidate-final.json b/docs/plans/purpose-separated-standards-engine/reports/performance-proposal-reuse/candidate-final.json new file mode 100644 index 00000000..e5eebd47 --- /dev/null +++ b/docs/plans/purpose-separated-standards-engine/reports/performance-proposal-reuse/candidate-final.json @@ -0,0 +1,486 @@ +{ + "source": "/mnt/data/projection-work/repo", + "head": "68eb97c0dd59fb9f833d0b3e4e90bdb7271345bf", + "python": "3.13.5 (main, Jul 15 2026, 20:25:40) [GCC 14.2.0]", + "executable_sha256": "17b78e0a93175e86f9ac03141924fd7a7f0c0c52e66b34bfa0de20ffef989df1", + "packages": { + "jsonschema": "4.26.0", + "rpds-py": "2026.5.1" + }, + "observations": [ + { + "history": 1, + "iteration": 0, + "operation": "query_proposal", + "wall_seconds": 0.8224129840000387, + "cpu_seconds": 0.822402063, + "counts": { + "durable_loads": 1, + "full_compiles": 2, + "manifest_refreshes": 1 + }, + "result_sha256": "aff0ad86d75b9ccbc3f49b0df358912bcb2dcd27bb1302377b14dc6c2597a0aa", + "cache": { + "entries": 2, + "accounted_bytes": 13607851, + "hits": 0, + "misses": 2, + "evictions": 0, + "uncached": 0 + } + }, + { + "history": 1, + "iteration": 0, + "operation": "workflow_status", + "wall_seconds": 0.2843976990000101, + "cpu_seconds": 0.2843747139999999, + "counts": { + "durable_loads": 1, + "decision_evaluations": 1 + }, + "result_sha256": "c0d7c5042771a21a45efcd35c0ac683794935c39f8d9d2febbdf116318a124ea", + "cache": { + "entries": 2, + "accounted_bytes": 13607851, + "hits": 2, + "misses": 2, + "evictions": 0, + "uncached": 0 + } + }, + { + "history": 1, + "iteration": 1, + "operation": "query_proposal", + "wall_seconds": 0.19272818699982963, + "cpu_seconds": 0.19273389600000002, + "counts": { + "durable_loads": 1 + }, + "result_sha256": "aff0ad86d75b9ccbc3f49b0df358912bcb2dcd27bb1302377b14dc6c2597a0aa", + "cache": { + "entries": 2, + "accounted_bytes": 13607851, + "hits": 4, + "misses": 2, + "evictions": 0, + "uncached": 0 + } + }, + { + "history": 1, + "iteration": 1, + "operation": "workflow_status", + "wall_seconds": 0.28982939700017596, + "cpu_seconds": 0.28981875700000015, + "counts": { + "durable_loads": 1, + "decision_evaluations": 1 + }, + "result_sha256": "c0d7c5042771a21a45efcd35c0ac683794935c39f8d9d2febbdf116318a124ea", + "cache": { + "entries": 2, + "accounted_bytes": 13607851, + "hits": 6, + "misses": 2, + "evictions": 0, + "uncached": 0 + } + }, + { + "history": 1, + "iteration": 2, + "operation": "query_proposal", + "wall_seconds": 0.20274338900003386, + "cpu_seconds": 0.20273995699999992, + "counts": { + "durable_loads": 1 + }, + "result_sha256": "aff0ad86d75b9ccbc3f49b0df358912bcb2dcd27bb1302377b14dc6c2597a0aa", + "cache": { + "entries": 2, + "accounted_bytes": 13607851, + "hits": 8, + "misses": 2, + "evictions": 0, + "uncached": 0 + } + }, + { + "history": 1, + "iteration": 2, + "operation": "workflow_status", + "wall_seconds": 0.30536392300018633, + "cpu_seconds": 0.3053499049999999, + "counts": { + "durable_loads": 1, + "decision_evaluations": 1 + }, + "result_sha256": "c0d7c5042771a21a45efcd35c0ac683794935c39f8d9d2febbdf116318a124ea", + "cache": { + "entries": 2, + "accounted_bytes": 13607851, + "hits": 10, + "misses": 2, + "evictions": 0, + "uncached": 0 + } + }, + { + "history": 1, + "iteration": 3, + "operation": "query_proposal", + "wall_seconds": 0.20519528299996637, + "cpu_seconds": 0.20519408299999986, + "counts": { + "durable_loads": 1 + }, + "result_sha256": "aff0ad86d75b9ccbc3f49b0df358912bcb2dcd27bb1302377b14dc6c2597a0aa", + "cache": { + "entries": 2, + "accounted_bytes": 13607851, + "hits": 12, + "misses": 2, + "evictions": 0, + "uncached": 0 + } + }, + { + "history": 1, + "iteration": 3, + "operation": "workflow_status", + "wall_seconds": 0.3060294530000647, + "cpu_seconds": 0.3060369650000001, + "counts": { + "durable_loads": 1, + "decision_evaluations": 1 + }, + "result_sha256": "c0d7c5042771a21a45efcd35c0ac683794935c39f8d9d2febbdf116318a124ea", + "cache": { + "entries": 2, + "accounted_bytes": 13607851, + "hits": 14, + "misses": 2, + "evictions": 0, + "uncached": 0 + } + }, + { + "history": 4, + "iteration": 0, + "operation": "query_proposal", + "wall_seconds": 1.339784138999903, + "cpu_seconds": 1.3394530190000005, + "counts": { + "durable_loads": 1, + "full_compiles": 2, + "manifest_refreshes": 4 + }, + "result_sha256": "b41fa65585b1290f248a241da37493c2ee619a90b98b2db77c19afda0db0ee7f", + "cache": { + "entries": 2, + "accounted_bytes": 13610078, + "hits": 0, + "misses": 2, + "evictions": 0, + "uncached": 0 + } + }, + { + "history": 4, + "iteration": 0, + "operation": "workflow_status", + "wall_seconds": 0.28535178600009203, + "cpu_seconds": 0.285358617, + "counts": { + "durable_loads": 1, + "decision_evaluations": 1 + }, + "result_sha256": "5a3813efa7e83b83ca2576985a2853293633668eb178a0b7fe53d33a09236214", + "cache": { + "entries": 2, + "accounted_bytes": 13610078, + "hits": 2, + "misses": 2, + "evictions": 0, + "uncached": 0 + } + }, + { + "history": 4, + "iteration": 1, + "operation": "query_proposal", + "wall_seconds": 0.18627454200009197, + "cpu_seconds": 0.18626961700000066, + "counts": { + "durable_loads": 1 + }, + "result_sha256": "b41fa65585b1290f248a241da37493c2ee619a90b98b2db77c19afda0db0ee7f", + "cache": { + "entries": 2, + "accounted_bytes": 13610078, + "hits": 4, + "misses": 2, + "evictions": 0, + "uncached": 0 + } + }, + { + "history": 4, + "iteration": 1, + "operation": "workflow_status", + "wall_seconds": 0.28760294500011696, + "cpu_seconds": 0.2875961330000001, + "counts": { + "durable_loads": 1, + "decision_evaluations": 1 + }, + "result_sha256": "5a3813efa7e83b83ca2576985a2853293633668eb178a0b7fe53d33a09236214", + "cache": { + "entries": 2, + "accounted_bytes": 13610078, + "hits": 6, + "misses": 2, + "evictions": 0, + "uncached": 0 + } + }, + { + "history": 4, + "iteration": 2, + "operation": "query_proposal", + "wall_seconds": 0.1870546220000051, + "cpu_seconds": 0.1870605629999993, + "counts": { + "durable_loads": 1 + }, + "result_sha256": "b41fa65585b1290f248a241da37493c2ee619a90b98b2db77c19afda0db0ee7f", + "cache": { + "entries": 2, + "accounted_bytes": 13610078, + "hits": 8, + "misses": 2, + "evictions": 0, + "uncached": 0 + } + }, + { + "history": 4, + "iteration": 2, + "operation": "workflow_status", + "wall_seconds": 0.30427593800004615, + "cpu_seconds": 0.30427747999999966, + "counts": { + "durable_loads": 1, + "decision_evaluations": 1 + }, + "result_sha256": "5a3813efa7e83b83ca2576985a2853293633668eb178a0b7fe53d33a09236214", + "cache": { + "entries": 2, + "accounted_bytes": 13610078, + "hits": 10, + "misses": 2, + "evictions": 0, + "uncached": 0 + } + }, + { + "history": 4, + "iteration": 3, + "operation": "query_proposal", + "wall_seconds": 0.19193290500015792, + "cpu_seconds": 0.19192314200000027, + "counts": { + "durable_loads": 1 + }, + "result_sha256": "b41fa65585b1290f248a241da37493c2ee619a90b98b2db77c19afda0db0ee7f", + "cache": { + "entries": 2, + "accounted_bytes": 13610078, + "hits": 12, + "misses": 2, + "evictions": 0, + "uncached": 0 + } + }, + { + "history": 4, + "iteration": 3, + "operation": "workflow_status", + "wall_seconds": 0.28298754999991615, + "cpu_seconds": 0.2829874229999998, + "counts": { + "durable_loads": 1, + "decision_evaluations": 1 + }, + "result_sha256": "5a3813efa7e83b83ca2576985a2853293633668eb178a0b7fe53d33a09236214", + "cache": { + "entries": 2, + "accounted_bytes": 13610078, + "hits": 14, + "misses": 2, + "evictions": 0, + "uncached": 0 + } + }, + { + "history": 12, + "iteration": 0, + "operation": "query_proposal", + "wall_seconds": 2.798210487999995, + "cpu_seconds": 2.7979661690000004, + "counts": { + "durable_loads": 1, + "full_compiles": 2, + "manifest_refreshes": 12 + }, + "result_sha256": "ff3f61183c458b2f5685429be6545cc2c2cb9a2b2ffd3750e3d1bb8306016cc8", + "cache": { + "entries": 2, + "accounted_bytes": 13616068, + "hits": 0, + "misses": 2, + "evictions": 0, + "uncached": 0 + } + }, + { + "history": 12, + "iteration": 0, + "operation": "workflow_status", + "wall_seconds": 0.2855314670000553, + "cpu_seconds": 0.285520687, + "counts": { + "durable_loads": 1, + "decision_evaluations": 1 + }, + "result_sha256": "142d5c70bf22a93e54216fc2da7bdb05560c79bb4fe581772d71ee0db3fddb95", + "cache": { + "entries": 2, + "accounted_bytes": 13616068, + "hits": 2, + "misses": 2, + "evictions": 0, + "uncached": 0 + } + }, + { + "history": 12, + "iteration": 1, + "operation": "query_proposal", + "wall_seconds": 0.18680512800006, + "cpu_seconds": 0.18681052099999995, + "counts": { + "durable_loads": 1 + }, + "result_sha256": "ff3f61183c458b2f5685429be6545cc2c2cb9a2b2ffd3750e3d1bb8306016cc8", + "cache": { + "entries": 2, + "accounted_bytes": 13616068, + "hits": 4, + "misses": 2, + "evictions": 0, + "uncached": 0 + } + }, + { + "history": 12, + "iteration": 1, + "operation": "workflow_status", + "wall_seconds": 0.3082281030001468, + "cpu_seconds": 0.30822770199999994, + "counts": { + "durable_loads": 1, + "decision_evaluations": 1 + }, + "result_sha256": "142d5c70bf22a93e54216fc2da7bdb05560c79bb4fe581772d71ee0db3fddb95", + "cache": { + "entries": 2, + "accounted_bytes": 13616068, + "hits": 6, + "misses": 2, + "evictions": 0, + "uncached": 0 + } + }, + { + "history": 12, + "iteration": 2, + "operation": "query_proposal", + "wall_seconds": 0.1891482730000007, + "cpu_seconds": 0.18914540099999932, + "counts": { + "durable_loads": 1 + }, + "result_sha256": "ff3f61183c458b2f5685429be6545cc2c2cb9a2b2ffd3750e3d1bb8306016cc8", + "cache": { + "entries": 2, + "accounted_bytes": 13616068, + "hits": 8, + "misses": 2, + "evictions": 0, + "uncached": 0 + } + }, + { + "history": 12, + "iteration": 2, + "operation": "workflow_status", + "wall_seconds": 0.2844511349999266, + "cpu_seconds": 0.2844501770000001, + "counts": { + "durable_loads": 1, + "decision_evaluations": 1 + }, + "result_sha256": "142d5c70bf22a93e54216fc2da7bdb05560c79bb4fe581772d71ee0db3fddb95", + "cache": { + "entries": 2, + "accounted_bytes": 13616068, + "hits": 10, + "misses": 2, + "evictions": 0, + "uncached": 0 + } + }, + { + "history": 12, + "iteration": 3, + "operation": "query_proposal", + "wall_seconds": 0.1885727040000802, + "cpu_seconds": 0.18856881399999992, + "counts": { + "durable_loads": 1 + }, + "result_sha256": "ff3f61183c458b2f5685429be6545cc2c2cb9a2b2ffd3750e3d1bb8306016cc8", + "cache": { + "entries": 2, + "accounted_bytes": 13616068, + "hits": 12, + "misses": 2, + "evictions": 0, + "uncached": 0 + } + }, + { + "history": 12, + "iteration": 3, + "operation": "workflow_status", + "wall_seconds": 0.28192434799984767, + "cpu_seconds": 0.2819315920000012, + "counts": { + "durable_loads": 1, + "decision_evaluations": 1 + }, + "result_sha256": "142d5c70bf22a93e54216fc2da7bdb05560c79bb4fe581772d71ee0db3fddb95", + "cache": { + "entries": 2, + "accounted_bytes": 13616068, + "hits": 14, + "misses": 2, + "evictions": 0, + "uncached": 0 + } + } + ] +} diff --git a/docs/plans/purpose-separated-standards-engine/reports/performance-proposal-reuse/comparison.csv b/docs/plans/purpose-separated-standards-engine/reports/performance-proposal-reuse/comparison.csv new file mode 100644 index 00000000..bbc8d04c --- /dev/null +++ b/docs/plans/purpose-separated-standards-engine/reports/performance-proposal-reuse/comparison.csv @@ -0,0 +1,12 @@ +scope,history,operation,baseline_samples,baseline_median,baseline_minimum,baseline_maximum,candidate_samples,candidate_median,candidate_minimum,candidate_maximum,speedup +in-process MCP dispatch,1,query_proposal,3,0.5871132489999127,0.577514625999811,0.5973127830000067,3,0.20274338900003386,0.19272818699982963,0.20519528299996637,2.895844110605326 +in-process MCP dispatch,1,workflow_status,3,0.7142770100001599,0.674513399000034,0.7331052619999809,3,0.30536392300018633,0.28982939700017596,0.3060294530000647,2.3391008439452228 +in-process MCP dispatch,4,query_proposal,3,1.1949334420000923,1.1562655379998432,1.265096627000048,3,0.1870546220000051,0.18627454200009197,0.19193290500015792,6.388152450999365 +in-process MCP dispatch,4,workflow_status,3,1.2641281300000173,1.2626330069999767,1.278719454000111,3,0.28760294500011696,0.28298754999991615,0.30427593800004615,4.395393552035787 +in-process MCP dispatch,12,query_proposal,3,2.6479470550000315,2.5372157290000814,2.6934243580001294,3,0.1885727040000802,0.18680512800006,0.1891482730000007,14.042048498169201 +in-process MCP dispatch,12,workflow_status,3,2.806694661000165,2.575289874999953,2.995833120000043,3,0.2844511349999266,0.28192434799984767,0.3082281030001468,9.867053829828766 +real MCP stdio,12,MCP initialization,3,0.6160213130001466,0.5732917230000112,0.62190619099988,3,0.6256709520000641,0.6222455590000209,0.6265571010001167,0.9845771344041613 +real MCP stdio,12,"First draft read, cold projection",3,2.81690493699989,2.7956150580000667,2.8905703899999935,3,2.801389307999898,2.785306965000018,2.814401781000015,1.0055385479467935 +real MCP stdio,12,Repeated query_proposal,6,2.59641446750004,2.490718859000026,2.7555031019999205,6,0.1924868815000309,0.1865453460000026,0.19540566699993178,13.488786598164213 +real MCP stdio,12,Repeated workflow_status,6,2.7054921915000705,2.635224705999917,2.790701533999936,6,0.28674861150000197,0.2831834829999025,0.2951541410000118,9.435066406590261 +real MCP stdio,12,startup plus three query/status pairs,3,16.800245859999677,16.646487868000122,16.87522402400009,3,4.684537466999927,4.674613561999877,4.732154522999963,3.586319029007339 diff --git a/docs/plans/purpose-separated-standards-engine/reports/performance-proposal-reuse/environment.json b/docs/plans/purpose-separated-standards-engine/reports/performance-proposal-reuse/environment.json new file mode 100644 index 00000000..96354273 --- /dev/null +++ b/docs/plans/purpose-separated-standards-engine/reports/performance-proposal-reuse/environment.json @@ -0,0 +1,33 @@ +{ + "python": "3.13.5 (main, Jul 15 2026, 20:25:40) [GCC 14.2.0]", + "executable_sha256": "17b78e0a93175e86f9ac03141924fd7a7f0c0c52e66b34bfa0de20ffef989df1", + "platform": "Linux-6.18.44-x86_64-with-glibc2.41", + "sqlite": "3.46.1", + "git": "git version 2.47.3", + "dependencies": { + "attrs": "26.1.0", + "jsonschema": "4.26.0", + "jsonschema-specifications": "2025.9.1", + "referencing": "0.37.0", + "rpds-py": "2026.5.1", + "typing-extensions": "4.16.0" + }, + "fixture": { + "source_revision": "2dd2ce1bd8e1129a5662be7c76bf864778fb2010", + "captured_files": 438, + "captured_bytes": 3796413, + "content_id": "snapshot-content:sha256:7fe09d2cadb34a547b52362239268dd86ab43ed9c679b9768e20644a87e1ec5b", + "store_bytes": 5885952, + "history_lengths": [ + 1, + 4, + 12 + ], + "type": "Synthetic non-normative reference; real immutable proposal and analysis records; original accepted base remains fixed." + }, + "limits": [ + "Python 3.13.5 is outside supported 3.11/3.12.", + "rpds-py 2026.5.1 differs from pinned 2026.6.3.", + "Official SDK, configured Codex and independent reviewer were unavailable." + ] +} diff --git a/docs/plans/purpose-separated-standards-engine/reports/performance-proposal-reuse/measure_proposal_stdio.py b/docs/plans/purpose-separated-standards-engine/reports/performance-proposal-reuse/measure_proposal_stdio.py new file mode 100644 index 00000000..537baa10 --- /dev/null +++ b/docs/plans/purpose-separated-standards-engine/reports/performance-proposal-reuse/measure_proposal_stdio.py @@ -0,0 +1,76 @@ +"""Alternating real-MCP draft reads on the same immutable twelve-edit workload.""" +from __future__ import annotations +import argparse +import hashlib +import json +import os +from pathlib import Path +import select +import signal +import subprocess +import sys +import tempfile +import time + +p=argparse.ArgumentParser() +p.add_argument('--baseline',type=Path,required=True) +p.add_argument('--candidate',type=Path,required=True) +p.add_argument('--fixture',type=Path,required=True) +p.add_argument('--output',type=Path,required=True) +p.add_argument('--repeats',type=int,default=3) +a=p.parse_args() +work=json.loads((a.fixture.parent/'workload.json').read_text()) +selection=work['selected']['12']; rows=[]; expected={} + +def sequence(label,source,sample): + env={**os.environ,'PYTHONPATH':str(source.resolve())} + command=[sys.executable,'-P','-m','tools.standards_engine.standards_engine.mcp','--repo-root',str(a.fixture.resolve()),'--purpose','authoring'] + with tempfile.TemporaryFile(mode='w+') as errors: + start=time.perf_counter() + process=subprocess.Popen(command,stdin=subprocess.PIPE,stdout=subprocess.PIPE,stderr=errors,text=True,bufsize=1,env=env,start_new_session=True) + def send(method,params,identifier): + process.stdin.write(json.dumps({'jsonrpc':'2.0','id':identifier,'method':method,'params':params})+'\n');process.stdin.flush() + ready,_,_=select.select([process.stdout],[],[],90) + if not ready: raise TimeoutError('MCP benchmark response unavailable') + line=process.stdout.readline() + if not line: + errors.seek(0);raise RuntimeError(errors.read()) + value=json.loads(line) + assert value.get('id')==identifier,value + assert 'error' not in value,value + return value['result'] + try: + send('initialize',{'protocolVersion':'2025-11-25','capabilities':{},'clientInfo':{'name':'projection-measurement','version':'1'}},1) + rows.append({'implementation':label,'sample':sample,'operation':'initialization','wall_seconds':time.perf_counter()-start}) + process.stdin.write(json.dumps({'jsonrpc':'2.0','method':'notifications/initialized'})+'\n');process.stdin.flush() + operations=[('query_proposal',{'revision':selection['revision'],'request':{'kind':'read','target':work['target']}}),('workflow_status',{'context':selection['context']})] + identifier=2 + for iteration in range(3): + for op,arguments in operations: + start=time.perf_counter() + out=send('tools/call',{'name':op,'arguments':arguments},identifier);identifier+=1 + elapsed=time.perf_counter()-start + assert not out['isError'],out + value=out['structuredContent']; assert json.loads(out['content'][0]['text'])==value + if op=='query_proposal':assert 'Revision 12.' in value['content'] + else:assert value['status']=='complete',value + digest=hashlib.sha256(json.dumps(value,sort_keys=True,separators=(',',':')).encode()).hexdigest() + if op in expected:assert expected[op]==digest,(op,expected[op],digest) + else:expected[op]=digest + rows.append({'implementation':label,'sample':sample,'iteration':iteration,'operation':op,'wall_seconds':elapsed,'result_sha256':digest}) + process.stdin.close() + assert process.wait(timeout=10)==0 + finally: + if process.poll() is None: + os.killpg(process.pid,signal.SIGTERM) + try:process.wait(timeout=5) + except subprocess.TimeoutExpired: + os.killpg(process.pid,signal.SIGKILL);process.wait() + process.stdout.close() + if not process.stdin.closed:process.stdin.close() + +for sample in range(a.repeats): + order=[('baseline',a.baseline),('candidate',a.candidate)] + if sample%2:order.reverse() + for label,source in order:sequence(label,source,sample) + a.output.write_text(json.dumps({'python':sys.version,'executable_sha256':hashlib.sha256(Path(sys.executable).read_bytes()).hexdigest(),'observations':rows},indent=2)+'\n') diff --git a/docs/plans/purpose-separated-standards-engine/reports/performance-proposal-reuse/measure_proposals.py b/docs/plans/purpose-separated-standards-engine/reports/performance-proposal-reuse/measure_proposals.py new file mode 100644 index 00000000..bc462b8c --- /dev/null +++ b/docs/plans/purpose-separated-standards-engine/reports/performance-proposal-reuse/measure_proposals.py @@ -0,0 +1,92 @@ +"""Measure exact-revision consumer operations on a fixed disposable workload.""" +from __future__ import annotations +import argparse +from contextlib import ExitStack +from collections import Counter +from copy import deepcopy +import hashlib +import importlib.metadata +import json +from pathlib import Path +import subprocess +import sys +import time +from unittest.mock import patch + +p=argparse.ArgumentParser() +p.add_argument('--source', type=Path, required=True) +p.add_argument('--fixture', type=Path, required=True) +p.add_argument('--output', type=Path, required=True) +p.add_argument('--prepare', action='store_true') +p.add_argument('--repeats', type=int, default=3) +a=p.parse_args() +sys.path.insert(0,str(a.source.resolve())) +from tools.standards_engine.standards_engine import AgentToolFacade +from tools.standards_engine.standards_engine.mcp import MCPServer +from tools.standards_engine.tests.test_mcp import initialize, request +from tools.standards_engine.tests.test_agent_workflow import reference_change +from tools.standards_engine.standards_engine import logical_authoring as logical +from tools.standards_engine.standards_engine import engine as engine_module +from tools.standards_snapshots.standards_snapshots import SnapshotModule + +manifest=a.fixture.parent/'workload.json' +if a.prepare: + if a.fixture.exists(): raise RuntimeError('fixture must be new') + a.fixture.parent.mkdir(parents=True,exist_ok=True) + subprocess.run(['git','clone','--quiet','--no-hardlinks',str(a.source),str(a.fixture)],check=True) + branch=subprocess.check_output(['git','branch','--show-current'],cwd=a.fixture,text=True).strip() + if branch!='main': subprocess.run(['git','branch','-M','main'],cwd=a.fixture,check=True) + with AgentToolFacade.open_repository(a.fixture,purpose='authoring') as f: + result=f.create_snapshot({'kind':'create-snapshot'}) + assert result['kind']=='create-snapshot-result',result + snapshot=result['snapshot']['snapshot']; selected={} + for n in range(1,13): + change=reference_change(a.fixture,'projection-latency',revision=n>1) + change['edits'][0]['standard']['body']+=f'Revision {n}.\n' + args={'change_set':change} + if n==1: + args['snapshot']=snapshot; out=f.propose(args) + else: + args['context']=out['context']; out=f.revise(args) + assert out['status']=='complete',out + if n in (1,4,12): selected[str(n)]=deepcopy(out) + data={'snapshot':snapshot,'selected':selected,'target':'reference.testing.projection-latency'} + manifest.write_text(json.dumps(data,indent=2)+'\n') + a.output.write_text(json.dumps({'fixture':str(a.fixture),'prepared':True})+'\n') + sys.exit(0) + +work=json.loads(manifest.read_text()); rows=[]; counts=Counter() +def instrument(owner,name,label): + original=getattr(owner,name) + def measured(*args,**kwargs): + counts[label]+=1 + return original(*args,**kwargs) + return patch.object(owner,name,measured) +with ExitStack() as stack: + stack.enter_context(instrument(logical,'_refresh_suite_input_projection','manifest_refreshes')) + stack.enter_context(instrument(engine_module,'compile_policy_impact','full_compiles')) + stack.enter_context(instrument(SnapshotModule,'load_content','durable_loads')) + stack.enter_context(instrument(engine_module,'evaluate_analysis','decision_evaluations')) + for length, result in work['selected'].items(): + server=MCPServer(a.fixture,purpose='authoring'); initialize(server) + operations=[('query_proposal',{'revision':result['revision'],'request':{'kind':'read','target':work['target']}}), + ('workflow_status',{'context':result['context']})] + for iteration in range(a.repeats+1): + for op,args in operations: + counts.clear(); start=time.perf_counter(); cpu=time.process_time() + out=server.dispatch(request('tools/call',{'name':op,'arguments':args})) + elapsed=time.perf_counter()-start; cpu=time.process_time()-cpu + value=out['result']['structuredContent'] + assert not out['result']['isError'],out + if op=='query_proposal': assert f'Revision {length}.' in value['content'] + else: assert value['status']==('complete' if length=='12' else 'stale'),value + encoded=json.dumps(value,sort_keys=True,separators=(',',':')).encode() + rows.append({'history':int(length),'iteration':iteration,'operation':op, + 'wall_seconds':elapsed,'cpu_seconds':cpu,'counts':dict(counts), + 'result_sha256':hashlib.sha256(encoded).hexdigest(), + 'cache':server._compiled_cache.statistics}) + server.close() +info={'source':str(a.source),'head':subprocess.check_output(['git','rev-parse','HEAD'],cwd=a.source,text=True).strip(), + 'python':sys.version,'executable_sha256':hashlib.sha256(Path(sys.executable).read_bytes()).hexdigest(), + 'packages':{n:importlib.metadata.version(n) for n in ('jsonschema','rpds-py')},'observations':rows} +a.output.write_text(json.dumps(info,indent=2)+'\n') diff --git a/docs/plans/purpose-separated-standards-engine/reports/performance-proposal-reuse/sequence-totals.json b/docs/plans/purpose-separated-standards-engine/reports/performance-proposal-reuse/sequence-totals.json new file mode 100644 index 00000000..96ddebec --- /dev/null +++ b/docs/plans/purpose-separated-standards-engine/reports/performance-proposal-reuse/sequence-totals.json @@ -0,0 +1,32 @@ +[ + { + "implementation": "baseline", + "sample": 0, + "wall_seconds": 16.87522402400009 + }, + { + "implementation": "baseline", + "sample": 1, + "wall_seconds": 16.646487868000122 + }, + { + "implementation": "baseline", + "sample": 2, + "wall_seconds": 16.800245859999677 + }, + { + "implementation": "candidate", + "sample": 0, + "wall_seconds": 4.674613561999877 + }, + { + "implementation": "candidate", + "sample": 1, + "wall_seconds": 4.732154522999963 + }, + { + "implementation": "candidate", + "sample": 2, + "wall_seconds": 4.684537466999927 + } +] diff --git a/docs/plans/purpose-separated-standards-engine/reports/performance-proposal-reuse/source-binding.json b/docs/plans/purpose-separated-standards-engine/reports/performance-proposal-reuse/source-binding.json new file mode 100644 index 00000000..214390de --- /dev/null +++ b/docs/plans/purpose-separated-standards-engine/reports/performance-proposal-reuse/source-binding.json @@ -0,0 +1,32 @@ +{ + "implementation_commit": "443d38e14bd7d4b2e279195bd0b62bc96cccd5d8", + "test_spy_repair_commit": "68eb97c0dd59fb9f833d0b3e4e90bdb7271345bf", + "source_hashes": { + "tools/standards_engine/standards_engine/compiled_cache.py": { + "sha256": "5fe033c834a88415ac477ef8d09bc97e9b189be2cff986e142c782005a1b4f50", + "python_3_11_grammar": true + }, + "tools/standards_engine/standards_engine/engine.py": { + "sha256": "ff1c3e9569fa7e60b37357608ade12b1a0abc5c287f6d8d4bbc7a4302196a759", + "python_3_11_grammar": true + }, + "tools/standards_engine/standards_engine/logical_authoring.py": { + "sha256": "81f99ed06fefd6c7caa4ac344bac92adf23ca9e1941d12f06c46c00cba8af2bc", + "python_3_11_grammar": true + }, + "tools/standards_engine/standards_engine/operation_materials.py": { + "sha256": "bae7ea7900cfc3b8aaf837d0ec9275692d9cc53bd10087a5e6a94e2ac8a624f9", + "python_3_11_grammar": true + }, + "tools/standards_engine/tests/test_nested_materials.py": { + "sha256": "2dd08a17f1a1f2b3869b3e552924afb6e4e91c70e5f86e63cce7eac975afd707", + "python_3_11_grammar": true + }, + "tools/standards_engine/tests/test_proposal_reuse.py": { + "sha256": "4493f55b8773f59ee1e99ac4a54f84524f70526d4e457a1acbe13c04a0c92460", + "python_3_11_grammar": true + } + }, + "normative_and_wire_and_lock_preservation": true, + "limits": "Grammar parsing is not execution on Python 3.11. The later evidence commit does not change runtime Python." +} diff --git a/docs/plans/purpose-separated-standards-engine/reports/performance-proposal-reuse/stdio-final.json b/docs/plans/purpose-separated-standards-engine/reports/performance-proposal-reuse/stdio-final.json new file mode 100644 index 00000000..4eab5047 --- /dev/null +++ b/docs/plans/purpose-separated-standards-engine/reports/performance-proposal-reuse/stdio-final.json @@ -0,0 +1,330 @@ +{ + "python": "3.13.5 (main, Jul 15 2026, 20:25:40) [GCC 14.2.0]", + "executable_sha256": "17b78e0a93175e86f9ac03141924fd7a7f0c0c52e66b34bfa0de20ffef989df1", + "observations": [ + { + "implementation": "baseline", + "sample": 0, + "operation": "initialization", + "wall_seconds": 0.6160213130001466 + }, + { + "implementation": "baseline", + "sample": 0, + "iteration": 0, + "operation": "query_proposal", + "wall_seconds": 2.8905703899999935, + "result_sha256": "ff3f61183c458b2f5685429be6545cc2c2cb9a2b2ffd3750e3d1bb8306016cc8" + }, + { + "implementation": "baseline", + "sample": 0, + "iteration": 0, + "operation": "workflow_status", + "wall_seconds": 2.739713920999975, + "result_sha256": "142d5c70bf22a93e54216fc2da7bdb05560c79bb4fe581772d71ee0db3fddb95" + }, + { + "implementation": "baseline", + "sample": 0, + "iteration": 1, + "operation": "query_proposal", + "wall_seconds": 2.7555031019999205, + "result_sha256": "ff3f61183c458b2f5685429be6545cc2c2cb9a2b2ffd3750e3d1bb8306016cc8" + }, + { + "implementation": "baseline", + "sample": 0, + "iteration": 1, + "operation": "workflow_status", + "wall_seconds": 2.690861086000041, + "result_sha256": "142d5c70bf22a93e54216fc2da7bdb05560c79bb4fe581772d71ee0db3fddb95" + }, + { + "implementation": "baseline", + "sample": 0, + "iteration": 2, + "operation": "query_proposal", + "wall_seconds": 2.5473295060000964, + "result_sha256": "ff3f61183c458b2f5685429be6545cc2c2cb9a2b2ffd3750e3d1bb8306016cc8" + }, + { + "implementation": "baseline", + "sample": 0, + "iteration": 2, + "operation": "workflow_status", + "wall_seconds": 2.635224705999917, + "result_sha256": "142d5c70bf22a93e54216fc2da7bdb05560c79bb4fe581772d71ee0db3fddb95" + }, + { + "implementation": "candidate", + "sample": 0, + "operation": "initialization", + "wall_seconds": 0.6222455590000209 + }, + { + "implementation": "candidate", + "sample": 0, + "iteration": 0, + "operation": "query_proposal", + "wall_seconds": 2.785306965000018, + "result_sha256": "ff3f61183c458b2f5685429be6545cc2c2cb9a2b2ffd3750e3d1bb8306016cc8" + }, + { + "implementation": "candidate", + "sample": 0, + "iteration": 0, + "operation": "workflow_status", + "wall_seconds": 0.3055896329999541, + "result_sha256": "142d5c70bf22a93e54216fc2da7bdb05560c79bb4fe581772d71ee0db3fddb95" + }, + { + "implementation": "candidate", + "sample": 0, + "iteration": 1, + "operation": "query_proposal", + "wall_seconds": 0.19540566699993178, + "result_sha256": "ff3f61183c458b2f5685429be6545cc2c2cb9a2b2ffd3750e3d1bb8306016cc8" + }, + { + "implementation": "candidate", + "sample": 0, + "iteration": 1, + "operation": "workflow_status", + "wall_seconds": 0.28874681100001, + "result_sha256": "142d5c70bf22a93e54216fc2da7bdb05560c79bb4fe581772d71ee0db3fddb95" + }, + { + "implementation": "candidate", + "sample": 0, + "iteration": 2, + "operation": "query_proposal", + "wall_seconds": 0.19413544400003957, + "result_sha256": "ff3f61183c458b2f5685429be6545cc2c2cb9a2b2ffd3750e3d1bb8306016cc8" + }, + { + "implementation": "candidate", + "sample": 0, + "iteration": 2, + "operation": "workflow_status", + "wall_seconds": 0.2831834829999025, + "result_sha256": "142d5c70bf22a93e54216fc2da7bdb05560c79bb4fe581772d71ee0db3fddb95" + }, + { + "implementation": "candidate", + "sample": 1, + "operation": "initialization", + "wall_seconds": 0.6256709520000641 + }, + { + "implementation": "candidate", + "sample": 1, + "iteration": 0, + "operation": "query_proposal", + "wall_seconds": 2.814401781000015, + "result_sha256": "ff3f61183c458b2f5685429be6545cc2c2cb9a2b2ffd3750e3d1bb8306016cc8" + }, + { + "implementation": "candidate", + "sample": 1, + "iteration": 0, + "operation": "workflow_status", + "wall_seconds": 0.3219053329999042, + "result_sha256": "142d5c70bf22a93e54216fc2da7bdb05560c79bb4fe581772d71ee0db3fddb95" + }, + { + "implementation": "candidate", + "sample": 1, + "iteration": 1, + "operation": "query_proposal", + "wall_seconds": 0.19215867299999445, + "result_sha256": "ff3f61183c458b2f5685429be6545cc2c2cb9a2b2ffd3750e3d1bb8306016cc8" + }, + { + "implementation": "candidate", + "sample": 1, + "iteration": 1, + "operation": "workflow_status", + "wall_seconds": 0.29004855299990595, + "result_sha256": "142d5c70bf22a93e54216fc2da7bdb05560c79bb4fe581772d71ee0db3fddb95" + }, + { + "implementation": "candidate", + "sample": 1, + "iteration": 2, + "operation": "query_proposal", + "wall_seconds": 0.19281509000006736, + "result_sha256": "ff3f61183c458b2f5685429be6545cc2c2cb9a2b2ffd3750e3d1bb8306016cc8" + }, + { + "implementation": "candidate", + "sample": 1, + "iteration": 2, + "operation": "workflow_status", + "wall_seconds": 0.2951541410000118, + "result_sha256": "142d5c70bf22a93e54216fc2da7bdb05560c79bb4fe581772d71ee0db3fddb95" + }, + { + "implementation": "baseline", + "sample": 1, + "operation": "initialization", + "wall_seconds": 0.5732917230000112 + }, + { + "implementation": "baseline", + "sample": 1, + "iteration": 0, + "operation": "query_proposal", + "wall_seconds": 2.7956150580000667, + "result_sha256": "ff3f61183c458b2f5685429be6545cc2c2cb9a2b2ffd3750e3d1bb8306016cc8" + }, + { + "implementation": "baseline", + "sample": 1, + "iteration": 0, + "operation": "workflow_status", + "wall_seconds": 2.648928900000101, + "result_sha256": "142d5c70bf22a93e54216fc2da7bdb05560c79bb4fe581772d71ee0db3fddb95" + }, + { + "implementation": "baseline", + "sample": 1, + "iteration": 1, + "operation": "query_proposal", + "wall_seconds": 2.490718859000026, + "result_sha256": "ff3f61183c458b2f5685429be6545cc2c2cb9a2b2ffd3750e3d1bb8306016cc8" + }, + { + "implementation": "baseline", + "sample": 1, + "iteration": 1, + "operation": "workflow_status", + "wall_seconds": 2.6540319319999526, + "result_sha256": "142d5c70bf22a93e54216fc2da7bdb05560c79bb4fe581772d71ee0db3fddb95" + }, + { + "implementation": "baseline", + "sample": 1, + "iteration": 2, + "operation": "query_proposal", + "wall_seconds": 2.6931998620000286, + "result_sha256": "ff3f61183c458b2f5685429be6545cc2c2cb9a2b2ffd3750e3d1bb8306016cc8" + }, + { + "implementation": "baseline", + "sample": 1, + "iteration": 2, + "operation": "workflow_status", + "wall_seconds": 2.790701533999936, + "result_sha256": "142d5c70bf22a93e54216fc2da7bdb05560c79bb4fe581772d71ee0db3fddb95" + }, + { + "implementation": "baseline", + "sample": 2, + "operation": "initialization", + "wall_seconds": 0.62190619099988 + }, + { + "implementation": "baseline", + "sample": 2, + "iteration": 0, + "operation": "query_proposal", + "wall_seconds": 2.81690493699989, + "result_sha256": "ff3f61183c458b2f5685429be6545cc2c2cb9a2b2ffd3750e3d1bb8306016cc8" + }, + { + "implementation": "baseline", + "sample": 2, + "iteration": 0, + "operation": "workflow_status", + "wall_seconds": 2.6910319449998497, + "result_sha256": "142d5c70bf22a93e54216fc2da7bdb05560c79bb4fe581772d71ee0db3fddb95" + }, + { + "implementation": "baseline", + "sample": 2, + "iteration": 1, + "operation": "query_proposal", + "wall_seconds": 2.633001178000086, + "result_sha256": "ff3f61183c458b2f5685429be6545cc2c2cb9a2b2ffd3750e3d1bb8306016cc8" + }, + { + "implementation": "baseline", + "sample": 2, + "iteration": 1, + "operation": "workflow_status", + "wall_seconds": 2.7574505549998776, + "result_sha256": "142d5c70bf22a93e54216fc2da7bdb05560c79bb4fe581772d71ee0db3fddb95" + }, + { + "implementation": "baseline", + "sample": 2, + "iteration": 2, + "operation": "query_proposal", + "wall_seconds": 2.5598277569999937, + "result_sha256": "ff3f61183c458b2f5685429be6545cc2c2cb9a2b2ffd3750e3d1bb8306016cc8" + }, + { + "implementation": "baseline", + "sample": 2, + "iteration": 2, + "operation": "workflow_status", + "wall_seconds": 2.7201232970001, + "result_sha256": "142d5c70bf22a93e54216fc2da7bdb05560c79bb4fe581772d71ee0db3fddb95" + }, + { + "implementation": "candidate", + "sample": 2, + "operation": "initialization", + "wall_seconds": 0.6265571010001167 + }, + { + "implementation": "candidate", + "sample": 2, + "iteration": 0, + "operation": "query_proposal", + "wall_seconds": 2.801389307999898, + "result_sha256": "ff3f61183c458b2f5685429be6545cc2c2cb9a2b2ffd3750e3d1bb8306016cc8" + }, + { + "implementation": "candidate", + "sample": 2, + "iteration": 0, + "operation": "workflow_status", + "wall_seconds": 0.31236002300011023, + "result_sha256": "142d5c70bf22a93e54216fc2da7bdb05560c79bb4fe581772d71ee0db3fddb95" + }, + { + "implementation": "candidate", + "sample": 2, + "iteration": 1, + "operation": "query_proposal", + "wall_seconds": 0.1865453460000026, + "result_sha256": "ff3f61183c458b2f5685429be6545cc2c2cb9a2b2ffd3750e3d1bb8306016cc8" + }, + { + "implementation": "candidate", + "sample": 2, + "iteration": 1, + "operation": "workflow_status", + "wall_seconds": 0.28475041199999396, + "result_sha256": "142d5c70bf22a93e54216fc2da7bdb05560c79bb4fe581772d71ee0db3fddb95" + }, + { + "implementation": "candidate", + "sample": 2, + "iteration": 2, + "operation": "query_proposal", + "wall_seconds": 0.18965904799983946, + "result_sha256": "ff3f61183c458b2f5685429be6545cc2c2cb9a2b2ffd3750e3d1bb8306016cc8" + }, + { + "implementation": "candidate", + "sample": 2, + "iteration": 2, + "operation": "workflow_status", + "wall_seconds": 0.2832762289999664, + "result_sha256": "142d5c70bf22a93e54216fc2da7bdb05560c79bb4fe581772d71ee0db3fddb95" + } + ] +} diff --git a/docs/plans/purpose-separated-standards-engine/reports/performance-proposal-reuse/structural.json b/docs/plans/purpose-separated-standards-engine/reports/performance-proposal-reuse/structural.json new file mode 100644 index 00000000..e7a47c71 --- /dev/null +++ b/docs/plans/purpose-separated-standards-engine/reports/performance-proposal-reuse/structural.json @@ -0,0 +1,11 @@ +{ + "kind": "verify-repository-result", + "refreshed_verification_inputs": true, + "verification": { + "passed": true, + "exit_code": 0, + "suites": 73, + "checks": 121, + "failures": [] + } +} diff --git a/docs/plans/purpose-separated-standards-engine/reports/performance-proposal-reuse/verification.json b/docs/plans/purpose-separated-standards-engine/reports/performance-proposal-reuse/verification.json new file mode 100644 index 00000000..df150bbe --- /dev/null +++ b/docs/plans/purpose-separated-standards-engine/reports/performance-proposal-reuse/verification.json @@ -0,0 +1,312 @@ +{ + "initial_campaign": { + "success": false, + "results": [ + { + "package": "standards_engine", + "command": [ + "/mnt/data/projection-work/env/bin/python", + "-m", + "unittest", + "discover", + "-s", + "tools/standards_engine/tests" + ], + "returncode": 1, + "wall_seconds": 541.495150882, + "tests": 232, + "unittest_seconds": 540.716, + "skipped": 0 + }, + { + "package": "graph_engine", + "command": [ + "/mnt/data/projection-work/env/bin/python", + "-m", + "unittest", + "discover", + "-s", + "tools/graph_engine/tests" + ], + "returncode": 0, + "wall_seconds": 0.22067430499987495, + "tests": 37, + "unittest_seconds": 0.15, + "skipped": 0 + }, + { + "package": "repository_git", + "command": [ + "/mnt/data/projection-work/env/bin/python", + "-m", + "unittest", + "discover", + "-s", + "tools/repository_git/tests" + ], + "returncode": 0, + "wall_seconds": 2.94203097899981, + "tests": 28, + "unittest_seconds": 2.846, + "skipped": 0 + }, + { + "package": "standards_analysis", + "command": [ + "/mnt/data/projection-work/env/bin/python", + "-m", + "unittest", + "discover", + "-s", + "tools/standards_analysis/tests" + ], + "returncode": 0, + "wall_seconds": 1.2570018960000198, + "tests": 100, + "unittest_seconds": 0.763, + "skipped": 0 + }, + { + "package": "standards_applicability", + "command": [ + "/mnt/data/projection-work/env/bin/python", + "-m", + "unittest", + "discover", + "-s", + "tools/standards_applicability/tests" + ], + "returncode": 0, + "wall_seconds": 0.10110776400006216, + "tests": 12, + "unittest_seconds": 0.032, + "skipped": 0 + }, + { + "package": "standards_contracts", + "command": [ + "/mnt/data/projection-work/env/bin/python", + "-m", + "unittest", + "discover", + "-s", + "tools/standards_contracts/tests" + ], + "returncode": 0, + "wall_seconds": 24.983117884999956, + "tests": 23, + "unittest_seconds": 24.855, + "skipped": 1 + }, + { + "package": "standards_graph", + "command": [ + "/mnt/data/projection-work/env/bin/python", + "-m", + "unittest", + "discover", + "-s", + "tools/standards_graph/tests" + ], + "returncode": 0, + "wall_seconds": 0.1775817550001193, + "tests": 2, + "unittest_seconds": 0.079, + "skipped": 0 + }, + { + "package": "standards_identity", + "command": [ + "/mnt/data/projection-work/env/bin/python", + "-m", + "unittest", + "discover", + "-s", + "tools/standards_identity/tests" + ], + "returncode": 0, + "wall_seconds": 0.1950812009999936, + "tests": 16, + "unittest_seconds": 0.118, + "skipped": 0 + }, + { + "package": "standards_metadata", + "command": [ + "/mnt/data/projection-work/env/bin/python", + "-m", + "unittest", + "discover", + "-s", + "tools/standards_metadata/tests" + ], + "returncode": 0, + "wall_seconds": 0.8283773769999243, + "tests": 31, + "unittest_seconds": 0.414, + "skipped": 0 + }, + { + "package": "standards_policy_impact", + "command": [ + "/mnt/data/projection-work/env/bin/python", + "-m", + "unittest", + "discover", + "-s", + "tools/standards_policy_impact/tests" + ], + "returncode": 0, + "wall_seconds": 0.5260782510001718, + "tests": 10, + "unittest_seconds": 0.434, + "skipped": 0 + }, + { + "package": "standards_snapshots", + "command": [ + "/mnt/data/projection-work/env/bin/python", + "-m", + "unittest", + "discover", + "-s", + "tools/standards_snapshots/tests" + ], + "returncode": 0, + "wall_seconds": 0.17879146499990384, + "tests": 23, + "unittest_seconds": 0.105, + "skipped": 0 + }, + { + "package": "standards_verifier", + "command": [ + "/mnt/data/projection-work/env/bin/python", + "-m", + "unittest", + "discover", + "-s", + "tools/standards_verifier/tests" + ], + "returncode": 0, + "wall_seconds": 6.031305341999996, + "tests": 168, + "unittest_seconds": 5.686, + "skipped": 0 + } + ] + }, + "corrected_fixture_and_followup": { + "success": true, + "results": [ + { + "name": "nested-final", + "returncode": 0, + "wall_seconds": 29.48828068099988, + "tests": 11, + "command": [ + "/mnt/data/projection-work/env/bin/python", + "-m", + "unittest", + "discover", + "-s", + "tools/standards_engine/tests", + "-p", + "test_nested_materials.py" + ] + }, + { + "name": "proposal-final", + "returncode": 0, + "wall_seconds": 52.286256933999994, + "tests": 21, + "command": [ + "/mnt/data/projection-work/env/bin/python", + "-m", + "unittest", + "discover", + "-s", + "tools/standards_engine/tests", + "-p", + "test_proposal_reuse.py" + ] + }, + { + "name": "warm-recovery-final", + "returncode": 0, + "wall_seconds": 34.419682730999966, + "tests": null, + "command": [ + "/mnt/data/projection-work/env/bin/python", + "/mnt/data/projection-work/qualified-final/docs/plans/purpose-separated-standards-engine/reports/performance-process-reuse/validate_warm_recovery.py", + "--source", + "/mnt/data/projection-work/qualified-final", + "--output", + "/mnt/data/projection-work/evidence/warm-recovery-final.json" + ] + }, + { + "name": "baseline-final", + "returncode": 0, + "wall_seconds": 38.97925158699991, + "tests": null, + "command": [ + "/mnt/data/projection-work/env/bin/python", + "/mnt/data/projection-work/measure_proposals.py", + "--source", + "/mnt/data/projection-work/baseline", + "--fixture", + "/mnt/data/projection-work/workload/repo", + "--output", + "/mnt/data/projection-work/evidence/baseline-final.json", + "--repeats", + "3" + ] + }, + { + "name": "candidate-final", + "returncode": 0, + "wall_seconds": 11.514479575999985, + "tests": null, + "command": [ + "/mnt/data/projection-work/env/bin/python", + "/mnt/data/projection-work/measure_proposals.py", + "--source", + "/mnt/data/projection-work/repo", + "--fixture", + "/mnt/data/projection-work/workload/repo", + "--output", + "/mnt/data/projection-work/evidence/candidate-final.json", + "--repeats", + "3" + ] + }, + { + "name": "stdio-final", + "returncode": 0, + "wall_seconds": 64.85418001699986, + "tests": null, + "command": [ + "/mnt/data/projection-work/env/bin/python", + "/mnt/data/projection-work/measure_proposal_stdio.py", + "--baseline", + "/mnt/data/projection-work/baseline", + "--candidate", + "/mnt/data/projection-work/repo", + "--fixture", + "/mnt/data/projection-work/workload/repo", + "--output", + "/mnt/data/projection-work/evidence/stdio-final.json", + "--repeats", + "3" + ] + } + ] + }, + "coverage": { + "engine_distinct_tests": 232, + "supporting_tests": 450, + "supporting_skips": 1, + "interpretation": "Initial full run had one old spy-signature error. Its entire unchanged-assertion module and all new cache regressions passed after the adapter repair. Production runtime sources are unchanged across that repair." + } +} diff --git a/docs/plans/purpose-separated-standards-engine/reports/performance-proposal-reuse/warm-recovery-final.json b/docs/plans/purpose-separated-standards-engine/reports/performance-proposal-reuse/warm-recovery-final.json new file mode 100644 index 00000000..55a7d317 --- /dev/null +++ b/docs/plans/purpose-separated-standards-engine/reports/performance-proposal-reuse/warm-recovery-final.json @@ -0,0 +1,42 @@ +{ + "outcome": "passed", + "seconds": 34.02609723399996, + "scenario": "tools.standards_engine.tests.test_coverage_publication.EngineAuditPublicationTest.test_review_verify_apply_recover_and_read_without_original_database", + "caches_before_close": [ + { + "entries": 2, + "accounted_bytes": 13607337, + "hits": 11, + "misses": 2, + "evictions": 0, + "uncached": 0 + }, + { + "entries": 1, + "accounted_bytes": 6533024, + "hits": 0, + "misses": 1, + "evictions": 0, + "uncached": 0 + } + ], + "scope": "Original assertions unchanged; first Engine warms through review, live-evidence rejection, interrupted apply and recovery. Second Engine uses a fresh cache and independent database.", + "caches_after_close": [ + { + "entries": 0, + "accounted_bytes": 0, + "hits": 11, + "misses": 2, + "evictions": 0, + "uncached": 0 + }, + { + "entries": 0, + "accounted_bytes": 0, + "hits": 0, + "misses": 1, + "evictions": 0, + "uncached": 0 + } + ] +} diff --git a/evaluation/standards-effectiveness/generated/suite-inputs.json b/evaluation/standards-effectiveness/generated/suite-inputs.json index 39d0ca1e..99b6504f 100644 --- a/evaluation/standards-effectiveness/generated/suite-inputs.json +++ b/evaluation/standards-effectiveness/generated/suite-inputs.json @@ -7065,7 +7065,7 @@ ] }, { - "digest": "sha256:834629773d98efb9dbc8461c9926eb58851b9ab5ebfa94938a08d410ce2d02a5", + "digest": "sha256:5fe033c834a88415ac477ef8d09bc97e9b189be2cff986e142c782005a1b4f50", "path": "tools/standards_engine/standards_engine/compiled_cache.py", "state": "present", "uses": [ @@ -7089,7 +7089,7 @@ ] }, { - "digest": "sha256:7790c66981e1b88986e186c521c2ab51e00c37f62cd096897063ae55504cc1c0", + "digest": "sha256:ff1c3e9569fa7e60b37357608ade12b1a0abc5c287f6d8d4bbc7a4302196a759", "path": "tools/standards_engine/standards_engine/engine.py", "state": "present", "uses": [ @@ -7123,7 +7123,7 @@ ] }, { - "digest": "sha256:f9471723773b3a23e50548e459c2965a67bc769d6504000b524e1ef05863f36a", + "digest": "sha256:81f99ed06fefd6c7caa4ac344bac92adf23ca9e1941d12f06c46c00cba8af2bc", "path": "tools/standards_engine/standards_engine/logical_authoring.py", "state": "present", "uses": [ @@ -7159,7 +7159,7 @@ ] }, { - "digest": "sha256:fff7a6cba434679b8d95f89d1eb17e25013b9887047c2dd7ab632d3b4d84a6fe", + "digest": "sha256:bae7ea7900cfc3b8aaf837d0ec9275692d9cc53bd10087a5e6a94e2ac8a624f9", "path": "tools/standards_engine/standards_engine/operation_materials.py", "state": "present", "uses": [ @@ -13302,7 +13302,7 @@ "path": "evaluation/standards-effectiveness/suite-registry.toml" }, "repository_index": { - "digest": "sha256:a61573877dbf8758c052973548c08f55e5e22ebf2effe449f40f37d0036f8094", + "digest": "sha256:9245138cf21822d5b31afdeec6862bbff9ace948c2597b7d7f6d02d643385ea4", "uses": [ { "check": "python-package-contract", diff --git a/tools/standards_engine/PURPOSE-SEPARATION.md b/tools/standards_engine/PURPOSE-SEPARATION.md index 581f07ba..3c0dd2c1 100644 --- a/tools/standards_engine/PURPOSE-SEPARATION.md +++ b/tools/standards_engine/PURPOSE-SEPARATION.md @@ -84,7 +84,8 @@ verification, target compare-and-swap and recovery obtain fresh observations; no operation-local material crosses those barriers as permission or readiness. Each facade/Engine/SQLite lifetime remains per call. MCP now owns the installed interface and a bounded cache of pure snapshot compilation as described below. -Operation-local proposal state, evaluations and permissions remain per-call. +Operation-local workflow state, evaluations and permissions remain per-call. +Exact draft projection retention is described separately below. ## Process-owned pure reuse @@ -97,7 +98,8 @@ publication keeps the installed interface valid. Standalone facades prepare thei own interface unless their trusted owner supplies an already prepared one. One MCP process also owns a repository/purpose-scoped compilation cache with a -two-entry and 32 MiB accounted-retention limit. Keys contain the exact verified +two-entry and 32 MiB accounted-retention limit shared by snapshot and draft +projection entries. Snapshot keys contain the exact verified captured paths, bytes and source revision, plus the installed compiler function. Python dictionary equality distinguishes hash collisions. Each new operation opens and validates its store, checks snapshot lifecycle and verifies complete @@ -132,6 +134,37 @@ server processes retain separate fixed-purpose resources. Stream EOF or failure releases the server-owned interface, catalog and cache; closing a borrowing Engine closes its store without releasing the owner's cache. +## Exact draft projection reuse + +Draft reads, analysis, status, creation/revision preparation and focused resolution +can retain the pure projection of one exact immutable proposal revision. They use +the existing compilation-cache owner and its shared two-entry / 32 MiB budget. +One base plus one current draft fits the measured workload; older entries can be +evicted normally. The runtime adds no persistent cache or new wire format. + +Each new public call reads the actual stored revision/root and fully validates its +original captured base before lookup. The key binds exact base bytes/paths, the +existing canonical representation of the complete revision (original snapshot, +repository membership, proposal identity, ordinal and all change sets), and the +installed replay recipe. Static compiler implementations qualify; custom stateful +adapters execute cold. The compiler's original accepted base remains the semantic +comparison authority. A miss replays the entire program with all normal checks; +this is not incremental successor construction. + +Retained semantic-intent maps are private copies. Each operation receives fresh +intent maps and result envelopes while sharing read-only sources and compiled +structures. Status and pre-/post-submission evaluations still run. Authorization, +evidence, snapshot lifecycle, proposal-head observations and conditional writes +remain current. A prospective projection retained before a failed publication is +only reusable computation: its handle still requires a real stored revision/root. + +Review, candidate verification, application and recovery retain their existing +fresh replay paths. New snapshot capture retains both independent compiler passes. +Main advancement affects new captures, never the base of an existing draft. Old +explicit revisions retain historical meaning and can have live stale status. +Corruption, quarantine, purge or missing/replaced stores reject before projection +reuse. Server restart reconstructs cold, and close releases both entry kinds. + ## Bounded grouped reads `read_many` takes one explicit snapshot and 1–32 ordered `items`. Each item has a diff --git a/tools/standards_engine/standards_engine/compiled_cache.py b/tools/standards_engine/standards_engine/compiled_cache.py index 4ee20fb4..222dc453 100644 --- a/tools/standards_engine/standards_engine/compiled_cache.py +++ b/tools/standards_engine/standards_engine/compiled_cache.py @@ -8,29 +8,35 @@ from collections import OrderedDict from collections.abc import Callable, Mapping +from copy import deepcopy +from dataclasses import replace from enum import Enum from pathlib import Path, PurePath import re import sys from types import FunctionType, MappingProxyType -from typing import TYPE_CHECKING +from typing import TYPE_CHECKING, cast +from tools.standards_identity.standards_identity import encode_identity_value from tools.standards_metadata.standards_metadata import FrozenContentSource from tools.standards_snapshots.standards_snapshots import CapturedContent from .context_projection import Purpose if TYPE_CHECKING: + from .authoring import ProposalRevision from .engine import CompiledSnapshot + from .logical_authoring import LogicalAuthoringCompiler, LogicalProjection class CompiledSnapshotCache: - """Retain at most a representative base/proposed pair for one serial owner. + """Retain a bounded mix of snapshot and exact draft material for one owner. - A key contains the exact *already verified* capture and compiler callable. - Equality includes bytes, paths and source revision; a Python hash collision - cannot identify different material. No snapshot lifecycle or access decision - is stored here. Each caller performs its complete durable read first. + Snapshot keys bind the exact verified capture and compiler. Draft keys also + bind the complete logical revision and installed replay recipe. Equality + distinguishes different material even after a Python hash collision. Current + lifecycle, root and access decisions remain with the caller, which performs + complete durable validation before consulting this pure reuse mechanism. """ def __init__( @@ -44,7 +50,7 @@ def __init__( self._max_entries = max_entries self._max_bytes = max_bytes self._entries: OrderedDict[ - tuple[CapturedContent, Callable], tuple[CompiledSnapshot, int] + tuple[object, ...], tuple[object, int] ] = OrderedDict() self._bytes = 0 self._closed = False @@ -70,23 +76,90 @@ def compile_verified( return compiler(FrozenContentSource( (str(item.path), item.content) for item in capture.files )) - key = (capture, compiler) - existing = self._entries.get(key) + key = ("snapshot", capture, compiler) + existing = self._lookup(key) if existing is not None: - self._hits += 1 - self._entries.move_to_end(key) - return existing[0] - self._misses += 1 + return cast("CompiledSnapshot", existing) result = compiler(FrozenContentSource( (str(item.path), item.content) for item in capture.files )) + self._retain(key, result) + return result + + def project_verified( + self, + revision: ProposalRevision, + base: CompiledSnapshot, + compiler: LogicalAuthoringCompiler, + ) -> LogicalProjection: + """Reuse only the replay of exact, independently verified draft inputs. + + The caller reads the stored revision/root and verifies base content before + entering. Prospective revisions may also be compiled before publication; + a cached pure projection is never evidence that a revision was published. + Snapshot and projection entries share one LRU and one retention budget. + """ + from .logical_authoring import LogicalProgram + + if self._closed: + raise ValueError("Compilation cache is closed.") + if self._purpose is not Purpose.AUTHORING: + raise ValueError("Proposal material requires authoring purpose.") + implementation = compiler.compilation_identity + eligible = ( + implementation is not None + and all(isinstance(item, FunctionType) and not item.__closure__ + for item in implementation) + and type(base.source) is FrozenContentSource + ) + key = None + if eligible and self._max_entries and self._max_bytes: + # Exact values rather than a mutable proposal head or a claimed ID. + # The existing canonical codec binds the whole program, membership, + # original base, ordinal and proposal identity without a new format. + key = ( + "proposal", base.source.files, + encode_identity_value(revision.identity_material()), + implementation, + ) + existing = self._lookup(key) + if existing is not None: + retained = cast("LogicalProjection", existing) + # Semantic intent maps historically belong to each operation. + # Preserve that ownership while sharing read-only compiled data. + return replace(retained, semantic_proposals=deepcopy(retained.semantic_proposals)) + else: + self._misses += 1 + result = compiler.compile( + base.source, LogicalProgram(revision.change_sets), + base_snapshot=str(revision.base_snapshot), + base_repository_paths=revision.base_repository_paths, + compiled_base=base, + ) + if key is None: + self._uncached += 1 + else: + # Keep the retained intent independent of the cold caller's maps too. + self._retain(key, replace(result, semantic_proposals=deepcopy(result.semantic_proposals))) + return result + + def _lookup(self, key: tuple[object, ...]) -> object | None: + existing = self._entries.get(key) + if existing is None: + self._misses += 1 + return None + self._hits += 1 + self._entries.move_to_end(key) + return existing[0] + + def _retain(self, key: tuple[object, ...], result: object) -> None: size = ( _retained_size((key, result), self._max_bytes) if self._max_entries and self._max_bytes else None ) if size is None: self._uncached += 1 - return result + return while self._entries and ( len(self._entries) >= self._max_entries or self._bytes + size > self._max_bytes ): @@ -95,7 +168,6 @@ def compile_verified( self._evictions += 1 self._entries[key] = (result, size) self._bytes += size - return result @property def statistics(self) -> dict[str, int]: diff --git a/tools/standards_engine/standards_engine/engine.py b/tools/standards_engine/standards_engine/engine.py index de80f333..116f523b 100644 --- a/tools/standards_engine/standards_engine/engine.py +++ b/tools/standards_engine/standards_engine/engine.py @@ -1067,7 +1067,7 @@ def query_proposal( ) -> QueryProposalResult | RejectedResult: try: revision = self._authoring.read_revision(call.revision.id) - compiled = self._proposal_projection(revision).compiled + compiled = self._proposal_projection(revision, reuse=True).compiled projection = _QueryProjection.proposal( call.revision, SnapshotHandle.from_value( @@ -1758,12 +1758,18 @@ def _proposal_projection( self, revision: ProposalRevision, accepted: CompiledSnapshot | None = None, + *, + reuse: bool = False, ) -> LogicalProjection: accepted = ( self._compiled_snapshot(revision.base_snapshot) if accepted is None else accepted ) + if reuse and self._compiled_cache is not None: + return self._compiled_cache.project_verified( + revision, accepted, self._logical_authoring + ) return self._logical_authoring.compile( accepted.source, LogicalProgram(revision.change_sets), diff --git a/tools/standards_engine/standards_engine/logical_authoring.py b/tools/standards_engine/standards_engine/logical_authoring.py index 37e5123e..66ae4c62 100644 --- a/tools/standards_engine/standards_engine/logical_authoring.py +++ b/tools/standards_engine/standards_engine/logical_authoring.py @@ -916,6 +916,22 @@ def __init__(self, compile_authorities: Callable[[FrozenContentSource], object]) ) self._compile_authorities = compile_authorities + @property + def compilation_identity(self) -> tuple[Callable, Callable] | None: + """Identify the installed replay recipe; stateful adapters remain cold. + + Only this exact owner, with its original compile method, exposes an + identity. Its authority compiler is checked for statelessness by the + retention owner. No instance, bound method or caller callback is retained. + """ + if ( + type(self) is not LogicalAuthoringCompiler + or set(vars(self)) != {"_compile_authorities"} + or getattr(self.compile, "__func__", None) is not type(self).compile + ): + return None + return type(self).compile, self._compile_authorities + def compile( self, base: FrozenContentSource, diff --git a/tools/standards_engine/standards_engine/operation_materials.py b/tools/standards_engine/standards_engine/operation_materials.py index dd712a37..75d55744 100644 --- a/tools/standards_engine/standards_engine/operation_materials.py +++ b/tools/standards_engine/standards_engine/operation_materials.py @@ -62,7 +62,7 @@ def projection(self, revision: ProposalRevision) -> LogicalProjection: accepted = self.compiled(revision.base_snapshot) if self._projection is not None and self._projection[0] == revision: return self._projection[1] - projection = self._engine._proposal_projection(revision, accepted) + projection = self._engine._proposal_projection(revision, accepted, reuse=True) # A revision change replaces, rather than accumulates, retained output. self._projection = (revision, projection) return projection diff --git a/tools/standards_engine/tests/test_nested_materials.py b/tools/standards_engine/tests/test_nested_materials.py index 247d0f8c..ef6cc7a8 100644 --- a/tools/standards_engine/tests/test_nested_materials.py +++ b/tools/standards_engine/tests/test_nested_materials.py @@ -186,12 +186,12 @@ def test_nested_public_reentry_has_independent_operation_material(self): nested = [] entered = False - def reenter(revision, accepted=None): + def reenter(revision, accepted=None, *, reuse=False): nonlocal entered if not entered: entered = True nested.append(self.facade.analyze_proposal({"revision": second["revision"]})) - return project(revision, accepted) + return project(revision, accepted, reuse=reuse) with patch.object(self.engine._snapshots, "load_content", wraps=self.engine._snapshots.load_content) as loads: with patch.object(self.engine, "_proposal_projection", side_effect=reenter): diff --git a/tools/standards_engine/tests/test_proposal_reuse.py b/tools/standards_engine/tests/test_proposal_reuse.py new file mode 100644 index 00000000..17a4ec78 --- /dev/null +++ b/tools/standards_engine/tests/test_proposal_reuse.py @@ -0,0 +1,397 @@ +"""Exact draft retention preserves live authority and independent cold replay.""" +from __future__ import annotations + +from contextlib import closing +from copy import deepcopy +import hashlib +import json +import os +from pathlib import Path +import sqlite3 +import subprocess +import sys +import tempfile +import unittest +from unittest.mock import patch + +from tools.standards_analysis.standards_analysis import AnalysisExecutionContext +from tools.standards_engine.standards_engine import AgentToolFacade, StandardsEngine +from tools.standards_engine.standards_engine import logical_authoring as logical +from tools.standards_engine.standards_engine.compiled_cache import CompiledSnapshotCache +from tools.standards_engine.standards_engine.tools import LocalAlwaysAllowAuthorizer +from tools.standards_engine.tests.test_agent_workflow import ( + decisions, evidence, prepare_repository, reference_change, +) +from tools.standards_engine.tests.test_mcp import request +from tools.standards_snapshots.standards_snapshots import SnapshotId + +ROOT = Path(__file__).resolve().parents[3] + + +class ProposalReuseTest(unittest.TestCase): + @classmethod + def setUpClass(cls): + cls.fixture = tempfile.TemporaryDirectory(prefix="proposal-cache-fixture-") + cls.root = Path(cls.fixture.name) / "repository" + prepare_repository(cls.root) + cls.interface = AgentToolFacade.load_interface(cls.root) + with AgentToolFacade.open_repository( + cls.root, purpose="authoring", interface=cls.interface, + ) as facade: + captured = facade.create_snapshot({"kind": "create-snapshot"}) + assert captured["kind"] == "create-snapshot-result", captured + cls.snapshot = captured["snapshot"]["snapshot"] + cls.first = facade.propose({ + "snapshot": cls.snapshot, + "change_set": reference_change(cls.root, "projection-cache"), + }) + assert cls.first["status"] == "complete", cls.first + cls.latest = facade.revise({ + "context": cls.first["context"], + "change_set": reference_change(cls.root, "projection-cache", revision=True), + }) + assert cls.latest["status"] == "complete", cls.latest + change = reference_change(cls.root, "projection-normative") + change["edits"][0]["standard"].update( + id="topic.projection-normative", role="topic", level="MUST", + ) + cls.normative = facade.propose({"snapshot": cls.snapshot, "change_set": change}) + assert cls.normative["status"] == "needs-action", cls.normative + cls.seed = cls.root / ".standards-engine/snapshots-v1.sqlite3" + cls.target = "reference.testing.projection-cache" + + @classmethod + def tearDownClass(cls): + cls.fixture.cleanup() + + def setUp(self): + self.temporary = tempfile.TemporaryDirectory(prefix="proposal-cache-store-") + self.addCleanup(self.temporary.cleanup) + self.store = Path(self.temporary.name) / "test.sqlite3" + with closing(sqlite3.connect(self.seed)) as source: + with closing(sqlite3.connect(self.store)) as destination: + source.backup(destination) + self.cache = CompiledSnapshotCache(self.root, "authoring") + self.addCleanup(self.cache.close) + self.engine = self.open_engine() + self.addCleanup(lambda: self.engine.close()) + self.facade = AgentToolFacade(self.engine, self.interface) + + def open_engine(self, cache=None): + return StandardsEngine.open_repository( + self.root, store_path=self.store, purpose="authoring", + compiled_cache=self.cache if cache is None else cache, + execution_context=AnalysisExecutionContext(LocalAlwaysAllowAuthorizer(self.root)), + ) + + def query(self, selection=None): + return self.facade.query_proposal({ + "revision": (selection or self.latest)["revision"], + "request": {"kind": "read", "target": self.target}, + }) + + def test_repeated_read_validates_base_and_revision_without_replaying_history(self): + with ( + patch.object(self.engine._snapshots, "load_content", wraps=self.engine._snapshots.load_content) as load, + patch.object(self.engine._authoring, "read_revision", wraps=self.engine._authoring.read_revision) as revision, + patch.object(logical, "_refresh_suite_input_projection", wraps=logical._refresh_suite_input_projection) as refresh, + ): + first = self.query() + self.assertEqual(first["kind"], "proposal-read-result", first) + self.assertEqual(refresh.call_count, 2) + refresh.reset_mock() + self.assertEqual(self.query(), first) + self.assertEqual(refresh.call_count, 0) + self.assertEqual(load.call_count, 2) + self.assertEqual(revision.call_count, 2) + self.assertEqual(self.cache.statistics["entries"], 2) + + def test_status_retains_fresh_evaluation_on_each_hit(self): + self.query() + with ( + patch.object(logical, "_refresh_suite_input_projection", wraps=logical._refresh_suite_input_projection) as refresh, + patch.object(self.engine, "_evaluate", wraps=self.engine._evaluate) as evaluate, + ): + first = self.facade.workflow_status({"context": self.latest["context"]}) + second = self.facade.workflow_status({"context": self.latest["context"]}) + self.assertEqual(first, second) + self.assertEqual(first["status"], "complete", first) + refresh.assert_not_called() + self.assertEqual(evaluate.call_count, 2) + + def test_new_revision_misses_while_old_results_and_stale_status_stay_exact(self): + old = self.query() + change = reference_change(self.root, "projection-cache", revision=True) + change["edits"][0]["standard"]["body"] += "Independent third revision.\n" + revised = self.facade.revise({"context": self.latest["context"], "change_set": change}) + self.assertEqual(revised["status"], "complete", revised) + self.assertNotEqual(revised["revision"], self.latest["revision"]) + self.assertEqual(self.query(), old) + self.assertIn("Independent third revision.", self.query(revised)["content"]) + self.assertEqual(self.facade.workflow_status({"context": self.latest["context"]})["status"], "stale") + + def test_request_and_response_mutation_cannot_change_the_next_result(self): + first = self.query() + expected = deepcopy(first) + first["content"] = "altered caller output" + first["requires"].append("invented") + first["next_operations"].clear() + self.assertEqual(self.query(), expected) + + def test_cached_semantic_intent_maps_are_private_to_each_operation(self): + snapshot = SnapshotId(self.snapshot["id"]) + base = self.engine._compiled_snapshot(snapshot) + old = self.engine._authoring.read_revision(self.latest["revision"]["id"]) + change = logical.StandardsChangeSet.from_mapping({ + "purpose": reference_change(self.root)["purpose"], + "edits": [{"kind": "move-policy-unit", + "policy": "topic.architecture.composed-design-admission", + "standard": "topic.contracts", + "semantics": {"kind": "preserve", "semantic_revision": 1, + "intent": "Move representation without changing meaning."}}], + }) + from tools.standards_engine.standards_engine.authoring import ProposalRevision + revision = ProposalRevision(old.proposal, 1, snapshot, old.base_repository_paths, (change,)) + first = self.cache.project_verified(revision, base, self.engine._logical_authoring) + expected = deepcopy(first.semantic_proposals) + self.assertTrue(expected) + first.semantic_proposals[0]["intent"] = "first caller mutation" + second = self.cache.project_verified(revision, base, self.engine._logical_authoring) + self.assertEqual(second.semantic_proposals, expected) + second.semantic_proposals[0]["intent"] = "second caller mutation" + third = self.cache.project_verified(revision, base, self.engine._logical_authoring) + self.assertEqual(third.semantic_proposals, expected) + + def test_quarantine_and_purge_are_observed_before_projection_hits(self): + self.query() + snapshot = SnapshotId(self.snapshot["id"]) + hits = self.cache.statistics["hits"] + self.engine._snapshots.delete_snapshot(snapshot) + self.assertEqual(self.query()["outcome"], "unavailable") + deadline = self.engine._snapshots.snapshot(snapshot, include_quarantined=True).purge_deadline + with patch.object(self.engine._snapshots, "_now", return_value=deadline + 1): + self.assertEqual(self.query()["outcome"], "unavailable") + self.assertEqual(self.cache.statistics["hits"], hits) + + def test_corrupt_base_is_rejected_before_using_either_retained_entry(self): + self.query() + hits = self.cache.statistics["hits"] + with closing(sqlite3.connect(self.store)) as connection, connection: + trigger = connection.execute("SELECT sql FROM sqlite_schema WHERE name='content_files_no_update'").fetchone()[0] + connection.execute("DROP TRIGGER content_files_no_update") + connection.execute( + "UPDATE content_files SET raw_bytes=?, byte_length=?, sha256=? WHERE logical_path=?", + (b"corrupt", 7, hashlib.sha256(b"corrupt").hexdigest(), "CORE-STANDARDS.md"), + ) + connection.execute(trigger) + self.assertEqual(self.query()["code"], "SNAPSHOT.CONTENT_ID_MISMATCH") + self.assertEqual(self.cache.statistics["hits"], hits) + + def test_corrupt_revision_is_not_hidden_by_an_exact_projection_hit(self): + self.query() + hits = self.cache.statistics["hits"] + with closing(sqlite3.connect(self.store)) as connection, connection: + trigger = connection.execute("SELECT sql FROM sqlite_schema WHERE name='aggregate_records_no_update'").fetchone()[0] + payload = connection.execute("SELECT payload FROM aggregate_records WHERE aggregate_id=?", (self.latest["revision"]["id"],)).fetchone()[0] + value = json.loads(payload) + value["change_sets"][-1]["purpose"]["summary"] = "Corrupt exact revision" + connection.execute("DROP TRIGGER aggregate_records_no_update") + connection.execute("UPDATE aggregate_records SET payload=? WHERE aggregate_id=?", (json.dumps(value).encode(), self.latest["revision"]["id"])) + connection.execute(trigger) + result = self.query() + self.assertEqual(result["kind"], "rejected-result", result) + self.assertEqual(result["outcome"], "invalid", result) + self.assertEqual(self.cache.statistics["hits"], hits) + + def test_store_replacement_has_no_revision_to_reuse(self): + self.query() + hits = self.cache.statistics["hits"] + self.engine.close() + self.store.rename(self.store.with_suffix(".retained")) + self.engine = self.open_engine() + self.facade = AgentToolFacade(self.engine, self.interface) + self.assertEqual(self.query()["outcome"], "unavailable") + self.assertEqual(self.cache.statistics["hits"], hits) + + def test_borrower_close_preserves_replay_but_still_reopens_storage(self): + expected = self.query() + self.engine.close() + self.engine = self.open_engine() + self.facade = AgentToolFacade(self.engine, self.interface) + with patch.object(logical, "_refresh_suite_input_projection", wraps=logical._refresh_suite_input_projection) as refresh: + self.assertEqual(self.query(), expected) + refresh.assert_not_called() + + def test_snapshot_and_projections_share_entry_and_byte_budgets(self): + expected = self.query() + used = self.cache.statistics["accounted_bytes"] + for entries, budget in ((0, used), (2, 1), (1, used), (4, used // 2)): + with self.subTest(entries=entries, budget=budget): + cache = CompiledSnapshotCache(self.root, "authoring", max_entries=entries, max_bytes=budget) + try: + with self.open_engine(cache) as engine: + facade = AgentToolFacade(engine, self.interface) + for _ in range(2): + observed = facade.query_proposal({"revision": self.latest["revision"], "request": {"kind": "read", "target": self.target}}) + self.assertEqual(observed, expected) + self.assertLessEqual(cache.statistics["entries"], entries) + self.assertLessEqual(cache.statistics["accounted_bytes"], budget) + self.assertTrue(cache.statistics["evictions"] or cache.statistics["uncached"]) + finally: + cache.close() + self.assertEqual(cache.statistics["accounted_bytes"], 0) + + def test_failed_replay_is_not_cached(self): + with patch.object(logical, "_refresh_suite_input_projection", side_effect=RuntimeError("failed replay")): + with self.assertRaisesRegex(RuntimeError, "failed replay"): + self.query() + self.assertEqual(self.cache.statistics["entries"], 1) # Verified base only. + with patch.object(logical, "_refresh_suite_input_projection", wraps=logical._refresh_suite_input_projection) as refresh: + self.assertEqual(self.query()["kind"], "proposal-read-result") + self.assertEqual(refresh.call_count, 2) + + def test_stateful_compiler_does_not_acquire_retention_authority(self): + base = self.engine._compiled_snapshot(SnapshotId(self.snapshot["id"])) + revision = self.engine._authoring.read_revision(self.latest["revision"]["id"]) + calls = [] + def compile_authorities(source): + calls.append(source) + return StandardsEngine._compile(source) + compiler = logical.LogicalAuthoringCompiler(compile_authorities) + for _ in range(2): + self.cache.project_verified(revision, base, compiler) + self.assertEqual(len(calls), 2) + self.assertEqual(self.cache.statistics["uncached"], 2) + self.assertEqual(self.cache.statistics["entries"], 1) + + def test_rejected_prospective_revision_is_not_published_by_cache_retention(self): + from tools.standards_engine.standards_engine.authoring import ProposalRevision + old = self.engine._authoring.read_revision(self.latest["revision"]["id"]) + change = reference_change(self.root, "projection-cache", revision=True) + change["edits"][0]["standard"]["body"] += "Prospective revision.\n" + prospective = ProposalRevision( + old.proposal, old.ordinal + 1, old.base_snapshot, + old.base_repository_paths, + (*old.change_sets, logical.StandardsChangeSet.from_mapping(change)), + ) + with patch.object(self.engine._snapshots, "advance_aggregate_root", return_value="stale"): + result = self.facade.revise({"context": self.latest["context"], "change_set": change}) + self.assertEqual(result["outcome"]["code"], "AUTHORING.REVISION_STALE", result) + observed = self.facade.query_proposal({ + "revision": self.engine._proposal_revision_handle(prospective.revision_id), + "request": {"kind": "read", "target": self.target}, + }) + self.assertEqual(observed["outcome"], "unavailable", observed) + self.assertEqual(self.facade.workflow_status({"context": self.latest["context"]})["status"], "complete") + + def test_compiler_recipe_changes_miss_and_unknown_instance_state_stays_cold(self): + base = self.engine._compiled_snapshot(SnapshotId(self.snapshot["id"])) + revision = self.engine._authoring.read_revision(self.latest["revision"]["id"]) + first = self.cache.project_verified(revision, base, self.engine._logical_authoring) + # This stateless alternate installation has a distinct recipe identity. + def alternate(source): + return StandardsEngine._compile(source) + compiler = logical.LogicalAuthoringCompiler(alternate) + with patch.object(logical, "_refresh_suite_input_projection", wraps=logical._refresh_suite_input_projection) as refresh: + second = self.cache.project_verified(revision, base, compiler) + self.assertEqual(refresh.call_count, 2) + self.assertEqual(first.source.files, second.source.files) + compiler.extra_context = object() + with patch.object(logical, "_refresh_suite_input_projection", wraps=logical._refresh_suite_input_projection) as refresh: + self.cache.project_verified(revision, base, compiler) + self.cache.project_verified(revision, base, compiler) + self.assertEqual(refresh.call_count, 4) + + def test_advancing_main_preserves_draft_base_through_warm_and_cold_reads(self): + from tools.standards_verifier.standards_verifier import suite_input_projection_bytes + root = Path(self.temporary.name) / "advanced-main" + prepare_repository(root) + store = root / ".standards-engine/snapshots-v1.sqlite3" + store.parent.mkdir(exist_ok=True) + with closing(sqlite3.connect(self.store)) as source: + with closing(sqlite3.connect(store)) as destination: + source.backup(destination) + cache = CompiledSnapshotCache(root, "authoring") + self.addCleanup(cache.close) + arguments = {"revision": self.latest["revision"], "request": {"kind": "read", "target": self.target}} + with AgentToolFacade.open_repository(root, purpose="authoring", compiled_cache=cache) as facade: + first = facade.query_proposal(arguments) + core = root / "CORE-STANDARDS.md" + core.write_text(core.read_text() + "\n\n") + manifest = root / "evaluation/standards-effectiveness/generated/suite-inputs.json" + manifest.write_bytes(suite_input_projection_bytes(root)) + subprocess.run(["git", "-C", str(root), "add", "CORE-STANDARDS.md", str(manifest.relative_to(root))], check=True) + subprocess.run(["git", "-C", str(root), "-c", "user.name=Fixture", "-c", "user.email=fixture@example.invalid", "-c", "commit.gpgsign=false", "commit", "--quiet", "-m", "fixture: advance accepted main"], check=True) + self.assertEqual(facade.query_proposal(arguments), first) + cache.close() + (root / "CORE-STANDARDS.md").unlink() + with AgentToolFacade.open_repository(root, purpose="authoring") as cold: + self.assertEqual(cold.query_proposal(arguments), first) + + def test_authorization_and_invalid_evidence_remain_fresh_on_warm_status(self): + context = self.normative["context"] + self.facade.workflow_status({"context": context}) + obligation = self.normative["outcome"]["obligations"][0] + submission = {"kind": "impact-disposition", "obligation": obligation["handle"], + "result": "confirmed", "rationale": "Reviewed isolated test scope.", + "fingerprint": obligation["fingerprint"], "evidence": [evidence(self.root)]} + bad = {**submission, "evidence": [{**evidence(self.root), "digest": "sha256:" + "0" * 64}]} + rejected = self.facade.resolve_workflow({"context": context, "submission": bad}) + self.assertEqual(rejected["outcome"]["code"], "ANALYSIS.EVIDENCE_DIGEST_MISMATCH", rejected) + authorize = self.engine._execution_context.authorization.authorize + def quarantine(request): + decision = authorize(request) + self.engine._snapshots.delete_snapshot(SnapshotId(self.snapshot["id"])) + return decision + with patch.object(self.engine._execution_context.authorization, "authorize", side_effect=quarantine) as calls: + rejected = self.facade.resolve_workflow({"context": context, "submission": submission}) + self.assertTrue(calls.call_count) + self.assertEqual(rejected.get("outcome", rejected)["outcome"], "unavailable", rejected) + + def test_review_keeps_fresh_replay_instead_of_borrowing_a_draft_entry(self): + self.query() + with patch.object(logical, "_refresh_suite_input_projection", wraps=logical._refresh_suite_input_projection) as refresh: + reviewed = self.facade.review({"context": self.latest["context"], "decisions": decisions(self.root)}) + self.assertEqual(reviewed["status"], "ready", reviewed) + self.assertGreaterEqual(refresh.call_count, 2) + + def test_application_cannot_read_authoring_entries(self): + self.query() + with self.assertRaisesRegex(ValueError, "another repository or purpose"): + StandardsEngine.open_repository(self.root, store_path=self.store, purpose="application", compiled_cache=self.cache) + with StandardsEngine.open_repository(self.root, store_path=self.store, purpose="application") as engine: + result = AgentToolFacade(engine, self.interface).query_proposal({"revision": self.latest["revision"], "request": {"kind": "read", "target": self.target}}) + self.assertEqual(result["code"], "APPLICATION.OPERATION_UNAVAILABLE") + + def test_capture_keeps_both_compiler_passes_with_warm_draft_material(self): + self.query() + from tools.standards_engine.standards_engine import engine as engine_module + with patch.object(engine_module, "compile_policy_impact", wraps=engine_module.compile_policy_impact) as compile: + result = self.facade.create_snapshot({"kind": "create-snapshot"}) + self.assertEqual(result["kind"], "create-snapshot-result", result) + self.assertEqual(compile.call_count, 2) + + def test_two_fresh_stdio_servers_reproduce_same_historical_draft(self): + messages = [request("initialize", {"protocolVersion": "2025-11-25", "capabilities": {}, "clientInfo": {"name": "projection-test", "version": "1"}}), + {"jsonrpc": "2.0", "method": "notifications/initialized"}] + args = {"revision": self.latest["revision"], "request": {"kind": "read", "target": self.target}} + messages += [request("tools/call", {"name": "query_proposal", "arguments": args}, i) for i in (2, 3)] + observed = [] + for _ in range(2): + process = subprocess.run( + [sys.executable, "-P", "-m", "tools.standards_engine.standards_engine.mcp", "--repo-root", str(self.root), "--purpose", "authoring"], + input="".join(json.dumps(item) + "\n" for item in messages), text=True, + capture_output=True, check=True, timeout=90, + env={**os.environ, "PYTHONPATH": str(ROOT)}, cwd=self.temporary.name, + ) + replies = [json.loads(line) for line in process.stdout.splitlines()] + rows = [item["result"] for item in replies if item["id"] in (2, 3)] + self.assertFalse(any(item["isError"] for item in rows), rows) + self.assertEqual(rows[0], rows[1]) + self.assertEqual(json.loads(rows[0]["content"][0]["text"]), rows[0]["structuredContent"]) + observed.append(rows[0]) + self.assertEqual(observed[0], observed[1]) + + +if __name__ == "__main__": + unittest.main() From bf1358c81a0fa1c59019a4b30682c39c62126d7f Mon Sep 17 00:00:00 2001 From: MrScripty Date: Thu, 24 Sep 2026 14:08:58 -0700 Subject: [PATCH 16/26] perf(engine): continue exact proposal successors --- .../performance-incremental-successors.md | 216 ++++++++++++++++++ .../measure_successors.py | 205 +++++++++++++++++ .../generated/suite-inputs.json | 22 +- tools/standards_engine/PURPOSE-SEPARATION.md | 40 +++- .../standards_engine/compiled_cache.py | 24 +- .../standards_engine/engine.py | 4 +- .../standards_engine/logical_authoring.py | 56 ++++- .../standards_engine/operation_materials.py | 5 +- .../projection_continuation.py | 58 +++++ .../tests/test_logical_authoring.py | 185 ++++++++++++++- .../tests/test_nested_materials.py | 12 +- .../tests/test_projection_continuation.py | 120 ++++++++++ .../tests/test_proposal_reuse.py | 116 ++++++++++ 13 files changed, 1035 insertions(+), 28 deletions(-) create mode 100644 docs/plans/purpose-separated-standards-engine/reports/performance-incremental-successors.md create mode 100644 docs/plans/purpose-separated-standards-engine/reports/performance-incremental-successors/measure_successors.py create mode 100644 tools/standards_engine/standards_engine/projection_continuation.py create mode 100644 tools/standards_engine/tests/test_projection_continuation.py diff --git a/docs/plans/purpose-separated-standards-engine/reports/performance-incremental-successors.md b/docs/plans/purpose-separated-standards-engine/reports/performance-incremental-successors.md new file mode 100644 index 00000000..a9b775c3 --- /dev/null +++ b/docs/plans/purpose-separated-standards-engine/reports/performance-incremental-successors.md @@ -0,0 +1,216 @@ +# Incremental successor construction + +Status: implementation delivered; repository-level qualification remains blocked. + +Base: `implementation/purpose-separated-standards-engine` at +`2e034f5dcc10bdd97e0d9b21e1edc6672f80c996`, tree +`09c605b62b0ed236fae0d90743131d28a738207e`. + +## Outcome and scope + +Construct an appended logical proposal revision from an eligible verified prefix +instead of reexecuting all earlier edits. Preserve the original accepted base, +complete final compilation and cumulative review/analysis inputs. This increment +changes neither public/persisted contracts nor review, application or recovery +replay authority. Schema-directed decoding and ordinary reads are outside scope. + +The structural claim is one newly executed edit/change set and its required +manifest refresh for a simple one-edit append, independent of the number of +retained preceding change sets. The end-to-end claim is reduced native +`AgentToolFacade.revise_proposal` latency with a warm exact predecessor at +histories of 1, 4, 12 and 32 change sets. No numeric speedup or constant-time +request claim is made. Exact program matching, final compilation, complete +analysis, original-base verification and retention accounting still scale with +their relevant material. + +The user's existing cold-reconstruction evidence motivates this scope; it is +not a baseline measurement of revision admission. This delivery does not present +that earlier measurement or focused-test duration as a measured successor speedup. + +## Implementation + +`projection_continuation.py` owns immutable computation input/material matching. +Its two small records carry original frozen base bytes, original snapshot identity, +complete original repository membership, canonical strings for every prefix +change set, installed compiler identity, projected bytes and projected membership. +Exact value equality, not a claimed revision hash alone, determines eligibility. +The strings snapshot authored data rather than retaining caller-owned nested edit +maps. Provenance has no disk format, public handle or independent retention owner. + +`LogicalAuthoringCompiler.compile` accepts an optional predecessor. It verifies the +original base/borrowed compiled base as before, admits only a strictly shorter +exact prefix with matching material and recipe, and copies the predecessor file +table. Every value remains an immutable byte string. Each remaining change set +runs the existing edit, supporting-content, no-effect and manifest logic. Invalid +suffixes propagate their original failures and cannot mutate a sibling or prefix. + +All suffix edit semantics and manifest membership arithmetic still use the +original base. The final candidate is always compiled. Final standard-successor +validation, semantic proposals, affected-policy selection and affected-module +selection all receive the complete logical program, original base and final +candidate. Provenance is returned only after those stages succeed. No earlier +proposal becomes an accepted standards baseline. + +The compiler applies the same function/closure and exact-owner eligibility rule +previously enforced by the shared cache. Stateful/instance adapters stay on full +replay. This is the existing installed pure-compilation contract, not a claim +that Python function introspection can prove the absence of mutable global state. + +`ProposalMaterials` offers its last projection during the current composed +operation. `CompiledSnapshotCache` can borrow the exact immediate predecessor of +the same proposal from its existing entries on an exact-successor cache miss. +It introduces no secondary cache, persistent checkpoint, search index or retained +history chain. The existing two-entry / 32 MiB limits charge the new provenance as +part of the same retained object graph. Budget pressure affects reuse, not meaning. + +The engine's existing `reuse` boundary gates both strategies. Its independent +projection path ignores even an explicitly supplied predecessor. Stored revision +reads, authorization, snapshot lifecycle, proposal heads and conditional +publication remain outside this pure optimization and execute through their +existing owners. Failure to publish a prospective projection does not make its +handle accessible as a stored revision. + +A new/cold native revision admission replays the full program. A cold focused +workflow can first reconstruct the predecessor during preflight and then continue +from that operation-local material; it still pays for the initial reconstruction. +After eviction, restart, changed input, changed compiler, absent provenance or +unmatched material, complete replay remains the supported computation. + +## Deciding evidence and its limits + +| Evidence | Result in this delivery | Claim actually covered | +| --- | --- | --- | +| `test_projection_continuation` | 12 tests passed | Exact prefix/input/material matching and immutable records | +| Isolated actual-owner control-flow harness | 11 checks passed | Real compiler/cache/material-owner/reuse-gate control flow with simulated domain collaborators | +| Python syntax compilation | Passed for changed source, tests and measurement runner | Syntax only; not full package import, typing or domain correctness | +| Focused real repository tests | Blocked before test-body execution | Missing source dependencies in the recovered checkout | +| Representative 1/4/12/32 successor latency | Unavailable; runner supplied, no observations recorded | No end-to-end performance claim accepted | +| Complete verifier and generated input refresh | Not run; full checkout required | Generated manifest freshness remains pending | + +The isolated harness loads the actual compiler, cache, operation owner and private +engine reuse gate definitions from the edited source. It substitutes the absent +content-source, authority compiler, edit, manifest and durable-revision collaborators. +Its checks show suffix-only execution at 1/4/12/32, final compile/analysis invocation +with the original base and full program, byte-table equivalence under that simulated +model, invalid/no-effect suffix handling, copy isolation, changed-input fallback, +cache lookup/eviction/accounting, operation-local handoff and the independent replay +gate. It supplies no real policy-graph, database, authorization, publication, +physical-candidate or latency evidence. The harness is retained as delivery evidence, +not installed as an alternative production implementation or permanent suite oracle. + +Real integration regressions were added to the existing owners' test modules: + +- Logical compiler: exact output and one-refresh continuation at growing histories; + cumulative original-base semantic revision and relationship/module selection; + mixed edits, multiple suffix sets, removals, invalid final successors; no-effect + and invalid suffix rejection; changed program, snapshot, recipe and output material. +- Proposal/cache workflow: native warm admission, new-cache and eviction replay, + fresh original-base/stored-revision reads, invalid suffix/stale head rejection, + unchanged older revisions, and cumulative review obligations compared with a + fresh cache-free engine after continuation. +- Nested material owner: suffix-only in-operation construction with no process + cache, and the existing reentrant observer forwards the new internal argument. + +Existing corruption, lifecycle, authorization, failed-publication, review, capture, +application-purpose and restart tests remain required alongside these regressions. +None of the real integration checks above is reported as passing here. + +## Source and environment limitation + +The GitHub connector confirmed the pinned branch and supplied inspected source. +Direct repository cloning was unavailable. Prior user-owned delivery archives +provided exact replacement sources; their result tree matches the pinned branch. +Every changed existing-file base was checked against that delivery's recorded +SHA-256 or, for the logical compiler test file, the current GitHub blob SHA. +This establishes the update's existing-file bases, not a complete local checkout. + +The recovered subset lacks, among others, +`tools.repository_git.repository_git.errors` and the `tools.standards_analysis` +package. The baseline logical-authoring test import failed on the former. The +candidate focused test imports failed on those same missing dependencies, before +real test-body execution. Logs accompany the delivery. The local Python runtime +is 3.13; no qualification against the repository's complete locked environment +was possible. No upstream commit, branch or authoritative store was modified. + +The canonical generated `suite-inputs.json` was deliberately left unchanged: +regenerating it against this incomplete source/index would produce an invalid +substitute. After applying and staging the source/test changes in the full +repository, use the owning Engine refresh command before integration verification. +The delivery is not merge-accepted while that gate and the real tests are pending. + +## Reproduction in a complete checkout + +Use the repository's locked Python environment. Review and stage the intended +source, tests and documentation. Refresh the owned generated manifest: + +```bash +printf '%s\n' '{"kind":"verify-repository","refresh_verification_inputs":true}' | + PYTHONPATH=. python3 -P .agents/skills/standards-engine/scripts/invoke.py verify_repository +``` + +Inspect `verification.passed` and all diagnostics, then review/stage the generated +manifest. Run the focused regressions: + +```bash +PYTHONPATH=. python3 -m unittest \ + tools.standards_engine.tests.test_projection_continuation \ + tools.standards_engine.tests.test_logical_authoring \ + tools.standards_engine.tests.test_proposal_reuse \ + tools.standards_engine.tests.test_nested_materials +``` + +Run the existing full engine/verifier suites to cover independent review, +publication, recovery, lifecycle and capture boundaries, and repeat the verifier +without refresh to establish freshness. The structural counters and equivalence +assertions are required; a passing wall-clock threshold is not substituted for them. + +### Successor-admission measurements + +The [measurement runner](performance-incremental-successors/measure_successors.py) +prepares one disposable full repository fixture with exact current heads at 1, 4, +12 and 32 change sets. Every timed sample uses a private SQLite backup of its +unchanged seed. It warms the exact predecessor, then times only the native +`revise_proposal` request through validation and conditional admission. Preparation, +warm-up reads and independent final-material comparison are outside that timer. + +The runner records wall and CPU time, executed edits, manifest refreshes, authority +compiles, original-base loads, cache accounting, request/result/material digests, +Python/platform/package information, installed source hashes and source status. +It requires exact one-edit/one-refresh continuation (or history-plus-one for full +replay) on this simple workload and independently compares final material through +the existing full-replay boundary. It rejects divergent outputs rather than +reporting an optimized but different result. Iteration zero is explicitly warm-up; +all subsequent observations are retained, including slow samples. + +Use a clean complete source revision for preparation. Keep that accepted-base +fixture fixed when comparing baseline and candidate installed implementations. +For a same-candidate comparison, `--strategy full-replay` disables only the internal +continuation match, preserving exact-read caching and final compilation. For the +unmodified pinned baseline, pass its checkout with `--source` and the same prepared +fixture; the runner also supports that source without the continuation module. + +```bash +SCRIPT=/absolute/candidate/docs/plans/purpose-separated-standards-engine/reports/performance-incremental-successors/measure_successors.py +python3 "$SCRIPT" --source /absolute/baseline --fixture /tmp/successor-fixture \ + --prepare --output /tmp/successor-prepared.json +python3 "$SCRIPT" --source /absolute/baseline --fixture /tmp/successor-fixture \ + --strategy full-replay --output /tmp/successor-baseline.json +python3 "$SCRIPT" --source /absolute/candidate --fixture /tmp/successor-fixture \ + --strategy continuation --output /tmp/successor-candidate.json +``` + +Compare only matching `workload_sha256`, per-history `request_sha256`, +`result_sha256` and `projection_sha256` values. Retain the host CPU/resource limits +and storage facts with the evidence; platform strings alone do not qualify hardware. +Alternate run order when repeating comparisons. Report per-history distributions, +median and range for non-warm-up samples, rather than promising a speedup from a +single sample. Increase repetition when variability obscures a decision. This +native-admission measurement does not measure an entire interactive editing session. + +## Remaining acceptance + +Close qualification only after canonical manifest regeneration, real differential +and workflow tests, independent replay boundary coverage, representative paired +latency evidence, and the repository's independent review step. Until then the +source implementation is available for review, but its complete domain behavior +and claimed user-visible performance benefit remain unqualified. diff --git a/docs/plans/purpose-separated-standards-engine/reports/performance-incremental-successors/measure_successors.py b/docs/plans/purpose-separated-standards-engine/reports/performance-incremental-successors/measure_successors.py new file mode 100644 index 00000000..8f9da6b0 --- /dev/null +++ b/docs/plans/purpose-separated-standards-engine/reports/performance-incremental-successors/measure_successors.py @@ -0,0 +1,205 @@ +"""Measure native successor admission with an exact warm predecessor. + +Use the same prepared fixture for the baseline and candidate. Every sample gets +an independent SQLite backup; neither measured run advances the seed's heads. +Preparation, warm reads and output equivalence checks are outside the timed call. +This runner requires a full checkout and the repository's locked environment. +""" +from __future__ import annotations + +import argparse +from collections import Counter +from contextlib import ExitStack, closing +from copy import deepcopy +import hashlib +import importlib.metadata +import importlib.util +import json +from pathlib import Path +import platform +import sqlite3 +import subprocess +import sys +import tempfile +import time +from unittest.mock import patch + + +def digest(value: object) -> str: + return hashlib.sha256(json.dumps(value, sort_keys=True, separators=(",", ":")).encode()).hexdigest() + + +def require_kind(result: dict, kind: str) -> dict: + if result.get("kind") != kind: + raise RuntimeError(f"Expected {kind}: {result!r}") + return result + + +def no_continuation(self, successor, *, projected_files, repository_paths) -> int: + """Select the ordinary replay strategy without changing compiler identity.""" + return 0 + + +def main() -> None: + parser = argparse.ArgumentParser(description=__doc__) + parser.add_argument("--source", type=Path, required=True, help="Installed engine source checkout") + parser.add_argument("--fixture", type=Path, required=True, help="Fixed accepted-base fixture repository") + parser.add_argument("--output", type=Path, required=True) + parser.add_argument("--prepare", action="store_true", help="Create a new disposable fixture; never overwrite one") + parser.add_argument("--strategy", choices=("full-replay", "continuation"), default="continuation") + parser.add_argument("--repeats", type=int, default=3, help="Measured samples plus one excluded warm-up sample") + args = parser.parse_args() + if args.repeats < 1: + parser.error("--repeats must be positive") + args.source = args.source.resolve() + args.fixture = args.fixture.resolve() + if args.output.exists(): + parser.error("--output must be a new evidence file") + sys.path.insert(0, str(args.source)) + from tools.standards_engine.standards_engine import AgentToolFacade, StandardsEngine + from tools.standards_engine.standards_engine import engine as engine_module + from tools.standards_engine.standards_engine import logical_authoring as logical + from tools.standards_engine.standards_engine.compiled_cache import CompiledSnapshotCache + from tools.standards_engine.tests.test_agent_workflow import reference_change + from tools.standards_snapshots.standards_snapshots import SnapshotModule + + workload_path = args.fixture.parent / f"{args.fixture.name}-successor-workload.json" + if args.prepare: + if args.fixture.exists() or workload_path.exists(): + parser.error("Preparation requires new fixture and workload paths") + args.fixture.parent.mkdir(parents=True, exist_ok=True) + subprocess.run(["git", "clone", "--quiet", "--no-hardlinks", str(args.source), str(args.fixture)], check=True) + branch = subprocess.check_output(["git", "branch", "--show-current"], cwd=args.fixture, text=True).strip() + if branch != "main": + subprocess.run(["git", "branch", "-m", "main"], cwd=args.fixture, check=True) + workload = [] + with AgentToolFacade.open_repository(args.fixture, purpose="authoring") as facade: + captured = require_kind(facade.create_snapshot({"kind": "create-snapshot"}), "create-snapshot-result") + snapshot = captured["snapshot"]["snapshot"] + for length in (1, 4, 12, 32): + label = f"incremental-benchmark-{length}" + for index in range(1, length + 1): + change = reference_change(args.fixture, label, revision=index > 1) + change["edits"][0]["standard"]["body"] += f"Draft revision {index}.\n" + if index == 1: + result = require_kind(facade.create_proposal({ + "kind": "create-proposal", "snapshot": snapshot, "change_set": change, + }), "create-proposal-result") + else: + result = require_kind(facade.revise_proposal({ + "kind": "revise-proposal", "expected_revision": result["revision"], "change_set": change, + }), "revise-proposal-result") + suffix = reference_change(args.fixture, label, revision=True) + suffix["edits"][0]["standard"]["body"] += f"Draft revision {length + 1}.\n" + workload.append({"history": length, "target": f"reference.testing.{label}", + "request": {"kind": "revise-proposal", "expected_revision": result["revision"], + "change_set": suffix}}) + workload_path.write_text(json.dumps(workload, indent=2) + "\n") + args.output.parent.mkdir(parents=True, exist_ok=True) + args.output.write_text(json.dumps({"fixture": str(args.fixture), "workload": str(workload_path), + "prepared": True}, indent=2) + "\n") + return + + workload = json.loads(workload_path.read_text()) + seed = args.fixture / ".standards-engine/snapshots-v1.sqlite3" + if not seed.is_file(): + raise FileNotFoundError(f"Missing prepared fixture store: {seed}") + interface = AgentToolFacade.load_interface(args.fixture) + continuation_name = "tools.standards_engine.standards_engine.projection_continuation" + continuation_spec = importlib.util.find_spec(continuation_name) + if args.strategy == "continuation" and continuation_spec is None: + raise RuntimeError("Selected installed source does not implement continuation") + + rows = [] + signatures: dict[int, tuple[str, str]] = {} + for sample in workload: + for iteration in range(args.repeats + 1): + with tempfile.TemporaryDirectory(prefix="successor-measure-") as directory: + store = Path(directory) / "sample.sqlite3" + with closing(sqlite3.connect(seed)) as original, closing(sqlite3.connect(store)) as copy: + original.backup(copy) + with ExitStack() as owners: + cache = CompiledSnapshotCache(args.fixture, "authoring") + owners.callback(cache.close) + engine = owners.enter_context(StandardsEngine.open_repository( + args.fixture, store_path=store, purpose="authoring", compiled_cache=cache, + )) + facade = AgentToolFacade(engine, interface) + require_kind(facade.query_proposal({ + "revision": sample["request"]["expected_revision"], + "request": {"kind": "read", "target": sample["target"]}, + }), "proposal-read-result") + warm_cache = dict(cache.statistics) + counts = Counter() + + def instrument(owner, name, label): + original = getattr(owner, name) + def measured(*values, **kwargs): + counts[label] += 1 + return original(*values, **kwargs) + return patch.object(owner, name, measured) + + with ExitStack() as measurement: + if args.strategy == "full-replay" and continuation_spec is not None: + from tools.standards_engine.standards_engine.projection_continuation import ProjectionContinuation + measurement.enter_context(patch.object(ProjectionContinuation, "prefix_length", no_continuation)) + measurement.enter_context(instrument(logical.LogicalAuthoringCompiler, "_apply_edit", "executed_edits")) + measurement.enter_context(instrument(logical, "_refresh_suite_input_projection", "manifest_refreshes")) + measurement.enter_context(instrument(engine_module, "compile_policy_impact", "authority_compiles")) + measurement.enter_context(instrument(SnapshotModule, "load_content", "verified_base_loads")) + request = deepcopy(sample["request"]) + wall, cpu = time.perf_counter(), time.process_time() + result = facade.revise_proposal(request) + elapsed, processor = time.perf_counter() - wall, time.process_time() - cpu + require_kind(result, "revise-proposal-result") + measured_cache = dict(cache.statistics) + measured_counts = dict(counts) + expected_edits = sample["history"] + 1 if args.strategy == "full-replay" else 1 + if counts["executed_edits"] != expected_edits or counts["manifest_refreshes"] != expected_edits: + raise RuntimeError(f"Expected {expected_edits} suffix/replay edits and refreshes; observed {dict(counts)}") + # Compare full material outside timing, through the existing + # independent replay boundary, not through an exact cache hit. + revision = engine._authoring.read_revision(result["revision"]["id"]) + replayed = engine._proposal_projection(revision) + retained = engine._proposal_projection(revision, reuse=True) + for field in ("repository_paths", "semantic_proposals", "analysis_policy_ids", "analysis_module_ids"): + if getattr(retained, field) != getattr(replayed, field): + raise RuntimeError(f"Continuation disagrees with full replay: {field}") + if retained.source.files != replayed.source.files: + raise RuntimeError("Continuation disagrees with full replay: exact projected bytes") + material = { + "files": [(path, hashlib.sha256(content).hexdigest()) for path, content in retained.source.files], + "repository_paths": retained.repository_paths, + "semantic_proposals": retained.semantic_proposals, + "analysis_policy_ids": retained.analysis_policy_ids, + "analysis_module_ids": retained.analysis_module_ids, + } + signature = digest(result), digest(material) + if signatures.setdefault(sample["history"], signature) != signature: + raise RuntimeError("Repeated identical requests produced different material or handles") + rows.append({"history": sample["history"], "iteration": iteration, "warmup": iteration == 0, + "wall_seconds": elapsed, "cpu_seconds": processor, "counts": measured_counts, + "request_sha256": digest(sample["request"]), "result_sha256": signature[0], + "projection_sha256": signature[1], "warm_cache": warm_cache, + "cache_after_admission": measured_cache}) + source_files = ("logical_authoring.py", "compiled_cache.py", "operation_materials.py", "engine.py", "projection_continuation.py") + source_hashes = {} + for name in source_files: + path = args.source / "tools/standards_engine/standards_engine" / name + if path.exists(): + source_hashes[name] = hashlib.sha256(path.read_bytes()).hexdigest() + data = {"operation": "AgentToolFacade.revise_proposal", "strategy": args.strategy, + "source": str(args.source), "fixture": str(args.fixture), + "source_head": subprocess.check_output(["git", "rev-parse", "HEAD"], cwd=args.source, text=True).strip(), + "source_changes": subprocess.check_output(["git", "status", "--porcelain"], cwd=args.source, text=True), + "source_sha256": source_hashes, "workload_sha256": digest(workload), + "environment": {"python": sys.version, "platform": platform.platform(), "machine": platform.machine(), + "processor": platform.processor(), + "packages": {name: importlib.metadata.version(name) for name in ("jsonschema", "rpds-py")}}, + "observations": rows} + args.output.parent.mkdir(parents=True, exist_ok=True) + args.output.write_text(json.dumps(data, indent=2) + "\n") + + +if __name__ == "__main__": + main() diff --git a/evaluation/standards-effectiveness/generated/suite-inputs.json b/evaluation/standards-effectiveness/generated/suite-inputs.json index 99b6504f..b9f6b558 100644 --- a/evaluation/standards-effectiveness/generated/suite-inputs.json +++ b/evaluation/standards-effectiveness/generated/suite-inputs.json @@ -7065,7 +7065,7 @@ ] }, { - "digest": "sha256:5fe033c834a88415ac477ef8d09bc97e9b189be2cff986e142c782005a1b4f50", + "digest": "sha256:c3368aaa78434e7ba12227f404c0eec501269cf74111c3e0e05adb6b822011e6", "path": "tools/standards_engine/standards_engine/compiled_cache.py", "state": "present", "uses": [ @@ -7089,7 +7089,7 @@ ] }, { - "digest": "sha256:ff1c3e9569fa7e60b37357608ade12b1a0abc5c287f6d8d4bbc7a4302196a759", + "digest": "sha256:374525c89c87953541d735211925469beb2f3204075681f67a0b3a083931e005", "path": "tools/standards_engine/standards_engine/engine.py", "state": "present", "uses": [ @@ -7123,7 +7123,7 @@ ] }, { - "digest": "sha256:81f99ed06fefd6c7caa4ac344bac92adf23ca9e1941d12f06c46c00cba8af2bc", + "digest": "sha256:3593999d7823cecb4e4e87403052ec7e1e84e3b982cad28fc43319fdee875f5f", "path": "tools/standards_engine/standards_engine/logical_authoring.py", "state": "present", "uses": [ @@ -7159,7 +7159,7 @@ ] }, { - "digest": "sha256:bae7ea7900cfc3b8aaf837d0ec9275692d9cc53bd10087a5e6a94e2ac8a624f9", + "digest": "sha256:49c87769596d165b73aa76bd280f10dd0f75902c314bc5114414d5a6033a163c", "path": "tools/standards_engine/standards_engine/operation_materials.py", "state": "present", "uses": [ @@ -7170,6 +7170,18 @@ } ] }, + { + "digest": "sha256:2188fd6ca71176ae31db92cfbf4c1be0286b09c6025d5eed75a1dac4b3af3518", + "path": "tools/standards_engine/standards_engine/projection_continuation.py", + "state": "present", + "uses": [ + { + "check": "python-package-contract", + "role": "package-contract-input", + "suite": "a1c-public-cutover" + } + ] + }, { "digest": "sha256:1b7e525f8b0b1628013c18769a0639eeb12980b5541e8115e61573246e1bda3e", "path": "tools/standards_engine/standards_engine/rendering.py", @@ -13302,7 +13314,7 @@ "path": "evaluation/standards-effectiveness/suite-registry.toml" }, "repository_index": { - "digest": "sha256:9245138cf21822d5b31afdeec6862bbff9ace948c2597b7d7f6d02d643385ea4", + "digest": "sha256:4ae8659dfa416f5ac33e74e4c5fd0ff77cc41c4f6d70f43d0ee746f8b9b57ad7", "uses": [ { "check": "python-package-contract", diff --git a/tools/standards_engine/PURPOSE-SEPARATION.md b/tools/standards_engine/PURPOSE-SEPARATION.md index 3c0dd2c1..e469cb37 100644 --- a/tools/standards_engine/PURPOSE-SEPARATION.md +++ b/tools/standards_engine/PURPOSE-SEPARATION.md @@ -148,8 +148,9 @@ existing canonical representation of the complete revision (original snapshot, repository membership, proposal identity, ordinal and all change sets), and the installed replay recipe. Static compiler implementations qualify; custom stateful adapters execute cold. The compiler's original accepted base remains the semantic -comparison authority. A miss replays the entire program with all normal checks; -this is not incremental successor construction. +comparison authority. On an exact-revision miss, an eligible verified prefix may +supply successor construction as described below. Without one, the entire program +replays with all normal checks. Retained semantic-intent maps are private copies. Each operation receives fresh intent maps and result envelopes while sharing read-only sources and compiled @@ -165,6 +166,41 @@ explicit revisions retain historical meaning and can have live stale status. Corruption, quarantine, purge or missing/replaced stores reject before projection reuse. Server restart reconstructs cold, and close releases both entry kinds. +### Incremental successor construction + +The logical compiler can copy a previously verified projection and execute only +its appended change sets. Eligibility binds the exact original frozen base, +original snapshot identity, complete base repository membership, canonical +change-set prefix, installed compiler identity, projected bytes and projected +membership. The compiler snapshots the program representation into immutable +inputs, then issues continuation provenance only after successful final compilation +and cumulative analysis. Caller-owned edit mappings and semantic-intent maps cannot +rewrite that provenance. + +The operation-local owner may offer its last projection. The existing bounded +cache may offer the immediate predecessor of the same proposal on an exact +successor miss. Both feed the same compiler-owned eligibility check; neither +adds a cache, persistent checkpoint, store format or compatibility mode. An +incompatible or absent prefix selects complete replay, including after eviction +or restart. A cold focused workflow may first reconstruct its predecessor during +preflight and then use that newly verified material for the suffix in the same +operation; it still pays for the first reconstruction. + +Successors use a new file table with immutable byte values. All edit semantics, +manifest membership calculations and cumulative analysis retain the original +accepted base. Final authority compilation, semantic successor validation and +complete-program policy/module analysis still run. This is a computation reuse +boundary, not a new accepted baseline or authorization/publication proof. The +independent review, candidate-verification, application and recovery paths above +continue to select full replay. + +The deciding structural claim is suffix-only edit execution and manifest +regeneration for a simple append with an eligible predecessor. Canonical program +comparison, final compilation, retention accounting and complete analysis remain +whole-material work. Representative successor-admission latency qualification is +tracked in the [incremental successor report](../../docs/plans/purpose-separated-standards-engine/reports/performance-incremental-successors.md); +it is distinct from repeated-read latency or focused-test duration. + ## Bounded grouped reads `read_many` takes one explicit snapshot and 1–32 ordered `items`. Each item has a diff --git a/tools/standards_engine/standards_engine/compiled_cache.py b/tools/standards_engine/standards_engine/compiled_cache.py index 222dc453..871f4be4 100644 --- a/tools/standards_engine/standards_engine/compiled_cache.py +++ b/tools/standards_engine/standards_engine/compiled_cache.py @@ -91,14 +91,19 @@ def project_verified( revision: ProposalRevision, base: CompiledSnapshot, compiler: LogicalAuthoringCompiler, + *, + predecessor: LogicalProjection | None = None, ) -> LogicalProjection: - """Reuse only the replay of exact, independently verified draft inputs. + """Construct exact verified drafts from cached output or a matching prefix. + Prefix admission remains with the logical compiler. The optional local + predecessor and existing retained entries supply computation, not authority. The caller reads the stored revision/root and verifies base content before entering. Prospective revisions may also be compiled before publication; a cached pure projection is never evidence that a revision was published. Snapshot and projection entries share one LRU and one retention budget. """ + from .authoring import ProposalRevision from .logical_authoring import LogicalProgram if self._closed: @@ -108,8 +113,6 @@ def project_verified( implementation = compiler.compilation_identity eligible = ( implementation is not None - and all(isinstance(item, FunctionType) and not item.__closure__ - for item in implementation) and type(base.source) is FrozenContentSource ) key = None @@ -130,11 +133,26 @@ def project_verified( return replace(retained, semantic_proposals=deepcopy(retained.semantic_proposals)) else: self._misses += 1 + if key is not None and predecessor is None and revision.ordinal > 1: + previous = ProposalRevision( + revision.proposal, revision.ordinal - 1, revision.base_snapshot, + revision.base_repository_paths, revision.change_sets[:-1], + ) + previous_key = ( + "proposal", base.source.files, + encode_identity_value(previous.identity_material()), implementation, + ) + # Borrow from the existing bounded store, without retaining another + # entry or promoting a computational prefix over the final result. + previous_entry = self._entries.get(previous_key) + if previous_entry is not None: + predecessor = cast("LogicalProjection", previous_entry[0]) result = compiler.compile( base.source, LogicalProgram(revision.change_sets), base_snapshot=str(revision.base_snapshot), base_repository_paths=revision.base_repository_paths, compiled_base=base, + predecessor=predecessor, ) if key is None: self._uncached += 1 diff --git a/tools/standards_engine/standards_engine/engine.py b/tools/standards_engine/standards_engine/engine.py index 116f523b..f79948ab 100644 --- a/tools/standards_engine/standards_engine/engine.py +++ b/tools/standards_engine/standards_engine/engine.py @@ -1760,6 +1760,7 @@ def _proposal_projection( accepted: CompiledSnapshot | None = None, *, reuse: bool = False, + predecessor: LogicalProjection | None = None, ) -> LogicalProjection: accepted = ( self._compiled_snapshot(revision.base_snapshot) @@ -1768,7 +1769,7 @@ def _proposal_projection( ) if reuse and self._compiled_cache is not None: return self._compiled_cache.project_verified( - revision, accepted, self._logical_authoring + revision, accepted, self._logical_authoring, predecessor=predecessor, ) return self._logical_authoring.compile( accepted.source, @@ -1776,6 +1777,7 @@ def _proposal_projection( base_snapshot=str(revision.base_snapshot), base_repository_paths=revision.base_repository_paths, compiled_base=accepted, + predecessor=predecessor if reuse else None, ) @staticmethod diff --git a/tools/standards_engine/standards_engine/logical_authoring.py b/tools/standards_engine/standards_engine/logical_authoring.py index 66ae4c62..39592c1a 100644 --- a/tools/standards_engine/standards_engine/logical_authoring.py +++ b/tools/standards_engine/standards_engine/logical_authoring.py @@ -5,9 +5,9 @@ import re import tomllib from collections.abc import Callable, Iterable, Mapping -from dataclasses import dataclass +from dataclasses import dataclass, field from pathlib import Path -from types import MappingProxyType +from types import FunctionType, MappingProxyType from typing import Any, Protocol from tools.standards_applicability.standards_applicability import compile_fact_schema @@ -35,6 +35,7 @@ ) from .authoring import AuthoringError, AuthoringFailure +from .projection_continuation import ProjectionContinuation, ProjectionInputs _CANONICAL_ID = re.compile(r"^[A-Za-z0-9][A-Za-z0-9._:/-]*$") @@ -903,6 +904,9 @@ class LogicalProjection: analysis_policy_ids: tuple[str, ...] analysis_module_ids: tuple[str, ...] repository_paths: tuple[str, ...] + _continuation: ProjectionContinuation | None = field( + default=None, repr=False, compare=False, + ) class LogicalAuthoringCompiler: @@ -921,13 +925,17 @@ def compilation_identity(self) -> tuple[Callable, Callable] | None: """Identify the installed replay recipe; stateful adapters remain cold. Only this exact owner, with its original compile method, exposes an - identity. Its authority compiler is checked for statelessness by the - retention owner. No instance, bound method or caller callback is retained. + identity. Both compilers must be stateless installed functions. No + instance, bound method or stateful caller callback supplies reuse proof. """ if ( type(self) is not LogicalAuthoringCompiler or set(vars(self)) != {"_compile_authorities"} or getattr(self.compile, "__func__", None) is not type(self).compile + or not all( + isinstance(item, FunctionType) and not item.__closure__ + for item in (type(self).compile, self._compile_authorities) + ) ): return None return type(self).compile, self._compile_authorities @@ -940,7 +948,15 @@ def compile( base_snapshot: str | None = None, base_repository_paths: Iterable[str], compiled_base: Any | None = None, + predecessor: LogicalProjection | None = None, ) -> LogicalProjection: + """Compile the complete program, optionally continuing a verified prefix. + + Predecessor bytes are only a private computational starting point. The + original base owns edit semantics, manifest membership and cumulative + analysis; every candidate still receives final authority compilation. + Missing or incompatible provenance selects the ordinary full replay. + """ if type(base) is not FrozenContentSource or type(program) is not LogicalProgram: raise _invalid( "AUTHORING.INVALID_LOGICAL_PROGRAM", @@ -968,9 +984,35 @@ def compile_current(current: dict[str, bytes]) -> Any: "compiled base must own the exact supplied frozen source", ) base_compiled = compiled_base - files = dict(base.files) + implementation = self.compilation_identity + inputs = ( + ProjectionInputs( + base.files, base_snapshot, selected_repository_paths, + tuple(_canonical_json(item.as_contract()) for item in program.change_sets), + implementation, + ) + if implementation is not None else None + ) + prefix_length = 0 + selected_source = base repository_paths = selected_repository_paths - for change_set in program.change_sets: + if ( + inputs is not None + and type(predecessor) is LogicalProjection + and type(predecessor.source) is FrozenContentSource + and type(predecessor._continuation) is ProjectionContinuation + ): + prefix_length = predecessor._continuation.prefix_length( + inputs, projected_files=predecessor.source.files, + repository_paths=predecessor.repository_paths, + ) + if prefix_length: + selected_source = predecessor.source + repository_paths = predecessor.repository_paths + # Copy only the file table: every value is an immutable byte string. + # Neither a failed suffix nor a sibling successor can mutate its prefix. + files = dict(selected_source.files) + for change_set in program.change_sets[prefix_length:]: before = dict(files) from .supporting_authoring import SUPPORT_EDIT_KINDS, begin_edits, finish_edits support_edits = [edit.as_contract() for edit in change_set.edits @@ -1020,6 +1062,8 @@ def compile_current(current: dict[str, bytes]) -> Any: _analysis_policy_ids(base_compiled, compiled, program), _analysis_module_ids(program), repository_paths, + ProjectionContinuation(inputs, source.files, repository_paths) + if inputs is not None else None, ) def _apply_edit( diff --git a/tools/standards_engine/standards_engine/operation_materials.py b/tools/standards_engine/standards_engine/operation_materials.py index 75d55744..2a3a18c9 100644 --- a/tools/standards_engine/standards_engine/operation_materials.py +++ b/tools/standards_engine/standards_engine/operation_materials.py @@ -62,7 +62,10 @@ def projection(self, revision: ProposalRevision) -> LogicalProjection: accepted = self.compiled(revision.base_snapshot) if self._projection is not None and self._projection[0] == revision: return self._projection[1] - projection = self._engine._proposal_projection(revision, accepted, reuse=True) + projection = self._engine._proposal_projection( + revision, accepted, reuse=True, + predecessor=self._projection[1] if self._projection is not None else None, + ) # A revision change replaces, rather than accumulates, retained output. self._projection = (revision, projection) return projection diff --git a/tools/standards_engine/standards_engine/projection_continuation.py b/tools/standards_engine/standards_engine/projection_continuation.py new file mode 100644 index 00000000..bfcbaec4 --- /dev/null +++ b/tools/standards_engine/standards_engine/projection_continuation.py @@ -0,0 +1,58 @@ +"""Immutable computation provenance for a logical projection, not acceptance. + +The compiler snapshots inputs before replay and returns continuation material +only after final compilation and cumulative analysis succeed. These values retain +no storage, lifecycle, authorization or publication decisions. A non-matching +value selects complete replay of the requested authoritative inputs. +""" +from __future__ import annotations + +from collections.abc import Callable +from dataclasses import dataclass + + +@dataclass(frozen=True, slots=True) +class ProjectionInputs: + base_files: tuple[tuple[str, bytes], ...] + base_snapshot: str | None + base_repository_paths: tuple[str, ...] + # Snapshots of the existing canonical change-set representation, not live + # edit mappings: nested authored values may still belong to their caller. + change_sets: tuple[str, ...] + implementation: tuple[Callable[..., object], ...] + + def prefix_length(self, successor: ProjectionInputs) -> int: + """Return a strictly shorter exact prefix, or zero for complete replay.""" + length = len(self.change_sets) + if ( + not 0 < length < len(successor.change_sets) + or self.implementation != successor.implementation + or self.base_snapshot != successor.base_snapshot + or self.base_repository_paths != successor.base_repository_paths + or self.base_files != successor.base_files + or self.change_sets != successor.change_sets[:length] + ): + return 0 + return length + + +@dataclass(frozen=True, slots=True) +class ProjectionContinuation: + inputs: ProjectionInputs + projected_files: tuple[tuple[str, bytes], ...] + repository_paths: tuple[str, ...] + + def prefix_length( + self, + successor: ProjectionInputs, + *, + projected_files: tuple[tuple[str, bytes], ...], + repository_paths: tuple[str, ...], + ) -> int: + """Bind the offered material as well as its claimed computation inputs.""" + if ( + projected_files != self.projected_files + or repository_paths != self.repository_paths + ): + return 0 + return self.inputs.prefix_length(successor) diff --git a/tools/standards_engine/tests/test_logical_authoring.py b/tools/standards_engine/tests/test_logical_authoring.py index 4ebc2695..6f9f7a94 100644 --- a/tools/standards_engine/tests/test_logical_authoring.py +++ b/tools/standards_engine/tests/test_logical_authoring.py @@ -1,6 +1,7 @@ from __future__ import annotations import json +from dataclasses import replace import subprocess import tempfile import tomllib @@ -16,6 +17,7 @@ authoring_target_id, ) from tools.standards_engine.standards_engine.authoring import AuthoringError +from tools.standards_engine.standards_engine import logical_authoring as logical from tools.standards_engine.standards_engine.engine import StandardsEngine from tools.standards_metadata.standards_metadata import ( DirectoryContentSource, @@ -92,6 +94,172 @@ def test_verified_compiled_base_is_reused_but_candidate_compiles(self) -> None: base_repository_paths=self.repository_paths, compiled_base=self.compiled) self.assertEqual(raised.exception.failure.code, "AUTHORING.COMPILED_BASE_MISMATCH") + def continuation_change(self, index: int) -> StandardsChangeSet: + edit = self.new_standard_edit() + edit["standard"].update( + id="reference.testing.logical-continuation", role="reference", + level="REFERENCE", body=f"Independent continuation revision {index}.\n", + ) + edit["policy_units"] = [] + if index > 1: + edit["kind"] = "revise-standard" + for key in ("requires", "specializes", "policy_units"): + del edit[key] + return self.change_set([edit]) + + def compile_continuation(self, changes, *, predecessor=None, compiler=None, **kwargs): + compiler = compiler or LogicalAuthoringCompiler(StandardsEngine._compile) + return compiler.compile( + self.base, LogicalProgram(tuple(changes)), + base_repository_paths=self.repository_paths, compiled_base=self.compiled, + predecessor=predecessor, **kwargs, + ) + + def assert_same_projection(self, actual, expected) -> None: + self.assertEqual(actual.source.files, expected.source.files) + self.assertEqual(actual.repository_paths, expected.repository_paths) + self.assertEqual(actual.semantic_proposals, expected.semantic_proposals) + self.assertEqual(actual.analysis_policy_ids, expected.analysis_policy_ids) + self.assertEqual(actual.analysis_module_ids, expected.analysis_module_ids) + self.assertEqual(actual.compiled.source.files, expected.compiled.source.files) + + def test_successor_executes_only_suffix_at_growing_history_lengths(self) -> None: + for length in (1, 4, 12, 32): + with self.subTest(history=length): + prefix = tuple(self.continuation_change(i) for i in range(1, length + 1)) + predecessor = self.compile_continuation(prefix) + self.assertIsNotNone(predecessor._continuation) + original_files = predecessor.source.files + program = (*prefix, self.continuation_change(length + 1)) + with mock.patch.object( + logical, "_refresh_suite_input_projection", + wraps=logical._refresh_suite_input_projection, + ) as refresh: + cold = self.compile_continuation(program) + self.assertEqual(refresh.call_count, length + 1) + refresh.reset_mock() + warm = self.compile_continuation(program, predecessor=predecessor) + self.assertEqual(refresh.call_count, 1) + self.assert_same_projection(warm, cold) + self.assertEqual(predecessor.source.files, original_files) + self.assertIsNot(warm.compiled, predecessor.compiled) + self.assertIsNot(warm.compiled, self.compiled) + + def test_successor_preserves_cumulative_original_base_semantics(self) -> None: + policy = "topic.architecture.composed-design-admission" + def revision(body): + return self.change_set([{ + "kind": "revise-policy-unit", "policy": policy, + "title": "Composed Design Admission", "body": body, + "semantics": {"kind": "change", "accepted_semantic_revision": 1, + "proposed_semantic_revision": 2, + "intent": "Clarify the composed-design decision."}, + }]) + relationship = self.new_relationship() + relationship["source_policy"] = policy + prefix = (revision("Use a deep Module for the first decision.\n"), + self.change_set([self.new_standard_edit()]), + self.change_set([{"kind": "put-policy-relationship", "relationship": relationship}])) + predecessor = self.compile_continuation(prefix) + program = (*prefix, revision("Use a stable Interface for the final decision.\n"), + self.change_set([{ + "kind": "replace-standard-relationships", + "standard": "topic.architecture", + "requires": ["core"], "specializes": [], + "rationale": "Narrow architecture prerequisites to core.", + }])) + warm = self.compile_continuation(program, predecessor=predecessor) + cold = self.compile_continuation(program) + self.assert_same_projection(warm, cold) + self.assertIn(policy, warm.analysis_policy_ids) + self.assertIn("topic.logical-authoring-test", warm.analysis_module_ids) + self.assertIn("topic.logical-authoring-test.policy", {item["policy"] for item in warm.semantic_proposals}) + proposal = next(item for item in warm.semantic_proposals if item["policy"] == policy) + self.assertEqual(proposal["accepted_semantic_revision"], 1) + self.assertEqual(proposal["proposed_semantic_revision"], 2) + self.assertEqual(warm.compiled.corpus.resolve_policy_unit(policy).semantic_revision, 2) + self.assertEqual(self.compiled.corpus.resolve_policy_unit(policy).semantic_revision, 1) + + def test_invalid_and_no_effect_suffixes_preserve_the_predecessor(self) -> None: + prefix = (self.continuation_change(1),) + predecessor = self.compile_continuation(prefix) + files = predecessor.source.files + no_effect = self.continuation_change(2).as_contract() + no_effect["edits"][0]["standard"]["body"] = "Independent continuation revision 1.\n" + unavailable = self.continuation_change(2).as_contract() + unavailable["edits"][0]["standard"]["id"] = "reference.testing.missing-successor" + for raw in (no_effect, unavailable): + with self.subTest(kind=raw["edits"][0]["standard"]["id"]): + program = (*prefix, StandardsChangeSet.from_mapping(raw)) + failures = [] + for seed in (None, predecessor): + with self.assertRaises(AuthoringError) as raised: + self.compile_continuation(program, predecessor=seed) + failures.append(raised.exception.failure) + self.assertEqual(failures[0], failures[1]) + self.assertEqual(predecessor.source.files, files) + valid = self.compile_continuation( + (*prefix, self.continuation_change(3)), predecessor=predecessor, + ) + self.assert_same_projection(valid, self.compile_continuation((*prefix, self.continuation_change(3)))) + + def test_unproven_or_changed_predecessor_material_selects_full_replay(self) -> None: + prefix = (self.continuation_change(1),) + predecessor = self.compile_continuation(prefix) + program = (*prefix, self.continuation_change(2)) + altered = dict(predecessor.source.files) + altered["untrusted.md"] = b"not a verified projection" + candidates = ( + replace(predecessor, _continuation=None), + replace(predecessor, source=FrozenContentSource(altered)), + replace(predecessor, repository_paths=(*predecessor.repository_paths, "untrusted.md")), + ) + expected = self.compile_continuation(program) + for seed in candidates: + with self.subTest(seed=seed._continuation is None), mock.patch.object( + logical, "_refresh_suite_input_projection", + wraps=logical._refresh_suite_input_projection, + ) as refresh: + actual = self.compile_continuation(program, predecessor=seed) + self.assertEqual(refresh.call_count, 2) + self.assert_same_projection(actual, expected) + + def test_changed_history_snapshot_or_compiler_recipe_replays(self) -> None: + prefix = (self.continuation_change(1),) + predecessor = self.compile_continuation(prefix) + changed = prefix[0].as_contract() + changed["purpose"]["rationale"] = "A distinct exact logical program." + def alternate(source): + return StandardsEngine._compile(source) + cases = ( + ((StandardsChangeSet.from_mapping(changed), self.continuation_change(2)), {}), + ((*prefix, self.continuation_change(2)), {"base_snapshot": "snapshot:other"}), + ((*prefix, self.continuation_change(2)), {"compiler": LogicalAuthoringCompiler(alternate)}), + ) + for program, kwargs in cases: + with self.subTest(changed=tuple(kwargs)), mock.patch.object( + logical, "_refresh_suite_input_projection", + wraps=logical._refresh_suite_input_projection, + ) as refresh: + actual = self.compile_continuation(program, predecessor=predecessor, **kwargs) + self.assertEqual(refresh.call_count, 2) + self.assert_same_projection(actual, self.compile_continuation(program, **kwargs)) + + def test_caller_owned_nested_changes_cannot_rewrite_compilation_provenance(self) -> None: + prefix = self.continuation_change(1) + predecessor = self.compile_continuation((prefix,)) + original_proof = predecessor._continuation + caller = prefix.as_contract() + caller["edits"][0]["standard"]["body"] = "Changed prefix bytes.\n" + changed = StandardsChangeSet.from_mapping(caller) + program = (changed, self.continuation_change(2)) + with mock.patch.object(logical, "_refresh_suite_input_projection", + wraps=logical._refresh_suite_input_projection) as refresh: + actual = self.compile_continuation(program, predecessor=predecessor) + self.assertEqual(refresh.call_count, 2) + self.assert_same_projection(actual, self.compile_continuation(program)) + self.assertIs(predecessor._continuation, original_proof) + def test_manifest_projection_uses_captured_inputs_without_staging(self) -> None: program = LogicalProgram((self.change_set([self.new_standard_edit()]),)) compiler = LogicalAuthoringCompiler(StandardsEngine._compile) @@ -765,6 +933,11 @@ def test_created_standard_can_be_retired_with_complete_explicit_closure( base_repository_paths=self.repository_paths, ) + predecessor = self.compile_continuation((create,)) + continued = self.compile_continuation((create, retire), predecessor=predecessor) + self.assert_same_projection(continued, projection) + self.assert_suite_input_projection_is_canonical(continued) + self.assertIsNone( projection.compiled.corpus.resolve_module("topic.logical-authoring-test") ) @@ -836,13 +1009,11 @@ def test_retired_standard_successor_must_survive_the_final_program(self) -> None ) ) - with self.assertRaises(AuthoringError) as raised: - LogicalAuthoringCompiler(StandardsEngine._compile).compile( - self.base, - LogicalProgram((create, self.change_set(retire_edits))), - base_repository_paths=self.repository_paths, - ) - self.assertEqual(raised.exception.failure.code, "AUTHORING.INVALID_SUCCESSOR") + predecessor = self.compile_continuation((create,)) + for seed in (None, predecessor): + with self.subTest(continued=seed is not None), self.assertRaises(AuthoringError) as raised: + self.compile_continuation((create, self.change_set(retire_edits)), predecessor=seed) + self.assertEqual(raised.exception.failure.code, "AUTHORING.INVALID_SUCCESSOR") def test_retirement_requires_and_applies_complete_relationship_dispositions( self, diff --git a/tools/standards_engine/tests/test_nested_materials.py b/tools/standards_engine/tests/test_nested_materials.py index ef6cc7a8..9b2ea6f7 100644 --- a/tools/standards_engine/tests/test_nested_materials.py +++ b/tools/standards_engine/tests/test_nested_materials.py @@ -11,6 +11,7 @@ from tools.standards_engine.standards_engine import AgentToolFacade, StandardsEngine from tools.standards_engine.standards_engine import _generated_contract as c from tools.standards_engine.standards_engine.logical_authoring import StandardsChangeSet +from tools.standards_engine.standards_engine import logical_authoring as logical from tools.standards_engine.standards_engine.operation_materials import ProposalMaterials from tools.standards_engine.standards_engine.tools import LocalAlwaysAllowAuthorizer, _contracts from tools.standards_engine.tests.test_agent_workflow import ( @@ -90,12 +91,17 @@ def test_propose_shares_validation_and_analysis_material(self): def test_revise_compiles_only_old_and_new_projections(self): proposed = self.propose() - with self.counts() as counts: + self.assertIsNone(self.engine._compiled_cache) + with self.counts() as counts, patch.object( + logical, "_refresh_suite_input_projection", wraps=logical._refresh_suite_input_projection, + ) as refresh: revised = self.facade.revise({ "context": proposed["context"], "change_set": self.change(revision=True), }) self.assertEqual(revised["status"], "complete", revised) self.assert_counts(counts, projections=2, evaluations=2) + # One preflight replay plus one suffix; not a second replay of edit one. + self.assertEqual(refresh.call_count, 2) self.assertNotEqual(revised["revision"], proposed["revision"]) self.assertEqual(self.facade.workflow_status({"context": proposed["context"]})["status"], "stale") target = self.change()["edits"][0]["standard"]["id"] @@ -186,12 +192,12 @@ def test_nested_public_reentry_has_independent_operation_material(self): nested = [] entered = False - def reenter(revision, accepted=None, *, reuse=False): + def reenter(revision, accepted=None, *, reuse=False, predecessor=None): nonlocal entered if not entered: entered = True nested.append(self.facade.analyze_proposal({"revision": second["revision"]})) - return project(revision, accepted, reuse=reuse) + return project(revision, accepted, reuse=reuse, predecessor=predecessor) with patch.object(self.engine._snapshots, "load_content", wraps=self.engine._snapshots.load_content) as loads: with patch.object(self.engine, "_proposal_projection", side_effect=reenter): diff --git a/tools/standards_engine/tests/test_projection_continuation.py b/tools/standards_engine/tests/test_projection_continuation.py new file mode 100644 index 00000000..39a99e26 --- /dev/null +++ b/tools/standards_engine/tests/test_projection_continuation.py @@ -0,0 +1,120 @@ +"""Exact continuation input/material matching, independent of repository I/O.""" +from __future__ import annotations + +from dataclasses import FrozenInstanceError, replace +import json +import unittest + +from tools.standards_engine.standards_engine.projection_continuation import ( + ProjectionContinuation, + ProjectionInputs, +) + + +def compiler_one(source: object) -> object: + return source + + +def compiler_two(source: object) -> object: + return source + + +class ProjectionContinuationTests(unittest.TestCase): + def setUp(self) -> None: + self.inputs = ProjectionInputs( + (("base.md", b"accepted"),), "snapshot:original", + ("base.md", "not-read.md"), ("change-1", "change-2"), + (compiler_one,), + ) + self.material = (("base.md", b"projected"), ("created.md", b"new")) + self.paths = ("base.md", "created.md", "not-read.md") + self.proof = ProjectionContinuation(self.inputs, self.material, self.paths) + self.successor = replace(self.inputs, change_sets=(*self.inputs.change_sets, "change-3")) + + def length(self, successor: ProjectionInputs) -> int: + return self.proof.prefix_length( + successor, projected_files=self.material, repository_paths=self.paths, + ) + + def test_exact_prefix_supports_one_or_multiple_appended_changes(self) -> None: + self.assertEqual(self.length(self.successor), 2) + self.assertEqual(self.length(replace( + self.successor, change_sets=(*self.successor.change_sets, "change-4"), + )), 2) + + def test_each_supported_history_length_matches_only_its_exact_prefix(self) -> None: + for length in (1, 4, 12, 32): + with self.subTest(length=length): + prefix = replace(self.inputs, change_sets=tuple(str(i) for i in range(length))) + successor = replace(prefix, change_sets=(*prefix.change_sets, "new")) + self.assertEqual(prefix.prefix_length(successor), length) + self.assertEqual(prefix.prefix_length(replace( + successor, change_sets=("changed", *successor.change_sets[1:]), + )), 0) + + def test_same_shorter_or_reordered_program_is_not_a_successor(self) -> None: + for program in ((), ("change-1",), self.inputs.change_sets, + ("change-2", "change-1", "change-3")): + with self.subTest(program=program): + self.assertEqual(self.length(replace(self.inputs, change_sets=program)), 0) + + def test_empty_program_does_not_supply_continuation(self) -> None: + self.assertEqual(replace(self.inputs, change_sets=()).prefix_length(self.successor), 0) + + def test_changed_base_bytes_or_file_membership_replays(self) -> None: + for files in ((("base.md", b"new accepted bytes"),), + (("renamed.md", b"accepted"),), + (*self.inputs.base_files, ("extra.md", b"more"))): + with self.subTest(files=files): + self.assertEqual(self.length(replace(self.successor, base_files=files)), 0) + + def test_changed_snapshot_identity_replays_even_with_equal_bytes(self) -> None: + for snapshot in (None, "snapshot:other"): + with self.subTest(snapshot=snapshot): + self.assertEqual(self.length(replace(self.successor, base_snapshot=snapshot)), 0) + + def test_repository_membership_outside_captured_files_is_bound(self) -> None: + self.assertEqual(self.length(replace( + self.successor, base_repository_paths=("base.md",), + )), 0) + self.assertEqual(self.length(replace( + self.successor, base_repository_paths=(*self.inputs.base_repository_paths, "new.md"), + )), 0) + + def test_installed_compiler_identity_is_bound(self) -> None: + self.assertEqual(self.length(replace(self.successor, implementation=(compiler_two,))), 0) + + def test_changed_projected_bytes_replay(self) -> None: + self.assertEqual(self.proof.prefix_length( + self.successor, projected_files=(("base.md", b"forged"),), + repository_paths=self.paths, + ), 0) + + def test_changed_projected_membership_replays(self) -> None: + self.assertEqual(self.proof.prefix_length( + self.successor, projected_files=self.material, repository_paths=("base.md",), + ), 0) + + def test_canonical_program_snapshot_does_not_follow_caller_mutation(self) -> None: + change = {"purpose": {"evidence": [{"id": "evidence:original"}]}} + original = json.dumps(change, sort_keys=True) + prefix = replace(self.inputs, change_sets=(original,)) + change["purpose"]["evidence"][0]["id"] = "evidence:mutated" + successor = replace(prefix, change_sets=(json.dumps(change, sort_keys=True), "new")) + self.assertEqual(prefix.change_sets, (original,)) + self.assertEqual(prefix.prefix_length(successor), 0) + + def test_material_and_provenance_are_immutable_and_copies_are_independent(self) -> None: + with self.assertRaises(FrozenInstanceError): + self.proof.repository_paths = () # type: ignore[misc] + with self.assertRaises(FrozenInstanceError): + self.inputs.change_sets = () # type: ignore[misc] + working = dict(self.material) + working["base.md"] = b"successor only" + del working["created.md"] + self.assertEqual(self.proof.projected_files, self.material) + self.assertEqual(self.length(self.successor), 2) + + +if __name__ == "__main__": + unittest.main() diff --git a/tools/standards_engine/tests/test_proposal_reuse.py b/tools/standards_engine/tests/test_proposal_reuse.py index 17a4ec78..b02452eb 100644 --- a/tools/standards_engine/tests/test_proposal_reuse.py +++ b/tools/standards_engine/tests/test_proposal_reuse.py @@ -119,6 +119,122 @@ def test_status_retains_fresh_evaluation_on_each_hit(self): refresh.assert_not_called() self.assertEqual(evaluate.call_count, 2) + def successor_change(self): + change = reference_change(self.root, "projection-cache", revision=True) + change["edits"][0]["standard"]["body"] += "Incremental successor.\n" + return change + + def test_native_revision_uses_warm_exact_predecessor_without_preflight_replay(self): + old = self.query() + with ( + patch.object(logical, "_refresh_suite_input_projection", wraps=logical._refresh_suite_input_projection) as refresh, + patch.object(self.engine._snapshots, "load_content", wraps=self.engine._snapshots.load_content) as load, + patch.object(self.engine._authoring, "read_revision", wraps=self.engine._authoring.read_revision) as read, + patch.object(logical.LogicalAuthoringCompiler, "_apply_edit", autospec=True, + side_effect=logical.LogicalAuthoringCompiler._apply_edit) as edit, + ): + revised = self.facade.revise_proposal({ + "kind": "revise-proposal", + "expected_revision": self.latest["revision"], "change_set": self.successor_change(), + }) + self.assertEqual(revised["kind"], "revise-proposal-result", revised) + self.assertEqual(refresh.call_count, 1) + self.assertEqual(edit.call_count, 1) + self.assertGreaterEqual(read.call_count, 1) + self.assertEqual(load.call_count, 1) + self.assertIn("Incremental successor.", self.query(revised)["content"]) + self.assertEqual(self.query(), old) + self.assertEqual(self.facade.workflow_status({"context": self.latest["context"]})["status"], "stale") + + def test_native_revision_with_a_new_cache_reconstructs_the_complete_program(self): + self.query() + cache = CompiledSnapshotCache(self.root, "authoring") + self.addCleanup(cache.close) + with self.open_engine(cache) as engine: + facade = AgentToolFacade(engine, self.interface) + with patch.object(logical, "_refresh_suite_input_projection", wraps=logical._refresh_suite_input_projection) as refresh: + revised = facade.revise_proposal({ + "kind": "revise-proposal", + "expected_revision": self.latest["revision"], "change_set": self.successor_change(), + }) + self.assertEqual(revised["kind"], "revise-proposal-result", revised) + self.assertEqual(refresh.call_count, 3) + + def test_evicted_predecessor_selects_full_replay_without_changing_the_result(self): + cache = CompiledSnapshotCache(self.root, "authoring", max_entries=1) + self.addCleanup(cache.close) + with self.open_engine(cache) as engine: + facade = AgentToolFacade(engine, self.interface) + warm = facade.query_proposal({ + "revision": self.latest["revision"], "request": {"kind": "read", "target": self.target}, + }) + self.assertEqual(warm["kind"], "proposal-read-result", warm) + with patch.object(logical, "_refresh_suite_input_projection", wraps=logical._refresh_suite_input_projection) as refresh: + revised = facade.revise_proposal({ + "kind": "revise-proposal", + "expected_revision": self.latest["revision"], "change_set": self.successor_change(), + }) + self.assertEqual(revised["kind"], "revise-proposal-result", revised) + # Fresh original-base compilation occupies the sole slot before + # successor construction; the draft was therefore evicted. + self.assertEqual(refresh.call_count, 3) + self.assertLessEqual(cache.statistics["entries"], 1) + self.assertIn("Incremental successor.", facade.query_proposal({ + "revision": revised["revision"], "request": {"kind": "read", "target": self.target}, + })["content"]) + + def test_invalid_native_suffix_keeps_the_exact_predecessor_and_head(self): + old = self.query() + no_effect = reference_change(self.root, "projection-cache", revision=True) + with patch.object(logical, "_refresh_suite_input_projection", wraps=logical._refresh_suite_input_projection) as refresh: + rejected = self.facade.revise_proposal({ + "kind": "revise-proposal", + "expected_revision": self.latest["revision"], "change_set": no_effect, + }) + self.assertEqual(rejected["code"], "AUTHORING.NO_EFFECT", rejected) + refresh.assert_not_called() + self.assertEqual(self.query(), old) + refresh.assert_not_called() + self.assertEqual(self.facade.workflow_status({"context": self.latest["context"]})["status"], "complete") + + def test_stale_native_head_is_rejected_before_continuation(self): + self.query() + with patch.object(logical, "_refresh_suite_input_projection", wraps=logical._refresh_suite_input_projection) as refresh: + rejected = self.facade.revise_proposal({ + "kind": "revise-proposal", + "expected_revision": self.first["revision"], "change_set": self.successor_change(), + }) + self.assertEqual(rejected["code"], "AUTHORING.REVISION_STALE", rejected) + refresh.assert_not_called() + + def test_cumulative_review_obligations_match_a_fresh_engine_after_continuation(self): + warm = self.facade.workflow_status({"context": self.normative["context"]}) + self.assertEqual(warm["status"], "needs-action", warm) + change = reference_change(self.root, "projection-normative", revision=True) + change["edits"][0]["standard"].update( + id="topic.projection-normative", role="topic", level="MUST", + ) + revised = self.facade.revise({"context": self.normative["context"], "change_set": change}) + self.assertEqual(revised["status"], "needs-action", revised) + with StandardsEngine.open_repository( + self.root, store_path=self.store, purpose="authoring", + execution_context=AnalysisExecutionContext(LocalAlwaysAllowAuthorizer(self.root)), + ) as engine: + cold = AgentToolFacade(engine, self.interface).workflow_status({"context": revised["context"]}) + self.assertEqual(cold["status"], revised["status"]) + self.assertTrue(revised["outcome"]["obligations"]) + self.assertEqual(cold["outcome"]["obligations"], revised["outcome"]["obligations"]) + + def test_independent_projection_boundary_ignores_an_offered_predecessor(self): + base = self.engine._compiled_snapshot(SnapshotId(self.snapshot["id"])) + first = self.engine._authoring.read_revision(self.first["revision"]["id"]) + latest = self.engine._authoring.read_revision(self.latest["revision"]["id"]) + prefix = self.engine._proposal_projection(first, base, reuse=True) + with patch.object(logical, "_refresh_suite_input_projection", wraps=logical._refresh_suite_input_projection) as refresh: + replayed = self.engine._proposal_projection(latest, base, predecessor=prefix) + self.assertEqual(refresh.call_count, 2) + self.assertEqual(replayed.source.files, self.engine._proposal_projection(latest, base).source.files) + def test_new_revision_misses_while_old_results_and_stale_status_stay_exact(self): old = self.query() change = reference_change(self.root, "projection-cache", revision=True) From 5a9dcb08effda50a485e6ae08d9fe4c349c74eda Mon Sep 17 00:00:00 2001 From: MrScripty Date: Thu, 24 Sep 2026 14:55:34 -0700 Subject: [PATCH 17/26] perf(contracts): select validated union branches by schema tag --- .../reports/performance-schema-decoding.md | 212 +++++++++++ .../measure_decoding.py | 168 +++++++++ .../generated/suite-inputs.json | 16 +- tools/standards_contracts/README.md | 21 ++ .../standards_contracts/runtime.py | 6 + .../standards_contracts/union_selection.py | 136 +++++++ .../tests/test_union_decoding.py | 336 ++++++++++++++++++ .../tests/test_union_projection.py | 126 +++++++ 8 files changed, 1019 insertions(+), 2 deletions(-) create mode 100644 docs/plans/purpose-separated-standards-engine/reports/performance-schema-decoding.md create mode 100644 docs/plans/purpose-separated-standards-engine/reports/performance-schema-decoding/measure_decoding.py create mode 100644 tools/standards_contracts/standards_contracts/union_selection.py create mode 100644 tools/standards_contracts/tests/test_union_decoding.py create mode 100644 tools/standards_contracts/tests/test_union_projection.py diff --git a/docs/plans/purpose-separated-standards-engine/reports/performance-schema-decoding.md b/docs/plans/purpose-separated-standards-engine/reports/performance-schema-decoding.md new file mode 100644 index 00000000..c8b1c72c --- /dev/null +++ b/docs/plans/purpose-separated-standards-engine/reports/performance-schema-decoding.md @@ -0,0 +1,212 @@ +# Schema-directed post-validation decoding + +**Status:** implemented; focused and canonical contract tests pass in the recorded +local environment. Supported-runtime, installed Engine, and complete repository +qualification remain pending. + +**Base:** `MrScripty/Coding-Standards`, branch +`implementation/purpose-separated-standards-engine`, commit +`bf1358c81a0fa1c59019a4b30682c39c62126d7f`, tree +`5c07a26bde3a4dd48973d52c88ad057e80b00caf`. + +## Outcome and write scope + +Reduce repeated `oneOf` branch validation while constructing generated models +from a root value that has already passed the canonical validator. This is the +schema-directed decoder increment selected after successor construction; it +contains no snapshot-identity, suite-manifest incrementality, or general compiler +optimization. + +The production write set is `standards_contracts/runtime.py` and the new internal +`standards_contracts/union_selection.py`. The package README, two focused test +modules, this report, and the measurement runner complete the seven-file update. +Canonical schemas, interface declarations, generated models/tool definitions, +dependency locks, public exports, persisted formats, and version domains are +unchanged. No remote branch, accepted main, user store, or installed client was +modified by this delivery. + +## Design and deciding correctness argument + +`ContractRuntime` still calls its existing root validator before decoding, and +`normalize_model` still validates the complete generated-model wire value before +normalizing its fields. Strict JSON checks, reference resolution, diagnostics, +optional-field omission, schema-default annotations, and model construction keep +their existing implementation owners. + +On runtime construction, the selector planner reads the runtime's private copied +schema. It admits a table only when every alternative is explicitly an object +and all alternatives share a required property whose direct string `const` or +all-string `enum` values are pairwise disjoint. The table maps those values to +the original alternative nodes, rather than flattening or replacing `$ref` +branches. Bare same-resource definition aliases can be followed during planning; +cycles terminate planning without selecting a table. + +After successful root validation, an instance satisfying that union must have +exactly one valid alternative. Its required string tag excludes every other +alternative, so the table identifies the construction branch. The root proof +still establishes all remaining constraints and `oneOf` exclusivity. The planner +is not an instance validator and does not create a second JSON Schema semantics +implementation. + +Overlapping tags, optional or missing tags, scalar unions, mixed/non-string tag +values, reference siblings, property references, and other unrecognized shapes +retain the original `is_valid` selection loop. A missing tag at lookup also uses +that loop. The planner follows schema positions only, not objects inside +`const`, `enum`, or annotation values. A nested resource `$id` disables tables +for that runtime, preserving the existing reference path. These are optimization +eligibility restrictions, not new schema support or rejection rules. + +Tables are created once per runtime and indexed by the identity of nodes in its +retained schema copy. Their size and lifetime follow that schema. They retain no +request values, introduce no process-global cache, and require no persistence or +invalidation service. The current canonical schema produces 26 tables. Runtime +initialization costs and retained table state are the corresponding tradeoff. + +## Verification results + +All existing package tests were restored unchanged and checked against their +pushed Git blob identities before running the package test campaign. + +| Check | Observed result | Evidence boundary | +| --- | --- | --- | +| Candidate contract package | 52 tests: 51 passed, 1 existing skip | All 23 original tests plus 29 added tests | +| Baseline original package | 23 tests: 22 passed, same skip | Unmodified decoder on the same interpreter/dependencies | +| Focused union tests | 23 passed in the candidate campaign | Eligibility, fallback, mutation isolation, root validation and diagnostics | +| Canonical generated-model tests | 6 passed in the candidate campaign | 42 canonical examples, recursive variants, constructor/from-value and required-field mutations | +| Canonical generation | Both generated outputs byte-identical | Actual schema/interface -> compiler -> Python and agent-tool artifacts | +| Syntax | All five changed/new Python files compile and parse with the 3.11 grammar | Syntax only, not supported-interpreter execution | + +The skipped test is the existing exact-dependency runtime qualification test, +which admits CPython 3.11 and 3.12 only. It was neither changed nor bypassed by a +new skip. Test logs retain the actual result and skip reason. + +Tests distinguish construction-time `is_valid` calls from calls made inside the +canonical root validator. Rejections compare complete structured failure values, +including nested pointers and causes, against the original branch-selection path. +Cases include a valid tag with an invalid payload, absent required fields, invalid +operators, multiple matching alternatives, strings with distinct Unicode spelling, +empty-string tags, and JSON boolean/numeric equality cases. Generated model types, +wire values, immutability, and omitted optional fields are observable assertions. + +The test-only general decoder reproduces the prior branch-selection strategy and +shares unchanged validation/construction owners. Its comparisons establish +consistency of the optimization, not independent completeness for arbitrary JSON +Schema. Existing package semantics tests continue comparing the admitted behavior +with the selected `Draft202012Validator`; unsupported constructs remain owned by +the existing compiler profile. + +## Measured decoding effect + +The [runner](performance-schema-decoding/measure_decoding.py) measured seven +alternating baseline/candidate pairs, using a fresh worker process for each sample. +Each worker uses the same canonical schema and real compiler-generated models. +One warm-up decode per workload is excluded; the measured operation includes +complete root validation plus generated-model construction. Imports, generation, +initialization, serialization, and separate instrumented observations are outside +that timer. Every run checks input/output digests, generated source identity, +schema identity, Python, and dependency versions. + +These are **synthetic, schema-valid decoder workloads**, not calls through the +Engine, MCP dispatcher, repository store, or user interface. In particular, the +route-result fixture contains explanation-shaped data but is not the result of +executing the Router. The comparison must not be presented as an end-to-end +routing or application latency improvement. + +| Workload | Baseline median (range), ms | Candidate median (range), ms | Median decrease | +| --- | ---: | ---: | ---: | +| Compact query, 163 input bytes | 0.392 (0.367–0.468) | 0.326 (0.262–0.475) | Small overlapping range; not a meaningful consumer claim | +| Recursive expression, 9,968 input bytes | 444.377 (429.112–496.635) | 118.860 (110.828–158.345) | 73.3% | +| Synthetic route result, 14,347 input bytes | 337.936 (331.067–423.542) | 126.210 (120.675–135.364) | 62.7% | + +The expression fixture contains 225 recursive expression nodes. The route-result +fixture has 32 rules and 32 unknown boolean facts. The input-byte column uses the +runner's standard JSON representation. Seven observations describe medians and +ranges, not tail-latency guarantees. + +Separate instrumentation, excluded from timing, found: + +| Workload | Construction-time `is_valid` calls, before -> after | Root validations, before -> after | +| --- | ---: | ---: | +| Compact query | 3 -> 0 | 1 -> 1 | +| Recursive expression | 5,128 -> 256 | 1 -> 1 | +| Synthetic route result | 3,968 -> 416 | 1 -> 1 | + +Remaining calls cover general-path unions and their nested validator work; their +presence is intentional. Every measured response has the identical output digest. +The delivered runtime/helper hashes match those recorded in every candidate run. + +Runtime initialization, measured separately, increased from a median 4.882 ms +(range 4.586–6.637) to 9.733 ms (9.423–11.481). This is approximately 4.851 ms +additional setup per runtime, not per decode. It is not a full process-startup +measurement. Peak memory, process RSS, model token cost, and installed consumer +latency were not measured. + +## Environment, provenance and limitations + +Measurements and tests used Linux on an Intel Xeon Platinum 8272CL host inside a +container with a four-CPU quota and 4 GiB memory limit. The executable was Python +3.13.5. `jsonschema` 4.26.0, `referencing` 0.37.0, `attrs` 26.1.0, +`jsonschema-specifications` 2025.9.1 and `typing-extensions` 4.16.0 match the selected +versions; `rpds-py` is 2026.5.1 instead of the lock's 2026.6.3. The project admits +Python >=3.11,<3.13, so these are local same-environment results, not qualification +of the supported locked deployment. No test campaign ran alongside the final +paired measurement run. + +Direct cloning was unavailable. Prior source deliveries supplied relevant files, +and the GitHub connector supplied current source and blob identities. Sixteen +original files/input artifacts, including the changed existing-file bases, were +checked against exact pushed Git blob hashes. The generated Python and agent-tool +artifacts also match real regeneration from the canonical schema. This verifies +the relevant recovered inputs; it does not turn the working subset into a complete +repository checkout. + +The full Engine integration suite, actual MCP route measurement, installed-client +qualification, and complete repository verifier were not run. The canonical +`suite-inputs.json` was deliberately not regenerated from the incomplete checkout. +It must be refreshed through the Engine in the complete repository after applying +and staging this write set. Independent review also remains a separate gate. + +The ZIP retains raw measurements, full final candidate/baseline test logs, +environment and source identity records, syntax results, generated freshness, +patch-application verification, and file checksums. An initial measurement command +hit the execution tool's limit; it supplies no accepted timing. The complete +subsequent seven-pair run is the sole source of the measurements reported here. + +## Reproduction and integration + +Apply the patch or replacement files using the delivery's `APPLY.md`; use one +method, preserve unrelated edits, and reconcile if the expected source hashes have +changed. In the complete checkout, use the admitted locked environment and run: + +```bash +PYTHONPATH=. python3 -m unittest discover -s tools/standards_contracts/tests -v +``` + +After reviewing/staging the intended write set, refresh verification inputs using +their canonical owner, inspect `verification.passed` and all diagnostics, then +review the generated diff: + +```bash +printf '%s\n' '{"kind":"verify-repository","refresh_verification_inputs":true}' | + PYTHONPATH=. python3 -P .agents/skills/standards-engine/scripts/invoke.py verify_repository +``` + +Run the affected Engine integration and generated-contract checks, repeat the +verifier without refresh, and obtain the repository's independent review before +claiming integration acceptance. Restart a retained MCP process after updating its +installed code; a running process continues to use its imported runtime. + +For a same-schema decoder comparison, retain an unmodified `bf1358c8` checkout +and the candidate checkout. The runner creates a new evidence file and modifies +neither checkout: + +```bash +python3 docs/plans/purpose-separated-standards-engine/reports/performance-schema-decoding/measure_decoding.py \ + --baseline /absolute/baseline --candidate /absolute/candidate \ + --output /tmp/schema-decoding-comparison.json --repeats 7 +``` + +The optional `--workloads` file accepts recorded object-model instances with +`name`, `definition`, and `value` fields. That still measures decoding only. A +representative complete route through the actual host must be measured separately +before asserting an installed authoring-workflow speedup. diff --git a/docs/plans/purpose-separated-standards-engine/reports/performance-schema-decoding/measure_decoding.py b/docs/plans/purpose-separated-standards-engine/reports/performance-schema-decoding/measure_decoding.py new file mode 100644 index 00000000..0e8d4c0f --- /dev/null +++ b/docs/plans/purpose-separated-standards-engine/reports/performance-schema-decoding/measure_decoding.py @@ -0,0 +1,168 @@ +"""Compare root validation plus generated-model decoding, not Engine execution. + +Each sample uses an isolated process. Imports, schema compilation, warm-up, +serialization and instrumentation are outside the decode timer. Built-in cases +are synthetic instances of the canonical schema. --workloads accepts an array +of recorded {name, definition, value} instances for a consumer-specific check. +""" +from __future__ import annotations + +import argparse +import hashlib +import importlib.metadata +import json +from pathlib import Path +import platform +import statistics +import subprocess +import sys +import time +import tomllib +import types +from unittest.mock import patch + + +def digest(value): + return hashlib.sha256(json.dumps(value, sort_keys=True, ensure_ascii=False, + separators=(",", ":")).encode()).hexdigest() + + +def workloads(): + snapshot = {"kind": "snapshot-handle", "id": "snapshot:v1:00000000-0000-4000-8000-000000000001", "schema_version": 5} + expressions = [{"operator": "all", "expressions": [ + {"operator": "exists", "fact": f"task.fact{i}"}, + {"operator": "not", "expression": {"operator": "equals", "fact": f"task.fact{i}", "value": True}}, + {"operator": "any", "expressions": [{"operator": "contains", "fact": "task.tags", "value": "example"}, + {"operator": "always"}]}, + ]} for i in range(32)] + return [ + {"name": "compact-query", "definition": "QueryCall", "value": { + "snapshot": snapshot, "request": {"kind": "route", "facts": {}}}}, + {"name": "recursive-expression", "definition": "ApplicabilityExpression", "value": { + "operator": "all", "expressions": expressions}}, + {"name": "synthetic-route-result", "definition": "AgentRouteResult", "value": { + "kind": "agent-route-result", "snapshot": snapshot, "reading_plan": [], + "unresolved_questions": [], "next_operations": [], + "facts": {f"task.fact{i}": {"type": "boolean", "state": "unknown"} for i in range(32)}, + "rules": [{"id": f"rule.example{i}", "target": "core", "when": expression, + "state": "unresolved"} for i, expression in enumerate(expressions)]}}, + ] + + +def worker(source, cases): + sys.path.insert(0, str(source)) + from jsonschema import Draft202012Validator + from tools.standards_contracts.standards_contracts import ContractRuntime, compile_contracts, model_as_contract + root = source / "tools/standards_engine/contracts" + schema = json.loads((root / "a1-contract.schema.json").read_text()) + interface = tomllib.loads((root / "a1-interface.toml").read_text()) + generated = types.ModuleType("measured_contracts") + sys.modules[generated.__name__] = generated + artifacts = compile_contracts(schema, interface).project() + exec(compile(artifacts.python_source, "", "exec"), generated.__dict__) + started = time.perf_counter() + runtime = ContractRuntime(schema, generated.MODEL_TYPES) + initialization = time.perf_counter() - started + observations = [] + for case in cases: + runtime.decode(case["definition"], case["value"]) + started, cpu = time.perf_counter(), time.process_time() + decoded = runtime.decode(case["definition"], case["value"]) + elapsed, cpu_elapsed = time.perf_counter() - started, time.process_time() - cpu + wire = model_as_contract(decoded) + if digest(wire) != digest(case["value"]): + raise AssertionError(f"Changed decoded value: {case['name']}") + counts = {"root_validations": 0, "construction_is_valid_calls": 0} + validating = False + original_validate, original_is_valid = runtime.validate, Draft202012Validator.is_valid + + def validate(*args, **kwargs): + nonlocal validating + counts["root_validations"] += 1 + validating = True + try: + return original_validate(*args, **kwargs) + finally: + validating = False + + def is_valid(validator, *args, **kwargs): + if not validating: + counts["construction_is_valid_calls"] += 1 + return original_is_valid(validator, *args, **kwargs) + + with patch.object(runtime, "validate", validate), patch.object(Draft202012Validator, "is_valid", is_valid): + observed = runtime.decode(case["definition"], case["value"]) + if model_as_contract(observed) != wire or counts["root_validations"] != 1: + raise AssertionError("Instrumentation changed output or root validation") + observations.append({"name": case["name"], "wall_seconds": elapsed, "cpu_seconds": cpu_elapsed, + "input_sha256": digest(case), "output_sha256": digest(wire), **counts}) + package = source / "tools/standards_contracts/standards_contracts" + return {"python": sys.version, "platform": platform.platform(), + "dependencies": {name: importlib.metadata.version(name) for name in ( + "jsonschema", "referencing", "attrs", "jsonschema-specifications", "rpds-py", "typing-extensions")}, + "source_hashes": {p.name: hashlib.sha256(p.read_bytes()).hexdigest() for p in sorted(package.glob("*.py"))}, + "schema_sha256": digest(schema), "generated_source_sha256": hashlib.sha256(artifacts.python_source.encode()).hexdigest(), + "runtime_initialization_seconds": initialization, + "selector_count": len(getattr(runtime, "_union_selectors", {})), "observations": observations} + + +def main(): + parser = argparse.ArgumentParser(description=__doc__) + parser.add_argument("--baseline", type=Path) + parser.add_argument("--candidate", type=Path) + parser.add_argument("--output", type=Path) + parser.add_argument("--workloads", type=Path) + parser.add_argument("--repeats", type=int, default=7) + parser.add_argument("--worker", type=Path, help=argparse.SUPPRESS) + args = parser.parse_args() + if args.worker: + print(json.dumps(worker(args.worker.resolve(), json.load(sys.stdin)))) + return + if not args.baseline or not args.candidate or not args.output or args.repeats < 1: + parser.error("Provide baseline, candidate, new output and positive repeats") + if args.output.exists(): + parser.error("Output must be a new evidence file") + cases = json.loads(args.workloads.read_text()) if args.workloads else workloads() + runs = [] + for repeat in range(args.repeats): + order = [("baseline", args.baseline), ("candidate", args.candidate)] + if repeat % 2: + order.reverse() + for variant, source in order: + completed = subprocess.run([sys.executable, str(Path(__file__).resolve()), "--worker", str(source)], + input=json.dumps(cases), text=True, capture_output=True, check=True) + run = json.loads(completed.stdout) + run.update({"variant": variant, "repeat": repeat}) + runs.append(run) + print(f"{repeat + 1}/{args.repeats} {variant}", file=sys.stderr, flush=True) + reference = runs[0] + for run in runs: + for key in ("schema_sha256", "generated_source_sha256", "dependencies", "python"): + if run[key] != reference[key]: + raise AssertionError(f"Inputs or environments differ: {key}") + if len(run["observations"]) != len(reference["observations"]): + raise AssertionError("Different workload lengths") + for original, observed in zip(reference["observations"], run["observations"]): + for key in ("name", "input_sha256", "output_sha256"): + if original[key] != observed[key]: + raise AssertionError(f"Differential mismatch: {key}") + summary = [] + for case in cases: + row = {"name": case["name"], "definition": case["definition"], + "input_bytes": len(json.dumps(case["value"]).encode())} + for variant in ("baseline", "candidate"): + observations = [o for r in runs if r["variant"] == variant for o in r["observations"] if o["name"] == case["name"]] + values = [o["wall_seconds"] for o in observations] + row[variant] = {"median_seconds": statistics.median(values), "min_seconds": min(values), "max_seconds": max(values), + "construction_is_valid_calls": sorted({o["construction_is_valid_calls"] for o in observations})} + row["latency_reduction_percent"] = 100 * (1 - row["candidate"]["median_seconds"] / row["baseline"]["median_seconds"]) + summary.append(row) + args.output.parent.mkdir(parents=True, exist_ok=True) + args.output.write_text(json.dumps({"scope": "decoder only; synthetic canonical-schema workloads unless supplied", + "workloads_sha256": digest(cases), "workloads": cases, + "summary": summary, "runs": runs}, indent=2) + "\n") + print(json.dumps(summary, indent=2)) + + +if __name__ == "__main__": + main() diff --git a/evaluation/standards-effectiveness/generated/suite-inputs.json b/evaluation/standards-effectiveness/generated/suite-inputs.json index b9f6b558..adaea3a0 100644 --- a/evaluation/standards-effectiveness/generated/suite-inputs.json +++ b/evaluation/standards-effectiveness/generated/suite-inputs.json @@ -6852,7 +6852,7 @@ ] }, { - "digest": "sha256:1d0766fe21122721a457cab7cad26d8941618051a1f4d017e333a1aa66ef4608", + "digest": "sha256:3a62c3c929793e1a39f7de64dfaf80b797405da1c21e0d1c1ea32ce4e22020c0", "path": "tools/standards_contracts/standards_contracts/runtime.py", "state": "present", "uses": [ @@ -6868,6 +6868,18 @@ } ] }, + { + "digest": "sha256:76fa84b9762a619893e28312f5ff9354ed79667b083d6d5c4b36963e111a8a8a", + "path": "tools/standards_contracts/standards_contracts/union_selection.py", + "state": "present", + "uses": [ + { + "check": "python-package-contract", + "role": "package-contract-input", + "suite": "a1c-public-cutover" + } + ] + }, { "digest": "sha256:d353a60df761481e751378095e49115bbff1dbcb77b1c1c010ade03e1ceb9766", "path": "tools/standards_engine/README.md", @@ -13314,7 +13326,7 @@ "path": "evaluation/standards-effectiveness/suite-registry.toml" }, "repository_index": { - "digest": "sha256:4ae8659dfa416f5ac33e74e4c5fd0ff77cc41c4f6d70f43d0ee746f8b9b57ad7", + "digest": "sha256:9d9f052f54444fc05bad711ef66ceaf9e2f6983598271fbbee986cde09608a07", "uses": [ { "check": "python-package-contract", diff --git a/tools/standards_contracts/README.md b/tools/standards_contracts/README.md index 7dfe25a7..f48676ad 100644 --- a/tools/standards_contracts/README.md +++ b/tools/standards_contracts/README.md @@ -43,3 +43,24 @@ projection. Variants select wire shape; their names do not grant permissions or change the operation's capability authority. The Engine host selects the application variant, while authoring uses the base operation. Transport code consumes these definitions rather than maintaining a second schema. + +## Post-validation union construction + +`ContractRuntime` keeps complete root validation as the instance-acceptance +boundary. It derives construction selectors from its private schema copy for +object unions whose branches share a required string property with disjoint +`const` or all-string `enum` values. After the root succeeds, that property +selects the original branch (and its generated type) without repeating branch +validation. Direct generated-model construction uses the same root boundary. + +The selector planner follows only bare same-resource definition aliases. +Overlapping or absent tags, optional tags, scalar unions, reference siblings, +and unrecognized forms retain the existing validator-backed selection path. +Nested resource scopes also retain that path. These restrictions limit an +optimization; they neither expand nor narrow the admitted schema profile. + +Selectors belong to one runtime and its copied schema, not to a request or +process-global cache. They retain no instance values. Schema changes construct +new selectors; current permission, lifecycle, and publication decisions remain +outside this module. Error adaptation, strict JSON checks, omission, defaults, +and generated serialization keep their existing owners. diff --git a/tools/standards_contracts/standards_contracts/runtime.py b/tools/standards_contracts/standards_contracts/runtime.py index c7a7853c..70c2b89f 100644 --- a/tools/standards_contracts/standards_contracts/runtime.py +++ b/tools/standards_contracts/standards_contracts/runtime.py @@ -11,6 +11,7 @@ from referencing import Registry, Resource from .errors import ContractError, ContractFailure +from .union_selection import compile_union_selectors class GeneratedModel(Protocol): @@ -66,6 +67,7 @@ def __init__( self._validator = Draft202012Validator(selected_schema, registry=registry) self._definitions = selected_schema["$defs"] self._models = dict(model_types) + self._union_selectors = compile_union_selectors(selected_schema) def validate(self, definition: str, value: object) -> None: node = self._definitions[definition] @@ -108,6 +110,10 @@ def _decode_node( variants = node.get("oneOf") if isinstance(variants, list): + selector = self._union_selectors.get(id(node)) + branch = selector.select(value) if selector is not None else None + if branch is not None: + return self._decode_node(branch, value) selected = [ variant for variant in variants diff --git a/tools/standards_contracts/standards_contracts/union_selection.py b/tools/standards_contracts/standards_contracts/union_selection.py new file mode 100644 index 00000000..19a743a8 --- /dev/null +++ b/tools/standards_contracts/standards_contracts/union_selection.py @@ -0,0 +1,136 @@ +"""Schema-owned construction selectors, used only after root validation. + +A required string property with disjoint const/enum values excludes every other +branch. The root proof supplies existence and exclusivity; these tables neither +validate instances nor interpret arbitrary JSON Schema constraints. +""" +from __future__ import annotations + +from collections.abc import Iterator, Mapping +from dataclasses import dataclass +import re +from types import MappingProxyType + + +_LOCAL_DEFINITION = re.compile(r"#/\$defs/([A-Za-z][A-Za-z0-9]*)\Z") + + +@dataclass(frozen=True, slots=True) +class StringDiscriminant: + property_name: str + variants: Mapping[str, Mapping[str, object]] + + def select(self, value: object) -> Mapping[str, object] | None: + if not isinstance(value, Mapping): + return None + tag = value.get(self.property_name) + # Keep Python's bool/int equality and non-string enum semantics with + # the canonical validator. No request data is retained by this selector. + return self.variants.get(tag) if type(tag) is str else None + + +def compile_union_selectors(schema: Mapping[str, object]) -> dict[int, StringDiscriminant]: + """Index the runtime's private schema copy; size/lifetime follow that schema. + + Walk only schema positions, never annotation/const/enum instance data. A + nested resource scope stays entirely on the existing reference path. + """ + definitions = schema.get("$defs", {}) + nodes = list(_schema_nodes(schema)) + if not isinstance(definitions, Mapping) or any( + node is not schema and "$id" in node for node in nodes + ): + return {} + selectors = {} + for node in nodes: + variants = node.get("oneOf") + if isinstance(variants, list): + selector = _string_discriminant(variants, definitions) + if selector is not None: + selectors[id(node)] = selector + return selectors + + +def _schema_nodes(schema: Mapping[str, object]) -> Iterator[Mapping[str, object]]: + pending = [schema] + seen: set[int] = set() + while pending: + node = pending.pop() + if not isinstance(node, Mapping) or id(node) in seen: + continue + seen.add(id(node)) + yield node + for keyword in ("$defs", "properties"): + children = node.get(keyword) + if isinstance(children, Mapping): + pending.extend(children.values()) + variants = node.get("oneOf") + if isinstance(variants, list): + pending.extend(variants) + pending.extend(node.get(keyword) for keyword in ("items", "additionalProperties")) + + +def _local_object( + node: object, definitions: Mapping[str, object], +) -> Mapping[str, object] | None: + seen: set[str] = set() + while isinstance(node, Mapping) and "$ref" in node: + reference = node["$ref"] + match = _LOCAL_DEFINITION.fullmatch(reference) if type(reference) is str else None + # Reference siblings and other reference forms keep their existing + # interpretation; the planner follows only bare same-resource aliases. + if set(node) != {"$ref"} or match is None or reference in seen: + return None + seen.add(reference) + node = definitions.get(match[1]) + if isinstance(node, Mapping) and node.get("type") == "object": + return node + return None + + +def _required_tags(node: Mapping[str, object]) -> dict[str, frozenset[str]]: + properties, required = node.get("properties"), node.get("required") + if not isinstance(properties, Mapping) or not isinstance(required, list): + return {} + tags = {} + for name in required: + if type(name) is not str: + continue + declaration = properties.get(name) + if not isinstance(declaration, Mapping) or "$ref" in declaration: + continue + const = declaration.get("const") + enum = declaration.get("enum") + if type(const) is str: + tags[name] = frozenset((const,)) + elif isinstance(enum, list) and enum and all(type(item) is str for item in enum): + tags[name] = frozenset(enum) + return tags + + +def _string_discriminant( + variants: list[object], definitions: Mapping[str, object], +) -> StringDiscriminant | None: + constraints = [] + branches: list[Mapping[str, object]] = [] + for variant in variants: + if not isinstance(variant, Mapping): + return None + branches.append(variant) + node = _local_object(variant, definitions) + if node is None: + return None + constraints.append(_required_tags(node)) + if not constraints: + return None + common = set(constraints[0]).intersection(*(set(item) for item in constraints[1:])) + for name in sorted(common): + choices = {} + for variant, tags in zip(branches, constraints): + values = tags[name] + if choices.keys() & values: + break + choices.update((value, variant) for value in values) + else: + return StringDiscriminant(name, MappingProxyType(choices)) + return None diff --git a/tools/standards_contracts/tests/test_union_decoding.py b/tools/standards_contracts/tests/test_union_decoding.py new file mode 100644 index 00000000..94a580a4 --- /dev/null +++ b/tools/standards_contracts/tests/test_union_decoding.py @@ -0,0 +1,336 @@ +from __future__ import annotations + +from contextlib import contextmanager +from copy import deepcopy +from dataclasses import FrozenInstanceError, asdict, field, make_dataclass +import unittest +from unittest.mock import patch +from types import MappingProxyType + +from jsonschema import Draft202012Validator + +from tools.standards_contracts.standards_contracts.errors import ContractError +from tools.standards_contracts.standards_contracts.runtime import ( + ContractRuntime, FrozenMap, MISSING, model_as_contract, +) + + +DIALECT = "https://json-schema.org/draft/2020-12/schema" + + +def record(tag: object, *, name: str = "kind", required: bool = True) -> dict: + return { + "type": "object", + "properties": {name: tag, "value": {"type": "integer"}, + "note": {"type": "string", "default": "annotation only"}}, + "required": [name, "value"] if required else ["value"], + "additionalProperties": False, + } + + +def schema_for(*variants: object, definitions: dict | None = None) -> dict: + return {"$schema": DIALECT, "$id": "https://coding-standards.local/tests/unions", + "$defs": {**(definitions or {}), "Choice": {"oneOf": list(variants)}}} + + +def models_for(schema: dict) -> dict: + """Small test models keep type identity and optionality observable.""" + models = {} + for name, node in schema["$defs"].items(): + properties = node.get("properties", {}) + if node.get("type") != "object" or not properties: + continue + required = node.get("required", []) + members = [(key, object) for key in properties if key in required] + members.extend((key, object, field(default=MISSING)) + for key in properties if key not in required) + models[name] = make_dataclass(name, members, frozen=True, slots=True, + namespace={"__definition__": name, + "__contract_fields__": MappingProxyType( + {key: key for key in properties})}) + return models + + +@contextmanager +def construction_observations(runtime: ContractRuntime): + """Count conversion work separately from the unchanged root validator.""" + counts = {"roots": 0, "branches": 0} + validating = False + original_validate = runtime.validate + original_is_valid = Draft202012Validator.is_valid + + def validate(definition, value): + nonlocal validating + counts["roots"] += 1 + validating = True + try: + return original_validate(definition, value) + finally: + validating = False + + def is_valid(validator, *args, **kwargs): + if not validating: + counts["branches"] += 1 + return original_is_valid(validator, *args, **kwargs) + + with patch.object(runtime, "validate", side_effect=validate), \ + patch.object(Draft202012Validator, "is_valid", is_valid): + yield counts + + +class UnionDecodingTest(unittest.TestCase): + def setUp(self) -> None: + self.schema = schema_for( + {"$ref": "#/$defs/Alpha"}, {"$ref": "#/$defs/Beta"}, + definitions={"Alpha": record({"const": "alpha"}), + "Beta": record({"enum": ["beta", "b"]})}, + ) + self.models = models_for(self.schema) + self.runtime = ContractRuntime(self.schema, self.models) + + def test_const_and_enum_select_generated_types_without_branch_validation(self): + for tag, name in (("alpha", "Alpha"), ("beta", "Beta"), ("b", "Beta")): + value = {"kind": tag, "value": 7} + with self.subTest(tag=tag), construction_observations(self.runtime) as counts: + decoded = self.runtime.decode("Choice", value) + self.assertIs(type(decoded), self.models[name]) + self.assertEqual(model_as_contract(decoded), value) + self.assertIs(decoded.note, MISSING) + self.assertEqual(counts, {"roots": 1, "branches": 0}) + with self.assertRaises(FrozenInstanceError): + decoded.value = 8 + + def test_inline_variants_use_the_same_selector(self): + runtime = ContractRuntime(schema_for(record({"const": "a"}), + record({"const": "b"})), {}) + with construction_observations(runtime) as counts: + result = runtime.decode("Choice", {"kind": "a", "value": 1}) + self.assertIsInstance(result, FrozenMap) + self.assertEqual(dict(result), {"kind": "a", "value": 1}) + self.assertEqual(counts, {"roots": 1, "branches": 0}) + + def test_array_and_map_values_construct_all_tagged_items(self): + schema = deepcopy(self.schema) + schema["$defs"].update({ + "Choices": {"type": "array", "items": {"$ref": "#/$defs/Choice"}}, + "ChoiceMap": {"type": "object", "additionalProperties": {"$ref": "#/$defs/Choice"}}, + }) + runtime = ContractRuntime(schema, self.models) + values = [{"kind": "alpha", "value": 1}, {"kind": "b", "value": 2}] + with construction_observations(runtime) as counts: + array = runtime.decode("Choices", values) + mapping = runtime.decode("ChoiceMap", dict(zip(("a", "b"), values))) + self.assertEqual([model_as_contract(item) for item in array], values) + self.assertEqual([model_as_contract(item) for item in mapping.values()], values) + self.assertIsInstance(array, tuple) + self.assertEqual(counts, {"roots": 2, "branches": 0}) + + def test_normalize_model_keeps_one_root_proof_and_optional_defaults(self): + schema = deepcopy(self.schema) + schema["$defs"]["Envelope"] = { + "type": "object", "required": ["choice"], + "properties": {"choice": {"$ref": "#/$defs/Choice"}, + "note": {"type": "string", "default": "annotation only"}}, + "additionalProperties": False, + } + models = models_for(schema) + runtime = ContractRuntime(schema, models) + envelope = models["Envelope"]({"kind": "alpha", "value": 3}) + with construction_observations(runtime) as counts: + runtime.normalize_model(envelope) + self.assertIs(type(envelope.choice), models["Alpha"]) + self.assertIs(envelope.note, MISSING) + self.assertEqual(counts, {"roots": 1, "branches": 0}) + + def test_recursive_object_boundary_and_reference_alias(self): + schema = schema_for( + {"$ref": "#/$defs/LeafAlias"}, {"$ref": "#/$defs/Branch"}, + definitions={ + "LeafAlias": {"$ref": "#/$defs/Leaf"}, + "Leaf": record({"const": "leaf"}), + "Branch": {"type": "object", "required": ["kind", "children"], + "properties": {"kind": {"const": "branch"}, + "children": {"type": "array", "items": {"$ref": "#/$defs/Choice"}}}, + "additionalProperties": False}, + }, + ) + models = models_for(schema) + runtime = ContractRuntime(schema, models) + value = {"kind": "leaf", "value": 1} + for _ in range(8): + value = {"kind": "branch", "children": [value]} + with construction_observations(runtime) as counts: + result = runtime.decode("Choice", value) + self.assertEqual(model_as_contract(result), value) + self.assertEqual(counts, {"roots": 1, "branches": 0}) + + def test_second_required_field_can_disambiguate_overlapping_first_field(self): + variants = [record({"const": "same"}), record({"const": "same"})] + for variant, tag in zip(variants, ("left", "right")): + variant["properties"]["side"] = {"const": tag} + variant["required"].append("side") + runtime = ContractRuntime(schema_for(*variants), {}) + with construction_observations(runtime) as counts: + decoded = runtime.decode("Choice", {"kind": "same", "side": "right", "value": 1}) + self.assertEqual(decoded["side"], "right") + self.assertEqual(counts["branches"], 0) + + def test_exact_unicode_strings_and_empty_tag(self): + runtime = ContractRuntime(schema_for(*(record({"const": tag}) + for tag in ("", "\u00e9", "e\u0301"))), {}) + with construction_observations(runtime) as counts: + for tag in ("", "\u00e9", "e\u0301"): + self.assertEqual(runtime.decode("Choice", {"kind": tag, "value": 1})["kind"], tag) + self.assertEqual(counts, {"roots": 3, "branches": 0}) + + def test_schema_ownership_isolated_between_runtimes_and_from_caller_mutation(self): + changed = deepcopy(self.schema) + changed["$defs"]["Alpha"]["properties"]["kind"]["const"] = "changed" + other = ContractRuntime(changed, self.models) + self.schema["$defs"]["Alpha"]["properties"]["kind"]["const"] = "poison" + changed["$defs"].clear() + with construction_observations(self.runtime) as first: + self.assertEqual(self.runtime.decode("Choice", {"kind": "alpha", "value": 1}).kind, "alpha") + with construction_observations(other) as second: + self.assertEqual(other.decode("Choice", {"kind": "changed", "value": 2}).kind, "changed") + self.assertEqual(first["branches"], 0) + self.assertEqual(second["branches"], 0) + + def test_decoded_mutation_does_not_change_later_selection(self): + value = {"kind": "alpha", "value": 1} + result = self.runtime.decode("Choice", value) + value["kind"] = "b" + object.__setattr__(result, "kind", "corrupted test instance") + decoded = self.runtime.decode("Choice", value) + self.assertIs(type(decoded), self.models["Beta"]) + self.assertEqual(decoded.kind, "b") + + def test_mapping_input_and_readonly_nested_values(self): + with construction_observations(self.runtime) as counts: + decoded = self.runtime.decode("Choice", MappingProxyType({"kind": "alpha", "value": 4})) + self.assertEqual(decoded.value, 4) + self.assertEqual(counts, {"roots": 1, "branches": 0}) + + def test_invalid_inputs_have_exact_root_diagnostics_before_construction(self): + values = [ + {"kind": "unknown", "value": 1}, {"value": 1}, + {"kind": "alpha", "value": "wrong"}, {"kind": "alpha", "value": True}, + {"kind": "alpha", "value": 1, "extra": 0}, + {"kind": ["alpha"], "value": 1}, {"kind": "alpha", "value": float("nan")}, + {1: "invalid key"}, None, b"bytes", + ] + for value in values: + with self.subTest(value=value): + with self.assertRaises(ContractError) as direct: + self.runtime.validate("Choice", value) + with construction_observations(self.runtime) as counts: + with self.assertRaises(ContractError) as decoded: + self.runtime.decode("Choice", value) + self.assertEqual(asdict(decoded.exception.failure), asdict(direct.exception.failure)) + self.assertEqual(counts, {"roots": 1, "branches": 0}) + + def test_nested_invalid_branch_keeps_error_causes_and_pointers(self): + schema = deepcopy(self.schema) + schema["$defs"]["List"] = {"type": "array", "items": {"$ref": "#/$defs/Choice"}} + runtime = ContractRuntime(schema, self.models) + value = [{"kind": "alpha", "value": 0}, {"kind": "b", "value": "bad"}] + with self.assertRaises(ContractError) as expected: + runtime.validate("List", value) + with self.assertRaises(ContractError) as actual: + runtime.decode("List", value) + self.assertEqual(actual.exception.failure, expected.exception.failure) + self.assertEqual(actual.exception.failure.instance_pointer, "/1") + self.assertTrue(actual.exception.failure.causes) + + def assert_fallback(self, schema: dict, value: object, expected: object) -> None: + runtime = ContractRuntime(schema, {}) + with construction_observations(runtime) as counts: + result = runtime.decode("Choice", value) + self.assertEqual(result, expected) + self.assertEqual(counts["roots"], 1) + self.assertGreater(counts["branches"], 0) + + def test_overlapping_string_tags_retain_general_branch_selection(self): + left, right = record({"const": "same"}), record({"const": "same"}) + right["properties"]["value"] = {"type": "string"} + value = {"kind": "same", "value": 4} + self.assert_fallback(schema_for(left, right), value, value) + + def test_untagged_branch_and_optional_tag_retain_general_selection(self): + left = record({"const": "left"}) + for right in (record({"const": "right"}, required=False), + record({"type": "string"})): + with self.subTest(right=right): + # Only the right branch accepts this input. + value = {"kind": "right", "value": 1} + self.assert_fallback(schema_for(left, right), value, value) + + def test_non_object_and_mixed_enum_tags_retain_general_selection(self): + self.assert_fallback(schema_for(record({"const": "left"}), {"type": "null"}), None, None) + value = {"kind": 1, "value": 2} + self.assert_fallback(schema_for(record({"const": "left"}), record({"enum": ["right", 1]})), value, value) + + def test_boolean_number_and_structured_constants_use_json_equality(self): + for value in (True, 1, 1.0): + self.assert_fallback(schema_for({"const": True}, {"const": 1}), value, value) + for value in ([1, 2], {"a": 1}): + self.assert_fallback(schema_for({"const": [1, 2]}, {"const": {"a": 1}}), value, value) + ambiguous = ContractRuntime(schema_for({"const": 1}, {"const": 1.0}), {}) + with self.assertRaises(ContractError): + ambiguous.decode("Choice", 1) + + def test_discriminant_requires_explicit_object_type(self): + left, right = record({"const": "left"}), record({"const": "right"}) + del left["type"] + self.assert_fallback(schema_for(left, right), "not an object", "not an object") + + def test_ref_siblings_and_referenced_tag_keep_general_selection(self): + schema = deepcopy(self.schema) + schema["$defs"]["Choice"]["oneOf"][0]["description"] = "Retain reference interpretation" + value = {"kind": "alpha", "value": 1} + self.assert_fallback(schema, value, value) + schema = deepcopy(self.schema) + schema["$defs"]["Tag"] = {"const": "alpha"} + schema["$defs"]["Alpha"]["properties"]["kind"] = {"$ref": "#/$defs/Tag"} + self.assert_fallback(schema, value, value) + + def test_ambiguous_union_rejects_even_when_one_tag_matches(self): + variants = [record({"const": "same"}), record({"enum": ["same", "other"]})] + runtime = ContractRuntime(schema_for(*variants), {}) + with construction_observations(runtime) as counts: + with self.assertRaises(ContractError) as caught: + runtime.decode("Choice", {"kind": "same", "value": 1}) + self.assertEqual(caught.exception.failure.keyword, "oneOf") + self.assertEqual(counts, {"roots": 1, "branches": 0}) + + def test_nested_resource_scope_keeps_the_existing_reference_path(self): + left, right = record({"const": "left"}), record({"const": "right"}) + left["$id"] = "https://coding-standards.local/tests/child" + value = {"kind": "left", "value": 1} + self.assert_fallback(schema_for(left, right), value, value) + + def test_annotations_that_look_like_schemas_are_not_traversed(self): + schema = deepcopy(self.schema) + schema["$defs"]["Alpha"]["default"] = { + "$id": "https://example.invalid/not-a-resource", + "oneOf": [{"$ref": "#/$defs/Missing"}], + } + runtime = ContractRuntime(schema, self.models) + with construction_observations(runtime) as counts: + result = runtime.decode("Choice", {"kind": "alpha", "value": 3}) + self.assertEqual(result.value, 3) + self.assertEqual(counts, {"roots": 1, "branches": 0}) + + def test_missing_reference_is_not_resolved_during_selector_planning(self): + ContractRuntime(schema_for({"$ref": "#/$defs/Missing"}, record({"const": "other"})), {}) + + def test_reference_cycle_does_not_create_a_planning_loop(self): + schema = schema_for({"$ref": "#/$defs/Loop"}, record({"const": "other"}), + definitions={"Loop": {"$ref": "#/$defs/Loop"}}) + # A cycle cannot identify a construction branch; actual validation stays + # with the existing reference owner and is not invoked by this check. + ContractRuntime(schema, {}) + + +if __name__ == "__main__": + unittest.main() diff --git a/tools/standards_contracts/tests/test_union_projection.py b/tools/standards_contracts/tests/test_union_projection.py new file mode 100644 index 00000000..fafa8a1b --- /dev/null +++ b/tools/standards_contracts/tests/test_union_projection.py @@ -0,0 +1,126 @@ +from __future__ import annotations + +from copy import deepcopy +from dataclasses import asdict +import json +import sys +import types +import unittest +from unittest.mock import patch + +from tools.standards_contracts.standards_contracts import ( + ContractError, ContractRuntime, compile_contracts, model_as_contract, +) +from tools.standards_contracts.standards_contracts.runtime import _wire +from tools.standards_contracts.tests.support import CONTRACTS, canonical_inputs +from tools.standards_contracts.tests.test_union_decoding import construction_observations + + +class GeneralUnionRuntime(ContractRuntime): + """The pre-optimization branch-selection oracle, without selector tables. + + Validation and construction keep their existing owners. Only branch choice + is independent of the optimized lookup, so comparisons exercise its effect. + """ + def _decode_node(self, node, value, definition=None): + variants = node.get("oneOf") + if "$ref" not in node and isinstance(variants, list): + selected = [variant for variant in variants + if self._validator.evolve(schema=variant).is_valid(_wire(value))] + if len(selected) != 1: + raise AssertionError("validated oneOf did not select exactly one branch") + return self._decode_node(selected[0], value) + return super()._decode_node(node, value, definition) + + +class CanonicalUnionProjectionTest(unittest.TestCase): + @classmethod + def setUpClass(cls): + cls.schema, interface = canonical_inputs() + cls.artifacts = compile_contracts(cls.schema, interface).project() + cls.generated = types.ModuleType("union_projection_fixture") + sys.modules[cls.generated.__name__] = cls.generated + cls.addClassCleanup(sys.modules.pop, cls.generated.__name__, None) + exec(compile(cls.artifacts.python_source, "", "exec"), + cls.generated.__dict__) + cls.examples = json.loads((CONTRACTS / "examples/a1-examples.json").read_text())["examples"] + + def setUp(self): + self.candidate = ContractRuntime(self.schema, self.generated.MODEL_TYPES) + self.general = GeneralUnionRuntime(self.schema, self.generated.MODEL_TYPES) + + def test_all_canonical_examples_keep_generated_types_values_and_omissions(self): + for example in self.examples: + with self.subTest(example=example["name"]): + value = deepcopy(example["value"]) + actual = self.candidate.decode(example["definition"], value) + expected = self.general.decode(example["definition"], value) + self.assertEqual(actual, expected) + self.assertIs(type(actual), type(expected)) + self.assertEqual(model_as_contract(actual), example["value"]) + self.assertEqual(value, example["value"]) + + def test_recursive_expression_and_scalar_variants_match_the_general_decoder(self): + leaves = [ + {"operator": "always"}, {"operator": "exists", "fact": "task.kind"}, + *({"operator": "equals", "fact": "task.kind", "value": value} + for value in (None, True, 1, 1.0, "text")), + {"operator": "in", "fact": "task.kind", "values": [None, True, 1, "text"]}, + {"operator": "contains", "fact": "task.tags", "value": "text"}, + ] + values = [*leaves, {"operator": "all", "expressions": leaves}, + {"operator": "any", "expressions": leaves}, + {"operator": "not", "expression": {"operator": "all", "expressions": leaves}}] + for value in values: + with self.subTest(value=value): + actual = self.candidate.decode("ApplicabilityExpression", value) + expected = self.general.decode("ApplicabilityExpression", value) + self.assertEqual(actual, expected) + self.assertEqual(model_as_contract(actual), value) + + def test_recursive_tagged_construction_eliminates_branch_checks_not_root_validation(self): + value = {"operator": "always"} + for _ in range(8): + value = {"operator": "not", "expression": value} + with construction_observations(self.candidate) as optimized: + actual = self.candidate.decode("ApplicabilityExpression", value) + with construction_observations(self.general) as original: + expected = self.general.decode("ApplicabilityExpression", value) + self.assertEqual(actual, expected) + self.assertEqual(optimized, {"roots": 1, "branches": 0}) + self.assertEqual(original["roots"], 1) + self.assertGreater(original["branches"], 0) + + def test_all_example_required_field_rejections_keep_complete_diagnostics(self): + for example in self.examples: + definition = example["definition"] + required = self.schema["$defs"][definition].get("required", []) + for name in required: + value = deepcopy(example["value"]) + del value[name] + with self.subTest(example=example["name"], missing=name): + failures = [] + for runtime in (self.general, self.candidate): + with self.assertRaises(ContractError) as caught: + runtime.decode(definition, value) + failures.append(asdict(caught.exception.failure)) + self.assertEqual(*failures) + + def test_generated_constructor_and_from_value_use_the_shared_runtime(self): + value = {"operator": "all", "expressions": [{"operator": "always"}]} + with construction_observations(self.generated._RUNTIME) as observed: + from_value = self.generated.AllExpression.from_value(deepcopy(value)) + direct = self.generated.AllExpression(**deepcopy(value)) + self.assertEqual(from_value, direct) + self.assertEqual(direct.as_contract(), value) + self.assertEqual(observed, {"roots": 2, "branches": 0}) + + def test_selector_compilation_does_not_repeat_for_each_request(self): + from tools.standards_contracts.standards_contracts import runtime + with patch.object(runtime, "compile_union_selectors", side_effect=AssertionError("replanned")): + for _ in range(5): + self.candidate.decode("ApplicabilityExpression", {"operator": "always"}) + + +if __name__ == "__main__": + unittest.main() From 437292784e3819285e99d6ffbd0d77f85c7d633f Mon Sep 17 00:00:00 2001 From: MrScripty Date: Thu, 24 Sep 2026 15:55:22 -0700 Subject: [PATCH 18/26] perf(coverage): prepare suite dependencies and relationship groups --- .../performance-coverage-preparation.md | 206 +++++++++++++++ .../measure_coverage.py | 131 ++++++++++ .../generated/suite-inputs.json | 6 +- .../standards_analysis/coverage.py | 56 +++- .../tests/test_coverage_preparation.py | 243 ++++++++++++++++++ .../test_coverage_preparation_integration.py | 55 ++++ .../test_coverage_preparation_accounting.py | 31 +++ .../standards_metadata/suite_inputs.py | 33 ++- .../tests/test_prepared_suite_dependencies.py | 227 ++++++++++++++++ 9 files changed, 969 insertions(+), 19 deletions(-) create mode 100644 docs/plans/purpose-separated-standards-engine/reports/performance-coverage-preparation.md create mode 100644 docs/plans/purpose-separated-standards-engine/reports/performance-coverage-preparation/measure_coverage.py create mode 100644 tools/standards_analysis/tests/test_coverage_preparation.py create mode 100644 tools/standards_analysis/tests/test_coverage_preparation_integration.py create mode 100644 tools/standards_engine/tests/test_coverage_preparation_accounting.py create mode 100644 tools/standards_metadata/tests/test_prepared_suite_dependencies.py diff --git a/docs/plans/purpose-separated-standards-engine/reports/performance-coverage-preparation.md b/docs/plans/purpose-separated-standards-engine/reports/performance-coverage-preparation.md new file mode 100644 index 00000000..114dc331 --- /dev/null +++ b/docs/plans/purpose-separated-standards-engine/reports/performance-coverage-preparation.md @@ -0,0 +1,206 @@ +# Coverage preparation — implementation and evidence + +Status: source implementation complete; focused source-subset evidence passed. +Full-checkout integration, supported-runtime measurements and independent review +remain pending. + +Base: `implementation/purpose-separated-standards-engine` at +`5a9dcb08effda50a485e6ae08d9fe4c349c74eda`. + +## Outcome and scope + +Prepare each suite dependency projection once per validated, loaded manifest and +group policy relationships once per complete coverage compilation. Preserve every +suite fingerprint, coverage view, requirement identity, canonical manifest byte, +rejection and independent replay boundary. The production write set is confined +to Metadata's `suite_inputs.py` and Analysis's `coverage.py`. Four new test modules, +this report and a complete-checkout measurement runner accompany them. + +This is shared preparation inside existing owners, not incremental manifest +construction or a second compilation cache. Public and persisted wire formats, +generated contracts, dependency locks, normative standards, authorization, +publication, accepted-base interpretation and Engine replay selection are unchanged. +The user's previous 121-test/64.8-second run and 8.2 seconds of verifier work are +context, not a measured baseline/candidate comparison for this increment. + +## Implementation and ownership + +### Manifest-owned dependency projections + +`load_suite_input_manifest` retains its existing canonical-form, registry, +suite-definition, dependency graph, file digest, absence, use and index validation. +Its final all-suite derivation now uses one definition lookup and keeps the +resulting projections in a private read-only mapping. That mapping is attached +only after every derivation succeeds, before returning the validated manifest. +There is no partially published index or lazy mutation during later reads. + +`SuiteInputManifest.dependency()` returns the prepared result for a loaded +manifest. Its original derivation body remains the computation for a directly +constructed manifest. Direct construction does not acquire authority from a +previous object. The private field is excluded from constructor arguments, +equality, hashing and representation; `as_projection()` and canonical serialization +retain their exact declared fields. `dataclasses.replace()` starts with no prepared +index, including when the replacement changes prerequisites or file material. +Unknown suite IDs retain `KeyError`. Each fresh load still reads and verifies its +supplied source; a previously retained object cannot authorize a corrupt reload. + +The index has the same lifetime as its manifest. Existing compilation-cache +accounting traverses its slot, mapping and immutable result records before +retention. Lookup never expands the retained object graph. Existing cache limits +and overflow/eviction behavior remain unchanged. + +### Compilation-local relationship grouping + +`compile_coverage_definitions` initializes one edge-ID group per selected policy, +visits the semantics mapping once, and derives every policy view from that policy's +group. Unrelated sources are excluded, policies without edges still receive views, +and an empty policy corpus avoids the scan. This grouping is local scratch data, +not another retained index or a cross-compilation graph cache. + +The public `derive_coverage_view` signature is unchanged. A standalone call still +selects from the supplied graph. Both standalone and bulk construction invoke one +private derivation helper, retaining sorted relationship processing, complete local +horizon membership, evidence-owner checks, semantic overrides and requirement +identity calculations. Authorization and repository coverage decision functions +are unchanged. No caller-provided filtered graph becomes a new public trust input. + +## Verification performed + +| Evidence | Observed result | Proof boundary | +| --- | --- | --- | +| New manifest regression module | 12 tests passed | Real source adapters, manifest validation, identity encoding and preparation in the recovered source subset | +| New coverage regression module | 12 tests passed | Actual coverage definitions/functions with synthetic already-compiled corpus/graph records and isolated imports | +| New accounting regression module | 2 tests passed | Actual existing `_retained_size` function applied to prepared manifests; not the full LRU workflow | +| Independent original-source comparison | 100 cases matched | Complete coverage material or complete structured rejection, using original and candidate function bodies on deterministic synthetic inputs | +| Removal-of-optimization probes | Both detected by assertion failures | Regression counters fail when original repeated scanning or uncached dependency lookup is restored | +| Python compilation and 3.11 grammar parsing | Passed | Syntax, not execution on CPython 3.11/3.12 | +| Two new full-checkout integration tests | Not run | Import fails on unavailable `tools.standards_applicability` before test bodies | +| Complete Engine compilation benchmark | Not run | Import fails on unavailable `tools.graph_engine` | + +The 28 authored regression tests comprise 26 executed focused checks and two +pending integration checks. The independent comparisons are additional bounded +evidence, not 100 claims about the entire Engine. Their generator uses seed 73109, +0–12 policies, 0–7 edges per policy, shuffled relationship ordering, changed input +bytes and sampled missing-consumer/invalid-owner/missing-suite failures. Separate +focused tests cover diamond prerequisites, shared file uses, absence, repository +index changes, immutable lookup, parallel reads, replacement, corruption and +canonical serialization. Removing only the optimization makes the structural +regressions fail; these are not wall-clock assertions. + +The integration tests use the existing real CoverageTest fixture. They cover the +loader-to-horizon-to-view path and persisted coverage claims across unrelated, +corrupt and coherently changed relevant inputs. They require execution in the +complete repository alongside the existing coverage, manifest, Engine/replay and +cache tests. + +## Isolated performance observations + +Seven alternating baseline/candidate pairs per workload follow one excluded +warm-up pair. Both sides use the same source bytes and synthetic compiled records. +The timed operation performs actual manifest loading/validation, coverage-horizon +construction and all coverage definitions. Fixture creation, result comparisons, +structural counters and memory observations are outside the timer. + +All cases use five suites and four manifest file records, including a diamond +prerequisite graph, overlapping uses, an absent path and repository-index use. +Corpus and graph parser execution, complete authority compilation, persisted +proposal admission, MCP transport and the user's test selection are outside this +measurement. These are synthetic mechanism observations, not representative +Engine-latency or test-suite-speedup claims. + +| Policies / relationships | Baseline median (range), ms | Candidate median (range), ms | +| --- | ---: | ---: | +| 1 / 3 | 1.279 (1.162–1.357) | 0.800 (0.757–0.988) | +| 32 / 256 | 14.765 (14.122–15.959) | 3.461 (3.185–5.066) | +| 128 / 1,536 | 75.952 (72.398–82.270) | 10.675 (10.016–11.946) | + +Every paired complete coverage projection was exactly equal, including manifests, +all view fields, horizon members, dependency-derived requirements and requirement +IDs. For 128 policies, suite fingerprint computations fell from 1,034 to 5; +relationship passes from 128 to 1; and relationship visits from 196,608 to 1,536. +The deciding result is reduced repeated work without reduced coverage scope. + +The private index adds storage to a standalone loaded manifest. Sharing the same +fingerprint strings can also reduce duplication in the final coverage output. +Existing conservative accounting measured the 128-policy result at 560,420 bytes +before and 532,940 bytes after; the one-policy result increased from 10,983 to +11,951 bytes. These are fixture-specific reachable-object counts, not process RSS +or a universal memory saving. Separate tracemalloc observations and all raw timing +samples are retained in the delivery evidence. + +## Source and environment limits + +Direct clone/archive acquisition was unavailable. Complete replacement files were +recovered from the GitHub connector and verified against the exact upstream Git +blob identities: Metadata `7db6e020de046502a7cbc159832ccc6312e75a5e` and Analysis +`1363572e6056184d020139f3316f191bf28fa500`. Supporting source modules were likewise +checked, and the unchanged portions of both edited modules were compared as ASTs. +This establishes the patch bases, not a complete local repository. + +Execution used CPython 3.13.5 on Linux, outside the repository's declared 3.11/3.12 +qualification. Metadata tests execute actual source/identity modules. For coverage, +the delivery-only loader excludes imports from unavailable parser/graph/trust +packages while executing unchanged production definitions and function bodies; +fixtures explicitly supply the already-compiled structural inputs. The accounting +checks execute the existing accounting function extracted from its module. The +loader is retained as evidence and is not installed into the repository. It does +not provide parser, authorization, package-initializer, snapshot-store, publication +or full-cache integration evidence. The first manifest test run exposed a fixture +expectation difference in Python 3.13's exception class for replacing an `init=False` +field; the assertion now accepts the supported exception families while requiring +rejection. Both logs are retained. + +The owning generated `suite-inputs.json` is intentionally unchanged in this ZIP. +Refresh it through the Engine after applying/staging the eight intended repository +files in a full checkout. Generating it against the partial source/index here +would not establish canonical freshness. No remote branch, accepted main, user +store or installed configuration was changed. + +## Complete-checkout acceptance and reproduction + +Use the supported locked environment, review the patch and stage its intended +write set. Refresh the generated input manifest through its owner, inspect the +reported outcome/diagnostics, and review/stage that generated change: + +```bash +printf '%s\n' '{"kind":"verify-repository","refresh_verification_inputs":true}' | + PYTHONPATH=. python3 -P .agents/skills/standards-engine/scripts/invoke.py verify_repository +``` + +Run the new focused and integration tests: + +```bash +PYTHONPATH=. python3 -m unittest \ + tools.standards_metadata.tests.test_prepared_suite_dependencies \ + tools.standards_analysis.tests.test_coverage_preparation \ + tools.standards_analysis.tests.test_coverage_preparation_integration \ + tools.standards_engine.tests.test_coverage_preparation_accounting +``` + +Run the affected existing Metadata, Analysis and Engine tests, including manifest +corruption, coverage receipt/revocation, independent replay and retention/eviction +coverage. Repeat the repository verifier without refresh to establish freshness. +Keep the same selection and environment when comparing the previously reported +121-test turnaround; no corresponding reduction is promised here. + +The [complete-compilation runner](performance-coverage-preparation/measure_coverage.py) +reads one explicit complete corpus into an exact frozen source and measures full +`StandardsEngine._compile()` calls. Use the same stable corpus for both installed +implementations, alternate process order across repeated comparisons, and retain +all observations. The script also records source/package identities, workload +size, dependency-fingerprint counts and current cache accounting. Compare timings +only when `input_sha256` and `coverage_output_sha256` match. It checks full semantic +signature stability within each run and complete coverage material across runs; +it does not time revision admission or transport. + +```bash +python /absolute/candidate/docs/plans/purpose-separated-standards-engine/reports/performance-coverage-preparation/measure_coverage.py \ + --source /absolute/baseline --corpus /absolute/fixed-corpus --output /tmp/coverage-baseline.json +python /absolute/candidate/docs/plans/purpose-separated-standards-engine/reports/performance-coverage-preparation/measure_coverage.py \ + --source /absolute/candidate --corpus /absolute/fixed-corpus --output /tmp/coverage-candidate.json +``` + +Complete acceptance remains contingent on these real-checkout tests, representative +operation measurements and independent review. The implementation and isolated +reduced-work/equivalence evidence are available now; stronger claims are not +inferred from them. diff --git a/docs/plans/purpose-separated-standards-engine/reports/performance-coverage-preparation/measure_coverage.py b/docs/plans/purpose-separated-standards-engine/reports/performance-coverage-preparation/measure_coverage.py new file mode 100644 index 00000000..a8c4159f --- /dev/null +++ b/docs/plans/purpose-separated-standards-engine/reports/performance-coverage-preparation/measure_coverage.py @@ -0,0 +1,131 @@ +"""Measure complete authority compilation against one fixed corpus. + +Run this script with separate baseline/candidate --source checkouts and the same +--corpus directory, in the supported locked environment. It reads but never +changes the corpus. Compare input/output digests before comparing observations. +Capture, warm-up, structural counters and result comparisons are outside timings. +This measures compilation, not complete revision admission or MCP latency. +""" +from __future__ import annotations + +import argparse +from dataclasses import asdict +import hashlib +import importlib.metadata +import json +from pathlib import Path +import platform +import statistics +import subprocess +import sys +import time +from unittest.mock import patch + + +def digest_json(value): + return hashlib.sha256(json.dumps(value, sort_keys=True, separators=(",", ":"), + ensure_ascii=False).encode()).hexdigest() + + +def coverage_material(compiled, coverage): + index = compiled.coverage + horizon = index.horizon + return { + "horizon": {"id": horizon.id, "provider": horizon.provider, "version": horizon.version, + "members": [member.as_projection() for member in horizon.members], + "digest": horizon.digest, "input_sources": list(horizon.input_sources), + "consumer_members": {key: value.as_projection() for key, value in horizon.consumer_members.items()}}, + "suite_inputs": horizon.suite_inputs.as_projection(), + "dependencies": {suite.id: asdict(horizon.suite_inputs.dependency(suite.id)) + for suite in horizon.suite_inputs.suites}, + "views": {key: value.as_projection() for key, value in index.views.items()}, + "requirements": {key: value.as_projection() for key, value in index.requirements.items()}, + "requirement_ids": {key: coverage.coverage_requirement_id(index.requirements[key], view) + for key, view in index.views.items()}, + "input_sources": list(index.input_sources), + } + + +def main(): + parser = argparse.ArgumentParser(description=__doc__) + parser.add_argument("--source", type=Path, required=True) + parser.add_argument("--corpus", type=Path, required=True) + parser.add_argument("--output", type=Path, required=True) + parser.add_argument("--repeats", type=int, default=7) + args = parser.parse_args() + if args.repeats < 1: + parser.error("--repeats must be positive") + if args.output.exists(): + parser.error("--output must be a new evidence file") + args.source = args.source.resolve() + args.corpus = args.corpus.resolve() + sys.path.insert(0, str(args.source)) + from tools.standards_engine.standards_engine.engine import StandardsEngine + from tools.standards_engine.standards_engine.compiled_cache import _retained_size + from tools.standards_metadata.standards_metadata.source import DirectoryContentSource, RecordingContentSource + from tools.standards_metadata.standards_metadata import suite_inputs + from tools.standards_analysis.standards_analysis import coverage + + recording = RecordingContentSource(DirectoryContentSource(args.corpus)) + StandardsEngine._compile(recording) + frozen = recording.freeze() + input_digest = hashlib.sha256() + for path, content in frozen.files: + path_bytes = path.encode() + input_digest.update(len(path_bytes).to_bytes(8, "big")) + input_digest.update(path_bytes) + input_digest.update(len(content).to_bytes(8, "big")) + input_digest.update(content) + # Untimed structural observation keeps instrumentation out of measurements. + with patch.object(suite_inputs, "_identity_digest", wraps=suite_inputs._identity_digest) as fingerprints: + reference = StandardsEngine._compile(frozen) + material = coverage_material(reference, coverage) + expected_signature = reference.semantic_signature() + observations = [] + for iteration in range(args.repeats + 1): + cpu_start = time.process_time() + start = time.perf_counter() + result = StandardsEngine._compile(frozen) + wall = time.perf_counter() - start + cpu = time.process_time() - cpu_start + if result.semantic_signature() != expected_signature or coverage_material(result, coverage) != material: + raise RuntimeError("Compilation changed semantic or coverage material during measurement") + observations.append({"warmup": iteration == 0, "wall_seconds": wall, "cpu_seconds": cpu}) + times = [row["wall_seconds"] for row in observations if not row["warmup"]] + versions = {} + for package in ("attrs", "jsonschema", "jsonschema-specifications", "referencing", "rpds-py", "typing-extensions"): + try: + versions[package] = importlib.metadata.version(package) + except importlib.metadata.PackageNotFoundError: + versions[package] = None + source_files = ("tools/standards_analysis/standards_analysis/coverage.py", + "tools/standards_metadata/standards_metadata/suite_inputs.py", + "tools/standards_engine/standards_engine/engine.py") + head = subprocess.run(["git", "rev-parse", "HEAD"], cwd=args.source, capture_output=True, text=True) + status = subprocess.run(["git", "status", "--porcelain"], cwd=args.source, capture_output=True, text=True) + evidence = { + "scope": "complete frozen authority compilation; excludes capture, revision admission and transport", + "source": str(args.source), "corpus": str(args.corpus), + "head": head.stdout.strip() if head.returncode == 0 else None, + "status": status.stdout if status.returncode == 0 else None, + "input_sha256": input_digest.hexdigest(), "coverage_output_sha256": digest_json(material), + "captured_files": len(frozen.files), "captured_bytes": sum(len(content) for _, content in frozen.files), + "policies": len(reference.corpus.policy_units), "relationships": len(reference.policy_impact.semantics), + "suites": len(reference.coverage.horizon.suite_inputs.suites), + "dependency_fingerprints_per_compile": fingerprints.call_count, + "accounted_compile_bytes": _retained_size(reference, 32 * 1024 * 1024), + "python": sys.version, "platform": platform.platform(), "packages": versions, + "source_sha256": {name: hashlib.sha256((args.source / name).read_bytes()).hexdigest() for name in source_files}, + "median_seconds": statistics.median(times), "min_seconds": min(times), "max_seconds": max(times), + "observations": observations, + } + args.output.parent.mkdir(parents=True, exist_ok=True) + with args.output.open("x") as stream: + json.dump(evidence, stream, indent=2) + stream.write("\n") + print(json.dumps({key: evidence[key] for key in ("median_seconds", "min_seconds", "max_seconds", + "dependency_fingerprints_per_compile", "input_sha256", "coverage_output_sha256")})) + + +if __name__ == "__main__": + main() diff --git a/evaluation/standards-effectiveness/generated/suite-inputs.json b/evaluation/standards-effectiveness/generated/suite-inputs.json index adaea3a0..b4e38558 100644 --- a/evaluation/standards-effectiveness/generated/suite-inputs.json +++ b/evaluation/standards-effectiveness/generated/suite-inputs.json @@ -6493,7 +6493,7 @@ ] }, { - "digest": "sha256:8ebe9e778e023b98f408b04fbcba86bdb78cb94cf449667582397a427230d12a", + "digest": "sha256:0fdca28dadfc1f4b950d844348c7927326b33a8fb291995f45e7680842b88fa4", "path": "tools/standards_analysis/standards_analysis/coverage.py", "state": "present", "uses": [ @@ -7582,7 +7582,7 @@ ] }, { - "digest": "sha256:b20b8257a6cf182118074c1de9bc398c0f5381d83b2d27460bb543535e81c76d", + "digest": "sha256:ca59c9b44cc21fdca6bc92784581d3c40ddced5d80bae73772b7f146754e2d5c", "path": "tools/standards_metadata/standards_metadata/suite_inputs.py", "state": "present", "uses": [ @@ -13326,7 +13326,7 @@ "path": "evaluation/standards-effectiveness/suite-registry.toml" }, "repository_index": { - "digest": "sha256:9d9f052f54444fc05bad711ef66ceaf9e2f6983598271fbbee986cde09608a07", + "digest": "sha256:3817f1cc9e0eb5ff9d5c828a7dcbf684c428726bfc88c29facbb4825fadbeb00", "uses": [ { "check": "python-package-contract", diff --git a/tools/standards_analysis/standards_analysis/coverage.py b/tools/standards_analysis/standards_analysis/coverage.py index 1363572e..04f7a4a3 100644 --- a/tools/standards_analysis/standards_analysis/coverage.py +++ b/tools/standards_analysis/standards_analysis/coverage.py @@ -3,6 +3,7 @@ import hashlib import re import tomllib +from collections.abc import Iterable from dataclasses import dataclass from types import MappingProxyType from typing import Any, Mapping @@ -557,18 +558,38 @@ def derive_coverage_view( representation_digest: str | None = None, structural_digest: str | None = None, ) -> CoverageViewDefinition: - relationships = tuple( - sorted( - ( - edge_id, - semantics.dependency_fingerprint, - semantics.relation, - semantics.applicability_program.dependency_digest, - ) - for edge_id, semantics in compiled.semantics.items() - if semantics.source == unit.id - ) + edge_ids = ( + edge_id for edge_id, semantics in compiled.semantics.items() + if semantics.source == unit.id ) + return _derive_coverage_view( + unit, compiled, horizon, edge_ids, + semantic_revision=semantic_revision, + representation_digest=representation_digest, + structural_digest=structural_digest, + ) + + +def _derive_coverage_view( + unit: PolicyUnit, + compiled: CompiledPolicyImpactSet, + horizon: CoverageHorizon, + edge_ids: Iterable[str], + *, + semantic_revision: int | None = None, + representation_digest: str | None = None, + structural_digest: str | None = None, +) -> CoverageViewDefinition: + relationships = [] + for edge_id in edge_ids: + semantics = compiled.semantics[edge_id] + relationships.append(( + edge_id, + semantics.dependency_fingerprint, + semantics.relation, + semantics.applicability_program.dependency_digest, + )) + relationships.sort() local_members: dict[str, CoverageHorizonMember] = {} for edge_id, _fingerprint, _relation, _program in relationships: semantics = compiled.semantics[edge_id] @@ -651,8 +672,19 @@ def compile_coverage_definitions( compiled: CompiledPolicyImpactSet, horizon: CoverageHorizon, ) -> CoverageDefinitionIndex: + # Group only the selected policies' edge identities. This preparation is + # private to this compilation and never outlives or replaces its graph. + edges_by_source: dict[str, list[str]] = { + unit.id: [] for unit in corpus.policy_units + } + if edges_by_source: + for edge_id, semantics in compiled.semantics.items(): + if semantics.source in edges_by_source: + edges_by_source[semantics.source].append(edge_id) views = { - unit.id: derive_coverage_view(unit, compiled, horizon) + unit.id: _derive_coverage_view( + unit, compiled, horizon, edges_by_source[unit.id], + ) for unit in corpus.policy_units } requirements = { diff --git a/tools/standards_analysis/tests/test_coverage_preparation.py b/tools/standards_analysis/tests/test_coverage_preparation.py new file mode 100644 index 00000000..5dc402f1 --- /dev/null +++ b/tools/standards_analysis/tests/test_coverage_preparation.py @@ -0,0 +1,243 @@ +"""Focused coverage preparation with synthetic already-compiled input records. + +These tests exercise real manifest loading, identities and coverage owners. The +small structural records deliberately exclude graph/corpus parser qualification. +""" +from __future__ import annotations + +from dataclasses import asdict, dataclass, replace +from types import SimpleNamespace +import unittest +from unittest.mock import patch + +from tools.standards_analysis.standards_analysis import coverage +from tools.standards_analysis.standards_analysis.errors import AnalysisError +from tools.standards_metadata.standards_metadata.source import FrozenContentSource +from tools.standards_metadata.standards_metadata import suite_inputs +from tools.standards_metadata.tests.test_prepared_suite_dependencies import manifest_fixture + + +@dataclass(frozen=True) +class Unit: + id: str + module: str = "module.policy" + semantic_revision: int = 1 + representation_digest: str = "sha256:" + "1" * 64 + structural_digest: str = "sha256:" + "2" * 64 + + +@dataclass(frozen=True) +class Semantics: + source: str + consumer: str + evidence_owner: str + dependency_fingerprint: str + applicability_program: object + relation: str = "documentation-projection" + + +class CountingSemantics(dict): + def __init__(self, values): + super().__init__(values) + self.passes = self.visits = 0 + + def items(self): + self.passes += 1 + for entry in super().items(): + self.visits += 1 + yield entry + + +def coverage_fixture(policy_count=4, edges_per_policy=3, payload=b"shared input\n"): + files, direct = manifest_fixture(payload) + files.update({ + "policy.md": b"# Policy\n", + "edges.toml": b"schema_version = 1\nsources = []\n", + "horizon.toml": ( + 'schema_version = 1\nid = "audit-horizon.policy-impact-consumers"\n' + 'provider = "standards-analysis:policy-impact-consumer-horizon"\n' + 'version = 6\nsuite_registry = "registry.toml"\n' + 'suite_inputs = "manifest.json"\nedge_source_registry = "edges.toml"\n' + ).encode(), + }) + units = tuple(Unit(f"policy.p{index:04d}") for index in range(policy_count)) + corpus = SimpleNamespace( + policy_units=units, + modules=(SimpleNamespace(path="policy.md", module_id="module.policy"),), + module_corpus=SimpleNamespace(members=("policy.md",)), + policy_unit_corpus=SimpleNamespace(sources=()), + ) + program = SimpleNamespace(dependency_digest="sha256:" + "3" * 64) + semantics = {} + for unit in units: + for index in range(edges_per_policy): + name = f"edge.{unit.id}.r{index:04d}" + semantics[name] = Semantics( + unit.id, "module.policy", ("suite:left", "suite:right", "review:consumer")[index % 3], + suite_inputs.file_digest(name.encode()), program, + ) + compiled = SimpleNamespace( + semantics=semantics, artifacts={}, input_sources=(), + fact_schema=SimpleNamespace(digest="sha256:" + "4" * 64), + relationship_kind_contract_version=2, + provider_contract_digest="sha256:" + "5" * 64, + ) + return FrozenContentSource(files), corpus, compiled, direct + + +def prepared_fixture(policy_count=4, edges_per_policy=3, payload=b"shared input\n"): + source, corpus, compiled, direct = coverage_fixture(policy_count, edges_per_policy, payload) + horizon = coverage.load_coverage_horizon(source, corpus, compiled, "horizon.toml") + return corpus, compiled, horizon + + +def result_projection(result): + """Complete public coverage material, excluding internal prepared indexes.""" + horizon = result.horizon + return { + "horizon": {"id": horizon.id, "provider": horizon.provider, "version": horizon.version, + "digest": horizon.digest, "members": [m.as_projection() for m in horizon.members], + "input_sources": list(horizon.input_sources), + "suite_inputs": horizon.suite_inputs.as_projection(), + "consumer_members": {key: value.as_projection() for key, value in horizon.consumer_members.items()}}, + "views": {key: value.as_projection() for key, value in result.views.items()}, + "requirements": {key: value.as_projection() for key, value in result.requirements.items()}, + "requirement_ids": {key: coverage.coverage_requirement_id(result.requirements[key], view) + for key, view in result.views.items()}, + "input_sources": list(result.input_sources), + } + + +class CoveragePreparationTest(unittest.TestCase): + def test_bulk_views_and_requirements_equal_individual_derivation(self): + for count in (1, 4, 32): + corpus, compiled, horizon = prepared_fixture(count) + with self.subTest(policies=count): + result = coverage.compile_coverage_definitions(corpus, compiled, horizon) + expected = {unit.id: coverage.derive_coverage_view(unit, compiled, horizon) + for unit in corpus.policy_units} + self.assertEqual(result.views, expected) + self.assertEqual(result.requirements, { + key: coverage.derive_coverage_requirement(view) for key, view in expected.items()}) + self.assertIs(result.horizon, horizon) + self.assertEqual(result.input_sources, horizon.input_sources) + + def test_bulk_preparation_visits_each_relationship_once(self): + corpus, compiled, horizon = prepared_fixture(32) + compiled.semantics = CountingSemantics(compiled.semantics) + result = coverage.compile_coverage_definitions(corpus, compiled, horizon) + self.assertEqual(compiled.semantics.passes, 1) + self.assertEqual(compiled.semantics.visits, len(compiled.semantics)) + self.assertEqual(sum(len(view.relationship_fingerprints) for view in result.views.values()), 96) + + def test_horizon_and_all_views_reuse_the_loader_dependency_preparation(self): + source, corpus, compiled, direct = coverage_fixture(32) + original = suite_inputs.SuiteInputManifest._derive_dependency + calls = [] + def observed(manifest, suite_id, definitions): + calls.append(suite_id) + return original(manifest, suite_id, definitions) + with patch.object(suite_inputs.SuiteInputManifest, "_derive_dependency", observed): + horizon = coverage.load_coverage_horizon(source, corpus, compiled, "horizon.toml") + for _ in range(2): + coverage.compile_coverage_definitions(corpus, compiled, horizon) + self.assertEqual(calls, [item.id for item in direct.suites]) + + def test_relationship_order_and_repeated_evidence_owners_preserve_results(self): + corpus, compiled, horizon = prepared_fixture(4, 8) + expected = result_projection(coverage.compile_coverage_definitions(corpus, compiled, horizon)) + compiled.semantics = dict(reversed(tuple(compiled.semantics.items()))) + actual = result_projection(coverage.compile_coverage_definitions(corpus, compiled, horizon)) + self.assertEqual(actual, expected) + for view in actual["views"].values(): + self.assertEqual(len(view["relationship_fingerprints"]), 8) + member_ids = [member["id"] for member in view["horizon"]["members"]] + self.assertEqual(member_ids.count("suite-dependency:left"), 1) + self.assertEqual(member_ids.count("suite-dependency:right"), 1) + + def test_unrelated_sources_are_ignored_without_reading_their_other_fields(self): + corpus, compiled, horizon = prepared_fixture() + expected = result_projection(coverage.compile_coverage_definitions(corpus, compiled, horizon)) + compiled.semantics["edge.unrelated"] = SimpleNamespace(source="another.policy") + actual = result_projection(coverage.compile_coverage_definitions(corpus, compiled, horizon)) + self.assertEqual(actual, expected) + + def test_policy_without_relationships_still_has_a_complete_view(self): + corpus, compiled, horizon = prepared_fixture() + missing = corpus.policy_units[-1].id + compiled.semantics = {key: value for key, value in compiled.semantics.items() if value.source != missing} + result = coverage.compile_coverage_definitions(corpus, compiled, horizon) + view = result.views[missing] + self.assertEqual(view.relationship_fingerprints, ()) + self.assertEqual(view.horizon_members, ()) + self.assertEqual(view, coverage.derive_coverage_view(corpus.policy_units[-1], compiled, horizon)) + + def test_empty_corpus_does_not_scan_relationships(self): + corpus, compiled, horizon = prepared_fixture(0) + compiled.semantics = CountingSemantics({"unrelated": SimpleNamespace(source="other")}) + result = coverage.compile_coverage_definitions(corpus, compiled, horizon) + self.assertEqual(result.views, {}) + self.assertEqual(result.requirements, {}) + self.assertEqual(compiled.semantics.passes, 0) + + def test_each_compilation_uses_its_own_relationship_assignment(self): + corpus, compiled, horizon = prepared_fixture(2) + previous = coverage.compile_coverage_definitions(corpus, compiled, horizon) + name = next(iter(compiled.semantics)) + compiled.semantics[name] = replace(compiled.semantics[name], source=corpus.policy_units[1].id) + current = coverage.compile_coverage_definitions(corpus, compiled, horizon) + self.assertNotEqual(current.views, previous.views) + self.assertEqual(len(previous.views[corpus.policy_units[0].id].relationship_fingerprints), 3) + self.assertEqual(len(current.views[corpus.policy_units[0].id].relationship_fingerprints), 2) + self.assertEqual(len(current.views[corpus.policy_units[1].id].relationship_fingerprints), 4) + + def test_changed_manifest_material_changes_relevant_requirement_ids(self): + first = prepared_fixture(payload=b"first material") + second = prepared_fixture(payload=b"second material") + before = result_projection(coverage.compile_coverage_definitions(*first)) + after = result_projection(coverage.compile_coverage_definitions(*second)) + self.assertNotEqual(before["requirement_ids"], after["requirement_ids"]) + self.assertNotEqual(first[2].suite_inputs.dependency("left"), second[2].suite_inputs.dependency("left")) + self.assertEqual(first[2].suite_inputs.dependency("other"), second[2].suite_inputs.dependency("other")) + + def test_direct_unprepared_manifest_keeps_the_standalone_coverage_path(self): + corpus, compiled, horizon = prepared_fixture() + direct_horizon = replace(horizon, suite_inputs=replace(horizon.suite_inputs)) + before = result_projection(coverage.compile_coverage_definitions(corpus, compiled, horizon)) + after = result_projection(coverage.compile_coverage_definitions(corpus, compiled, direct_horizon)) + self.assertEqual(before, after) + + def test_failures_preserve_diagnostics_and_sorted_first_failure(self): + for change, code in ( + ({"consumer": "missing.consumer"}, "COVERAGE.CONSUMER_MISSING"), + ({"evidence_owner": "invalid-owner"}, "COVERAGE.EVIDENCE_OWNER"), + ({"evidence_owner": "suite:unknown"}, "COVERAGE.EVIDENCE_SUITE_MISSING"), + ): + corpus, compiled, horizon = prepared_fixture(1) + names = sorted(compiled.semantics) + compiled.semantics[names[0]] = replace(compiled.semantics[names[0]], **change) + compiled.semantics[names[1]] = replace(compiled.semantics[names[1]], consumer="later.missing") + compiled.semantics = dict(reversed(tuple(compiled.semantics.items()))) + failures = [] + for operation in ( + lambda: coverage.compile_coverage_definitions(corpus, compiled, horizon), + lambda: coverage.derive_coverage_view(corpus.policy_units[0], compiled, horizon), + ): + with self.subTest(code=code), self.assertRaises(AnalysisError) as error: + operation() + failures.append(asdict(error.exception.failure)) + self.assertEqual(failures[0], failures[1]) + self.assertEqual(failures[0]["code"], code) + + def test_single_view_semantic_overrides_are_preserved(self): + corpus, compiled, horizon = prepared_fixture(1) + unit = corpus.policy_units[0] + baseline = coverage.derive_coverage_view(unit, compiled, horizon) + overridden = coverage.derive_coverage_view(unit, compiled, horizon, + semantic_revision=2, representation_digest="new representation", structural_digest="new structure") + self.assertEqual(overridden, replace(baseline, semantic_revision=2, + representation_digest="new representation", structural_digest="new structure")) + + +if __name__ == "__main__": + unittest.main() diff --git a/tools/standards_analysis/tests/test_coverage_preparation_integration.py b/tools/standards_analysis/tests/test_coverage_preparation_integration.py new file mode 100644 index 00000000..53dee600 --- /dev/null +++ b/tools/standards_analysis/tests/test_coverage_preparation_integration.py @@ -0,0 +1,55 @@ +"""Complete-checkout coverage preparation through the existing real fixture.""" +from dataclasses import replace +import unittest +from unittest.mock import patch + +from tools.standards_analysis.standards_analysis import coverage +from tools.standards_analysis.standards_analysis.errors import AnalysisError +from tools.standards_analysis.tests import test_coverage as fixtures +from tools.standards_metadata.standards_metadata.suite_inputs import SuiteInputManifest + + +class CoveragePreparationIntegrationTest(unittest.TestCase): + def setUp(self): + self.fixture = fixtures.CoverageTest() + self.fixture.setUp() + self.addCleanup(self.fixture.tearDown) + + def test_real_horizon_views_and_requirement_identity_reuse_preparation(self): + fixture = self.fixture + compiled = fixture.compiled(relationship=True) + original = SuiteInputManifest._derive_dependency + calls = [] + def observed(manifest, suite_id, definitions): + calls.append(suite_id) + return original(manifest, suite_id, definitions) + with patch.object(SuiteInputManifest, "_derive_dependency", observed): + horizon = coverage.load_coverage_horizon(fixture.root, fixture.corpus, compiled, "horizon.toml") + result = coverage.compile_coverage_definitions(fixture.corpus, compiled, horizon) + self.assertEqual(calls, [suite.id for suite in horizon.suite_inputs.suites]) + cold = replace(horizon, suite_inputs=replace(horizon.suite_inputs)) + reference = coverage.compile_coverage_definitions(fixture.corpus, compiled, cold) + self.assertEqual(result.views, reference.views) + self.assertEqual(result.requirements, reference.requirements) + for subject, view in result.views.items(): + self.assertEqual(coverage.coverage_requirement_id(result.requirements[subject], view), + coverage.coverage_requirement_id(reference.requirements[subject], reference.views[subject])) + + def test_persisted_coverage_claim_tracks_relevant_inputs_not_retained_preparation(self): + fixture = self.fixture + fixture.write_attestations(pinned=True) + before = fixture.load_decisions() + self.assertIn("workflow.policy.rule", before.attestations) + fixture.write("inputs/unrelated.md", "# Unrelated changed input\n") + fixture.write_suite_projection() + self.assertEqual(fixture.load_decisions().attestations, before.attestations) + fixture.write("inputs/consumer.md", "# Relevant changed input\n") + with self.assertRaises(AnalysisError) as error: + fixture.definitions() + self.assertEqual(error.exception.failure.code, "SUITE_INPUT.STALE_FILE") + fixture.write_suite_projection() + self.assertNotIn("workflow.policy.rule", fixture.load_decisions().attestations) + + +if __name__ == "__main__": + unittest.main() diff --git a/tools/standards_engine/tests/test_coverage_preparation_accounting.py b/tools/standards_engine/tests/test_coverage_preparation_accounting.py new file mode 100644 index 00000000..e03bf52c --- /dev/null +++ b/tools/standards_engine/tests/test_coverage_preparation_accounting.py @@ -0,0 +1,31 @@ +"""Prepared manifest memory is owned and bounded with the compiled data graph.""" +from dataclasses import replace +import unittest + +from tools.standards_engine.standards_engine.compiled_cache import _retained_size +from tools.standards_metadata.tests.test_prepared_suite_dependencies import load_fixture + + +class CoveragePreparationAccountingTest(unittest.TestCase): + def test_dependency_index_is_charged_before_any_cache_hit(self): + prepared, _ = load_fixture() + direct = replace(prepared) + unprepared_size = _retained_size(direct, 32 * 1024 * 1024) + prepared_size = _retained_size(prepared, 32 * 1024 * 1024) + self.assertIsNotNone(prepared_size) + self.assertIsNotNone(unprepared_size) + self.assertGreater(prepared_size, unprepared_size) + self.assertIsNone(_retained_size(prepared, prepared_size - 1)) + self.assertEqual(_retained_size(prepared, prepared_size), prepared_size) + + def test_dependency_lookups_do_not_grow_retained_memory(self): + prepared, _ = load_fixture() + size = _retained_size(prepared, 32 * 1024 * 1024) + for _ in range(5): + for suite in prepared.suites: + prepared.dependency(suite.id) + self.assertEqual(_retained_size(prepared, 32 * 1024 * 1024), size) + + +if __name__ == "__main__": + unittest.main() diff --git a/tools/standards_metadata/standards_metadata/suite_inputs.py b/tools/standards_metadata/standards_metadata/suite_inputs.py index 7db6e020..cb9869f3 100644 --- a/tools/standards_metadata/standards_metadata/suite_inputs.py +++ b/tools/standards_metadata/standards_metadata/suite_inputs.py @@ -3,7 +3,9 @@ import hashlib import json import tomllib -from dataclasses import dataclass +from collections.abc import Mapping +from dataclasses import dataclass, field +from types import MappingProxyType from tools.standards_identity.standards_identity import ( IdentityArray, @@ -172,6 +174,12 @@ class SuiteInputManifest: suites: tuple[SuiteDefinitionInput, ...] files: tuple[SuiteFileInput, ...] repository_index: RepositoryIndexObservation | None + # The loader publishes this read-only index only after all source checks. + # It is derived state: replacement, equality, hashing and the wire form + # continue to depend solely on the manifest's declared inputs. + _dependencies: Mapping[str, SuiteDependencyProjection] | None = field( + default=None, init=False, repr=False, compare=False, + ) def as_projection(self) -> dict[str, object]: return { @@ -191,7 +199,18 @@ def as_projection(self) -> dict[str, object]: } def dependency(self, suite_id: str) -> SuiteDependencyProjection: - definitions = {suite.id: suite for suite in self.suites} + if self._dependencies is not None: + return self._dependencies[suite_id] + # Directly constructed manifests retain the ordinary derivation path. + return self._derive_dependency( + suite_id, {suite.id: suite for suite in self.suites}, + ) + + def _derive_dependency( + self, + suite_id: str, + definitions: Mapping[str, SuiteDefinitionInput], + ) -> SuiteDependencyProjection: if suite_id not in definitions: raise KeyError(suite_id) selected: set[str] = set() @@ -620,8 +639,14 @@ def load_suite_input_manifest( "repository-index observation requires sorted registered uses", path=path, ) - for suite in manifest.suites: - manifest.dependency(suite.id) + definitions = {suite.id: suite for suite in manifest.suites} + dependencies = { + suite.id: manifest._derive_dependency(suite.id, definitions) + for suite in manifest.suites + } + # Retain the projections that validation already derives. Finish the whole + # index before publishing the manifest; subsequent reads never grow it. + object.__setattr__(manifest, "_dependencies", MappingProxyType(dependencies)) return manifest diff --git a/tools/standards_metadata/tests/test_prepared_suite_dependencies.py b/tools/standards_metadata/tests/test_prepared_suite_dependencies.py new file mode 100644 index 00000000..e8cf71f4 --- /dev/null +++ b/tools/standards_metadata/tests/test_prepared_suite_dependencies.py @@ -0,0 +1,227 @@ +"""Preparation preserves the validated manifest's dependency and wire contracts.""" +from __future__ import annotations + +from concurrent.futures import ThreadPoolExecutor +from dataclasses import FrozenInstanceError, replace +import hashlib +import json +import tempfile +from pathlib import Path +import unittest +from unittest.mock import patch + +from tools.standards_metadata.standards_metadata.errors import MetadataError +from tools.standards_metadata.standards_metadata.source import FrozenContentSource +from tools.standards_metadata.standards_metadata import suite_inputs as inputs + + +def manifest_fixture(payload: bytes = b"shared input\n"): + """A diamond prerequisite graph, overlapping uses, absence and index input.""" + requirements = {"common": (), "left": ("common",), + "right": ("common",), "top": ("left", "right"), "other": ()} + files = {f"suites/{name}.toml": f'id = "{name}"\n'.encode() + for name in requirements} + registry = "schema_version = 1\n" + "".join( + f'[[suites]]\nid = "{name}"\npath = "suites/{name}.toml"\n' + f'requires = {json.dumps(list(required))}\n' + for name, required in requirements.items() + ) + files["registry.toml"] = registry.encode() + files.update({"inputs/shared.txt": payload, "inputs/left.txt": b"left\n", + "inputs/other.txt": b"other\n"}) + use = inputs.SuiteInputUse + declarations = ( + inputs.SuiteFileInput("inputs/absent.txt", "absent", None, + (use("top", "absent", "absence"),)), + inputs.SuiteFileInput("inputs/left.txt", "present", + inputs.file_digest(files["inputs/left.txt"]), + (use("left", "left", "content"),)), + inputs.SuiteFileInput("inputs/other.txt", "present", + inputs.file_digest(files["inputs/other.txt"]), + (use("other", "other", "content"),)), + inputs.SuiteFileInput("inputs/shared.txt", "present", inputs.file_digest(payload), + (use("common", "shared", "content"), + use("right", "shared", "content"))), + ) + manifest = inputs.SuiteInputManifest( + "registry.toml", inputs.file_digest(files["registry.toml"]), + tuple(inputs.SuiteDefinitionInput(name, f"suites/{name}.toml", + inputs.file_digest(files[f"suites/{name}.toml"]), required) + for name, required in requirements.items()), + declarations, + inputs.RepositoryIndexObservation(inputs.file_digest(b"membership"), + (use("right", "index", "membership"),)), + ) + files["manifest.json"] = inputs.suite_input_manifest_bytes(manifest) + return files, manifest + + +def load_fixture(payload: bytes = b"shared input\n"): + files, direct = manifest_fixture(payload) + return inputs.load_suite_input_manifest(FrozenContentSource(files), "manifest.json"), direct + + +class PreparedSuiteDependenciesTest(unittest.TestCase): + def test_diamond_projection_has_exact_files_uses_and_fingerprint(self): + loaded, direct = load_fixture() + result = loaded.dependency("top") + selected = {"common", "left", "right", "top"} + self.assertEqual(result.suites, tuple(sorted(selected))) + self.assertEqual(result.files, ("inputs/absent.txt", "inputs/left.txt", "inputs/shared.txt")) + self.assertTrue(result.observes_repository_index) + # This ASCII-only fixture's literal JSON preimage independently specifies + # the unchanged identity-v1 dependency shape, ordering and filtered uses. + preimage = { + "contract": inputs.SUITE_INPUT_CONTRACT, "schema_version": 1, "suite": "top", + "suites": [entry.as_projection() for entry in sorted(direct.suites, key=lambda item: item.id) + if entry.id in selected], + "files": [{"path": item.path, "state": item.state, "digest": item.digest, + "uses": [use.as_projection() for use in item.uses if use.suite in selected]} + for item in direct.files if any(use.suite in selected for use in item.uses)], + "repository_index": direct.repository_index.as_projection(), + } + expected = "sha256:" + hashlib.sha256( + json.dumps(preimage, sort_keys=True, separators=(",", ":")).encode()).hexdigest() + self.assertEqual(result.fingerprint, expected) + self.assertEqual(result, direct.dependency("top")) + + def test_loader_derives_each_suite_once_with_one_definition_table(self): + files, direct = manifest_fixture() + original = inputs.SuiteInputManifest._derive_dependency + observations = [] + def observed(manifest, suite_id, definitions): + observations.append((suite_id, definitions)) + return original(manifest, suite_id, definitions) + with patch.object(inputs.SuiteInputManifest, "_derive_dependency", observed): + loaded = inputs.load_suite_input_manifest(FrozenContentSource(files), "manifest.json") + for _ in range(4): + for definition in direct.suites: + loaded.dependency(definition.id) + self.assertEqual([name for name, _ in observations], [item.id for item in direct.suites]) + self.assertEqual(len({id(table) for _, table in observations}), 1) + + def test_lookup_is_read_only_and_result_is_immutable(self): + loaded, _ = load_fixture() + selected = loaded.dependency("top") + self.assertIs(loaded.dependency("top"), selected) + with self.assertRaises(TypeError): + loaded._dependencies["top"] = None + with self.assertRaises(FrozenInstanceError): + selected.fingerprint = "changed" + with self.assertRaises(FrozenInstanceError): + loaded._dependencies = {} + + def test_unknown_suite_preserves_key_error_without_growing_index(self): + loaded, direct = load_fixture() + keys = tuple(loaded._dependencies) + for manifest in (loaded, direct): + with self.assertRaises(KeyError) as error: + manifest.dependency("missing") + self.assertEqual(error.exception.args, ("missing",)) + self.assertEqual(tuple(loaded._dependencies), keys) + + def test_wire_equality_hash_and_representation_ignore_preparation(self): + loaded, direct = load_fixture() + self.assertEqual(inputs.suite_input_manifest_bytes(loaded), inputs.suite_input_manifest_bytes(direct)) + self.assertEqual(loaded, direct) + self.assertEqual(hash(loaded), hash(direct)) + self.assertEqual(repr(loaded), repr(direct)) + + def test_replacement_discards_derived_state_for_every_input_change(self): + loaded, _ = load_fixture() + changed_files = tuple(replace(item, digest=inputs.file_digest(b"changed")) + if item.path == "inputs/shared.txt" else item for item in loaded.files) + changed_requires = tuple(replace(item, requires=("left",)) + if item.id == "top" else item for item in loaded.suites) + changed_definition = tuple(replace(item, digest=inputs.file_digest(b"definition")) + if item.id == "common" else item for item in loaded.suites) + cases = ( + replace(loaded, files=changed_files), + replace(loaded, suites=changed_requires), + replace(loaded, suites=changed_definition), + replace(loaded, repository_index=replace(loaded.repository_index, + digest=inputs.file_digest(b"new index"))), + ) + for changed in cases: + with self.subTest(manifest=changed): + self.assertIsNone(changed._dependencies) + self.assertNotEqual(changed.dependency("top"), loaded.dependency("top")) + self.assertIsNone(replace(loaded)._dependencies) + with self.assertRaises((TypeError, ValueError)): + replace(loaded, _dependencies={}) + + def test_independent_manifests_with_same_suite_ids_do_not_share_results(self): + first, _ = load_fixture(b"first") + second, _ = load_fixture(b"second") + self.assertNotEqual(first.dependency("top"), second.dependency("top")) + self.assertEqual(first.dependency("other"), second.dependency("other")) + self.assertIsNot(first._dependencies, second._dependencies) + + def test_reload_rechecks_live_files_even_after_a_successful_load(self): + files, _ = manifest_fixture() + with tempfile.TemporaryDirectory() as temporary: + root = Path(temporary) + for name, content in files.items(): + path = root / name + path.parent.mkdir(parents=True, exist_ok=True) + path.write_bytes(content) + retained = inputs.load_suite_input_manifest(root, "manifest.json") + prior = retained.dependency("top") + (root / "inputs/shared.txt").write_bytes(b"changed behind manifest") + with self.assertRaises(MetadataError) as error: + inputs.load_suite_input_manifest(root, "manifest.json") + self.assertEqual(error.exception.failure.code, "SUITE_INPUT.STALE_FILE") + self.assertEqual(error.exception.failure.path, "inputs/shared.txt") + self.assertIs(retained.dependency("top"), prior) + + def test_invalid_material_rejects_before_dependency_preparation(self): + original, _ = manifest_fixture() + for path, replacement, code in ( + ("registry.toml", b"changed", "SUITE_INPUT.STALE_REGISTRY"), + ("suites/common.toml", b'id = "common"\n# changed\n', "SUITE_INPUT.STALE_SUITES"), + ("inputs/shared.txt", b"changed", "SUITE_INPUT.STALE_FILE"), + ("inputs/absent.txt", b"present", "SUITE_INPUT.PRESENT_ABSENCE"), + ("manifest.json", b"{}", "SUITE_INPUT.INVALID_FIELDS"), + ): + with self.subTest(path=path): + files = {**original, path: replacement} + with patch.object(inputs.SuiteInputManifest, "_derive_dependency", + side_effect=AssertionError("prepared before validation")): + with self.assertRaises(MetadataError) as error: + inputs.load_suite_input_manifest(FrozenContentSource(files), "manifest.json") + self.assertEqual(error.exception.failure.code, code) + + def test_invalid_graph_keeps_cycle_and_missing_prerequisite_diagnostics(self): + for requires, code in ((["unknown"], "SUITE_INPUT.INVALID_DEPENDENCY"), + (["top"], "SUITE_INPUT.DEPENDENCY_CYCLE")): + files, direct = manifest_fixture() + text = files["registry.toml"].decode().replace('requires = []', + f'requires = {json.dumps(requires)}', 1) + files["registry.toml"] = text.encode() + changed = replace(direct, registry_digest=inputs.file_digest(files["registry.toml"])) + files["manifest.json"] = inputs.suite_input_manifest_bytes(changed) + with self.subTest(requires=requires), self.assertRaises(MetadataError) as error: + inputs.load_suite_input_manifest(FrozenContentSource(files), "manifest.json") + self.assertEqual(error.exception.failure.code, code) + + def test_absence_membership_and_unrelated_files_have_distinct_dependency_effects(self): + loaded, _ = load_fixture() + without_absence = replace(loaded, files=tuple(item for item in loaded.files if item.state != "absent")) + without_index = replace(loaded, repository_index=None) + self.assertNotEqual(loaded.dependency("top"), without_absence.dependency("top")) + self.assertNotEqual(loaded.dependency("top"), without_index.dependency("top")) + self.assertEqual(loaded.dependency("common"), without_index.dependency("common")) + self.assertEqual(loaded.dependency("other"), without_absence.dependency("other")) + + def test_parallel_reads_neither_recompute_nor_change_the_prepared_index(self): + loaded, _ = load_fixture() + expected = loaded.dependency("top") + with patch.object(inputs.SuiteInputManifest, "_derive_dependency", + side_effect=AssertionError("unexpected lazy mutation")): + with ThreadPoolExecutor(max_workers=4) as pool: + results = list(pool.map(loaded.dependency, ["top"] * 32)) + self.assertTrue(all(result is expected for result in results)) + + +if __name__ == "__main__": + unittest.main() From e7fc783bd2f0580404cdd3a5ae04c374e168274c Mon Sep 17 00:00:00 2001 From: MrScripty Date: Thu, 24 Sep 2026 17:22:26 -0700 Subject: [PATCH 19/26] feat(engine): register policy units in existing standards --- .../standards-engine/references/authoring.md | 36 +++ .../positive-guidance-and-provenance.md | 2 + .../execution-ledger.md | 17 ++ .../existing-policy-registration/issues.md | 12 + .../existing-policy-registration/plan.md | 141 +++++++++ .../reports/verification.md | 89 ++++++ .../generated/suite-inputs.json | 14 +- tools/standards_engine/PURPOSE-SEPARATION.md | 16 +- .../contracts/a1-contract.schema.json | 24 ++ .../contracts/a1-interface.toml | 2 +- .../contracts/examples/a1-examples.json | 21 +- .../contracts/generated/agent-tools.json | 26 +- .../standards_engine/_generated_contract.py | 34 ++- .../standards_engine/logical_authoring.py | 79 ++++- .../tests/mcp_policy_registration_client.py | 238 +++++++++++++++ .../tests/test_policy_registration.py | 274 ++++++++++++++++++ .../tests/test_registration_contract.py | 142 +++++++++ 17 files changed, 1152 insertions(+), 15 deletions(-) create mode 100644 docs/plans/existing-policy-registration/execution-ledger.md create mode 100644 docs/plans/existing-policy-registration/issues.md create mode 100644 docs/plans/existing-policy-registration/plan.md create mode 100644 docs/plans/existing-policy-registration/reports/verification.md create mode 100644 tools/standards_engine/tests/mcp_policy_registration_client.py create mode 100644 tools/standards_engine/tests/test_policy_registration.py create mode 100644 tools/standards_engine/tests/test_registration_contract.py diff --git a/.agents/skills/standards-engine/references/authoring.md b/.agents/skills/standards-engine/references/authoring.md index 40a9ca01..d605b86f 100644 --- a/.agents/skills/standards-engine/references/authoring.md +++ b/.agents/skills/standards-engine/references/authoring.md @@ -46,6 +46,7 @@ The closed edit variants are: - `create-standard` - `revise-standard` +- `register-policy-unit` - `revise-policy-unit` - `move-policy-unit` - `retire-policy-unit` @@ -100,6 +101,41 @@ sufficiency, or successors from prose. If the user has not decided required meaning, stop at the typed rejection or ask for that decision instead of manufacturing closure. +## Register A Scope In An Existing Standard + +Use `register-policy-unit` to bind a selected existing scope to a fresh stable +policy ID. Supply the existing canonical `standard` and the schema's +`policy_unit` declaration: ID, heading chain, revision one, explicit intent, +aliases, predecessors and successors. Registry paths and generated bindings +remain Engine-owned. The declaration uses the same validated policy shape as +`create-standard`. + +Registration preserves the standard's body. It supports both previously +unmapped modules and owners that already contain policy units, preserving +existing identities, aliases and tombstones. Select one uniquely resolved, +non-overlapping scope and an available identity. Existing lifecycle and lineage +validation remains authoritative. + +A coherent change set may revise a module, register selected additional scopes, +and add relationships and provenance for those scopes. Module and existing +policy content changes run first; registrations are validated together before +consumer relationships and final supporting bindings. `scope_updates` describes +the policies registered before those new registrations. Input edit order does +not change this staging. + +Registration establishes an identity, not audited coverage. Resolve the actual +consumer, impact and coverage obligations before review and publication. A +rejected registration leaves the current proposal revision and accepted source +unchanged. Use the returned status and current contract for recovery or revision. + +After installing interface 33, restart the Engine process and refresh the client +catalog. Reopen preserved work with `workflow_status`; use `resume` only to select +its explicit current revision when needed. A previous review remains historical +evidence, while changed candidates receive current analysis and affected review. +`resume` selects a proposal revision; it does not promise to rebase an old source +snapshot. Follow any returned stale-base disposition rather than editing a store +or carrying old readiness onto changed material. + ## Navigation Index Correction For a legacy navigation correction, call `read` with target diff --git a/docs/guides/positive-guidance-and-provenance.md b/docs/guides/positive-guidance-and-provenance.md index 45248706..ccd2cdea 100644 --- a/docs/guides/positive-guidance-and-provenance.md +++ b/docs/guides/positive-guidance-and-provenance.md @@ -156,6 +156,8 @@ Begin after code claims C1–C10 are accepted. Verify the actual installed purpo Required capabilities are complete module/metadata revision, scoped policy revision with stable identities, reference creation/revision, registered prompt/template editing, provenance maintenance, explicit exposure approval/withdrawal, relationship updates, and coherent reviewed publication. Verify a whole-module rewrite preserves or explicitly dispositions existing policy-unit scopes and previously unmapped content. +The handoff also exercises explicit policy-unit registration within an existing standard, both for a module with no registered units and for an owner with established units. Prove registration together with an optional whole-module rewrite, consumer relationships and provenance through reviewed publication and cold readback. Registration preserves existing identities and requires the real coverage dispositions. The [registration correction plan](../plans/existing-policy-registration/plan.md) owns the code capability and its acceptance; a schema entry alone does not satisfy this handoff. + A missing necessary content operation returns to the code workstream as a bounded implementation gap. It is not a reason to bypass the Engine and edit canonical files directly. ### H1 — Inventory one coherent migration boundary diff --git a/docs/plans/existing-policy-registration/execution-ledger.md b/docs/plans/existing-policy-registration/execution-ledger.md new file mode 100644 index 00000000..2310835e --- /dev/null +++ b/docs/plans/existing-policy-registration/execution-ledger.md @@ -0,0 +1,17 @@ +# Execution Ledger + +## 2026-09-24 — Admission and source qualification + +The owner requested the plan and implementation. Admitted `docs/plans/existing-policy-registration/plan.md` with operation `start`. + +Confirmed published branch `implementation/purpose-separated-standards-engine` at `5a9dcb08effda50a485e6ae08d9fe4c349c74eda`. Direct Git transport fails DNS resolution. Recovered affected source from retained delivery archives; the logical-authoring and canonical schema blobs match the published identities. The recovered working tree is partial. No access to the user's installed store or proposal was attempted. + +The bounded design extends the existing edit/metadata/projection owners and preserves normative content. Verification will distinguish executable local evidence from full-checkout/installed-MCP qualification. + +## September 24, 2026 — Source correction and bounded verification + +Implemented the closed `register-policy-unit` edit, grouped registration before consumer binding, addition semantics, interface 33 and generated projections. Reused the existing sidecar owner and preserved tombstone-only files. Added contract/integration tests, an actual-client walkthrough, technical operation guidance and the narrow H0 handoff clarification. + +The baseline schema rejected the new edit before implementation. Fourteen available existing contract tests and eight new contract tests passed. Nine explicitly isolated owner-mechanism checks passed; their excluded boundaries are recorded in the report. Full-checkout integration collection failed on unavailable `tools.graph_engine`, so canonical metadata/replay and real MCP publication remain unexecuted. Generated public projections, source syntax, exact baseline input hashes and package round-trip checks passed. + +The plan is Verifying with blocked objective acceptance, not Accepted. No real standards content, upstream history, installed server or user proposal store was changed. The final evidence and the required next qualification slice are recorded in [reports/verification.md](reports/verification.md). diff --git a/docs/plans/existing-policy-registration/issues.md b/docs/plans/existing-policy-registration/issues.md new file mode 100644 index 00000000..e679b717 --- /dev/null +++ b/docs/plans/existing-policy-registration/issues.md @@ -0,0 +1,12 @@ +# Issues + +| ID | Severity | Evidence and owner | Disposition | Verification / revisit | +| --- | --- | --- | --- | --- | +| PR-01 | high | Logical authoring lacks registration on an existing module; policy relationships require registered sources. | Fix in this slice. | Generic registration, final-candidate composition and MCP publication tests. | +| PR-02 | high | The local environment cannot clone GitHub and the available recovered source is partial. Verification owner. | Continue bounded source work; qualify only claims reached by actual checks. | Full checkout with locked runtime is required for complete package/MCP acceptance. | +| PR-03 | medium | Existing sidecar helper treats a registered tombstone-only derived sidecar as unregistered. Logical-authoring owner. | Fix in this slice because new registration must preserve the owner's retired identity history. | Register a fresh unit after all previous active units were retired; tombstones retained. | +| PR-04 | high | Preserved proposal and its current store are on the user's machine, not in this environment. Integration owner. | Preserve by access boundary; no resets or inferred readiness. | Inspect and resume through installed authoring operations after qualification. | + +## Current dispositions + +PR-01 and PR-03 are implemented in source; their complete canonical/runtime acceptance is blocked by PR-02. The new schema and generated consumers are verified. PR-04 remains a deployment boundary: the external proposal was untouched and must be inspected through the qualified installed authoring interface before resuming. No issue is closed by assuming that isolated checks replace its required real evidence. diff --git a/docs/plans/existing-policy-registration/plan.md b/docs/plans/existing-policy-registration/plan.md new file mode 100644 index 00000000..3c3e2486 --- /dev/null +++ b/docs/plans/existing-policy-registration/plan.md @@ -0,0 +1,141 @@ +# Existing-Standard Policy Registration + +**Plan status:** `Verifying` +**Acceptance status:** `blocked` +**Current phase:** Full-checkout and real-MCP qualification of the implemented source. +**Next slice:** Run the canonical compiler, replay and MCP publication regressions in a full supported checkout; repair any findings before content migration. +**Repository baseline:** `MrScripty/Coding-Standards@5a9dcb08effda50a485e6ae08d9fe4c349c74eda`. +**Admission:** The owner requested this plan and its implementation. Canonical plan path: `docs/plans/existing-policy-registration/plan.md`; operation: `start`. +**Composed-design review:** applicable; see below. +**Execution ledger:** [execution-ledger.md](execution-ledger.md). **Issues:** [issues.md](issues.md). **Evidence:** [reports/verification.md](reports/verification.md). **ADRs:** none required; this extends the existing authoring owner. + +## Objective + +An author can give a selected scope in an existing standard a stable policy identity through the Standards Engine, then maintain its consumer relationships and provenance through the existing reviewed publication workflow. Registration preserves the existing standard's prose unless an explicit same-candidate content edit changes it. + +This is an Engine code correction. The real standards migration remains separately owned by `docs/guides/positive-guidance-and-provenance.md`. Real standards, policy declarations, relationships, exposure approvals and the installed proposal store remain unchanged by this task. In particular, preserve proposal `503f233b-5c9f-442f-a04f-99f330142bae` and its review evidence; that store is not present in this environment. + +## Scope And Constraints + +Apply Core and Router; Implementation, Planning, Verification, Development Proportionality, Build, Documentation and Commit; Library, Generated Contract, IPC and Persistence; Contracts and its schema/evolution detail, Architecture/replay, Security, Diagnostics and verification-oracle guidance where affected. The prospective guide supplies the owner's agreed practices: generic mechanisms, affirmative instructions, separate supplementary examples/provenance, coherent slices, bounded repair and evidence proportional to risk. + +The new edit is generic and uses canonical identities and authored scope/intent. No Core-specific inference, automatic heading registration, raw path-editing API, second graph, alternate authoring lifecycle or new database is introduced. + +No backward-compatibility layer is required. Extend the current contract coherently and retire nothing that remains the correct implementation. Existing proposal representations and storage need no forced replacement: adding a supported edit kind changes the interface, not the meaning of prior edits. Increment the interface version, regenerate its projections and refresh the actual client after installation. Preserve existing stores and historical evidence. + +## Baseline and bounded findings + +The existing `create-standard` can introduce initial policy units, `revise-standard.scope_updates` addresses the registered set, and `revise-policy-unit`/`put-policy-relationship` require registered identities. The parser and projection lack registration on an existing standard. The affected source was recovered from prior delivery archives and checked against published Git blob identities. Direct Git download is unavailable in this environment; the recovered tree is partial. Full-repository and installed-MCP acceptance are distinct from checks that can run against the available files. + +## Binding Decisions + +1. **Logical authoring owns the edit.** Add `register-policy-unit` with `standard` (canonical existing module ID) and `policy_unit` (the existing `NewPolicyUnit` declaration: ID, heading chain, revision one, explicit intent, aliases and lineage). Reuse closed field validation and normalized immutable `StructuredEdit` payloads. Its facet is the policy identity, so contradictory same-set policy edits fail before projection. +2. **Projection owns ordering.** Apply module and existing-policy content changes first, then stage all registrations in the change set as one group before relationship compilation, supporting-content binding and final validation. Grouping lets the existing corpus validator see all newly declared identities and scopes without loading a half-registered corpus; existing lineage constraints remain authoritative. Input edit order does not determine semantics. +3. **Metadata remains authoritative.** Resolve existing canonical module ownership, reject reserved identities, append declarations through existing sidecar/registry writers, and let the canonical metadata loader validate headings, aliases, lineage and scope. Reuse a registered owner sidecar even after its last active policy was retired, retaining its tombstones. No standard body is rewritten by registration. +4. **Analysis sees additions.** Produce revision-one semantic intent against an absent accepted identity and include the containing module in analysis. Registration establishes identity, not evidence of exhaustive consumer discovery or automatic coverage certification. +5. **Existing publication remains authoritative.** Relationships and provenance target the final candidate. Proposal validation remains private and atomic; restart/replay uses stored logical edits. Full replay and eligible incremental successors produce equivalent material and intents. The original accepted base retains authority. +6. **Generated interface remains single-source.** Add the new variant to the canonical JSON Schema and interface edition; run the existing projection compiler for Python and tool schemas. Reuse `propose`/`revise`; no new MCP tool or dispatch service is needed. Application-purpose authorization remains unchanged. + +## Simplicity And Ownership Review + +**Applicability:** `applicable` + +**Independent concepts and dimensions:** logical authoring owns intent and staging; canonical metadata owns identities/scopes; impact and coverage own review obligations; snapshots/publication own durability; generated contracts own public representation. Registration introduces no new lifetime or authority. + +**State, identity, value, time, policy and mechanism:** a new policy ID binds a selected current candidate scope at semantic revision one. Registration time is not the date the rule's meaning originated. The declared intent is preserved for review. IDs, body bytes, semantic revisions, evidence and coverage are separate. + +**Caller and composition-root knowledge:** authors provide module ID, selected heading chain and intent, rather than sidecar paths, digests or generated files. Existing Engine composition consumes the resulting projection without new dependencies. + +**Representative change paths and forced owners:** one registration changes its declaration and analysis intent; a same-candidate rewrite is a separate explicit edit; a relationship remains an explicit declaration; a later prose change uses the existing policy revision mechanism. + +**Stable Interfaces versus hidden knowledge:** keep the existing `NewPolicyUnit` contract and metadata validator. The projection owns batching and file placement. The graph compiler receives the same canonical declarations as before. + +**Independent evolution, testing, failure, and replacement:** current metadata and graph contracts remain unchanged. An invalid candidate publishes no partial registration. Application reading and authoring permission do not broaden. No authority is inferred from cached projections. + +**Deletion and cumulative machinery result:** a new registration service, dynamic filesystem editor or graph-inference layer can be omitted entirely. The batch staging is required to keep final-candidate identity/scope validation independent of input order. A shared sidecar helper avoids duplicated registration representation. + +**Necessary complexity and containment:** one edit variant, one bounded projection phase, existing analysis selection, generated projections and regression tests. Existing storage, generic graph, purpose filtering and review lifecycle remain untouched. File counts and commit counts do not drive decomposition. + +## Milestones + +### M1 — Implement the complete authoring transition + +**Status:** `Implemented`. **Goal:** registration is expressible and composes correctly through the current owner and contract. + +Allowed production files: +- `tools/standards_engine/standards_engine/logical_authoring.py` +- `tools/standards_engine/contracts/a1-contract.schema.json` +- `tools/standards_engine/contracts/a1-interface.toml` +- `tools/standards_engine/standards_engine/_generated_contract.py` (generator output) +- `tools/standards_engine/contracts/generated/agent-tools.json` (generator output) + +Allowed verification and technical handoff files: +- `tools/standards_engine/tests/test_policy_registration.py` +- `tools/standards_engine/tests/test_registration_contract.py` +- `tools/standards_engine/contracts/examples/a1-examples.json` (authored contract fixture) +- `tools/standards_engine/tests/mcp_policy_registration_client.py` +- `tools/standards_engine/tests/codex_navigation_client.py` only if its declared edit catalog needs updating +- `.agents/skills/standards-engine/references/authoring.md` +- `tools/standards_engine/PURPOSE-SEPARATION.md` +- `docs/guides/positive-guidance-and-provenance.md` (H0 capability clarification only) +- this plan directory and its evidence +- the canonical suite-input manifest only through its owning generator when a full checkout is available + +Preserve prior operations, existing policy identities/tombstones, prose, review obligations, current-only runtime and durable stores. Prove decoder agreement, both existing-module cases, same-candidate rewrite/relationships/provenance, rejection/atomicity and replay. Repair failures within this decision boundary. Replan for a different ownership model, broader identity semantics, a persisted-format change or evidence that the selected operation cannot express the blocker. + +### M2 — Qualify and hand off + +**Status:** `Blocked`. **Goal:** prove source and consumer behavior at their actual boundaries and provide a safe patch package. + +Write set: M1 corrective changes, evidence/plan lifecycle, package manifest and delivery instructions outside the repository. Run available focused checks; run full-checkout logical/contract/package suites and real MCP publication when dependencies are present. Bind each result to the actual source and environment. Report missing environmental evidence explicitly rather than treating an isolated test as installed acceptance. Provide complete changed files and a base-bound patch, hashes, plan, tests and installation/resume instructions. No push, production publication, live proposal mutation or store reset is part of delivery. + +## Objective Acceptance + +| ID | Observable criterion | Kind | Environment | Mode | Status | Evidence | +| --- | --- | --- | --- | --- | --- | --- | +| R1 | Current schema and generated models admit the new edit and reject malformed declarations; projections are current. | contract | not-applicable | automated | satisfied | [Contract evidence](reports/verification.md) | +| R2 | Existing standards with zero or other units retain prose, identities and tombstones after registration. | integration | representative | automated | blocked | Canonical metadata/compiler run requires a full checkout; isolated owner probes are supporting only. | +| R3 | Same-candidate rewrite, registrations, relationships and provenance resolve correctly independent of edit ordering. | integration | representative | automated | blocked | Complete authority compiler is unavailable locally. | +| R4 | Invalid candidates preserve accepted and predecessor state; full replay and incremental construction agree. | integration | representative | automated | blocked | Full compiler/replay regressions are supplied but unexecuted. | +| R5 | Real MCP discovers, authors, resolves, reviews, publishes, restarts and reads the registration in an isolated repository. | system | required-real | automated | blocked | Full checkout, supported locked interpreter and actual client processes are required. | +| R6 | ZIP patch reproduces the intended changed-file tree and excludes real normative content and the external proposal store. | release-artifact | not-applicable | automated | satisfied | [Package round-trip evidence](reports/verification.md) | + +For R2–R4 use the canonical metadata, graph, analysis and logical compiler in a supported Python 3.11/3.12 environment. R5 additionally uses the existing official MCP SDK qualification environment, actual local subprocesses, Git and SQLite. The available Python 3.13 observations do not qualify that installed environment. + +## Blockers + +A complete Git checkout and supported locked runtime are unavailable here. Direct source download is unavailable and the recovered source omits modules needed by Engine startup. This blocks R2–R5; it does not turn the passed contract/isolated checks into acceptance. The installed user store and proposal are outside this environment. + +## Re-Plan Triggers + +A required operation or invariant that cannot be expressed with these owners triggers a design update. Local test failures trigger repair while the contract remains valid. New unrelated code quality findings are recorded with owner and revisit trigger rather than expanding scope. + +## Evidence And Oracle Plan + +Add the regression before production changes and show that the baseline rejects the new edit. Derive focused expectations from the intended behavior, not copied generated outputs. Validate runtime and schema separately. Use a full-checkout MCP client to exercise actual publication, with explicit fixture decisions confined to disposable test repositories. + +The plan is `Accepted` only when all required claims have matching evidence. Source implementation can be delivered as `Implemented`/`Verifying` with environment-gated evidence explicitly outstanding. Resume the preserved content proposal only after installing the candidate, refreshing the MCP contract and satisfying H0. Earlier Core text/review evidence remains historical evidence; the revised candidate receives the affected current review rather than inheriting old readiness. + +## Systemic Finding Audit + +The bounded invariant family is explicit policy identity authoring through the public logical-edit contract. Inspect the parser, registration representation, projection ordering, semantic/coverage inputs, generated schemas, proposal consumers and actual MCP path. The missing operation spans these projections of one owner; it is not evidence that all standards or graph mechanisms need redesign. + +The new edit reuses the existing declaration/metadata authority and the existing authoring lifecycle. Sibling creation, revision and retirement operations establish preserved contracts; only the shared tombstone-sidecar reuse case needed a corrective change. Generated outputs come from the existing compiler. Code inspection and isolated observations support the composition, while full consumer acceptance remains blocked. Stop expansion when these named consumers are qualified or a specific new consequence changes scope. + +## Version And Material Boundaries + +The interface edition advances from 32 to 33 because the public edit vocabulary expands. Analysis request 6, result/state 7, Snapshot, proposal and SQLite formats remain unchanged: their meanings were not replaced. A server restart is required to obtain its newly installed catalog. There is one current decoder, with no compatibility branch, dual write or automatic store migration. + +Canonical policy identity/scope belongs to metadata; edit intent and atomic staging belong to logical authoring; generation transports the schema. Adding a registration changes its declaration, module mapping and review inputs. It does not automatically approve coverage, rewrite a provenance history or revive retired identities. Existing proposal text and review evidence remain available subject to ordinary stale-state rules; old readiness does not authorize changed material. + +## Repository Isolation + +All work occurs in a disposable partial reconstruction under `/mnt/data/policy-registration-work`. It is not the user's checkout or installed MCP store. ZIP integration is owned by the user's repository integrator. No upstream branch, remote, live proposal, shared history or user workspace is modified. Temporary repositories used to prove patch application contain only package-selected fixture files and confer no upstream commit identity. + +## Final Acceptance + +- Acceptance status: `blocked`. +- Source status: `Implemented`; the new contract, projection, tests and technical handoff are supplied. +- Deferred independent feature work: `none`. +- Required outstanding work: canonical full-checkout/replay tests, generated suite-input refresh, structural checks and actual MCP publication qualification. +- Final plan status: `Verifying`. Accept after R1–R6 are satisfied; the content guide's H0 remains closed until then. diff --git a/docs/plans/existing-policy-registration/reports/verification.md b/docs/plans/existing-policy-registration/reports/verification.md new file mode 100644 index 00000000..da99e775 --- /dev/null +++ b/docs/plans/existing-policy-registration/reports/verification.md @@ -0,0 +1,89 @@ +# Existing-Policy Registration — Implementation And Verification + +**Source implementation:** delivered. +**Objective acceptance:** blocked on complete-checkout and installed-boundary evidence. +**Date:** September 24, 2026. +**Upstream baseline:** `5a9dcb08effda50a485e6ae08d9fe4c349c74eda`, branch `implementation/purpose-separated-standards-engine`. + +## Full-checkout integration qualification + +The delivered patch was applied to the complete local checkout on the same implementation branch. The archive integrity and patch hash matched its manifest, `git apply --check` succeeded, and only the declared patch files were staged. A Python 3.12.3 environment with the repository's locked contract dependencies ran the new contract tests (8 passed), the new full-compiler registration tests (14 passed), and the focused logical-authoring (31), metadata (43), policy-impact (10), contracts (52), and analysis (114) suites successfully. Canonical public-contract projection freshness passed. + +The temporary-store repository verification refreshed the tracked `suite-inputs.json` through its owner and passed 73 suites and 121 structural checks. The manifest diff contains the expected changed contract/source digests and repository-index digest. A precommit run of the full Engine suite passed 280 of 281 tests. Its sole failure was `test_main_advancement_and_cold_historical_read_use_exact_captures`: that fixture clones committed `HEAD`, then copies the new contract files from the working tree, leaving the clone's committed verification manifest stale. Recheck this case after committing the candidate, as the package's application instructions require. + +The official MCP SDK client walkthrough has not run in this checkout. The available Python environments do not contain the `mcp` client package, and a download attempt failed DNS resolution. This qualification has not opened the installed proposal store or published real standards content. + +## Implemented behavior + +The current logical-edit contract includes `register-policy-unit`. It accepts an existing canonical standard ID and the existing `NewPolicyUnit` declaration. The parser freezes the declaration into the normal logical-edit representation and uses the policy identity as its conflict facet. + +The compiler performs module and existing-policy edits before a grouped registration phase, then resolves consumer relationships and final supporting content. It uses the existing sidecar renderer, registry writer and canonical corpus validator. Existing module bytes are untouched by registration alone. Registered sidecars with only tombstones are reusable without deleting their retired records. New primary identities and aliases cannot claim a canonical module identity; existing policy/tombstone reservations and the canonical validator remain authoritative. + +New identities enter semantic analysis as additions at revision one, with explicit intent and the containing module selected for analysis. Coverage is not automatically certified. Existing proposal storage, immutable snapshots, publication, purpose filtering and full/incremental replay mechanisms remain the owners of their current guarantees. + +Interface edition 33 replaces edition 32 for discovery of the expanded edit vocabulary. Analysis request 6 and result/state 7 remain unchanged. No alternate decoder, compatibility shim, database reset or persisted-format conversion was added. The current generated Python and tool schemas were produced by the existing contract compiler. + +Technical authoring documentation and the guide's H0 handoff now explicitly include registration within existing modules. The rest of the standards-content migration remains separate. This source package does not certify H0: actual consumer qualification below is still required. + +## Source and environment boundary + +Direct repository download was unavailable. Source was reconstructed from existing delivery archives and a small number of retrieved baseline files. Before editing, each of the nine existing files included in the patch was checked against its published Git blob identity at the baseline. All matched. New files are the plan/evidence and feature tests. No recovered dependency file is distributed as a feature change. + +The reconstruction is **not a complete Git checkout**. It lacks the graph engine and other unchanged packages required to import the Standards Engine. The available interpreter is Python 3.13.5, outside the repository's supported locked 3.11/3.12 qualification environment. The actual installed MCP server and user proposal database are not accessible here. + +The blocked proposal `503f233b-5c9f-442f-a04f-99f330142bae` was never opened, edited, published or reset. No real normative body, policy-unit declaration, consumer relationship or application exposure approval was changed. No upstream commit or push is claimed. + +## Executed evidence + +| Observation | Result | Proof boundary | +| --- | --- | --- | +| Baseline JSON Schema validation of the proposed new edit, before production edits | Rejected as unsupported by the existing `StandardEdit` union | Reproduces the missing public contract; not an MCP process test. | +| Existing contract/compiler suites available in the recovered source | 14 tests passed | Canonical schema compilation, validation and projection behavior. This is the available subset, not a claim about every upstream test. | +| New `test_registration_contract.py` | 8 tests passed | Proposal reachability, generated model ownership/roundtrip, required/closed fields, revision and scope constraints, authored examples and projection freshness. | +| Existing canonical projection generator and `--check` | Passed | Both generated artifacts agree with their source schema/interface. Baseline generation also reproduced both original generated files exactly. | +| Isolated owner-mechanism probe | 9 checks passed | Selected real function bodies exercise registration staging, sidecar reuse/tombstones, reservation checks, ordering and error propagation. Metadata compilation and transport are explicitly substituted or excluded. | +| Python compilation and supported-grammar parsing | Passed for changed Python files | Syntax only; imports and supported-environment execution remain separate. | +| Full registration integration suite invocation | Blocked during import: `ModuleNotFoundError: No module named 'tools.graph_engine'` | No canonical metadata/compiler integration test ran. The collection error is not a test pass. | +| Base-file Git identities | All nine existing patch inputs match the published baseline | Exact changed-file provenance, not completeness of the recovered repository. | +| Patch round trip, changed-file hashes and ZIP integrity | Passed | A disposable index of the exact baseline inputs accepts the patch and reproduces every packaged replacement/addition. | + +The isolated probe lives in the delivery's `verification/` area rather than the repository's test discovery. It extracts selected function bodies from the actual source and supplies a bounded model at missing imports. It is retained to make the experiment inspectable. It neither reimplements nor verifies the canonical metadata validator, graph, manifest generator, analysis, storage, MCP or full logical compiler. Its nine observations are not added to a claim that the full Engine suite passed. + +Executed commands used the available interpreter and recovered source: + +```bash +PYTHONPATH=. python -m unittest discover -s tools/standards_contracts/tests +PYTHONPATH=. python -m unittest discover -s tools/standards_engine/tests -p test_registration_contract.py -v +PYTHONPATH=. python -m tools.standards_contracts.standards_contracts.projection --check +python isolated_registration_probe.py /path/to/recovered/source +``` + +Raw outputs, baseline rejection, and the one-off probe are included in the ZIP's `verification/` directory. The full-checkout attempt is retained separately from successful logs. + +## Supplied but unexecuted acceptance coverage + +`test_policy_registration.py` contains fourteen integration cases using the existing real compiler/capture fixture. It starts from an already-created module so registration is actually against existing authority. It covers empty and populated policy mappings, unchanged prose/aliases, multiple registrations, same-candidate rewrite and relationships/provenance, tombstone-only owners, unavailable/reserved identities, scope/alias/lineage rejection, failed candidate isolation, mutation resistance and full/incremental replay equivalence. + +`mcp_policy_registration_client.py` extends the existing official SDK qualification approach. It creates and publishes synthetic owners in a disposable repository, registers a policy in an accepted previously unmapped owner, resumes that pending workflow after process replacement, then registers another scope alongside a rewrite, consumer relationship and provenance. It includes explicit fixture coverage/consumer/impact decisions, reviewed publication, a rejected successor preserving its predecessor, cold historical/current readback and application-purpose rationale isolation. The harness has no option for selecting the user's real repository/store as its mutation target. + +Neither file has been runtime-qualified in this environment. Their Python syntax is checked. Run them with the full source and supported environments before claiming the blocker resolved end to end. A future failure requires an ordinary bounded repair; a syntax pass is not a substitute for that execution. + +## Generated verification inputs + +The repository's complete `suite-inputs.json` manifest was deliberately **not** regenerated from a partial tree or manually edited. The schema's generated Python and tool definitions are included and current. The full verification-input manifest must be regenerated through its existing owner in the complete checkout, after adding these new files to its tracked membership. The package's application instructions show a temporary-store native invocation so this does not require opening the preserved production proposal store. + +The complete structural checkpoint, full package suites, official MCP walkthrough, installed Codex catalog and any independent external code review remain outstanding. This report is an implementation/self-review record, not independent acceptance. + +## Material self-review + +The source diff was reviewed for one semantic owner per concern, explicit canonical identity rather than paths, absence of Core-specific branches, immutable program payloads, deterministic group staging, reserved identities, preservation of existing declarations, one-source generated contracts, original-base semantic intent and absence of new persistence authority. The sidecar reuse repair was kept inside the existing helper because both registration and existing movement use its owner contract. + +The added public operation is intentionally a logical edit within `propose`/`revise`, not a new MCP tool or a general file-edit escape path. The unchanged Codex catalog harness discovers edit variants from the canonical union, so no hard-coded variant-count patch is necessary. The new handoff requirement asks for the actual existing-owner transition, not merely successful creation of a new standard containing initial policies. + +## Integration and resume boundary + +Apply the patch to a reviewed local code branch, refresh the verification-input projection with a temporary verification store, and run the supplied full-checkout tests. Commit the candidate before the SDK walkthrough clones it. Integrate the qualified code using the repository's normal process, then restart the server and refresh the client catalog for interface 33. + +Read the preserved proposal's actual state through supported authoring operations. `workflow_status` reconstructs its exact context; `resume` selects its explicit current revision where needed. It does not rebase the original accepted source. A changed accepted base may require the Engine's supported stale-state disposition or a new proposal carrying the preserved draft/evidence against current authority. Keep the original records and follow returned decisions rather than editing stored bytes. + +Reanalyze the candidate containing the new registrations/relationships. The previous Core wording review remains useful historical evidence; it is not automatic readiness for a changed candidate. Resume standards publication only after the missing handoff claim is actually satisfied. diff --git a/evaluation/standards-effectiveness/generated/suite-inputs.json b/evaluation/standards-effectiveness/generated/suite-inputs.json index b4e38558..3e632924 100644 --- a/evaluation/standards-effectiveness/generated/suite-inputs.json +++ b/evaluation/standards-effectiveness/generated/suite-inputs.json @@ -6905,7 +6905,7 @@ ] }, { - "digest": "sha256:f72b766a17224da7599267e47a9d40e25a15e2b4b1dd8c2a846dd2e167979c02", + "digest": "sha256:6856c158929e7065e75f5ed340cce525eafe1270ecde291b4bf9e7dbaa5f9c63", "path": "tools/standards_engine/contracts/a1-contract.schema.json", "state": "present", "uses": [ @@ -6922,7 +6922,7 @@ ] }, { - "digest": "sha256:e7bdf6aff70f72506955a902de1ffb829762bf8b37003d20f2bff5a110c024f2", + "digest": "sha256:1430092f0624180829df0545890ebe9319ca0fe5edcc11ccb1c0b2c20d88242d", "path": "tools/standards_engine/contracts/a1-interface.toml", "state": "present", "uses": [ @@ -6939,7 +6939,7 @@ ] }, { - "digest": "sha256:4b6a6a9bec925e778d0d34919233a03011221d200872f42e2ce4698c2fa4791f", + "digest": "sha256:1e942ce60dacb00694b2991f959741bdc3ea1477ed8e4b8da6e3e4c96633d8f5", "path": "tools/standards_engine/contracts/examples/a1-examples.json", "state": "present", "uses": [ @@ -6956,7 +6956,7 @@ ] }, { - "digest": "sha256:f4739057451b802feac32c05f64e7f4d3ac918fdc643609fb9f1d5c99dc2943a", + "digest": "sha256:dfdb04014603f07e827e788f06ee21600b86d3367c70f0a4ccbfd0b985797d9e", "path": "tools/standards_engine/contracts/generated/agent-tools.json", "state": "present", "uses": [ @@ -7019,7 +7019,7 @@ ] }, { - "digest": "sha256:b023eeef004835e52ab836d27f435dfef6a0d783957fc956857e1140f4c2d213", + "digest": "sha256:79745695054664b96f17eae432509e6250ea0c4e7f1d2905cf7b3431a0290823", "path": "tools/standards_engine/standards_engine/_generated_contract.py", "state": "present", "uses": [ @@ -7135,7 +7135,7 @@ ] }, { - "digest": "sha256:3593999d7823cecb4e4e87403052ec7e1e84e3b982cad28fc43319fdee875f5f", + "digest": "sha256:c13c22e0612adcabcc7c185964ba5641c5e545e16a4792d5fe3b62cdd818537f", "path": "tools/standards_engine/standards_engine/logical_authoring.py", "state": "present", "uses": [ @@ -13326,7 +13326,7 @@ "path": "evaluation/standards-effectiveness/suite-registry.toml" }, "repository_index": { - "digest": "sha256:3817f1cc9e0eb5ff9d5c828a7dcbf684c428726bfc88c29facbb4825fadbeb00", + "digest": "sha256:ae569bce7aa23d04cf81d33e83815a0b7b417f798d677e31641ec716c67f1ccc", "uses": [ { "check": "python-package-contract", diff --git a/tools/standards_engine/PURPOSE-SEPARATION.md b/tools/standards_engine/PURPOSE-SEPARATION.md index e469cb37..a24f836e 100644 --- a/tools/standards_engine/PURPOSE-SEPARATION.md +++ b/tools/standards_engine/PURPOSE-SEPARATION.md @@ -281,6 +281,7 @@ the current generated schema; this table is a navigation aid, not a validator. | Read a complete owner or scoped policy | Authoring `read`; inspect metadata/relationships as needed | | Revise module body and metadata | `revise-standard` | | Relocate/rescope registered headings in a full rewrite | `revise-standard.scope_updates`, with all existing scope identities and explicit semantics | +| Register a selected scope within an existing owner | `register-policy-unit`, using the existing canonical module ID and a new policy declaration | | Revise one policy scope | `revise-policy-unit` | | Create/revise a supplementary reference | `create-standard` / `revise-standard` with the existing reference role | | Inspect an existing registered prompt/template | Authoring `read` returns its opaque target handle | @@ -295,6 +296,19 @@ the current generated schema; this table is a navigation aid, not a validator. | Inspect a draft | Authoring `query_proposal` against its exact revision | | Publish the reviewed candidate | Existing explicit `review`, then `apply`; follow `recover` on recovery-required | +Existing-owner registration supports modules with zero or more registered +policies. It preserves existing prose and declarations, and can follow a +whole-module rewrite in the same candidate. New scopes are selected explicitly; +module and existing-policy edits precede the registration group, then consumer +relationships resolve against the completed registry. Existing canonical scope, +identity and lifecycle validation applies. Registration alone issues no coverage +certificate. The same logical program is replayed after restart or through an +eligible incremental successor; storage and handle editions are unchanged. + +The [registration qualification plan](../../docs/plans/existing-policy-registration/plan.md) +tracks the current source correction and its outstanding full-checkout/MCP +acceptance. Interface 33 availability does not by itself certify that qualification. + The Engine resolves unordered same-change-set references against the final candidate. It stages retirement and withdrawal privately before dependent owner changes, computes approval/provenance bindings after material edits, and validates @@ -311,7 +325,7 @@ those same bytes. The Engine does not rewrite semantic versions after review. ## Versions and coordinated cutover -Current Engine package/transport implementation: 0.2.0. Engine interface: 32. +Current Engine package/transport implementation: 0.2.0. Engine interface: 33. Analysis request: 6; result/state and Analysis handles: 7. The semantic-revision interpretation change belongs to Analysis 7. Unchanged Snapshot, proposal, readiness, application and generic identity/storage contracts keep their diff --git a/tools/standards_engine/contracts/a1-contract.schema.json b/tools/standards_engine/contracts/a1-contract.schema.json index 355665ad..6272acc4 100644 --- a/tools/standards_engine/contracts/a1-contract.schema.json +++ b/tools/standards_engine/contracts/a1-contract.schema.json @@ -2259,6 +2259,27 @@ }, "additionalProperties": false }, + "RegisterPolicyUnitEdit": { + "type": "object", + "description": "Register an explicitly selected policy scope in an existing standard. The Engine owns declaration placement and validates the final candidate.", + "required": [ + "kind", + "standard", + "policy_unit" + ], + "properties": { + "kind": { + "const": "register-policy-unit" + }, + "standard": { + "$ref": "#/$defs/CanonicalId" + }, + "policy_unit": { + "$ref": "#/$defs/NewPolicyUnit" + } + }, + "additionalProperties": false + }, "ReviseStandardEdit": { "type": "object", "required": [ @@ -2690,6 +2711,9 @@ { "$ref": "#/$defs/CreateStandardEdit" }, + { + "$ref": "#/$defs/RegisterPolicyUnitEdit" + }, { "$ref": "#/$defs/ReviseStandardEdit" }, diff --git a/tools/standards_engine/contracts/a1-interface.toml b/tools/standards_engine/contracts/a1-interface.toml index d0227d97..a27d91cb 100644 --- a/tools/standards_engine/contracts/a1-interface.toml +++ b/tools/standards_engine/contracts/a1-interface.toml @@ -1,5 +1,5 @@ schema_version = 1 -interface_schema_version = 32 +interface_schema_version = 33 request_contract_version = 6 result_projection_version = 7 diff --git a/tools/standards_engine/contracts/examples/a1-examples.json b/tools/standards_engine/contracts/examples/a1-examples.json index ce0327be..73dff34c 100644 --- a/tools/standards_engine/contracts/examples/a1-examples.json +++ b/tools/standards_engine/contracts/examples/a1-examples.json @@ -1,6 +1,6 @@ { "schema_version": 2, - "interface_schema_version": 32, + "interface_schema_version": 33, "examples": [ { "name": "create-snapshot", @@ -729,6 +729,25 @@ } ] } + }, + { + "name": "register-existing-policy-unit", + "definition": "RegisterPolicyUnitEdit", + "value": { + "kind": "register-policy-unit", + "standard": "topic.contracts", + "policy_unit": { + "id": "topic.contracts.registration-example", + "heading_chain": [ + "Example Scope" + ], + "semantic_revision": 1, + "intent": "Give the explicitly selected existing scope a stable review identity.", + "aliases": [], + "predecessors": [], + "successors": [] + } + } } ] } diff --git a/tools/standards_engine/contracts/generated/agent-tools.json b/tools/standards_engine/contracts/generated/agent-tools.json index 1621ea2c..805c72d8 100644 --- a/tools/standards_engine/contracts/generated/agent-tools.json +++ b/tools/standards_engine/contracts/generated/agent-tools.json @@ -5486,6 +5486,27 @@ ], "type": "object" }, + "RegisterPolicyUnitEdit": { + "additionalProperties": false, + "description": "Register an explicitly selected policy scope in an existing standard. The Engine owns declaration placement and validates the final candidate.", + "properties": { + "kind": { + "const": "register-policy-unit" + }, + "policy_unit": { + "$ref": "#/$defs/NewPolicyUnit" + }, + "standard": { + "$ref": "#/$defs/CanonicalId" + } + }, + "required": [ + "kind", + "standard", + "policy_unit" + ], + "type": "object" + }, "RejectedResult": { "additionalProperties": false, "properties": { @@ -6813,6 +6834,9 @@ { "$ref": "#/$defs/CreateStandardEdit" }, + { + "$ref": "#/$defs/RegisterPolicyUnitEdit" + }, { "$ref": "#/$defs/ReviseStandardEdit" }, @@ -7314,7 +7338,7 @@ "type": "object" } }, - "interface_schema_version": 32, + "interface_schema_version": 33, "operations": [ { "capability": "standards.snapshot.create", diff --git a/tools/standards_engine/standards_engine/_generated_contract.py b/tools/standards_engine/standards_engine/_generated_contract.py index aa0605f8..598f3e22 100644 --- a/tools/standards_engine/standards_engine/_generated_contract.py +++ b/tools/standards_engine/standards_engine/_generated_contract.py @@ -14,8 +14,8 @@ model_as_contract, ) -_SCHEMA = json.loads('{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"https://coding-standards.local/contracts/standards-engine/a2-v32","title":"Standards Engine A2 contract","description":"Canonical typed contract for snapshot lifecycle, controlled authoring, navigation, inspection, and immutable standards-change analysis.","oneOf":[{"$ref":"#/$defs/AgentRouteResult"},{"$ref":"#/$defs/AnalyzeCall"},{"$ref":"#/$defs/AnalyzeProposalCall"},{"$ref":"#/$defs/ApplicationInspectCall"},{"$ref":"#/$defs/ApplicationQueryCall"},{"$ref":"#/$defs/ApplicationReadCall"},{"$ref":"#/$defs/ApplicationReadManyCall"},{"$ref":"#/$defs/ApplicationReadManyResult"},{"$ref":"#/$defs/ApplicationReadResult"},{"$ref":"#/$defs/ApplicationRecoveryRequiredResult"},{"$ref":"#/$defs/ApplicationRejectedResult"},{"$ref":"#/$defs/ApplicationRelatedResult"},{"$ref":"#/$defs/ApplicationRouteResult"},{"$ref":"#/$defs/ApplicationRoutingFactsResult"},{"$ref":"#/$defs/ApplyCall"},{"$ref":"#/$defs/ApplyProposalCall"},{"$ref":"#/$defs/ApplyProposalResult"},{"$ref":"#/$defs/CompactReadResult"},{"$ref":"#/$defs/CompleteResult"},{"$ref":"#/$defs/CreateProposalCall"},{"$ref":"#/$defs/CreateProposalResult"},{"$ref":"#/$defs/CreateSnapshotCall"},{"$ref":"#/$defs/CreateSnapshotResult"},{"$ref":"#/$defs/DeleteSnapshotCall"},{"$ref":"#/$defs/DeleteSnapshotResult"},{"$ref":"#/$defs/FindProposalsCall"},{"$ref":"#/$defs/FindProposalsResult"},{"$ref":"#/$defs/FindSnapshotsCall"},{"$ref":"#/$defs/FindSnapshotsResult"},{"$ref":"#/$defs/InspectCall"},{"$ref":"#/$defs/InspectionResult"},{"$ref":"#/$defs/MaintainEvidenceCall"},{"$ref":"#/$defs/MaintainEvidenceResult"},{"$ref":"#/$defs/NavigationIndexesResult"},{"$ref":"#/$defs/OperationalReadResult"},{"$ref":"#/$defs/PendingResult"},{"$ref":"#/$defs/PrepareCall"},{"$ref":"#/$defs/ProposeCall"},{"$ref":"#/$defs/ProvenanceReadResult"},{"$ref":"#/$defs/QueryCall"},{"$ref":"#/$defs/QueryProposalCall"},{"$ref":"#/$defs/QueryProposalResult"},{"$ref":"#/$defs/QueryResult"},{"$ref":"#/$defs/ReadCall"},{"$ref":"#/$defs/ReadManyCall"},{"$ref":"#/$defs/ReadManyResult"},{"$ref":"#/$defs/ReadResult"},{"$ref":"#/$defs/RecoverApplicationCall"},{"$ref":"#/$defs/RecoverApplicationResult"},{"$ref":"#/$defs/RecoverCall"},{"$ref":"#/$defs/RejectedResult"},{"$ref":"#/$defs/RelatedCall"},{"$ref":"#/$defs/RelatedResult"},{"$ref":"#/$defs/ResolveCall"},{"$ref":"#/$defs/ResolveWorkflowCall"},{"$ref":"#/$defs/ResumeCall"},{"$ref":"#/$defs/ReviewCall"},{"$ref":"#/$defs/ReviewProposalCall"},{"$ref":"#/$defs/ReviewProposalResult"},{"$ref":"#/$defs/ReviseCall"},{"$ref":"#/$defs/ReviseProposalCall"},{"$ref":"#/$defs/ReviseProposalResult"},{"$ref":"#/$defs/RouteCall"},{"$ref":"#/$defs/RoutingFactsCall"},{"$ref":"#/$defs/RoutingFactsResult"},{"$ref":"#/$defs/UndeleteSnapshotCall"},{"$ref":"#/$defs/UndeleteSnapshotResult"},{"$ref":"#/$defs/VerifyProposalCall"},{"$ref":"#/$defs/VerifyProposalResult"},{"$ref":"#/$defs/VerifyRepositoryCall"},{"$ref":"#/$defs/VerifyRepositoryResult"},{"$ref":"#/$defs/WorkflowResult"},{"$ref":"#/$defs/WorkflowStatusCall"}],"$defs":{"NonEmptyString":{"type":"string","minLength":1},"CanonicalId":{"type":"string","pattern":"^[A-Za-z0-9][A-Za-z0-9._:/-]*$"},"EdgeId":{"type":"string","minLength":1},"Digest":{"type":"string","pattern":"^sha256:[0-9a-f]{64}$"},"ObligationId":{"type":"string","pattern":"^obligation:sha256:[0-9a-f]{64}$"},"ImpactTraceId":{"type":"string","pattern":"^impact-trace:sha256:[0-9a-f]{64}$"},"FactRequirementId":{"type":"string","pattern":"^fact-requirement:sha256:[0-9a-f]{64}$"},"ScalarValue":{"oneOf":[{"type":"boolean"},{"type":"integer"},{"type":"string"},{"type":"null"}]},"FactValue":{"oneOf":[{"type":"object","required":["type","state","value"],"properties":{"type":{"const":"boolean"},"state":{"const":"known"},"value":{"type":"boolean"}},"additionalProperties":false},{"type":"object","required":["type","state","value"],"properties":{"type":{"enum":["boolean","enum","string","string-set","enum-set","canonical-id"]},"state":{"const":"known"},"value":{"type":"null"}},"additionalProperties":false},{"type":"object","required":["type","state","value"],"properties":{"type":{"enum":["enum","string","canonical-id"]},"state":{"const":"known"},"value":{"type":"string"}},"additionalProperties":false},{"type":"object","required":["type","state","value"],"properties":{"type":{"enum":["string-set","enum-set"]},"state":{"const":"known"},"value":{"type":"array","items":{"type":"string"},"uniqueItems":true}},"additionalProperties":false},{"type":"object","required":["type","state"],"properties":{"type":{"enum":["boolean","enum","string","string-set","enum-set","canonical-id"]},"state":{"enum":["known-absent","unknown"]}},"additionalProperties":false}]},"FactSet":{"type":"object","additionalProperties":{"$ref":"#/$defs/FactValue"}},"StructuredScope":{"type":"object","required":["kind","heading_path"],"properties":{"kind":{"const":"structured"},"heading_path":{"type":"array","minItems":1,"items":{"$ref":"#/$defs/NonEmptyString"}}},"additionalProperties":false},"WholeArtifactScope":{"type":"object","required":["kind"],"properties":{"kind":{"const":"whole-artifact"}},"additionalProperties":false},"ReviewScope":{"oneOf":[{"$ref":"#/$defs/StructuredScope"},{"$ref":"#/$defs/WholeArtifactScope"}]},"AllExpression":{"type":"object","required":["operator","expressions"],"properties":{"operator":{"const":"all"},"expressions":{"type":"array","minItems":1,"items":{"$ref":"#/$defs/ApplicabilityExpression"}}},"additionalProperties":false},"AnyExpression":{"type":"object","required":["operator","expressions"],"properties":{"operator":{"const":"any"},"expressions":{"type":"array","minItems":1,"items":{"$ref":"#/$defs/ApplicabilityExpression"}}},"additionalProperties":false},"NotExpression":{"type":"object","required":["operator","expression"],"properties":{"operator":{"const":"not"},"expression":{"$ref":"#/$defs/ApplicabilityExpression"}},"additionalProperties":false},"EqualsExpression":{"type":"object","required":["operator","fact","value"],"properties":{"operator":{"const":"equals"},"fact":{"$ref":"#/$defs/CanonicalId"},"value":{"$ref":"#/$defs/ScalarValue"}},"additionalProperties":false},"InExpression":{"type":"object","required":["operator","fact","values"],"properties":{"operator":{"const":"in"},"fact":{"$ref":"#/$defs/CanonicalId"},"values":{"type":"array","minItems":1,"uniqueItems":true,"items":{"$ref":"#/$defs/ScalarValue"}}},"additionalProperties":false},"ContainsExpression":{"type":"object","required":["operator","fact","value"],"properties":{"operator":{"const":"contains"},"fact":{"$ref":"#/$defs/CanonicalId"},"value":{"$ref":"#/$defs/ScalarValue"}},"additionalProperties":false},"ExistsExpression":{"type":"object","required":["operator","fact"],"properties":{"operator":{"const":"exists"},"fact":{"$ref":"#/$defs/CanonicalId"}},"additionalProperties":false},"AlwaysExpression":{"type":"object","required":["operator"],"properties":{"operator":{"const":"always"}},"additionalProperties":false},"ApplicabilityExpression":{"oneOf":[{"$ref":"#/$defs/AlwaysExpression"},{"$ref":"#/$defs/AllExpression"},{"$ref":"#/$defs/AnyExpression"},{"$ref":"#/$defs/NotExpression"},{"$ref":"#/$defs/EqualsExpression"},{"$ref":"#/$defs/InExpression"},{"$ref":"#/$defs/ContainsExpression"},{"$ref":"#/$defs/ExistsExpression"}]},"GeneralSelectionReason":{"type":"object","required":["kind"],"properties":{"kind":{"enum":["routing-fact","requires","specializes","changed-policy","question","audit-coverage","unmapped-normative-change","structured-scope-analysis-unsupported","navigation-index-change","supporting-content-change"]},"source":{"$ref":"#/$defs/CanonicalId"},"fact":{"$ref":"#/$defs/CanonicalId"},"edge":{"$ref":"#/$defs/EdgeId"},"question":{"$ref":"#/$defs/CanonicalId"}},"additionalProperties":false},"PolicyImpactSelectionReason":{"type":"object","required":["kind","source","edge","relation","evidence_owner","traces"],"properties":{"kind":{"const":"policy-impact-edge"},"source":{"$ref":"#/$defs/CanonicalId"},"edge":{"$ref":"#/$defs/EdgeId"},"relation":{"$ref":"#/$defs/CanonicalId"},"evidence_owner":{"$ref":"#/$defs/CanonicalId"},"traces":{"type":"array","minItems":1,"uniqueItems":true,"items":{"$ref":"#/$defs/ImpactTraceReference"}}},"additionalProperties":false},"SelectionReason":{"oneOf":[{"$ref":"#/$defs/GeneralSelectionReason"},{"$ref":"#/$defs/PolicyImpactSelectionReason"}]},"ImpactTraceReference":{"type":"object","required":["id","graph","applicability"],"properties":{"id":{"$ref":"#/$defs/ImpactTraceId"},"graph":{"enum":["accepted","proposed"]},"applicability":{"enum":["true","false","unknown"]}},"additionalProperties":false},"ConsumerReviewObligationReadingReason":{"type":"object","required":["kind","obligation"],"properties":{"kind":{"const":"consumer-review-obligation"},"obligation":{"$ref":"#/$defs/ObligationId"}},"additionalProperties":false},"RoutingBaseReadingReason":{"type":"object","required":["kind","projection"],"properties":{"kind":{"const":"routing-base"},"projection":{"$ref":"#/$defs/CanonicalId"}},"additionalProperties":false},"RoutingRuleReadingReason":{"type":"object","required":["kind","rule","facts"],"properties":{"kind":{"const":"routing-rule"},"rule":{"$ref":"#/$defs/CanonicalId"},"facts":{"type":"array","uniqueItems":true,"items":{"$ref":"#/$defs/CanonicalId"}}},"additionalProperties":false},"RequiresReadingReason":{"type":"object","required":["kind","edge","source"],"properties":{"kind":{"const":"requires"},"edge":{"$ref":"#/$defs/EdgeId"},"source":{"$ref":"#/$defs/CanonicalId"}},"additionalProperties":false},"SpecializesReadingReason":{"type":"object","required":["kind","edge","source"],"properties":{"kind":{"const":"specializes"},"edge":{"$ref":"#/$defs/EdgeId"},"source":{"$ref":"#/$defs/CanonicalId"}},"additionalProperties":false},"ReadingPlanReason":{"oneOf":[{"$ref":"#/$defs/ConsumerReviewObligationReadingReason"},{"$ref":"#/$defs/RoutingBaseReadingReason"},{"$ref":"#/$defs/RoutingRuleReadingReason"},{"$ref":"#/$defs/RequiresReadingReason"},{"$ref":"#/$defs/SpecializesReadingReason"}]},"ReadingPlanEntry":{"type":"object","required":["target","scope","authority","reasons","state"],"properties":{"target":{"$ref":"#/$defs/CanonicalId"},"scope":{"$ref":"#/$defs/ReviewScope"},"authority":{"enum":["normative","projection","contextual","evidence"]},"reasons":{"type":"array","minItems":1,"uniqueItems":true,"items":{"$ref":"#/$defs/ReadingPlanReason"}},"state":{"enum":["selected","conditional","unresolved"]}},"additionalProperties":false},"RouteRequest":{"type":"object","required":["kind","facts"],"properties":{"kind":{"const":"route"},"facts":{"$ref":"#/$defs/FactSet"}},"additionalProperties":false},"ReadRequest":{"type":"object","required":["kind","target"],"properties":{"kind":{"const":"read"},"target":{"$ref":"#/$defs/CanonicalId"},"include_routing":{"type":"boolean"},"include_coverage":{"type":"boolean","description":"Include current repository attestation status for registered policy units in this read scope."}},"additionalProperties":false},"RelatedRequest":{"type":"object","required":["kind","target","groups","direction","transitive"],"properties":{"kind":{"const":"related"},"target":{"$ref":"#/$defs/CanonicalId"},"groups":{"type":"array","minItems":1,"uniqueItems":true,"items":{"$ref":"#/$defs/CanonicalId"}},"direction":{"enum":["incoming","outgoing","both"]},"transitive":{"type":"boolean","default":false}},"additionalProperties":false},"QueryRequest":{"oneOf":[{"$ref":"#/$defs/RouteRequest"},{"$ref":"#/$defs/ReadRequest"},{"$ref":"#/$defs/RelatedRequest"}]},"PolicyUnitDeclaration":{"type":"object","required":["kind","id","module","heading_path","semantic_revision","lifecycle"],"properties":{"kind":{"const":"policy-unit"},"id":{"$ref":"#/$defs/CanonicalId"},"module":{"$ref":"#/$defs/CanonicalId"},"heading_path":{"type":"array","minItems":1,"items":{"$ref":"#/$defs/NonEmptyString"}},"semantic_revision":{"type":"integer","minimum":1},"lifecycle":{"const":"active"},"aliases":{"type":"array","uniqueItems":true,"items":{"$ref":"#/$defs/CanonicalId"}},"predecessors":{"type":"array","uniqueItems":true,"items":{"$ref":"#/$defs/CanonicalId"}},"successors":{"type":"array","uniqueItems":true,"items":{"$ref":"#/$defs/CanonicalId"}}},"additionalProperties":false},"CanonicalModuleDeclaration":{"type":"object","required":["kind","id","role","level","applies_when","does_not_apply_when","requires","specializes","verification"],"properties":{"kind":{"const":"canonical-module"},"id":{"$ref":"#/$defs/CanonicalId"},"role":{"enum":["core","router","workflow","profile","topic","reference"]},"level":{"enum":["MUST","SHOULD","PROFILE","REFERENCE"]},"applies_when":{"$ref":"#/$defs/NonEmptyString"},"does_not_apply_when":{"$ref":"#/$defs/NonEmptyString"},"requires":{"type":"array","uniqueItems":true,"items":{"$ref":"#/$defs/CanonicalId"}},"specializes":{"type":"array","uniqueItems":true,"items":{"$ref":"#/$defs/CanonicalId"}},"verification":{"$ref":"#/$defs/NonEmptyString"}},"additionalProperties":false},"PolicyRelationshipInspection":{"type":"object","required":["relationship_kind","applicability","source_scope","consumer_scope","propagation","evidence_owner","rationale"],"properties":{"relationship_kind":{"enum":["normative-consumer","router-projection","prompt-projection","template-projection","reference-projection","fixture-projection","enforcement-suite-projection","documentation-projection","implementation-projection"]},"applicability":{"$ref":"#/$defs/ApplicabilityExpression"},"source_scope":{"oneOf":[{"$ref":"#/$defs/ReviewScope"},{"type":"null"}]},"consumer_scope":{"oneOf":[{"$ref":"#/$defs/ReviewScope"},{"type":"null"}]},"propagation":{"const":"source-to-consumer"},"evidence_owner":{"$ref":"#/$defs/CanonicalId"},"rationale":{"$ref":"#/$defs/NonEmptyString"}},"additionalProperties":false},"SemanticProposal":{"type":"object","required":["policy","accepted_semantic_revision","proposed_semantic_revision","intent","structural_digest"],"properties":{"policy":{"$ref":"#/$defs/CanonicalId"},"accepted_semantic_revision":{"oneOf":[{"type":"integer","minimum":1},{"type":"null"}]},"proposed_semantic_revision":{"type":"integer","minimum":1},"intent":{"$ref":"#/$defs/NonEmptyString"},"structural_digest":{"$ref":"#/$defs/Digest"}},"additionalProperties":false},"ChangeDescriptor":{"type":"object","required":["kind","accepted_ids","proposed_ids","scope"],"properties":{"kind":{"enum":["module","modification","addition","removal","move","split","merge","navigation-index","supporting-content"]},"accepted_ids":{"type":"array","uniqueItems":true,"items":{"$ref":"#/$defs/CanonicalId"}},"proposed_ids":{"type":"array","uniqueItems":true,"items":{"$ref":"#/$defs/CanonicalId"}},"scope":{"$ref":"#/$defs/ReviewScope"},"accepted_module":{"$ref":"#/$defs/CanonicalId"},"proposed_module":{"$ref":"#/$defs/CanonicalId"}},"additionalProperties":false},"ChangedPolicyUnit":{"type":"object","required":["policy","change_kind","classification","accepted_representation_digest","proposed_representation_digest","accepted_structural_digest","proposed_structural_digest","accepted_semantic_revision","proposed_semantic_revision","semantic_state","scope"],"properties":{"policy":{"$ref":"#/$defs/CanonicalId"},"change_kind":{"enum":["modification","addition","removal","move","split-predecessor","split-successor","merge-predecessor","merge-successor"]},"classification":{"enum":["unchanged","representation-only-candidate","possibly-semantically-changed","semantically-changed","unresolved"]},"accepted_representation_digest":{"oneOf":[{"$ref":"#/$defs/Digest"},{"type":"null"}]},"proposed_representation_digest":{"oneOf":[{"$ref":"#/$defs/Digest"},{"type":"null"}]},"accepted_structural_digest":{"oneOf":[{"$ref":"#/$defs/Digest"},{"type":"null"}]},"proposed_structural_digest":{"oneOf":[{"$ref":"#/$defs/Digest"},{"type":"null"}]},"accepted_semantic_revision":{"oneOf":[{"type":"integer","minimum":1},{"type":"null"}]},"proposed_semantic_revision":{"oneOf":[{"type":"integer","minimum":1},{"type":"null"}]},"semantic_state":{"enum":["accepted-unchanged","proposed","removed","unresolved"]},"scope":{"$ref":"#/$defs/ReviewScope"}},"additionalProperties":false},"Question":{"type":"object","required":["id","kind","prompt","state","permitted_answers"],"properties":{"id":{"$ref":"#/$defs/CanonicalId"},"kind":{"enum":["applicability-fact","normative-classification","identity-resolution","scope-resolution"]},"prompt":{"$ref":"#/$defs/NonEmptyString"},"state":{"enum":["required","answered","blocked"]},"permitted_answers":{"type":"array","minItems":1,"uniqueItems":true,"items":{"$ref":"#/$defs/NonEmptyString"}}},"additionalProperties":false},"ConsumerReviewContract":{"type":"object","required":["kind","id","version","permitted_dispositions","evidence_contract","authorization_capability","semantics"],"properties":{"kind":{"const":"consumer-review-contract"},"id":{"$ref":"#/$defs/CanonicalId"},"version":{"type":"integer","minimum":1},"permitted_dispositions":{"type":"array","minItems":1,"uniqueItems":true,"items":{"enum":["updated","reviewed-no-change","not-applicable","blocked"]}},"evidence_contract":{"$ref":"#/$defs/CanonicalId"},"authorization_capability":{"$ref":"#/$defs/CanonicalId"},"semantics":{"$ref":"#/$defs/NonEmptyString"}},"additionalProperties":false},"DecisionDependency":{"type":"object","required":["class","identity","digest"],"properties":{"class":{"enum":["policy-unit","semantic-revision","structure","representation","module-locator","applicability-fact","relationship","audit","exception","evidence","provider-contract","applicability-contract","analysis-contract"]},"identity":{"$ref":"#/$defs/NonEmptyString"},"digest":{"$ref":"#/$defs/Digest"}},"additionalProperties":false},"DecisionFingerprint":{"type":"object","required":["decision_kind","decision_contract","schema_version","dependencies"],"properties":{"decision_kind":{"$ref":"#/$defs/CanonicalId"},"decision_contract":{"$ref":"#/$defs/CanonicalId"},"schema_version":{"const":1},"dependencies":{"type":"array","minItems":1,"items":{"$ref":"#/$defs/DecisionDependency"}}},"additionalProperties":false},"FactValueContract":{"type":"object","required":["type","states","nullable"],"properties":{"type":{"enum":["boolean","enum","string","string-set","enum-set","canonical-id"]},"states":{"const":["known","known-absent"]},"nullable":{"type":"boolean"},"values":{"type":"array","minItems":1,"uniqueItems":true,"items":{"type":"string"}}},"additionalProperties":false},"EvidenceReference":{"type":"object","required":["id","digest","provider_contract","provider_contract_version"],"properties":{"id":{"$ref":"#/$defs/CanonicalId"},"digest":{"$ref":"#/$defs/Digest"},"provider_contract":{"$ref":"#/$defs/CanonicalId"},"provider_contract_version":{"$ref":"#/$defs/NonEmptyString"}},"additionalProperties":false},"CompletionProof":{"type":"object","required":["required_coverage_subjects","certificate_subjects","reached_consumer_obligations","disposition_obligations","required_fact_requirements","observed_fact_requirements","non_consumer_obligations_resolved","applicability_resolved","authorization_valid","evidence_valid"],"properties":{"required_coverage_subjects":{"type":"array","uniqueItems":true,"items":{"$ref":"#/$defs/CanonicalId"}},"certificate_subjects":{"type":"array","uniqueItems":true,"items":{"$ref":"#/$defs/CanonicalId"}},"reached_consumer_obligations":{"type":"array","uniqueItems":true,"items":{"$ref":"#/$defs/ObligationId"}},"disposition_obligations":{"type":"array","uniqueItems":true,"items":{"$ref":"#/$defs/ObligationId"}},"required_fact_requirements":{"type":"array","uniqueItems":true,"items":{"$ref":"#/$defs/FactRequirementId"}},"observed_fact_requirements":{"type":"array","uniqueItems":true,"items":{"$ref":"#/$defs/FactRequirementId"}},"non_consumer_obligations_resolved":{"const":true},"applicability_resolved":{"const":true},"authorization_valid":{"const":true},"evidence_valid":{"const":true}},"additionalProperties":false},"Timestamp":{"type":"integer","minimum":0},"SnapshotId":{"type":"string","pattern":"^snapshot:v1:[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"},"AnalysisId":{"type":"string","pattern":"^analysis:sha256:[0-9a-f]{64}$"},"ProposalId":{"type":"string","pattern":"^proposal:v1:[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"},"ProposalRevisionId":{"type":"string","pattern":"^proposal-revision:sha256:[0-9a-f]{64}$"},"ReadinessId":{"type":"string","pattern":"^readiness:sha256:[0-9a-f]{64}$"},"ApplicationId":{"type":"string","pattern":"^application:sha256:[0-9a-f]{64}$"},"ChildId":{"type":"string","pattern":"^sha256:[0-9a-f]{64}$"},"AuthorizationId":{"type":"string","pattern":"^authorization:sha256:[0-9a-f]{64}$"},"SnapshotHandle":{"type":"object","required":["kind","id","schema_version"],"properties":{"kind":{"const":"snapshot-handle"},"id":{"$ref":"#/$defs/SnapshotId"},"schema_version":{"const":5}},"additionalProperties":false},"AnalysisHandle":{"type":"object","required":["kind","id","schema_version"],"properties":{"kind":{"const":"analysis-handle"},"id":{"$ref":"#/$defs/AnalysisId"},"schema_version":{"const":7}},"additionalProperties":false},"ProposalHandle":{"type":"object","required":["kind","id","schema_version"],"properties":{"kind":{"const":"proposal-handle"},"id":{"$ref":"#/$defs/ProposalId"},"schema_version":{"const":1}},"additionalProperties":false},"ProposalRevisionHandle":{"type":"object","required":["kind","id","schema_version"],"properties":{"kind":{"const":"proposal-revision-handle"},"id":{"$ref":"#/$defs/ProposalRevisionId"},"schema_version":{"const":1}},"additionalProperties":false},"ReadinessHandle":{"type":"object","required":["kind","id","schema_version"],"properties":{"kind":{"const":"readiness-handle"},"id":{"$ref":"#/$defs/ReadinessId"},"schema_version":{"const":1}},"additionalProperties":false},"ApplicationHandle":{"type":"object","required":["kind","id","schema_version"],"properties":{"kind":{"const":"application-handle"},"id":{"$ref":"#/$defs/ApplicationId"},"schema_version":{"const":1}},"additionalProperties":false},"SnapshotChildHandle":{"type":"object","required":["kind","snapshot","child_kind","child_id","schema_version"],"properties":{"kind":{"const":"snapshot-child-handle"},"snapshot":{"$ref":"#/$defs/SnapshotHandle"},"child_kind":{"enum":["policy","relationship"]},"child_id":{"$ref":"#/$defs/NonEmptyString"},"schema_version":{"const":5}},"additionalProperties":false},"AnalysisChildHandle":{"type":"object","required":["kind","analysis","child_kind","child_id","schema_version"],"properties":{"kind":{"const":"analysis-child-handle"},"analysis":{"$ref":"#/$defs/AnalysisHandle"},"child_kind":{"enum":["context","fact-requirement","fact-observation","obligation","coverage-requirement","coverage-certificate"]},"child_id":{"$ref":"#/$defs/ChildId"},"schema_version":{"const":7}},"additionalProperties":false},"AnalysisMaterialHandle":{"oneOf":[{"$ref":"#/$defs/SnapshotHandle"},{"$ref":"#/$defs/ProposalRevisionHandle"}]},"InspectableHandle":{"oneOf":[{"$ref":"#/$defs/SnapshotHandle"},{"$ref":"#/$defs/AnalysisHandle"},{"$ref":"#/$defs/SnapshotChildHandle"},{"$ref":"#/$defs/AnalysisChildHandle"}]},"ActiveSnapshotSummary":{"type":"object","required":["snapshot","lifecycle","source_revision","created_at"],"properties":{"snapshot":{"$ref":"#/$defs/SnapshotHandle"},"lifecycle":{"const":"active"},"source_revision":{"$ref":"#/$defs/NonEmptyString"},"created_at":{"$ref":"#/$defs/Timestamp"}},"additionalProperties":false},"QuarantinedSnapshotSummary":{"type":"object","required":["snapshot","lifecycle","source_revision","created_at","purge_deadline"],"properties":{"snapshot":{"$ref":"#/$defs/SnapshotHandle"},"lifecycle":{"const":"quarantined"},"source_revision":{"$ref":"#/$defs/NonEmptyString"},"created_at":{"$ref":"#/$defs/Timestamp"},"purge_deadline":{"$ref":"#/$defs/Timestamp"}},"additionalProperties":false},"SnapshotSummary":{"oneOf":[{"$ref":"#/$defs/ActiveSnapshotSummary"},{"$ref":"#/$defs/QuarantinedSnapshotSummary"}]},"CreateSnapshotCall":{"type":"object","required":["kind"],"properties":{"kind":{"const":"create-snapshot"}},"additionalProperties":false},"CreateSnapshotResult":{"type":"object","required":["kind","snapshot"],"properties":{"kind":{"const":"create-snapshot-result"},"snapshot":{"$ref":"#/$defs/ActiveSnapshotSummary"}},"additionalProperties":false},"FindSnapshotsCall":{"type":"object","required":["kind"],"properties":{"kind":{"const":"find-snapshots"},"lifecycle":{"enum":["active","quarantined"],"default":"active"},"after":{"$ref":"#/$defs/SnapshotHandle"},"limit":{"type":"integer","minimum":1,"default":50}},"additionalProperties":false},"FindSnapshotsResult":{"type":"object","required":["kind","snapshots"],"properties":{"kind":{"const":"find-snapshots-result"},"snapshots":{"type":"array","items":{"$ref":"#/$defs/SnapshotSummary"}},"continuation":{"$ref":"#/$defs/SnapshotHandle"}},"additionalProperties":false},"StandardsChangePurpose":{"type":"object","required":["summary","rationale","evidence"],"properties":{"summary":{"$ref":"#/$defs/NonEmptyString"},"rationale":{"$ref":"#/$defs/NonEmptyString"},"evidence":{"type":"array","minItems":1,"uniqueItems":true,"items":{"$ref":"#/$defs/EvidenceReference"}}},"additionalProperties":false},"StandardContent":{"type":"object","required":["id","title","role","level","applies_when","does_not_apply_when","verification","body"],"properties":{"id":{"$ref":"#/$defs/CanonicalId"},"title":{"$ref":"#/$defs/NonEmptyString"},"role":{"enum":["core","router","workflow","profile","topic","reference"]},"level":{"enum":["MUST","SHOULD","PROFILE","REFERENCE"]},"applies_when":{"$ref":"#/$defs/NonEmptyString"},"does_not_apply_when":{"$ref":"#/$defs/NonEmptyString"},"verification":{"$ref":"#/$defs/NonEmptyString"},"body":{"$ref":"#/$defs/NonEmptyString"}},"additionalProperties":false},"NewPolicyUnit":{"type":"object","required":["id","heading_chain","semantic_revision","intent","aliases","predecessors","successors"],"properties":{"id":{"$ref":"#/$defs/CanonicalId"},"heading_chain":{"type":"array","minItems":1,"items":{"$ref":"#/$defs/NonEmptyString"}},"semantic_revision":{"const":1},"intent":{"$ref":"#/$defs/NonEmptyString"},"aliases":{"type":"array","uniqueItems":true,"items":{"$ref":"#/$defs/CanonicalId"}},"predecessors":{"type":"array","uniqueItems":true,"items":{"$ref":"#/$defs/CanonicalId"}},"successors":{"type":"array","uniqueItems":true,"items":{"$ref":"#/$defs/CanonicalId"}}},"additionalProperties":false},"PreservePolicySemantics":{"type":"object","required":["kind","semantic_revision","intent"],"properties":{"kind":{"const":"preserve"},"semantic_revision":{"type":"integer","minimum":1},"intent":{"$ref":"#/$defs/NonEmptyString"}},"additionalProperties":false},"ChangePolicySemantics":{"type":"object","required":["kind","accepted_semantic_revision","proposed_semantic_revision","intent"],"properties":{"kind":{"const":"change"},"accepted_semantic_revision":{"type":"integer","minimum":1},"proposed_semantic_revision":{"type":"integer","minimum":1},"intent":{"$ref":"#/$defs/NonEmptyString"}},"additionalProperties":false},"PolicySemanticIntent":{"oneOf":[{"$ref":"#/$defs/PreservePolicySemantics"},{"$ref":"#/$defs/ChangePolicySemantics"}]},"CreateStandardEdit":{"type":"object","required":["kind","standard","requires","specializes","policy_units"],"properties":{"kind":{"const":"create-standard"},"standard":{"$ref":"#/$defs/StandardContent"},"requires":{"type":"array","uniqueItems":true,"items":{"$ref":"#/$defs/CanonicalId"}},"specializes":{"type":"array","uniqueItems":true,"items":{"$ref":"#/$defs/CanonicalId"}},"policy_units":{"type":"array","uniqueItems":true,"items":{"$ref":"#/$defs/NewPolicyUnit"}}},"additionalProperties":false},"ReviseStandardEdit":{"type":"object","required":["kind","standard"],"properties":{"kind":{"const":"revise-standard"},"standard":{"$ref":"#/$defs/StandardContent"},"scope_updates":{"type":"array","items":{"$ref":"#/$defs/PolicyScopeUpdate"}}},"additionalProperties":false},"RevisePolicyUnitEdit":{"type":"object","required":["kind","policy","title","body","semantics"],"properties":{"kind":{"const":"revise-policy-unit"},"policy":{"$ref":"#/$defs/CanonicalId"},"title":{"$ref":"#/$defs/NonEmptyString"},"body":{"$ref":"#/$defs/NonEmptyString"},"semantics":{"$ref":"#/$defs/PolicySemanticIntent"}},"additionalProperties":false},"MovePolicyUnitEdit":{"type":"object","required":["kind","policy","standard","semantics"],"properties":{"kind":{"const":"move-policy-unit"},"policy":{"$ref":"#/$defs/CanonicalId"},"standard":{"$ref":"#/$defs/CanonicalId"},"after_policy":{"$ref":"#/$defs/CanonicalId"},"semantics":{"$ref":"#/$defs/PolicySemanticIntent"}},"additionalProperties":false},"RetirePolicyUnitEdit":{"type":"object","required":["kind","policy","retired_semantic_revision","successors","relationship_dispositions","evidence"],"properties":{"kind":{"const":"retire-policy-unit"},"policy":{"$ref":"#/$defs/CanonicalId"},"retired_semantic_revision":{"type":"integer","minimum":1},"successors":{"type":"array","uniqueItems":true,"items":{"$ref":"#/$defs/CanonicalId"}},"relationship_dispositions":{"type":"array","uniqueItems":true,"items":{"$ref":"#/$defs/RelationshipDisposition"}},"evidence":{"type":"array","minItems":1,"uniqueItems":true,"items":{"$ref":"#/$defs/EvidenceReference"}}},"additionalProperties":false},"RetireStandardEdit":{"type":"object","required":["kind","standard","successors","relationship_dispositions","evidence"],"properties":{"kind":{"const":"retire-standard"},"standard":{"$ref":"#/$defs/CanonicalId"},"successors":{"type":"array","uniqueItems":true,"items":{"$ref":"#/$defs/CanonicalId"}},"relationship_dispositions":{"type":"array","uniqueItems":true,"items":{"$ref":"#/$defs/RelationshipDisposition"}},"evidence":{"type":"array","minItems":1,"uniqueItems":true,"items":{"$ref":"#/$defs/EvidenceReference"}}},"additionalProperties":false},"ReplaceStandardRelationshipsEdit":{"type":"object","required":["kind","standard","requires","specializes","rationale"],"properties":{"kind":{"const":"replace-standard-relationships"},"standard":{"$ref":"#/$defs/CanonicalId"},"requires":{"type":"array","uniqueItems":true,"items":{"$ref":"#/$defs/CanonicalId"}},"specializes":{"type":"array","uniqueItems":true,"items":{"$ref":"#/$defs/CanonicalId"}},"rationale":{"$ref":"#/$defs/NonEmptyString"}},"additionalProperties":false},"AuthoringTargetHandle":{"type":"object","required":["kind","snapshot","id","schema_version"],"properties":{"kind":{"const":"authoring-target-handle"},"snapshot":{"$ref":"#/$defs/SnapshotHandle"},"id":{"$ref":"#/$defs/ChildId"},"schema_version":{"const":5}},"additionalProperties":false},"RelationshipConsumer":{"oneOf":[{"$ref":"#/$defs/CanonicalId"},{"$ref":"#/$defs/AuthoringTargetHandle"}]},"PolicyRelationship":{"type":"object","required":["source_policy","consumer","relation","applicability","source_scope","consumer_scope","evidence_owner","rationale"],"properties":{"source_policy":{"$ref":"#/$defs/CanonicalId"},"consumer":{"$ref":"#/$defs/RelationshipConsumer"},"relation":{"enum":["normative-consumer","router-projection","prompt-projection","template-projection","reference-projection","fixture-projection","enforcement-suite-projection","documentation-projection","implementation-projection"]},"applicability":{"$ref":"#/$defs/ApplicabilityExpression"},"source_scope":{"oneOf":[{"$ref":"#/$defs/ReviewScope"},{"type":"null"}]},"consumer_scope":{"oneOf":[{"$ref":"#/$defs/ReviewScope"},{"type":"null"}]},"evidence_owner":{"$ref":"#/$defs/CanonicalId"},"rationale":{"$ref":"#/$defs/NonEmptyString"}},"additionalProperties":false},"PutPolicyRelationshipEdit":{"type":"object","required":["kind","relationship"],"properties":{"kind":{"const":"put-policy-relationship"},"relationship":{"$ref":"#/$defs/PolicyRelationship"}},"additionalProperties":false},"RemovePolicyRelationshipEdit":{"type":"object","required":["kind","relationship"],"properties":{"kind":{"const":"remove-policy-relationship"},"relationship":{"$ref":"#/$defs/PolicyRelationship"}},"additionalProperties":false},"ModuleRelationshipKey":{"type":"object","required":["kind","relation","source","target"],"properties":{"kind":{"const":"module-relationship"},"relation":{"enum":["requires","specializes"]},"source":{"$ref":"#/$defs/CanonicalId"},"target":{"$ref":"#/$defs/CanonicalId"}},"additionalProperties":false},"PolicyRelationshipKey":{"type":"object","required":["kind","source_policy","consumer","relation"],"properties":{"kind":{"const":"policy-relationship"},"source_policy":{"$ref":"#/$defs/CanonicalId"},"consumer":{"$ref":"#/$defs/RelationshipConsumer"},"relation":{"$ref":"#/$defs/CanonicalId"}},"additionalProperties":false},"RelationshipKey":{"oneOf":[{"$ref":"#/$defs/ModuleRelationshipKey"},{"$ref":"#/$defs/PolicyRelationshipKey"}]},"RelationshipDisposition":{"type":"object","required":["relationship","disposition","rationale","evidence"],"properties":{"relationship":{"$ref":"#/$defs/RelationshipKey"},"disposition":{"enum":["remove","retarget"]},"replacement_consumer":{"$ref":"#/$defs/RelationshipConsumer"},"rationale":{"$ref":"#/$defs/NonEmptyString"},"evidence":{"type":"array","minItems":1,"uniqueItems":true,"items":{"$ref":"#/$defs/EvidenceReference"}}},"additionalProperties":false},"StandardEdit":{"oneOf":[{"$ref":"#/$defs/CreateStandardEdit"},{"$ref":"#/$defs/ReviseStandardEdit"},{"$ref":"#/$defs/RevisePolicyUnitEdit"},{"$ref":"#/$defs/MovePolicyUnitEdit"},{"$ref":"#/$defs/RetirePolicyUnitEdit"},{"$ref":"#/$defs/RetireStandardEdit"},{"$ref":"#/$defs/ReplaceStandardRelationshipsEdit"},{"$ref":"#/$defs/PutPolicyRelationshipEdit"},{"$ref":"#/$defs/RemovePolicyRelationshipEdit"},{"$ref":"#/$defs/PutRoutingRuleEdit"},{"$ref":"#/$defs/RemoveRoutingRuleEdit"},{"$ref":"#/$defs/PutRoutingFactEdit"},{"$ref":"#/$defs/RemoveRoutingFactEdit"},{"$ref":"#/$defs/AuditPolicyUnitEdit"},{"$ref":"#/$defs/RewriteNavigationIndexEdit"},{"$ref":"#/$defs/PutDecisionProvenanceEdit"},{"$ref":"#/$defs/RetireDecisionProvenanceEdit"},{"$ref":"#/$defs/ApproveApplicationContentEdit"},{"$ref":"#/$defs/WithdrawApplicationContentEdit"},{"$ref":"#/$defs/ReviseOperationalArtifactEdit"}]},"StandardsChangeSet":{"type":"object","required":["purpose","edits"],"properties":{"purpose":{"$ref":"#/$defs/StandardsChangePurpose"},"edits":{"type":"array","minItems":1,"uniqueItems":true,"items":{"$ref":"#/$defs/StandardEdit"}}},"additionalProperties":false},"ProposalSummary":{"type":"object","required":["proposal","head_revision"],"properties":{"proposal":{"$ref":"#/$defs/ProposalHandle"},"head_revision":{"$ref":"#/$defs/ProposalRevisionHandle"}},"additionalProperties":false},"CreateProposalCall":{"type":"object","required":["kind","base_snapshot","change_set"],"properties":{"kind":{"const":"create-proposal"},"base_snapshot":{"$ref":"#/$defs/SnapshotHandle"},"change_set":{"$ref":"#/$defs/StandardsChangeSet"}},"additionalProperties":false},"CreateProposalResult":{"type":"object","required":["kind","proposal","revision"],"properties":{"kind":{"const":"create-proposal-result"},"proposal":{"$ref":"#/$defs/ProposalHandle"},"revision":{"$ref":"#/$defs/ProposalRevisionHandle"}},"additionalProperties":false},"FindProposalsCall":{"type":"object","required":["kind"],"properties":{"kind":{"const":"find-proposals"},"after":{"$ref":"#/$defs/ProposalHandle"},"limit":{"type":"integer","minimum":1,"default":50}},"additionalProperties":false},"FindProposalsResult":{"type":"object","required":["kind","proposals"],"properties":{"kind":{"const":"find-proposals-result"},"proposals":{"type":"array","items":{"$ref":"#/$defs/ProposalSummary"}},"continuation":{"$ref":"#/$defs/ProposalHandle"}},"additionalProperties":false},"ReviseProposalCall":{"type":"object","required":["kind","expected_revision","change_set"],"properties":{"kind":{"const":"revise-proposal"},"expected_revision":{"$ref":"#/$defs/ProposalRevisionHandle"},"change_set":{"$ref":"#/$defs/StandardsChangeSet"}},"additionalProperties":false},"ReviseProposalResult":{"type":"object","required":["kind","proposal","revision"],"properties":{"kind":{"const":"revise-proposal-result"},"proposal":{"$ref":"#/$defs/ProposalHandle"},"revision":{"$ref":"#/$defs/ProposalRevisionHandle"}},"additionalProperties":false},"DeleteSnapshotCall":{"type":"object","required":["kind","snapshot"],"properties":{"kind":{"const":"delete-snapshot"},"snapshot":{"$ref":"#/$defs/SnapshotHandle"}},"additionalProperties":false},"DeleteSnapshotResult":{"type":"object","required":["kind","snapshot","purge_deadline"],"properties":{"kind":{"const":"delete-snapshot-result"},"snapshot":{"$ref":"#/$defs/SnapshotHandle"},"purge_deadline":{"$ref":"#/$defs/Timestamp"}},"additionalProperties":false},"UndeleteSnapshotCall":{"type":"object","required":["kind","snapshot"],"properties":{"kind":{"const":"undelete-snapshot"},"snapshot":{"$ref":"#/$defs/SnapshotHandle"}},"additionalProperties":false},"UndeleteSnapshotResult":{"type":"object","required":["kind","snapshot"],"properties":{"kind":{"const":"undelete-snapshot-result"},"snapshot":{"$ref":"#/$defs/ActiveSnapshotSummary"}},"additionalProperties":false},"QueryNextOperation":{"type":"object","required":["operation","request_kind","snapshot"],"properties":{"operation":{"const":"query"},"request_kind":{"enum":["route","read","related"]},"target":{"$ref":"#/$defs/CanonicalId"},"snapshot":{"$ref":"#/$defs/SnapshotHandle"}},"additionalProperties":false},"QueryProposalNextOperation":{"type":"object","required":["operation","request_kind","revision"],"properties":{"operation":{"const":"query_proposal"},"request_kind":{"enum":["route","read","related"]},"target":{"$ref":"#/$defs/CanonicalId"},"revision":{"$ref":"#/$defs/ProposalRevisionHandle"}},"additionalProperties":false},"ResolveNextOperation":{"type":"object","required":["operation","request_kind","analysis"],"properties":{"operation":{"const":"resolve"},"request_kind":{"enum":["provide-fact","consumer-disposition","impact-disposition","coverage-attestation"]},"target":{"$ref":"#/$defs/CanonicalId"},"work":{"$ref":"#/$defs/AnalysisChildHandle"},"analysis":{"$ref":"#/$defs/AnalysisHandle"}},"additionalProperties":false},"InspectNextOperation":{"type":"object","required":["operation","request_kind","handle"],"properties":{"operation":{"const":"inspect"},"request_kind":{"const":"inspect"},"handle":{"$ref":"#/$defs/InspectableHandle"}},"additionalProperties":false},"NextOperation":{"oneOf":[{"$ref":"#/$defs/QueryNextOperation"},{"$ref":"#/$defs/ResolveNextOperation"},{"$ref":"#/$defs/InspectNextOperation"},{"$ref":"#/$defs/FocusedQueryNextOperation"}]},"QueryCall":{"type":"object","required":["snapshot","request"],"properties":{"snapshot":{"$ref":"#/$defs/SnapshotHandle"},"request":{"$ref":"#/$defs/QueryRequest"}},"additionalProperties":false},"QueryProposalCall":{"type":"object","required":["revision","request"],"properties":{"revision":{"$ref":"#/$defs/ProposalRevisionHandle"},"request":{"$ref":"#/$defs/QueryRequest"}},"additionalProperties":false},"AnalyzeProposalCall":{"type":"object","required":["revision"],"properties":{"revision":{"$ref":"#/$defs/ProposalRevisionHandle"}},"additionalProperties":false},"ReviewDecision":{"type":"object","required":["owner","decision","rationale","evidence"],"properties":{"owner":{"enum":["consumer","impact","audit"]},"decision":{"const":"accept"},"rationale":{"$ref":"#/$defs/NonEmptyString"},"evidence":{"type":"array","minItems":1,"uniqueItems":true,"items":{"$ref":"#/$defs/EvidenceReference"}}},"additionalProperties":false},"ReviewProposalCall":{"type":"object","required":["kind","analysis","decisions"],"properties":{"kind":{"const":"review-proposal"},"analysis":{"$ref":"#/$defs/AnalysisHandle"},"decisions":{"type":"array","minItems":3,"maxItems":3,"uniqueItems":true,"items":{"$ref":"#/$defs/ReviewDecision"}},"prior_readiness":{"$ref":"#/$defs/ReadinessHandle"}},"additionalProperties":false},"ReviewProposalResult":{"type":"object","required":["kind","readiness","revision","status"],"properties":{"kind":{"const":"review-proposal-result"},"readiness":{"$ref":"#/$defs/ReadinessHandle"},"revision":{"$ref":"#/$defs/ProposalRevisionHandle"},"status":{"const":"ready"}},"additionalProperties":false},"ApplyProposalCall":{"type":"object","required":["kind","readiness"],"properties":{"kind":{"const":"apply-proposal"},"readiness":{"$ref":"#/$defs/ReadinessHandle"}},"additionalProperties":false},"ApplyProposalResult":{"type":"object","required":["kind","application","status"],"properties":{"kind":{"const":"apply-proposal-result"},"application":{"$ref":"#/$defs/ApplicationHandle"},"status":{"const":"applied"}},"additionalProperties":false},"RecoverApplicationCall":{"type":"object","required":["kind","readiness"],"properties":{"kind":{"const":"recover-application"},"readiness":{"$ref":"#/$defs/ReadinessHandle"}},"additionalProperties":false},"RecoverApplicationResult":{"type":"object","required":["kind","application","status"],"properties":{"kind":{"const":"recover-application-result"},"application":{"$ref":"#/$defs/ApplicationHandle"},"status":{"const":"applied"}},"additionalProperties":false},"ApplicationRecoveryRequiredResult":{"type":"object","required":["kind","application","status","code","outcome","message"],"properties":{"kind":{"const":"application-recovery-required-result"},"application":{"$ref":"#/$defs/ApplicationHandle"},"status":{"const":"recovery-required"},"code":{"enum":["APPLICATION.PUBLICATION_UNAVAILABLE","APPLICATION.OBSERVATION_UNAVAILABLE","APPLICATION.OUTCOME_PERSISTENCE_UNAVAILABLE","APPLICATION.RECOVERY_TARGET_UNCERTAIN","APPLICATION.RECOVERY_TARGET_DIVERGED"]},"outcome":{"const":"unavailable"},"message":{"$ref":"#/$defs/NonEmptyString"}},"additionalProperties":false},"PolicySummary":{"type":"object","required":["handle","authority","scope"],"properties":{"handle":{"$ref":"#/$defs/SnapshotChildHandle"},"authority":{"enum":["normative","projection","contextual","evidence"]},"scope":{"$ref":"#/$defs/ReviewScope"}},"additionalProperties":false},"RelationshipSummary":{"type":"object","required":["handle","source","target","relation","groups","direction","traversal_eligible","applicability"],"properties":{"handle":{"$ref":"#/$defs/SnapshotChildHandle"},"source":{"$ref":"#/$defs/CanonicalId"},"target":{"$ref":"#/$defs/CanonicalId"},"relation":{"$ref":"#/$defs/CanonicalId"},"groups":{"type":"array","items":{"$ref":"#/$defs/CanonicalId"},"minItems":1,"uniqueItems":true},"direction":{"enum":["incoming","outgoing"]},"traversal_eligible":{"type":"boolean"},"applicability":{"enum":["true","false","unknown","not-declared"]}},"additionalProperties":false},"ProposalPolicySummary":{"type":"object","required":["id","authority","scope"],"properties":{"id":{"$ref":"#/$defs/CanonicalId"},"authority":{"enum":["normative","projection","contextual","evidence"]},"scope":{"$ref":"#/$defs/ReviewScope"}},"additionalProperties":false},"ProposalRelationshipSummary":{"type":"object","required":["source","target","relation","groups","direction","traversal_eligible","applicability"],"properties":{"source":{"$ref":"#/$defs/CanonicalId"},"target":{"$ref":"#/$defs/CanonicalId"},"relation":{"$ref":"#/$defs/CanonicalId"},"groups":{"type":"array","items":{"$ref":"#/$defs/CanonicalId"},"minItems":1,"uniqueItems":true},"direction":{"enum":["incoming","outgoing"]},"traversal_eligible":{"type":"boolean"},"applicability":{"enum":["true","false","unknown","not-declared"]}},"additionalProperties":false},"RouteResult":{"type":"object","required":["kind","snapshot","reading_plan","unresolved_questions","next_operations"],"properties":{"kind":{"const":"route-result"},"snapshot":{"$ref":"#/$defs/SnapshotHandle"},"reading_plan":{"type":"array","items":{"$ref":"#/$defs/ReadingPlanEntry"}},"unresolved_questions":{"type":"array","items":{"$ref":"#/$defs/Question"}},"next_operations":{"type":"array","items":{"$ref":"#/$defs/NextOperation"}},"summary":{"type":"string"}},"additionalProperties":false},"ReadResult":{"type":"object","required":["kind","snapshot","policy","content","requires","specializes","related","next_operations"],"properties":{"kind":{"const":"read-result"},"snapshot":{"$ref":"#/$defs/SnapshotHandle"},"policy":{"$ref":"#/$defs/PolicySummary"},"content":{"type":"string"},"requires":{"type":"array","items":{"$ref":"#/$defs/CanonicalId"},"uniqueItems":true},"specializes":{"type":"array","items":{"$ref":"#/$defs/CanonicalId"},"uniqueItems":true},"related":{"type":"array","items":{"$ref":"#/$defs/RelationshipSummary"}},"next_operations":{"type":"array","items":{"$ref":"#/$defs/NextOperation"}},"summary":{"type":"string"},"routing":{"$ref":"#/$defs/RoutingConfiguration"},"coverage":{"$ref":"#/$defs/ReadCoverage"},"application_exposure":{"$ref":"#/$defs/ApplicationExposureState"},"provenance":{"type":"array","items":{"$ref":"#/$defs/CanonicalId"}}},"additionalProperties":false},"PolicyUnitMapping":{"type":"object","required":["state","policy_units"],"properties":{"state":{"enum":["exact-policy-unit","policy-units-present","incomplete"]},"reason":{"const":"no-policy-units"},"policy_units":{"type":"array","items":{"$ref":"#/$defs/CanonicalId"},"uniqueItems":true}},"additionalProperties":false},"RelatedResult":{"type":"object","required":["kind","snapshot","target","policy_unit_mapping","relationships","next_operations"],"properties":{"kind":{"const":"related-result"},"snapshot":{"$ref":"#/$defs/SnapshotHandle"},"target":{"$ref":"#/$defs/CanonicalId"},"authoring_target":{"$ref":"#/$defs/AuthoringTargetHandle"},"policy_unit_mapping":{"$ref":"#/$defs/PolicyUnitMapping"},"relationships":{"type":"array","items":{"$ref":"#/$defs/RelationshipSummary"}},"next_operations":{"type":"array","items":{"$ref":"#/$defs/NextOperation"}},"summary":{"type":"string"}},"additionalProperties":false},"QueryResult":{"oneOf":[{"$ref":"#/$defs/RouteResult"},{"$ref":"#/$defs/ReadResult"},{"$ref":"#/$defs/RelatedResult"},{"$ref":"#/$defs/NavigationIndexesResult"},{"$ref":"#/$defs/ProvenanceReadResult"},{"$ref":"#/$defs/OperationalReadResult"}]},"ProposalRouteResult":{"type":"object","required":["kind","revision","reading_plan","unresolved_questions","next_operations"],"properties":{"kind":{"const":"proposal-route-result"},"revision":{"$ref":"#/$defs/ProposalRevisionHandle"},"reading_plan":{"type":"array","items":{"$ref":"#/$defs/ReadingPlanEntry"}},"unresolved_questions":{"type":"array","items":{"$ref":"#/$defs/Question"}},"next_operations":{"type":"array","items":{"$ref":"#/$defs/QueryProposalNextOperation"}},"summary":{"type":"string"}},"additionalProperties":false},"ProposalReadResult":{"type":"object","required":["kind","revision","policy","content","requires","specializes","related","next_operations"],"properties":{"kind":{"const":"proposal-read-result"},"revision":{"$ref":"#/$defs/ProposalRevisionHandle"},"policy":{"$ref":"#/$defs/ProposalPolicySummary"},"content":{"type":"string"},"requires":{"type":"array","items":{"$ref":"#/$defs/CanonicalId"},"uniqueItems":true},"specializes":{"type":"array","items":{"$ref":"#/$defs/CanonicalId"},"uniqueItems":true},"related":{"type":"array","items":{"$ref":"#/$defs/ProposalRelationshipSummary"}},"next_operations":{"type":"array","items":{"$ref":"#/$defs/QueryProposalNextOperation"}},"summary":{"type":"string"},"routing":{"$ref":"#/$defs/RoutingConfiguration"},"coverage":{"$ref":"#/$defs/ReadCoverage"},"application_exposure":{"$ref":"#/$defs/ApplicationExposureState"},"provenance":{"type":"array","items":{"$ref":"#/$defs/CanonicalId"}}},"additionalProperties":false},"ProposalRelatedResult":{"type":"object","required":["kind","revision","target","policy_unit_mapping","relationships","next_operations"],"properties":{"kind":{"const":"proposal-related-result"},"revision":{"$ref":"#/$defs/ProposalRevisionHandle"},"target":{"$ref":"#/$defs/CanonicalId"},"authoring_target":{"$ref":"#/$defs/AuthoringTargetHandle"},"policy_unit_mapping":{"$ref":"#/$defs/PolicyUnitMapping"},"relationships":{"type":"array","items":{"$ref":"#/$defs/ProposalRelationshipSummary"}},"next_operations":{"type":"array","items":{"$ref":"#/$defs/QueryProposalNextOperation"}},"summary":{"type":"string"}},"additionalProperties":false},"QueryProposalResult":{"oneOf":[{"$ref":"#/$defs/ProposalRouteResult"},{"$ref":"#/$defs/ProposalReadResult"},{"$ref":"#/$defs/ProposalRelatedResult"},{"$ref":"#/$defs/NavigationIndexesResult"},{"$ref":"#/$defs/ProvenanceReadResult"},{"$ref":"#/$defs/OperationalReadResult"}]},"AnalysisRequest":{"type":"object","required":["kind","base_snapshot","proposed_snapshot","changes","semantic_proposals","contract_version"],"properties":{"kind":{"const":"analysis-request"},"base_snapshot":{"$ref":"#/$defs/SnapshotHandle"},"proposed_snapshot":{"$ref":"#/$defs/SnapshotHandle"},"changes":{"type":"array","items":{"$ref":"#/$defs/ChangeDescriptor"},"minItems":1},"semantic_proposals":{"type":"array","items":{"$ref":"#/$defs/SemanticProposal"},"uniqueItems":true},"prior_analysis":{"$ref":"#/$defs/AnalysisHandle"},"contract_version":{"const":6}},"additionalProperties":false},"PrepareCall":{"type":"object","required":["request"],"properties":{"request":{"$ref":"#/$defs/AnalysisRequest"}},"additionalProperties":false},"AnalysisContext":{"type":"object","required":["kind","handle","subjects","changes","semantic_proposals"],"properties":{"kind":{"const":"analysis-context"},"handle":{"$ref":"#/$defs/AnalysisChildHandle"},"subjects":{"type":"array","items":{"$ref":"#/$defs/ChangedPolicyUnit"},"uniqueItems":true},"changes":{"type":"array","items":{"$ref":"#/$defs/ChangeDescriptor"},"minItems":1,"uniqueItems":true},"semantic_proposals":{"type":"array","items":{"$ref":"#/$defs/SemanticProposal"},"uniqueItems":true}},"additionalProperties":false},"AuthorizationReference":{"type":"object","required":["id","issuer","capability","authority_digest"],"properties":{"id":{"$ref":"#/$defs/AuthorizationId"},"issuer":{"$ref":"#/$defs/CanonicalId"},"capability":{"$ref":"#/$defs/CanonicalId"},"authority_digest":{"$ref":"#/$defs/Digest"}},"additionalProperties":false},"ProviderReference":{"type":"object","required":["id","contract","contract_version","input_digest"],"properties":{"id":{"$ref":"#/$defs/CanonicalId"},"contract":{"$ref":"#/$defs/CanonicalId"},"contract_version":{"$ref":"#/$defs/NonEmptyString"},"input_digest":{"$ref":"#/$defs/Digest"}},"additionalProperties":false},"AuthorizationRecord":{"type":"object","required":["reference","issuer_semantic_revision","principal","action","subject_kind","subject_id","authorization_evidence","revocation_authority","revocation_authority_semantic_revision","revocation_evidence"],"properties":{"reference":{"$ref":"#/$defs/AuthorizationReference"},"issuer_semantic_revision":{"type":"integer","minimum":1},"principal":{"$ref":"#/$defs/CanonicalId"},"action":{"$ref":"#/$defs/CanonicalId"},"subject_kind":{"$ref":"#/$defs/CanonicalId"},"subject_id":{"$ref":"#/$defs/NonEmptyString"},"authorization_evidence":{"type":"array","items":{"$ref":"#/$defs/EvidenceReference"},"minItems":1,"uniqueItems":true},"revocation_authority":{"$ref":"#/$defs/CanonicalId"},"revocation_authority_semantic_revision":{"type":"integer","minimum":1},"revocation_evidence":{"type":"array","items":{"$ref":"#/$defs/EvidenceReference"},"minItems":1,"uniqueItems":true}},"additionalProperties":false},"DomainContractReference":{"type":"object","required":["id","version"],"properties":{"id":{"$ref":"#/$defs/CanonicalId"},"version":{"$ref":"#/$defs/NonEmptyString"}},"additionalProperties":false},"AnalysisExecutionContractView":{"type":"object","required":["authorization_authority_digest","providers"],"properties":{"authorization_authority_digest":{"oneOf":[{"$ref":"#/$defs/Digest"},{"type":"null"}]},"providers":{"type":"array","items":{"$ref":"#/$defs/ProviderReference"},"uniqueItems":true}},"additionalProperties":false},"FactRequirement":{"type":"object","required":["kind","handle","fact","fact_semantic_revision","fact_contract_digest","context","value_contract","answer_contract","evidence_contract","authorization_capability"],"properties":{"kind":{"const":"fact-requirement"},"handle":{"$ref":"#/$defs/AnalysisChildHandle"},"fact":{"$ref":"#/$defs/CanonicalId"},"fact_semantic_revision":{"type":"integer","minimum":1},"fact_contract_digest":{"$ref":"#/$defs/Digest"},"context":{"$ref":"#/$defs/AnalysisChildHandle"},"value_contract":{"$ref":"#/$defs/FactValueContract"},"answer_contract":{"$ref":"#/$defs/CanonicalId"},"evidence_contract":{"$ref":"#/$defs/CanonicalId"},"authorization_capability":{"$ref":"#/$defs/CanonicalId"}},"additionalProperties":false},"FactRequirementWork":{"type":"object","required":["requirement","prompt","dependent_programs"],"properties":{"requirement":{"$ref":"#/$defs/FactRequirement"},"prompt":{"$ref":"#/$defs/NonEmptyString"},"dependent_programs":{"type":"array","items":{"$ref":"#/$defs/NonEmptyString"},"minItems":1,"uniqueItems":true}},"additionalProperties":false},"FactObservation":{"type":"object","required":["kind","handle","requirement","value","evidence","authorization"],"properties":{"kind":{"const":"fact-observation"},"handle":{"$ref":"#/$defs/AnalysisChildHandle"},"requirement":{"$ref":"#/$defs/AnalysisChildHandle"},"value":{"$ref":"#/$defs/FactValue"},"evidence":{"type":"array","items":{"$ref":"#/$defs/EvidenceReference"},"minItems":1,"uniqueItems":true},"authorization":{"$ref":"#/$defs/AuthorizationReference"},"provider":{"$ref":"#/$defs/ProviderReference"}},"additionalProperties":false},"Obligation":{"type":"object","required":["handle","kind","target","scope","reasons","state","permitted_submissions","fingerprint"],"properties":{"handle":{"$ref":"#/$defs/AnalysisChildHandle"},"kind":{"enum":["consumer-review","impact-review","lifecycle-impact-review","audit-coverage","unmapped-normative-change"]},"target":{"$ref":"#/$defs/CanonicalId"},"scope":{"$ref":"#/$defs/ReviewScope"},"reasons":{"type":"array","items":{"$ref":"#/$defs/SelectionReason"},"minItems":1,"uniqueItems":true},"state":{"enum":["required","resolved","blocked"]},"applicability":{"enum":["true","false","unknown","not-declared"]},"permitted_submissions":{"type":"array","items":{"enum":["consumer-disposition","impact-disposition","coverage-attestation"]},"minItems":1,"uniqueItems":true},"review_contract":{"$ref":"#/$defs/ConsumerReviewContract"},"fingerprint":{"$ref":"#/$defs/DecisionFingerprint"}},"additionalProperties":false},"ProvideFactSubmission":{"type":"object","required":["kind","requirement","value","evidence"],"properties":{"kind":{"const":"provide-fact"},"requirement":{"$ref":"#/$defs/AnalysisChildHandle"},"value":{"$ref":"#/$defs/FactValue"},"evidence":{"type":"array","items":{"$ref":"#/$defs/EvidenceReference"},"minItems":1,"uniqueItems":true}},"additionalProperties":false},"ConsumerDispositionSubmission":{"type":"object","required":["kind","obligation","result","rationale","evidence","fingerprint"],"properties":{"kind":{"const":"consumer-disposition"},"obligation":{"$ref":"#/$defs/AnalysisChildHandle"},"result":{"enum":["updated","reviewed-no-change","not-applicable","blocked"]},"rationale":{"$ref":"#/$defs/NonEmptyString"},"evidence":{"type":"array","items":{"$ref":"#/$defs/EvidenceReference"},"minItems":1},"fingerprint":{"$ref":"#/$defs/DecisionFingerprint"}},"additionalProperties":false},"ImpactDispositionSubmission":{"type":"object","required":["kind","obligation","result","rationale","evidence","fingerprint"],"properties":{"kind":{"const":"impact-disposition"},"obligation":{"$ref":"#/$defs/AnalysisChildHandle"},"result":{"enum":["confirmed","resolved-no-impact","requires-change","blocked"]},"rationale":{"$ref":"#/$defs/NonEmptyString"},"evidence":{"type":"array","items":{"$ref":"#/$defs/EvidenceReference"},"minItems":1},"fingerprint":{"$ref":"#/$defs/DecisionFingerprint"}},"additionalProperties":false},"CoverageAttestationClaim":{"type":"object","required":["requirement","conclusion","evidence","explicit_exclusions","rationale","auditor_provenance"],"properties":{"requirement":{"$ref":"#/$defs/AnalysisChildHandle"},"conclusion":{"const":"complete"},"evidence":{"type":"array","items":{"$ref":"#/$defs/EvidenceReference"},"minItems":1,"uniqueItems":true},"explicit_exclusions":{"type":"array","items":{"$ref":"#/$defs/EvidenceReference"},"uniqueItems":true},"rationale":{"$ref":"#/$defs/NonEmptyString"},"auditor_provenance":{"$ref":"#/$defs/NonEmptyString"}},"additionalProperties":false},"CoverageAttestationSubmission":{"type":"object","required":["kind","claim"],"properties":{"kind":{"const":"coverage-attestation"},"claim":{"$ref":"#/$defs/CoverageAttestationClaim"}},"additionalProperties":false},"Submission":{"oneOf":[{"$ref":"#/$defs/ProvideFactSubmission"},{"$ref":"#/$defs/ConsumerDispositionSubmission"},{"$ref":"#/$defs/ImpactDispositionSubmission"},{"$ref":"#/$defs/CoverageAttestationSubmission"}]},"ResolveCall":{"type":"object","required":["analysis","submission"],"properties":{"analysis":{"$ref":"#/$defs/AnalysisHandle"},"submission":{"$ref":"#/$defs/Submission"}},"additionalProperties":false},"CoverageRequirement":{"type":"object","required":["kind","handle","subject","owner","semantic_revision","relationship_kinds","horizon","required_evidence_contract"],"properties":{"kind":{"const":"coverage-requirement"},"handle":{"$ref":"#/$defs/AnalysisChildHandle"},"subject":{"$ref":"#/$defs/CanonicalId"},"owner":{"$ref":"#/$defs/CanonicalId"},"semantic_revision":{"type":"integer","minimum":1},"relationship_kinds":{"type":"array","items":{"$ref":"#/$defs/CanonicalId"},"uniqueItems":true},"horizon":{"$ref":"#/$defs/CanonicalId"},"required_evidence_contract":{"$ref":"#/$defs/CanonicalId"}},"additionalProperties":false},"CoverageAttestation":{"type":"object","required":["kind","requirement","conclusion","evidence","explicit_exclusions","rationale","auditor_provenance","schema_version","authorization"],"properties":{"kind":{"const":"coverage-attestation"},"requirement":{"$ref":"#/$defs/AnalysisChildHandle"},"conclusion":{"const":"complete"},"evidence":{"type":"array","items":{"$ref":"#/$defs/EvidenceReference"},"minItems":1},"explicit_exclusions":{"type":"array","items":{"$ref":"#/$defs/EvidenceReference"}},"rationale":{"$ref":"#/$defs/NonEmptyString"},"auditor_provenance":{"$ref":"#/$defs/NonEmptyString"},"schema_version":{"const":4},"authorization":{"$ref":"#/$defs/AuthorizationReference"}},"additionalProperties":false},"CoverageCertificate":{"type":"object","required":["kind","handle","requirement","subject","owner","semantic_revision","horizon_digest","relationship_digest","evidence_digests","fact_schema_digest"],"properties":{"kind":{"const":"coverage-certificate"},"handle":{"$ref":"#/$defs/AnalysisChildHandle"},"requirement":{"$ref":"#/$defs/AnalysisChildHandle"},"subject":{"$ref":"#/$defs/CanonicalId"},"owner":{"$ref":"#/$defs/CanonicalId"},"semantic_revision":{"type":"integer","minimum":1},"horizon_digest":{"$ref":"#/$defs/Digest"},"relationship_digest":{"$ref":"#/$defs/Digest"},"evidence_digests":{"type":"array","items":{"$ref":"#/$defs/Digest"},"uniqueItems":true},"fact_schema_digest":{"$ref":"#/$defs/Digest"}},"additionalProperties":false},"DispositionRecord":{"type":"object","required":["obligation","kind","result","rationale","evidence","authorization","fingerprint"],"properties":{"obligation":{"$ref":"#/$defs/AnalysisChildHandle"},"kind":{"enum":["consumer-disposition","impact-disposition"]},"result":{"$ref":"#/$defs/NonEmptyString"},"rationale":{"$ref":"#/$defs/NonEmptyString"},"evidence":{"type":"array","items":{"$ref":"#/$defs/EvidenceReference"}},"authorization":{"$ref":"#/$defs/AuthorizationReference"},"fingerprint":{"$ref":"#/$defs/DecisionFingerprint"}},"additionalProperties":false},"AnalysisState":{"type":"object","required":["kind","handle","base_snapshot","proposed_reference","changes","semantic_proposals","fact_observations","dispositions","coverage_attestations","authorization_records","domain_contracts","execution_contracts","contract_version"],"properties":{"kind":{"const":"analysis-state"},"handle":{"$ref":"#/$defs/AnalysisHandle"},"base_snapshot":{"$ref":"#/$defs/SnapshotHandle"},"proposed_reference":{"$ref":"#/$defs/AnalysisMaterialHandle"},"changes":{"type":"array","items":{"$ref":"#/$defs/ChangeDescriptor"},"minItems":1,"uniqueItems":true},"semantic_proposals":{"type":"array","items":{"$ref":"#/$defs/SemanticProposal"},"uniqueItems":true},"fact_observations":{"type":"array","items":{"$ref":"#/$defs/FactObservation"},"uniqueItems":true},"dispositions":{"type":"array","items":{"$ref":"#/$defs/DispositionRecord"},"uniqueItems":true},"coverage_attestations":{"type":"array","items":{"$ref":"#/$defs/CoverageAttestation"},"uniqueItems":true},"authorization_records":{"type":"array","items":{"$ref":"#/$defs/AuthorizationRecord"},"uniqueItems":true},"domain_contracts":{"type":"array","items":{"$ref":"#/$defs/DomainContractReference"},"minItems":1,"uniqueItems":true},"execution_contracts":{"$ref":"#/$defs/AnalysisExecutionContractView"},"contract_version":{"const":7}},"additionalProperties":false},"PendingResult":{"type":"object","required":["kind","handle","status","context","changes","changed_units","obligations","fact_requirements","reading_plan","next_operations"],"properties":{"kind":{"const":"pending-result"},"handle":{"$ref":"#/$defs/AnalysisHandle"},"status":{"const":"needs-action"},"context":{"$ref":"#/$defs/AnalysisContext"},"changes":{"type":"array","items":{"$ref":"#/$defs/ChangeDescriptor"}},"changed_units":{"type":"array","items":{"$ref":"#/$defs/ChangedPolicyUnit"}},"obligations":{"type":"array","items":{"$ref":"#/$defs/Obligation"}},"fact_requirements":{"type":"array","items":{"$ref":"#/$defs/FactRequirementWork"}},"reading_plan":{"type":"array","items":{"$ref":"#/$defs/ReadingPlanEntry"}},"next_operations":{"type":"array","items":{"$ref":"#/$defs/NextOperation"}},"summary":{"type":"string"}},"additionalProperties":false},"CompleteResult":{"type":"object","required":["kind","handle","status","context","changes","changed_units","coverage_certificates","fact_observations","dispositions","reading_plan","completion"],"properties":{"kind":{"const":"complete-result"},"handle":{"$ref":"#/$defs/AnalysisHandle"},"status":{"const":"complete"},"context":{"$ref":"#/$defs/AnalysisContext"},"changes":{"type":"array","items":{"$ref":"#/$defs/ChangeDescriptor"}},"changed_units":{"type":"array","items":{"$ref":"#/$defs/ChangedPolicyUnit"}},"coverage_certificates":{"type":"array","items":{"$ref":"#/$defs/CoverageCertificate"},"uniqueItems":true},"fact_observations":{"type":"array","items":{"$ref":"#/$defs/FactObservation"},"uniqueItems":true},"dispositions":{"type":"array","items":{"$ref":"#/$defs/DispositionRecord"}},"reading_plan":{"type":"array","items":{"$ref":"#/$defs/ReadingPlanEntry"}},"completion":{"$ref":"#/$defs/CompletionProof"},"summary":{"type":"string"}},"additionalProperties":false},"RepositoryPath":{"type":"array","items":{"$ref":"#/$defs/NonEmptyString"},"minItems":1},"ProvenanceRecord":{"type":"object","required":["snapshot","path"],"properties":{"snapshot":{"$ref":"#/$defs/SnapshotHandle"},"path":{"$ref":"#/$defs/RepositoryPath"}},"additionalProperties":false},"SnapshotInspectionResult":{"type":"object","required":["kind","snapshot"],"properties":{"kind":{"const":"snapshot-inspection-result"},"snapshot":{"$ref":"#/$defs/SnapshotSummary"}},"additionalProperties":false},"PolicyInspectionResult":{"type":"object","required":["kind","policy","declaration","representation_digest","structural_digest","provenance"],"properties":{"kind":{"const":"policy-inspection-result"},"policy":{"$ref":"#/$defs/SnapshotChildHandle"},"declaration":{"oneOf":[{"$ref":"#/$defs/CanonicalModuleDeclaration"},{"$ref":"#/$defs/PolicyUnitDeclaration"}]},"representation_digest":{"$ref":"#/$defs/Digest"},"structural_digest":{"$ref":"#/$defs/Digest"},"provenance":{"$ref":"#/$defs/ProvenanceRecord"}},"additionalProperties":false},"RelationshipInspectionResult":{"type":"object","required":["kind","relationship","policy_semantics","provenance"],"properties":{"kind":{"const":"relationship-inspection-result"},"relationship":{"$ref":"#/$defs/RelationshipSummary"},"policy_semantics":{"oneOf":[{"$ref":"#/$defs/PolicyRelationshipInspection"},{"type":"null"}]},"provenance":{"$ref":"#/$defs/ProvenanceRecord"}},"additionalProperties":false},"AnalysisInspectionResult":{"type":"object","required":["kind","state"],"properties":{"kind":{"const":"analysis-inspection-result"},"state":{"$ref":"#/$defs/AnalysisState"}},"additionalProperties":false},"AnalysisChildArtifact":{"oneOf":[{"$ref":"#/$defs/AnalysisContext"},{"$ref":"#/$defs/FactRequirement"},{"$ref":"#/$defs/FactObservation"},{"$ref":"#/$defs/Obligation"},{"$ref":"#/$defs/CoverageRequirement"},{"$ref":"#/$defs/CoverageCertificate"}]},"AnalysisChildInspectionResult":{"type":"object","required":["kind","handle","artifact"],"properties":{"kind":{"const":"analysis-child-inspection-result"},"handle":{"$ref":"#/$defs/AnalysisChildHandle"},"artifact":{"$ref":"#/$defs/AnalysisChildArtifact"}},"additionalProperties":false},"InspectionResult":{"oneOf":[{"$ref":"#/$defs/SnapshotInspectionResult"},{"$ref":"#/$defs/PolicyInspectionResult"},{"$ref":"#/$defs/RelationshipInspectionResult"},{"$ref":"#/$defs/AnalysisInspectionResult"},{"$ref":"#/$defs/AnalysisChildInspectionResult"}]},"InspectCall":{"type":"object","required":["handle"],"properties":{"handle":{"$ref":"#/$defs/InspectableHandle"}},"additionalProperties":false},"RejectedResult":{"type":"object","required":["kind","code","outcome","message","details","next_operations"],"properties":{"kind":{"const":"rejected-result"},"code":{"$ref":"#/$defs/CanonicalId"},"outcome":{"enum":["invalid","unavailable","unsupported","unauthorized"]},"target":{"$ref":"#/$defs/NonEmptyString"},"message":{"$ref":"#/$defs/NonEmptyString"},"details":{"type":"object","additionalProperties":{"$ref":"#/$defs/ScalarValue"}},"next_operations":{"type":"array","items":{"$ref":"#/$defs/NextOperation"}}},"additionalProperties":false},"AuthoredRoutingRule":{"type":"object","required":["id","target","when","condition"],"properties":{"id":{"$ref":"#/$defs/CanonicalId"},"target":{"$ref":"#/$defs/CanonicalId"},"when":{"$ref":"#/$defs/ApplicabilityExpression"},"condition":{"$ref":"#/$defs/NonEmptyString"}},"additionalProperties":false},"AuthoredRoutingFact":{"type":"object","required":["id","semantic_revision","type","nullable","values","aliases","meaning","prompt"],"properties":{"id":{"$ref":"#/$defs/CanonicalId"},"semantic_revision":{"type":"integer","minimum":1},"type":{"enum":["boolean","enum","string","string-set","enum-set","canonical-id"]},"nullable":{"type":"boolean"},"values":{"type":"array","items":{"type":"string"},"uniqueItems":true},"aliases":{"type":"array","items":{"$ref":"#/$defs/CanonicalId"},"uniqueItems":true},"meaning":{"$ref":"#/$defs/NonEmptyString"},"prompt":{"$ref":"#/$defs/NonEmptyString"}},"additionalProperties":false},"PutRoutingRuleEdit":{"type":"object","required":["kind","rule","rationale"],"properties":{"kind":{"const":"put-routing-rule"},"rule":{"$ref":"#/$defs/AuthoredRoutingRule"},"rationale":{"$ref":"#/$defs/NonEmptyString"}},"additionalProperties":false},"RemoveRoutingRuleEdit":{"type":"object","required":["kind","rule","rationale"],"properties":{"kind":{"const":"remove-routing-rule"},"rule":{"$ref":"#/$defs/CanonicalId"},"rationale":{"$ref":"#/$defs/NonEmptyString"}},"additionalProperties":false},"PutRoutingFactEdit":{"type":"object","required":["kind","fact","rationale"],"properties":{"kind":{"const":"put-routing-fact"},"fact":{"$ref":"#/$defs/AuthoredRoutingFact"},"rationale":{"$ref":"#/$defs/NonEmptyString"}},"additionalProperties":false},"RemoveRoutingFactEdit":{"type":"object","required":["kind","fact","rationale"],"properties":{"kind":{"const":"remove-routing-fact"},"fact":{"$ref":"#/$defs/CanonicalId"},"rationale":{"$ref":"#/$defs/NonEmptyString"}},"additionalProperties":false},"VerificationFailure":{"type":"object","additionalProperties":false,"required":["code","message","suite","check"],"properties":{"code":{"$ref":"#/$defs/NonEmptyString"},"message":{"$ref":"#/$defs/NonEmptyString"},"suite":{"type":["string","null"]},"check":{"type":["string","null"]}}},"VerificationReport":{"type":"object","additionalProperties":false,"required":["passed","exit_code","suites","checks","failures"],"properties":{"passed":{"type":"boolean"},"exit_code":{"enum":[0,1,2,3,4]},"suites":{"type":"integer","minimum":0},"checks":{"type":"integer","minimum":0},"failures":{"type":"array","items":{"$ref":"#/$defs/VerificationFailure"}}}},"VerifyRepositoryCall":{"type":"object","additionalProperties":false,"required":["kind","refresh_verification_inputs"],"properties":{"kind":{"const":"verify-repository"},"refresh_verification_inputs":{"type":"boolean"}}},"VerifyRepositoryResult":{"type":"object","additionalProperties":false,"required":["kind","refreshed_verification_inputs","verification"],"properties":{"kind":{"const":"verify-repository-result"},"refreshed_verification_inputs":{"type":"boolean"},"verification":{"$ref":"#/$defs/VerificationReport"}}},"VerifyProposalCall":{"type":"object","additionalProperties":false,"required":["kind","revision"],"properties":{"kind":{"const":"verify-proposal"},"revision":{"$ref":"#/$defs/ProposalRevisionHandle"},"readiness":{"$ref":"#/$defs/ReadinessHandle"}}},"VerifyProposalResult":{"type":"object","additionalProperties":false,"required":["kind","revision","verification"],"properties":{"kind":{"const":"verify-proposal-result"},"revision":{"$ref":"#/$defs/ProposalRevisionHandle"},"verification":{"$ref":"#/$defs/VerificationReport"},"readiness":{"$ref":"#/$defs/ReadinessHandle"}}},"RoutingConfiguration":{"type":"object","additionalProperties":false,"required":["facts","rules"],"properties":{"facts":{"type":"array","items":{"$ref":"#/$defs/AuthoredRoutingFact"}},"rules":{"type":"array","items":{"$ref":"#/$defs/AuthoredRoutingRule"}}}},"PolicyCoverageStatus":{"type":"object","required":["subject","requirement_id","status"],"properties":{"subject":{"$ref":"#/$defs/CanonicalId"},"requirement_id":{"$ref":"#/$defs/Digest"},"status":{"enum":["current-attestation","review-required"]},"authority":{"$ref":"#/$defs/CoverageAuditAuthority"}},"additionalProperties":false},"ReadCoverage":{"type":"object","description":"Repository attestation status bound to this snapshot or proposal. Empty subjects means no registered policy units in scope, not complete coverage. Analysis-local attestations are not repository certificates.","required":["subjects"],"properties":{"subjects":{"type":"array","items":{"$ref":"#/$defs/PolicyCoverageStatus"}}},"additionalProperties":false},"AuditPolicyUnitEdit":{"type":"object","required":["kind","policy","rationale"],"properties":{"kind":{"const":"audit-policy-unit"},"policy":{"$ref":"#/$defs/CanonicalId"},"rationale":{"$ref":"#/$defs/NonEmptyString"}},"additionalProperties":false},"CoverageAuditAuthority":{"type":"object","required":["issuer","principal","authorization_id"],"properties":{"issuer":{"$ref":"#/$defs/NonEmptyString"},"principal":{"$ref":"#/$defs/NonEmptyString"},"authorization_id":{"$ref":"#/$defs/NonEmptyString"}},"additionalProperties":false},"EvidenceCheckRetirement":{"type":"object","additionalProperties":false,"required":["suite","check"],"properties":{"suite":{"type":"string","minLength":1},"check":{"type":"string","minLength":1}}},"EvidenceSuiteDescription":{"type":"object","additionalProperties":false,"required":["suite","description"],"properties":{"suite":{"type":"string","minLength":1},"description":{"type":"string","minLength":1}}},"EvidenceRelationshipUpdate":{"type":"object","additionalProperties":false,"required":["source_policy","consumer","relation","evidence_owner","rationale"],"properties":{"source_policy":{"type":"string","minLength":1},"consumer":{"type":"string","minLength":1},"relation":{"type":"string","minLength":1},"evidence_owner":{"type":"string","minLength":1},"rationale":{"type":"string","minLength":1}}},"EvidenceConsumerRegistration":{"type":"object","additionalProperties":false,"required":["path","artifact_kind","source_policies","relation","evidence_owner","rationale"],"properties":{"path":{"type":"string","minLength":1},"artifact_kind":{"type":"string","enum":["implementation-artifact","fixture"]},"source_policies":{"type":"array","items":{"type":"string","minLength":1},"minItems":1,"uniqueItems":true},"relation":{"type":"string","enum":["implementation-projection","fixture-projection"]},"evidence_owner":{"type":"string","minLength":1},"rationale":{"type":"string","minLength":1}}},"EvidenceMaintenancePlan":{"type":"object","additionalProperties":false,"required":["prune_stale_certificates","retire_suites","retire_checks","retire_inputs","suite_descriptions","replacement_evidence_owner","replacement_evidence_rationale","relationship_updates","consumer_registrations"],"properties":{"prune_stale_certificates":{"type":"boolean"},"retire_suites":{"type":"array","items":{"type":"string","minLength":1},"uniqueItems":true},"retire_checks":{"type":"array","items":{"$ref":"#/$defs/EvidenceCheckRetirement"}},"retire_inputs":{"type":"array","items":{"type":"string","minLength":1},"uniqueItems":true},"suite_descriptions":{"type":"array","items":{"$ref":"#/$defs/EvidenceSuiteDescription"}},"replacement_evidence_owner":{"type":"string","minLength":1},"replacement_evidence_rationale":{"type":"string","minLength":1},"relationship_updates":{"type":"array","items":{"$ref":"#/$defs/EvidenceRelationshipUpdate"}},"consumer_registrations":{"type":"array","items":{"$ref":"#/$defs/EvidenceConsumerRegistration"}},"unregister_policy_subjects":{"type":"array","items":{"type":"string","minLength":1},"uniqueItems":true,"description":"Remove selected review-subject registrations and their source relationships while preserving normative Markdown."}}},"MaintainEvidenceCall":{"type":"object","additionalProperties":false,"required":["kind","expected_revision","evidence","plan","apply"],"properties":{"kind":{"const":"maintain-evidence"},"expected_revision":{"type":"string","minLength":1},"evidence":{"type":"array","items":{"$ref":"#/$defs/EvidenceReference"},"minItems":1},"plan":{"$ref":"#/$defs/EvidenceMaintenancePlan"},"apply":{"type":"boolean"}}},"MaintainEvidenceResult":{"type":"object","additionalProperties":false,"required":["kind","applied","changed_files","removed_files","verification"],"properties":{"kind":{"const":"maintain-evidence-result"},"applied":{"type":"boolean"},"changed_files":{"type":"array","items":{"type":"string","minLength":1}},"removed_files":{"type":"array","items":{"type":"string","minLength":1}},"verification":{"$ref":"#/$defs/VerificationReport"}}},"RouteCall":{"type":"object","required":["facts"],"properties":{"facts":{"$ref":"#/$defs/FactSet"},"snapshot":{"$ref":"#/$defs/SnapshotHandle"}},"additionalProperties":false},"ReadCall":{"type":"object","required":["target"],"properties":{"target":{"$ref":"#/$defs/CanonicalId"},"include_routing":{"type":"boolean"},"include_coverage":{"type":"boolean","description":"Include current repository attestation status for registered policy units in this read scope."},"snapshot":{"$ref":"#/$defs/SnapshotHandle"},"detail":{"enum":["compact","full"],"description":"Compact preserves exact policy and essential authority; full includes all relationship rows."}},"additionalProperties":false},"RelatedCall":{"type":"object","required":["target","groups","direction","transitive"],"properties":{"target":{"$ref":"#/$defs/CanonicalId"},"groups":{"type":"array","minItems":1,"uniqueItems":true,"items":{"$ref":"#/$defs/CanonicalId"}},"direction":{"enum":["incoming","outgoing","both"]},"transitive":{"type":"boolean","default":false},"snapshot":{"$ref":"#/$defs/SnapshotHandle"}},"additionalProperties":false},"CompactReadResult":{"type":"object","required":["kind","snapshot","policy","content","requires","specializes","next_operations","detail"],"properties":{"kind":{"const":"compact-read-result"},"snapshot":{"$ref":"#/$defs/SnapshotHandle"},"policy":{"$ref":"#/$defs/PolicySummary"},"content":{"type":"string"},"requires":{"type":"array","items":{"$ref":"#/$defs/CanonicalId"},"uniqueItems":true},"specializes":{"type":"array","items":{"$ref":"#/$defs/CanonicalId"},"uniqueItems":true},"next_operations":{"type":"array","items":{"$ref":"#/$defs/NextOperation"}},"summary":{"type":"string"},"routing":{"$ref":"#/$defs/RoutingConfiguration"},"coverage":{"$ref":"#/$defs/ReadCoverage"},"detail":{"const":"compact"},"application_exposure":{"$ref":"#/$defs/ApplicationExposureState"},"provenance":{"type":"array","items":{"$ref":"#/$defs/CanonicalId"}}},"additionalProperties":false},"RoutingFactsCall":{"type":"object","additionalProperties":false,"required":[],"properties":{"snapshot":{"$ref":"#/$defs/SnapshotHandle"}}},"RoutingFactsResult":{"type":"object","additionalProperties":false,"required":["kind","snapshot","facts"],"properties":{"kind":{"const":"routing-facts-result"},"snapshot":{"$ref":"#/$defs/SnapshotHandle"},"facts":{"type":"array","items":{"$ref":"#/$defs/AuthoredRoutingFact"}}}},"RoutingQuestion":{"type":"object","additionalProperties":false,"required":["id","kind","prompt","state","fact"],"properties":{"id":{"$ref":"#/$defs/CanonicalId"},"kind":{"const":"applicability-fact"},"prompt":{"$ref":"#/$defs/NonEmptyString"},"state":{"const":"required"},"fact":{"$ref":"#/$defs/AuthoredRoutingFact"}}},"RoutingRuleExplanation":{"type":"object","additionalProperties":false,"required":["id","target","when","state"],"properties":{"id":{"$ref":"#/$defs/CanonicalId"},"target":{"$ref":"#/$defs/CanonicalId"},"when":{"$ref":"#/$defs/ApplicabilityExpression"},"state":{"enum":["selected","unresolved"]}}},"AgentRouteResult":{"type":"object","required":["kind","snapshot","reading_plan","unresolved_questions","next_operations","facts","rules"],"properties":{"kind":{"const":"agent-route-result"},"snapshot":{"$ref":"#/$defs/SnapshotHandle"},"reading_plan":{"type":"array","items":{"$ref":"#/$defs/ReadingPlanEntry"}},"unresolved_questions":{"type":"array","items":{"$ref":"#/$defs/RoutingQuestion"}},"next_operations":{"type":"array","items":{"$ref":"#/$defs/NextOperation"}},"summary":{"type":"string"},"facts":{"$ref":"#/$defs/FactSet"},"rules":{"type":"array","items":{"$ref":"#/$defs/RoutingRuleExplanation"}}},"additionalProperties":false},"WorkflowContext":{"oneOf":[{"$ref":"#/$defs/ProposalRevisionHandle"},{"$ref":"#/$defs/AnalysisHandle"},{"$ref":"#/$defs/ReadinessHandle"}]},"ProposeCall":{"type":"object","additionalProperties":false,"properties":{"snapshot":{"$ref":"#/$defs/SnapshotHandle"},"change_set":{"$ref":"#/$defs/StandardsChangeSet"}},"required":["change_set"]},"ReviseCall":{"type":"object","additionalProperties":false,"properties":{"context":{"$ref":"#/$defs/WorkflowContext"},"change_set":{"$ref":"#/$defs/StandardsChangeSet"}},"required":["context","change_set"]},"AnalyzeCall":{"type":"object","additionalProperties":false,"properties":{"context":{"$ref":"#/$defs/WorkflowContext"}},"required":["context"]},"ResolveWorkflowCall":{"type":"object","additionalProperties":false,"properties":{"context":{"$ref":"#/$defs/WorkflowContext"},"submission":{"$ref":"#/$defs/Submission"}},"required":["context","submission"]},"ReviewCall":{"type":"object","additionalProperties":false,"properties":{"context":{"$ref":"#/$defs/WorkflowContext"},"decisions":{"type":"array","minItems":3,"maxItems":3,"uniqueItems":true,"items":{"$ref":"#/$defs/ReviewDecision"}}},"required":["context","decisions"]},"ApplyCall":{"type":"object","additionalProperties":false,"properties":{"context":{"$ref":"#/$defs/WorkflowContext"}},"required":["context"]},"RecoverCall":{"type":"object","additionalProperties":false,"properties":{"context":{"$ref":"#/$defs/WorkflowContext"}},"required":["context"]},"WorkflowStatusCall":{"type":"object","additionalProperties":false,"properties":{"context":{"$ref":"#/$defs/WorkflowContext"}},"required":["context"]},"ResumeCall":{"type":"object","additionalProperties":false,"properties":{"context":{"$ref":"#/$defs/WorkflowContext"}},"required":["context"]},"WorkflowContinuation":{"type":"object","additionalProperties":false,"properties":{"operation":{"enum":["revise","analyze","resolve_workflow","review","apply","recover","workflow_status","resume"]},"context":{"$ref":"#/$defs/WorkflowContext"},"required_inputs":{"type":"array","uniqueItems":true,"items":{"enum":["change_set","submission","decisions"]}}},"required":["operation","context","required_inputs"]},"WorkflowOutcome":{"oneOf":[{"$ref":"#/$defs/CreateProposalResult"},{"$ref":"#/$defs/ReviseProposalResult"},{"$ref":"#/$defs/PendingResult"},{"$ref":"#/$defs/CompleteResult"},{"$ref":"#/$defs/ReviewProposalResult"},{"$ref":"#/$defs/ApplyProposalResult"},{"$ref":"#/$defs/ApplicationRecoveryRequiredResult"},{"$ref":"#/$defs/RecoverApplicationResult"},{"$ref":"#/$defs/RejectedResult"}]},"WorkflowResult":{"type":"object","additionalProperties":false,"properties":{"kind":{"const":"workflow-result"},"context":{"$ref":"#/$defs/WorkflowContext"},"proposal":{"$ref":"#/$defs/ProposalHandle"},"revision":{"$ref":"#/$defs/ProposalRevisionHandle"},"status":{"enum":["draft","needs-action","complete","requires-change","ready","recovery-required","applied","rejected","stale"]},"next_operations":{"type":"array","items":{"$ref":"#/$defs/WorkflowContinuation"}},"outcome":{"$ref":"#/$defs/WorkflowOutcome"}},"required":["kind","context","proposal","revision","status","next_operations"]},"FocusedQueryNextOperation":{"type":"object","required":["operation","request_kind","snapshot"],"properties":{"operation":{"enum":["route","read","related"]},"request_kind":{"enum":["route","read","related"]},"target":{"$ref":"#/$defs/CanonicalId"},"snapshot":{"$ref":"#/$defs/SnapshotHandle"}},"additionalProperties":false},"RewriteNavigationIndexEdit":{"type":"object","required":["kind","entrypoint","destinations","rationale"],"properties":{"kind":{"const":"rewrite-navigation-index"},"entrypoint":{"$ref":"#/$defs/AuthoringTargetHandle"},"destinations":{"type":"array","items":{"$ref":"#/$defs/CanonicalId"},"minItems":1,"uniqueItems":true},"rationale":{"$ref":"#/$defs/NonEmptyString"},"retargets":{"type":"array","items":{"$ref":"#/$defs/NavigationRetarget"},"uniqueItems":true}},"additionalProperties":false},"NavigationIndexEntry":{"type":"object","required":["id","entrypoint","destinations"],"properties":{"id":{"$ref":"#/$defs/CanonicalId"},"entrypoint":{"$ref":"#/$defs/AuthoringTargetHandle"},"destinations":{"type":"array","items":{"$ref":"#/$defs/CanonicalId"},"uniqueItems":true},"content":{"$ref":"#/$defs/NonEmptyString"}},"additionalProperties":false},"NavigationIndexesResult":{"type":"object","required":["kind","authority","indexes","next_operations"],"properties":{"kind":{"const":"navigation-indexes-result"},"authority":{"oneOf":[{"$ref":"#/$defs/SnapshotHandle"},{"$ref":"#/$defs/ProposalRevisionHandle"}]},"indexes":{"type":"array","items":{"$ref":"#/$defs/NavigationIndexEntry"},"minItems":1},"next_operations":{"type":"array","items":{"$ref":"#/$defs/NextOperation"},"maxItems":0}},"additionalProperties":false},"NavigationRetarget":{"type":"object","required":["entrypoint","standard"],"properties":{"entrypoint":{"$ref":"#/$defs/AuthoringTargetHandle"},"standard":{"$ref":"#/$defs/CanonicalId"}},"additionalProperties":false},"ApplicationNextOperation":{"type":"object","additionalProperties":false,"required":["operation","snapshot"],"properties":{"operation":{"enum":["read","related","routing_facts","route","query","inspect"]},"snapshot":{"$ref":"#/$defs/SnapshotHandle"},"target":{"$ref":"#/$defs/CanonicalId"},"handle":{"$ref":"#/$defs/SnapshotChildHandle"}}},"ApplicationRejectedResult":{"type":"object","additionalProperties":false,"required":["kind","purpose","code","outcome","message","next_operations"],"properties":{"kind":{"const":"application-rejected-result"},"purpose":{"const":"application"},"code":{"enum":["APPLICATION.CONTENT_UNAVAILABLE","APPLICATION.INPUT_INVALID","APPLICATION.OPERATION_UNAVAILABLE","APPLICATION.INTERNAL_UNAVAILABLE","APPLICATION.UNSUPPORTED_CAPTURE","APPLICATION.RESULT_LIMIT"]},"outcome":{"enum":["invalid","unsupported","unavailable"]},"message":{"type":"string"},"next_operations":{"type":"array","items":{"$ref":"#/$defs/ApplicationNextOperation"}}}},"ApplicationPolicy":{"type":"object","additionalProperties":false,"required":["id","handle","role","level"],"properties":{"id":{"$ref":"#/$defs/CanonicalId"},"handle":{"$ref":"#/$defs/SnapshotChildHandle"},"role":{"enum":["core","router","topic","workflow","profile","reference","prompt","template"]},"level":{"enum":["MUST","SHOULD","PROFILE","REFERENCE"]}}},"ApplicationRelationship":{"type":"object","additionalProperties":false,"required":["handle","source","target","relation","groups","direction"],"properties":{"handle":{"$ref":"#/$defs/SnapshotChildHandle"},"source":{"$ref":"#/$defs/CanonicalId"},"target":{"$ref":"#/$defs/CanonicalId"},"relation":{"type":"string"},"groups":{"type":"array","items":{"$ref":"#/$defs/CanonicalId"}},"direction":{"enum":["incoming","outgoing"]}}},"ApplicationReadResult":{"type":"object","additionalProperties":false,"required":["kind","purpose","snapshot","policy","content","scope","requires","specializes","next_operations"],"properties":{"kind":{"const":"application-read-result"},"purpose":{"const":"application"},"snapshot":{"$ref":"#/$defs/SnapshotHandle"},"policy":{"$ref":"#/$defs/ApplicationPolicy"},"content":{"type":"string"},"scope":{"$ref":"#/$defs/ReviewScope"},"requires":{"type":"array","items":{"$ref":"#/$defs/CanonicalId"}},"specializes":{"type":"array","items":{"$ref":"#/$defs/CanonicalId"}},"related":{"type":"array","items":{"$ref":"#/$defs/ApplicationRelationship"}},"next_operations":{"type":"array","items":{"$ref":"#/$defs/ApplicationNextOperation"}}}},"ApplicationRelatedResult":{"type":"object","additionalProperties":false,"required":["kind","purpose","snapshot","target","relationships","next_operations"],"properties":{"kind":{"const":"application-related-result"},"purpose":{"const":"application"},"snapshot":{"$ref":"#/$defs/SnapshotHandle"},"target":{"$ref":"#/$defs/CanonicalId"},"relationships":{"type":"array","items":{"$ref":"#/$defs/ApplicationRelationship"}},"next_operations":{"type":"array","items":{"$ref":"#/$defs/ApplicationNextOperation"}}}},"ApplicationReadingEntry":{"type":"object","additionalProperties":false,"required":["target","scope","authority","state"],"properties":{"target":{"$ref":"#/$defs/CanonicalId"},"scope":{"$ref":"#/$defs/ReviewScope"},"authority":{"enum":["normative","contextual"]},"state":{"const":"selected"}}},"ApplicationQuestion":{"type":"object","additionalProperties":false,"required":["fact"],"properties":{"fact":{"$ref":"#/$defs/AuthoredRoutingFact"}}},"ApplicationRouteResult":{"type":"object","additionalProperties":false,"required":["kind","purpose","snapshot","status","reading_plan","unresolved_questions","next_operations"],"properties":{"kind":{"const":"application-route-result"},"purpose":{"const":"application"},"snapshot":{"$ref":"#/$defs/SnapshotHandle"},"status":{"enum":["complete","needs-facts"]},"reading_plan":{"type":"array","items":{"$ref":"#/$defs/ApplicationReadingEntry"}},"unresolved_questions":{"type":"array","items":{"$ref":"#/$defs/ApplicationQuestion"}},"next_operations":{"type":"array","items":{"$ref":"#/$defs/ApplicationNextOperation"}}}},"ApplicationRoutingFactsResult":{"type":"object","additionalProperties":false,"required":["kind","purpose","snapshot","facts","next_operations"],"properties":{"kind":{"const":"application-routing-facts-result"},"purpose":{"const":"application"},"snapshot":{"$ref":"#/$defs/SnapshotHandle"},"facts":{"type":"array","items":{"$ref":"#/$defs/AuthoredRoutingFact"}},"next_operations":{"type":"array","items":{"$ref":"#/$defs/ApplicationNextOperation"}}}},"ApplicationReadCall":{"type":"object","additionalProperties":false,"required":["target"],"properties":{"target":{"$ref":"#/$defs/CanonicalId"},"snapshot":{"$ref":"#/$defs/SnapshotHandle"},"detail":{"enum":["compact","full"]}}},"ApplicationReadRequest":{"type":"object","additionalProperties":false,"required":["kind","target"],"properties":{"kind":{"const":"read"},"target":{"$ref":"#/$defs/CanonicalId"},"detail":{"enum":["compact","full"]}}},"ApplicationQueryRequest":{"oneOf":[{"$ref":"#/$defs/RouteRequest"},{"$ref":"#/$defs/ApplicationReadRequest"},{"$ref":"#/$defs/RelatedRequest"}]},"ApplicationQueryCall":{"type":"object","additionalProperties":false,"required":["snapshot","request"],"properties":{"snapshot":{"$ref":"#/$defs/SnapshotHandle"},"request":{"$ref":"#/$defs/ApplicationQueryRequest"}}},"ApplicationInspectCall":{"type":"object","additionalProperties":false,"required":["handle"],"properties":{"handle":{"$ref":"#/$defs/SnapshotChildHandle"}}},"AuthoredDecisionProvenance":{"type":"object","additionalProperties":false,"required":["id","subject","origin","rationale","evidence"],"properties":{"id":{"$ref":"#/$defs/CanonicalId"},"subject":{"$ref":"#/$defs/CanonicalId"},"origin":{"enum":["documented-original","reconstructed-history","current-justification","unrecorded"]},"rationale":{"type":"string"},"evidence":{"type":"array","items":{"$ref":"#/$defs/EvidenceReference"}},"assumptions":{"type":"array","items":{"type":"string"}},"limits":{"type":"array","items":{"type":"string"}},"alternatives":{"type":"array","items":{"type":"string"}},"reconsideration":{"type":"array","items":{"type":"string"}},"supersedes":{"type":"array","items":{"type":"string"}}}},"DecisionProvenanceRecord":{"type":"object","additionalProperties":false,"required":["id","subject","origin","rationale","evidence","assumptions","limits","alternatives","reconsideration","supersedes","subject_binding","retired"],"properties":{"id":{"$ref":"#/$defs/CanonicalId"},"subject":{"$ref":"#/$defs/CanonicalId"},"origin":{"enum":["documented-original","reconstructed-history","current-justification","unrecorded"]},"rationale":{"type":"string"},"evidence":{"type":"array","items":{"$ref":"#/$defs/EvidenceReference"}},"assumptions":{"type":"array","items":{"type":"string"}},"limits":{"type":"array","items":{"type":"string"}},"alternatives":{"type":"array","items":{"type":"string"}},"reconsideration":{"type":"array","items":{"type":"string"}},"supersedes":{"type":"array","items":{"type":"string"}},"subject_binding":{"$ref":"#/$defs/Digest"},"retired":{"type":"boolean"}}},"ApplicationExposureState":{"enum":["unreviewed","current","needs-review"]},"ProvenanceReadResult":{"type":"object","additionalProperties":false,"required":["kind","authority","record","state","next_operations"],"properties":{"kind":{"const":"provenance-read-result"},"authority":{"oneOf":[{"$ref":"#/$defs/SnapshotHandle"},{"$ref":"#/$defs/ProposalRevisionHandle"}]},"record":{"$ref":"#/$defs/DecisionProvenanceRecord"},"state":{"enum":["current","needs-review","retired"]},"next_operations":{"type":"array","items":{"$ref":"#/$defs/NextOperation"}}}},"OperationalReadResult":{"type":"object","additionalProperties":false,"required":["kind","authority","target","canonical_id","role","content","application_exposure","next_operations"],"properties":{"kind":{"const":"operational-read-result"},"authority":{"oneOf":[{"$ref":"#/$defs/SnapshotHandle"},{"$ref":"#/$defs/ProposalRevisionHandle"}]},"target":{"$ref":"#/$defs/AuthoringTargetHandle"},"canonical_id":{"$ref":"#/$defs/CanonicalId"},"role":{"enum":["prompt","template"]},"content":{"type":"string"},"application_exposure":{"$ref":"#/$defs/ApplicationExposureState"},"next_operations":{"type":"array","items":{"$ref":"#/$defs/NextOperation"}}}},"PutDecisionProvenanceEdit":{"type":"object","additionalProperties":false,"required":["kind","record"],"properties":{"kind":{"const":"put-provenance"},"record":{"$ref":"#/$defs/AuthoredDecisionProvenance"}}},"RetireDecisionProvenanceEdit":{"type":"object","additionalProperties":false,"required":["kind","id"],"properties":{"kind":{"const":"retire-provenance"},"id":{"$ref":"#/$defs/CanonicalId"}}},"ApproveApplicationContentEdit":{"type":"object","additionalProperties":false,"required":["kind","target"],"properties":{"kind":{"const":"approve-application-content"},"target":{"oneOf":[{"$ref":"#/$defs/CanonicalId"},{"$ref":"#/$defs/AuthoringTargetHandle"}]}}},"WithdrawApplicationContentEdit":{"type":"object","additionalProperties":false,"required":["kind","target"],"properties":{"kind":{"const":"withdraw-application-content"},"target":{"oneOf":[{"$ref":"#/$defs/CanonicalId"},{"$ref":"#/$defs/AuthoringTargetHandle"}]}}},"ReviseOperationalArtifactEdit":{"type":"object","additionalProperties":false,"required":["kind","target","title","body"],"properties":{"kind":{"const":"revise-operational-artifact"},"target":{"$ref":"#/$defs/AuthoringTargetHandle"},"title":{"$ref":"#/$defs/NonEmptyString"},"body":{"type":"string"}}},"PolicyScopeUpdate":{"type":"object","additionalProperties":false,"required":["policy","heading_path","semantics"],"properties":{"policy":{"$ref":"#/$defs/CanonicalId"},"heading_path":{"type":"array","minItems":1,"items":{"$ref":"#/$defs/NonEmptyString"}},"semantics":{"$ref":"#/$defs/PolicySemanticIntent"}}},"ReadManyItem":{"type":"object","required":["target"],"properties":{"target":{"$ref":"#/$defs/CanonicalId"},"include_routing":{"type":"boolean"},"include_coverage":{"type":"boolean","description":"Include current repository attestation status for registered policy units in this read scope."},"detail":{"enum":["compact","full"],"description":"Compact preserves exact policy and essential authority; full includes all relationship rows."}},"additionalProperties":false},"ReadManyCall":{"type":"object","additionalProperties":false,"required":["snapshot","items"],"description":"Read 1–32 selected items from one explicit snapshot, preserving order. The complete JSON result is limited to 2 MiB; any failed item rejects the entire request.","properties":{"snapshot":{"$ref":"#/$defs/SnapshotHandle"},"items":{"type":"array","minItems":1,"maxItems":32,"uniqueItems":true,"items":{"$ref":"#/$defs/ReadManyItem"}}}},"ReadManyResult":{"type":"object","additionalProperties":false,"required":["kind","snapshot","items"],"properties":{"kind":{"const":"read-many-result"},"snapshot":{"$ref":"#/$defs/SnapshotHandle"},"items":{"type":"array","minItems":1,"maxItems":32,"items":{"oneOf":[{"$ref":"#/$defs/CompactReadResult"},{"$ref":"#/$defs/ReadResult"},{"$ref":"#/$defs/NavigationIndexesResult"},{"$ref":"#/$defs/ProvenanceReadResult"},{"$ref":"#/$defs/OperationalReadResult"}]}}}},"ApplicationReadManyItem":{"type":"object","additionalProperties":false,"required":["target"],"properties":{"target":{"$ref":"#/$defs/CanonicalId"},"detail":{"enum":["compact","full"]}}},"ApplicationReadManyCall":{"type":"object","additionalProperties":false,"required":["snapshot","items"],"description":"Read 1–32 selected items from one explicit snapshot, preserving order. The complete JSON result is limited to 2 MiB; any failed item rejects the entire request.","properties":{"snapshot":{"$ref":"#/$defs/SnapshotHandle"},"items":{"type":"array","minItems":1,"maxItems":32,"uniqueItems":true,"items":{"$ref":"#/$defs/ApplicationReadManyItem"}}}},"ApplicationReadManyResult":{"type":"object","additionalProperties":false,"required":["kind","snapshot","items","purpose"],"properties":{"kind":{"const":"application-read-many-result"},"snapshot":{"$ref":"#/$defs/SnapshotHandle"},"items":{"type":"array","minItems":1,"maxItems":32,"items":{"oneOf":[{"$ref":"#/$defs/ApplicationReadResult"}]}},"purpose":{"const":"application"}}}}}') -DEFINITION_METADATA = freeze_json({'ActiveSnapshotSummary': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'lifecycle': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'source_revision': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'created_at': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'AgentRouteResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'reading_plan': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'unresolved_questions': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'next_operations': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'summary': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'facts': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'rules': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'AllExpression': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'operator': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'expressions': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'AlwaysExpression': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'operator': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'AnalysisChildArtifact': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'AnalysisChildHandle': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'analysis': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'child_kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'child_id': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'schema_version': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'AnalysisChildInspectionResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'handle': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'artifact': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'AnalysisContext': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'handle': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'subjects': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'changes': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'semantic_proposals': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'AnalysisExecutionContractView': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'authorization_authority_digest': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'providers': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'AnalysisHandle': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'id': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'schema_version': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'AnalysisId': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'AnalysisInspectionResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'state': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'AnalysisMaterialHandle': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'AnalysisRequest': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'base_snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'proposed_snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'changes': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'semantic_proposals': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'prior_analysis': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'contract_version': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'AnalysisState': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'handle': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'base_snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'proposed_reference': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'changes': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'semantic_proposals': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'fact_observations': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'dispositions': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'coverage_attestations': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'authorization_records': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'domain_contracts': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'execution_contracts': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'contract_version': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'AnalyzeCall': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'context': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'AnalyzeProposalCall': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'revision': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'AnyExpression': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'operator': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'expressions': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ApplicabilityExpression': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'ApplicationExposureState': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'ApplicationHandle': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'id': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'schema_version': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ApplicationId': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'ApplicationInspectCall': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'handle': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ApplicationNextOperation': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'operation': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'target': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'handle': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ApplicationPolicy': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'id': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'handle': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'role': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'level': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ApplicationQueryCall': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'request': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ApplicationQueryRequest': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'ApplicationQuestion': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'fact': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ApplicationReadCall': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'target': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'detail': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ApplicationReadManyCall': {'title': None, 'description': 'Read 1–32 selected items from one explicit snapshot, preserving order. The complete JSON result is limited to 2 MiB; any failed item rejects the entire request.', 'has_default': False, 'default': None, 'properties': {'snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'items': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ApplicationReadManyItem': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'target': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'detail': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ApplicationReadManyResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'items': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'purpose': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ApplicationReadRequest': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'target': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'detail': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ApplicationReadResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'purpose': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'policy': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'content': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'scope': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'requires': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'specializes': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'related': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'next_operations': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ApplicationReadingEntry': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'target': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'scope': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'authority': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'state': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ApplicationRecoveryRequiredResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'application': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'status': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'code': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'outcome': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'message': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ApplicationRejectedResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'purpose': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'code': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'outcome': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'message': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'next_operations': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ApplicationRelatedResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'purpose': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'target': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'relationships': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'next_operations': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ApplicationRelationship': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'handle': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'source': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'target': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'relation': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'groups': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'direction': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ApplicationRouteResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'purpose': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'status': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'reading_plan': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'unresolved_questions': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'next_operations': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ApplicationRoutingFactsResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'purpose': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'facts': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'next_operations': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ApplyCall': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'context': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ApplyProposalCall': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'readiness': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ApplyProposalResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'application': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'status': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ApproveApplicationContentEdit': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'target': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'AuditPolicyUnitEdit': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'policy': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'rationale': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'AuthoredDecisionProvenance': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'id': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'subject': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'origin': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'rationale': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'evidence': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'assumptions': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'limits': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'alternatives': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'reconsideration': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'supersedes': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'AuthoredRoutingFact': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'id': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'semantic_revision': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'type': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'nullable': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'values': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'aliases': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'meaning': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'prompt': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'AuthoredRoutingRule': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'id': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'target': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'when': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'condition': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'AuthoringTargetHandle': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'id': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'schema_version': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'AuthorizationId': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'AuthorizationRecord': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'reference': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'issuer_semantic_revision': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'principal': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'action': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'subject_kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'subject_id': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'authorization_evidence': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'revocation_authority': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'revocation_authority_semantic_revision': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'revocation_evidence': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'AuthorizationReference': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'id': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'issuer': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'capability': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'authority_digest': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'CanonicalId': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'CanonicalModuleDeclaration': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'id': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'role': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'level': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'applies_when': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'does_not_apply_when': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'requires': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'specializes': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'verification': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ChangeDescriptor': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'accepted_ids': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'proposed_ids': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'scope': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'accepted_module': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'proposed_module': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ChangePolicySemantics': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'accepted_semantic_revision': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'proposed_semantic_revision': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'intent': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ChangedPolicyUnit': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'policy': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'change_kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'classification': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'accepted_representation_digest': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'proposed_representation_digest': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'accepted_structural_digest': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'proposed_structural_digest': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'accepted_semantic_revision': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'proposed_semantic_revision': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'semantic_state': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'scope': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ChildId': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'CompactReadResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'policy': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'content': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'requires': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'specializes': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'next_operations': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'summary': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'routing': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'coverage': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'detail': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'application_exposure': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'provenance': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'CompleteResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'handle': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'status': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'context': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'changes': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'changed_units': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'coverage_certificates': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'fact_observations': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'dispositions': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'reading_plan': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'completion': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'summary': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'CompletionProof': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'required_coverage_subjects': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'certificate_subjects': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'reached_consumer_obligations': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'disposition_obligations': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'required_fact_requirements': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'observed_fact_requirements': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'non_consumer_obligations_resolved': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'applicability_resolved': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'authorization_valid': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'evidence_valid': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ConsumerDispositionSubmission': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'obligation': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'result': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'rationale': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'evidence': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'fingerprint': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ConsumerReviewContract': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'id': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'version': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'permitted_dispositions': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'evidence_contract': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'authorization_capability': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'semantics': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ConsumerReviewObligationReadingReason': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'obligation': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ContainsExpression': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'operator': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'fact': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'value': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'CoverageAttestation': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'requirement': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'conclusion': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'evidence': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'explicit_exclusions': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'rationale': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'auditor_provenance': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'schema_version': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'authorization': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'CoverageAttestationClaim': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'requirement': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'conclusion': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'evidence': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'explicit_exclusions': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'rationale': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'auditor_provenance': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'CoverageAttestationSubmission': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'claim': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'CoverageAuditAuthority': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'issuer': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'principal': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'authorization_id': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'CoverageCertificate': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'handle': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'requirement': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'subject': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'owner': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'semantic_revision': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'horizon_digest': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'relationship_digest': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'evidence_digests': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'fact_schema_digest': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'CoverageRequirement': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'handle': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'subject': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'owner': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'semantic_revision': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'relationship_kinds': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'horizon': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'required_evidence_contract': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'CreateProposalCall': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'base_snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'change_set': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'CreateProposalResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'proposal': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'revision': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'CreateSnapshotCall': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'CreateSnapshotResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'CreateStandardEdit': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'standard': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'requires': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'specializes': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'policy_units': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'DecisionDependency': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'class': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'identity': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'digest': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'DecisionFingerprint': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'decision_kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'decision_contract': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'schema_version': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'dependencies': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'DecisionProvenanceRecord': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'id': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'subject': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'origin': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'rationale': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'evidence': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'assumptions': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'limits': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'alternatives': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'reconsideration': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'supersedes': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'subject_binding': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'retired': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'DeleteSnapshotCall': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'DeleteSnapshotResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'purge_deadline': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'Digest': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'DispositionRecord': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'obligation': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'result': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'rationale': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'evidence': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'authorization': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'fingerprint': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'DomainContractReference': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'id': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'version': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'EdgeId': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'EqualsExpression': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'operator': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'fact': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'value': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'EvidenceCheckRetirement': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'suite': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'check': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'EvidenceConsumerRegistration': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'path': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'artifact_kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'source_policies': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'relation': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'evidence_owner': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'rationale': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'EvidenceMaintenancePlan': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'prune_stale_certificates': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'retire_suites': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'retire_checks': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'retire_inputs': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'suite_descriptions': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'replacement_evidence_owner': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'replacement_evidence_rationale': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'relationship_updates': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'consumer_registrations': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'unregister_policy_subjects': {'title': None, 'description': 'Remove selected review-subject registrations and their source relationships while preserving normative Markdown.', 'has_default': False, 'default': None}}}, 'EvidenceReference': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'id': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'digest': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'provider_contract': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'provider_contract_version': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'EvidenceRelationshipUpdate': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'source_policy': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'consumer': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'relation': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'evidence_owner': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'rationale': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'EvidenceSuiteDescription': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'suite': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'description': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ExistsExpression': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'operator': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'fact': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'FactObservation': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'handle': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'requirement': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'value': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'evidence': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'authorization': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'provider': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'FactRequirement': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'handle': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'fact': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'fact_semantic_revision': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'fact_contract_digest': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'context': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'value_contract': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'answer_contract': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'evidence_contract': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'authorization_capability': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'FactRequirementId': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'FactRequirementWork': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'requirement': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'prompt': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'dependent_programs': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'FactSet': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'FactValue': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'FactValueContract': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'type': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'states': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'nullable': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'values': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'FindProposalsCall': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'after': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'limit': {'title': None, 'description': None, 'has_default': True, 'default': 50}}}, 'FindProposalsResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'proposals': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'continuation': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'FindSnapshotsCall': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'lifecycle': {'title': None, 'description': None, 'has_default': True, 'default': 'active'}, 'after': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'limit': {'title': None, 'description': None, 'has_default': True, 'default': 50}}}, 'FindSnapshotsResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'snapshots': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'continuation': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'FocusedQueryNextOperation': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'operation': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'request_kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'target': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'GeneralSelectionReason': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'source': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'fact': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'edge': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'question': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ImpactDispositionSubmission': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'obligation': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'result': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'rationale': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'evidence': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'fingerprint': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ImpactTraceId': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'ImpactTraceReference': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'id': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'graph': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'applicability': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'InExpression': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'operator': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'fact': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'values': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'InspectCall': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'handle': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'InspectNextOperation': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'operation': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'request_kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'handle': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'InspectableHandle': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'InspectionResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'MaintainEvidenceCall': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'expected_revision': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'evidence': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'plan': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'apply': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'MaintainEvidenceResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'applied': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'changed_files': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'removed_files': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'verification': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ModuleRelationshipKey': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'relation': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'source': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'target': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'MovePolicyUnitEdit': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'policy': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'standard': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'after_policy': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'semantics': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'NavigationIndexEntry': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'id': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'entrypoint': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'destinations': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'content': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'NavigationIndexesResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'authority': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'indexes': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'next_operations': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'NavigationRetarget': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'entrypoint': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'standard': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'NewPolicyUnit': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'id': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'heading_chain': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'semantic_revision': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'intent': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'aliases': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'predecessors': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'successors': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'NextOperation': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'NonEmptyString': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'NotExpression': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'operator': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'expression': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'Obligation': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'handle': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'target': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'scope': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'reasons': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'state': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'applicability': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'permitted_submissions': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'review_contract': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'fingerprint': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ObligationId': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'OperationalReadResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'authority': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'target': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'canonical_id': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'role': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'content': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'application_exposure': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'next_operations': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'PendingResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'handle': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'status': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'context': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'changes': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'changed_units': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'obligations': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'fact_requirements': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'reading_plan': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'next_operations': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'summary': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'PolicyCoverageStatus': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'subject': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'requirement_id': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'status': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'authority': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'PolicyImpactSelectionReason': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'source': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'edge': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'relation': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'evidence_owner': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'traces': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'PolicyInspectionResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'policy': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'declaration': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'representation_digest': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'structural_digest': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'provenance': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'PolicyRelationship': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'source_policy': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'consumer': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'relation': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'applicability': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'source_scope': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'consumer_scope': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'evidence_owner': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'rationale': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'PolicyRelationshipInspection': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'relationship_kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'applicability': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'source_scope': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'consumer_scope': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'propagation': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'evidence_owner': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'rationale': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'PolicyRelationshipKey': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'source_policy': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'consumer': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'relation': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'PolicyScopeUpdate': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'policy': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'heading_path': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'semantics': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'PolicySemanticIntent': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'PolicySummary': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'handle': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'authority': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'scope': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'PolicyUnitDeclaration': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'id': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'module': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'heading_path': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'semantic_revision': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'lifecycle': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'aliases': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'predecessors': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'successors': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'PolicyUnitMapping': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'state': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'reason': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'policy_units': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'PrepareCall': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'request': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'PreservePolicySemantics': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'semantic_revision': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'intent': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ProposalHandle': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'id': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'schema_version': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ProposalId': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'ProposalPolicySummary': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'id': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'authority': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'scope': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ProposalReadResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'revision': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'policy': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'content': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'requires': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'specializes': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'related': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'next_operations': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'summary': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'routing': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'coverage': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'application_exposure': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'provenance': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ProposalRelatedResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'revision': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'target': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'authoring_target': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'policy_unit_mapping': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'relationships': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'next_operations': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'summary': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ProposalRelationshipSummary': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'source': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'target': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'relation': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'groups': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'direction': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'traversal_eligible': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'applicability': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ProposalRevisionHandle': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'id': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'schema_version': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ProposalRevisionId': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'ProposalRouteResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'revision': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'reading_plan': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'unresolved_questions': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'next_operations': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'summary': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ProposalSummary': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'proposal': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'head_revision': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ProposeCall': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'change_set': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ProvenanceReadResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'authority': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'record': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'state': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'next_operations': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ProvenanceRecord': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'path': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ProvideFactSubmission': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'requirement': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'value': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'evidence': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ProviderReference': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'id': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'contract': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'contract_version': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'input_digest': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'PutDecisionProvenanceEdit': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'record': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'PutPolicyRelationshipEdit': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'relationship': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'PutRoutingFactEdit': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'fact': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'rationale': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'PutRoutingRuleEdit': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'rule': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'rationale': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'QuarantinedSnapshotSummary': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'lifecycle': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'source_revision': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'created_at': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'purge_deadline': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'QueryCall': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'request': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'QueryNextOperation': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'operation': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'request_kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'target': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'QueryProposalCall': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'revision': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'request': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'QueryProposalNextOperation': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'operation': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'request_kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'target': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'revision': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'QueryProposalResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'QueryRequest': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'QueryResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'Question': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'id': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'prompt': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'state': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'permitted_answers': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ReadCall': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'target': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'include_routing': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'include_coverage': {'title': None, 'description': 'Include current repository attestation status for registered policy units in this read scope.', 'has_default': False, 'default': None}, 'snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'detail': {'title': None, 'description': 'Compact preserves exact policy and essential authority; full includes all relationship rows.', 'has_default': False, 'default': None}}}, 'ReadCoverage': {'title': None, 'description': 'Repository attestation status bound to this snapshot or proposal. Empty subjects means no registered policy units in scope, not complete coverage. Analysis-local attestations are not repository certificates.', 'has_default': False, 'default': None, 'properties': {'subjects': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ReadManyCall': {'title': None, 'description': 'Read 1–32 selected items from one explicit snapshot, preserving order. The complete JSON result is limited to 2 MiB; any failed item rejects the entire request.', 'has_default': False, 'default': None, 'properties': {'snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'items': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ReadManyItem': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'target': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'include_routing': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'include_coverage': {'title': None, 'description': 'Include current repository attestation status for registered policy units in this read scope.', 'has_default': False, 'default': None}, 'detail': {'title': None, 'description': 'Compact preserves exact policy and essential authority; full includes all relationship rows.', 'has_default': False, 'default': None}}}, 'ReadManyResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'items': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ReadRequest': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'target': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'include_routing': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'include_coverage': {'title': None, 'description': 'Include current repository attestation status for registered policy units in this read scope.', 'has_default': False, 'default': None}}}, 'ReadResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'policy': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'content': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'requires': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'specializes': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'related': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'next_operations': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'summary': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'routing': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'coverage': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'application_exposure': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'provenance': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ReadinessHandle': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'id': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'schema_version': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ReadinessId': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'ReadingPlanEntry': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'target': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'scope': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'authority': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'reasons': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'state': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ReadingPlanReason': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'RecoverApplicationCall': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'readiness': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'RecoverApplicationResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'application': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'status': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'RecoverCall': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'context': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'RejectedResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'code': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'outcome': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'target': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'message': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'details': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'next_operations': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'RelatedCall': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'target': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'groups': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'direction': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'transitive': {'title': None, 'description': None, 'has_default': True, 'default': False}, 'snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'RelatedRequest': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'target': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'groups': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'direction': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'transitive': {'title': None, 'description': None, 'has_default': True, 'default': False}}}, 'RelatedResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'target': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'authoring_target': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'policy_unit_mapping': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'relationships': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'next_operations': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'summary': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'RelationshipConsumer': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'RelationshipDisposition': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'relationship': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'disposition': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'replacement_consumer': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'rationale': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'evidence': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'RelationshipInspectionResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'relationship': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'policy_semantics': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'provenance': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'RelationshipKey': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'RelationshipSummary': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'handle': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'source': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'target': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'relation': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'groups': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'direction': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'traversal_eligible': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'applicability': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'RemovePolicyRelationshipEdit': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'relationship': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'RemoveRoutingFactEdit': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'fact': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'rationale': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'RemoveRoutingRuleEdit': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'rule': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'rationale': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ReplaceStandardRelationshipsEdit': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'standard': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'requires': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'specializes': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'rationale': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'RepositoryPath': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'RequiresReadingReason': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'edge': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'source': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ResolveCall': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'analysis': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'submission': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ResolveNextOperation': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'operation': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'request_kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'target': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'work': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'analysis': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ResolveWorkflowCall': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'context': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'submission': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ResumeCall': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'context': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'RetireDecisionProvenanceEdit': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'id': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'RetirePolicyUnitEdit': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'policy': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'retired_semantic_revision': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'successors': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'relationship_dispositions': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'evidence': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'RetireStandardEdit': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'standard': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'successors': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'relationship_dispositions': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'evidence': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ReviewCall': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'context': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'decisions': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ReviewDecision': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'owner': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'decision': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'rationale': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'evidence': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ReviewProposalCall': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'analysis': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'decisions': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'prior_readiness': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ReviewProposalResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'readiness': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'revision': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'status': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ReviewScope': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'ReviseCall': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'context': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'change_set': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ReviseOperationalArtifactEdit': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'target': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'title': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'body': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'RevisePolicyUnitEdit': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'policy': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'title': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'body': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'semantics': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ReviseProposalCall': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'expected_revision': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'change_set': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ReviseProposalResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'proposal': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'revision': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ReviseStandardEdit': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'standard': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'scope_updates': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'RewriteNavigationIndexEdit': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'entrypoint': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'destinations': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'rationale': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'retargets': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'RouteCall': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'facts': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'RouteRequest': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'facts': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'RouteResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'reading_plan': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'unresolved_questions': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'next_operations': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'summary': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'RoutingBaseReadingReason': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'projection': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'RoutingConfiguration': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'facts': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'rules': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'RoutingFactsCall': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'RoutingFactsResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'facts': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'RoutingQuestion': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'id': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'prompt': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'state': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'fact': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'RoutingRuleExplanation': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'id': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'target': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'when': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'state': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'RoutingRuleReadingReason': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'rule': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'facts': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ScalarValue': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'SelectionReason': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'SemanticProposal': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'policy': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'accepted_semantic_revision': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'proposed_semantic_revision': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'intent': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'structural_digest': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'SnapshotChildHandle': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'child_kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'child_id': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'schema_version': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'SnapshotHandle': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'id': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'schema_version': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'SnapshotId': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'SnapshotInspectionResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'SnapshotSummary': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'SpecializesReadingReason': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'edge': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'source': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'StandardContent': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'id': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'title': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'role': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'level': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'applies_when': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'does_not_apply_when': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'verification': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'body': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'StandardEdit': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'StandardsChangePurpose': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'summary': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'rationale': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'evidence': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'StandardsChangeSet': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'purpose': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'edits': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'StructuredScope': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'heading_path': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'Submission': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'Timestamp': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'UndeleteSnapshotCall': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'UndeleteSnapshotResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'VerificationFailure': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'code': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'message': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'suite': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'check': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'VerificationReport': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'passed': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'exit_code': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'suites': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'checks': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'failures': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'VerifyProposalCall': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'revision': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'readiness': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'VerifyProposalResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'revision': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'verification': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'readiness': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'VerifyRepositoryCall': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'refresh_verification_inputs': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'VerifyRepositoryResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'refreshed_verification_inputs': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'verification': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'WholeArtifactScope': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'WithdrawApplicationContentEdit': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'target': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'WorkflowContext': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'WorkflowContinuation': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'operation': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'context': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'required_inputs': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'WorkflowOutcome': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'WorkflowResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'context': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'proposal': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'revision': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'status': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'next_operations': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'outcome': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'WorkflowStatusCall': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'context': {'title': None, 'description': None, 'has_default': False, 'default': None}}}}) +_SCHEMA = json.loads('{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"https://coding-standards.local/contracts/standards-engine/a2-v32","title":"Standards Engine A2 contract","description":"Canonical typed contract for snapshot lifecycle, controlled authoring, navigation, inspection, and immutable standards-change analysis.","oneOf":[{"$ref":"#/$defs/AgentRouteResult"},{"$ref":"#/$defs/AnalyzeCall"},{"$ref":"#/$defs/AnalyzeProposalCall"},{"$ref":"#/$defs/ApplicationInspectCall"},{"$ref":"#/$defs/ApplicationQueryCall"},{"$ref":"#/$defs/ApplicationReadCall"},{"$ref":"#/$defs/ApplicationReadManyCall"},{"$ref":"#/$defs/ApplicationReadManyResult"},{"$ref":"#/$defs/ApplicationReadResult"},{"$ref":"#/$defs/ApplicationRecoveryRequiredResult"},{"$ref":"#/$defs/ApplicationRejectedResult"},{"$ref":"#/$defs/ApplicationRelatedResult"},{"$ref":"#/$defs/ApplicationRouteResult"},{"$ref":"#/$defs/ApplicationRoutingFactsResult"},{"$ref":"#/$defs/ApplyCall"},{"$ref":"#/$defs/ApplyProposalCall"},{"$ref":"#/$defs/ApplyProposalResult"},{"$ref":"#/$defs/CompactReadResult"},{"$ref":"#/$defs/CompleteResult"},{"$ref":"#/$defs/CreateProposalCall"},{"$ref":"#/$defs/CreateProposalResult"},{"$ref":"#/$defs/CreateSnapshotCall"},{"$ref":"#/$defs/CreateSnapshotResult"},{"$ref":"#/$defs/DeleteSnapshotCall"},{"$ref":"#/$defs/DeleteSnapshotResult"},{"$ref":"#/$defs/FindProposalsCall"},{"$ref":"#/$defs/FindProposalsResult"},{"$ref":"#/$defs/FindSnapshotsCall"},{"$ref":"#/$defs/FindSnapshotsResult"},{"$ref":"#/$defs/InspectCall"},{"$ref":"#/$defs/InspectionResult"},{"$ref":"#/$defs/MaintainEvidenceCall"},{"$ref":"#/$defs/MaintainEvidenceResult"},{"$ref":"#/$defs/NavigationIndexesResult"},{"$ref":"#/$defs/OperationalReadResult"},{"$ref":"#/$defs/PendingResult"},{"$ref":"#/$defs/PrepareCall"},{"$ref":"#/$defs/ProposeCall"},{"$ref":"#/$defs/ProvenanceReadResult"},{"$ref":"#/$defs/QueryCall"},{"$ref":"#/$defs/QueryProposalCall"},{"$ref":"#/$defs/QueryProposalResult"},{"$ref":"#/$defs/QueryResult"},{"$ref":"#/$defs/ReadCall"},{"$ref":"#/$defs/ReadManyCall"},{"$ref":"#/$defs/ReadManyResult"},{"$ref":"#/$defs/ReadResult"},{"$ref":"#/$defs/RecoverApplicationCall"},{"$ref":"#/$defs/RecoverApplicationResult"},{"$ref":"#/$defs/RecoverCall"},{"$ref":"#/$defs/RejectedResult"},{"$ref":"#/$defs/RelatedCall"},{"$ref":"#/$defs/RelatedResult"},{"$ref":"#/$defs/ResolveCall"},{"$ref":"#/$defs/ResolveWorkflowCall"},{"$ref":"#/$defs/ResumeCall"},{"$ref":"#/$defs/ReviewCall"},{"$ref":"#/$defs/ReviewProposalCall"},{"$ref":"#/$defs/ReviewProposalResult"},{"$ref":"#/$defs/ReviseCall"},{"$ref":"#/$defs/ReviseProposalCall"},{"$ref":"#/$defs/ReviseProposalResult"},{"$ref":"#/$defs/RouteCall"},{"$ref":"#/$defs/RoutingFactsCall"},{"$ref":"#/$defs/RoutingFactsResult"},{"$ref":"#/$defs/UndeleteSnapshotCall"},{"$ref":"#/$defs/UndeleteSnapshotResult"},{"$ref":"#/$defs/VerifyProposalCall"},{"$ref":"#/$defs/VerifyProposalResult"},{"$ref":"#/$defs/VerifyRepositoryCall"},{"$ref":"#/$defs/VerifyRepositoryResult"},{"$ref":"#/$defs/WorkflowResult"},{"$ref":"#/$defs/WorkflowStatusCall"}],"$defs":{"NonEmptyString":{"type":"string","minLength":1},"CanonicalId":{"type":"string","pattern":"^[A-Za-z0-9][A-Za-z0-9._:/-]*$"},"EdgeId":{"type":"string","minLength":1},"Digest":{"type":"string","pattern":"^sha256:[0-9a-f]{64}$"},"ObligationId":{"type":"string","pattern":"^obligation:sha256:[0-9a-f]{64}$"},"ImpactTraceId":{"type":"string","pattern":"^impact-trace:sha256:[0-9a-f]{64}$"},"FactRequirementId":{"type":"string","pattern":"^fact-requirement:sha256:[0-9a-f]{64}$"},"ScalarValue":{"oneOf":[{"type":"boolean"},{"type":"integer"},{"type":"string"},{"type":"null"}]},"FactValue":{"oneOf":[{"type":"object","required":["type","state","value"],"properties":{"type":{"const":"boolean"},"state":{"const":"known"},"value":{"type":"boolean"}},"additionalProperties":false},{"type":"object","required":["type","state","value"],"properties":{"type":{"enum":["boolean","enum","string","string-set","enum-set","canonical-id"]},"state":{"const":"known"},"value":{"type":"null"}},"additionalProperties":false},{"type":"object","required":["type","state","value"],"properties":{"type":{"enum":["enum","string","canonical-id"]},"state":{"const":"known"},"value":{"type":"string"}},"additionalProperties":false},{"type":"object","required":["type","state","value"],"properties":{"type":{"enum":["string-set","enum-set"]},"state":{"const":"known"},"value":{"type":"array","items":{"type":"string"},"uniqueItems":true}},"additionalProperties":false},{"type":"object","required":["type","state"],"properties":{"type":{"enum":["boolean","enum","string","string-set","enum-set","canonical-id"]},"state":{"enum":["known-absent","unknown"]}},"additionalProperties":false}]},"FactSet":{"type":"object","additionalProperties":{"$ref":"#/$defs/FactValue"}},"StructuredScope":{"type":"object","required":["kind","heading_path"],"properties":{"kind":{"const":"structured"},"heading_path":{"type":"array","minItems":1,"items":{"$ref":"#/$defs/NonEmptyString"}}},"additionalProperties":false},"WholeArtifactScope":{"type":"object","required":["kind"],"properties":{"kind":{"const":"whole-artifact"}},"additionalProperties":false},"ReviewScope":{"oneOf":[{"$ref":"#/$defs/StructuredScope"},{"$ref":"#/$defs/WholeArtifactScope"}]},"AllExpression":{"type":"object","required":["operator","expressions"],"properties":{"operator":{"const":"all"},"expressions":{"type":"array","minItems":1,"items":{"$ref":"#/$defs/ApplicabilityExpression"}}},"additionalProperties":false},"AnyExpression":{"type":"object","required":["operator","expressions"],"properties":{"operator":{"const":"any"},"expressions":{"type":"array","minItems":1,"items":{"$ref":"#/$defs/ApplicabilityExpression"}}},"additionalProperties":false},"NotExpression":{"type":"object","required":["operator","expression"],"properties":{"operator":{"const":"not"},"expression":{"$ref":"#/$defs/ApplicabilityExpression"}},"additionalProperties":false},"EqualsExpression":{"type":"object","required":["operator","fact","value"],"properties":{"operator":{"const":"equals"},"fact":{"$ref":"#/$defs/CanonicalId"},"value":{"$ref":"#/$defs/ScalarValue"}},"additionalProperties":false},"InExpression":{"type":"object","required":["operator","fact","values"],"properties":{"operator":{"const":"in"},"fact":{"$ref":"#/$defs/CanonicalId"},"values":{"type":"array","minItems":1,"uniqueItems":true,"items":{"$ref":"#/$defs/ScalarValue"}}},"additionalProperties":false},"ContainsExpression":{"type":"object","required":["operator","fact","value"],"properties":{"operator":{"const":"contains"},"fact":{"$ref":"#/$defs/CanonicalId"},"value":{"$ref":"#/$defs/ScalarValue"}},"additionalProperties":false},"ExistsExpression":{"type":"object","required":["operator","fact"],"properties":{"operator":{"const":"exists"},"fact":{"$ref":"#/$defs/CanonicalId"}},"additionalProperties":false},"AlwaysExpression":{"type":"object","required":["operator"],"properties":{"operator":{"const":"always"}},"additionalProperties":false},"ApplicabilityExpression":{"oneOf":[{"$ref":"#/$defs/AlwaysExpression"},{"$ref":"#/$defs/AllExpression"},{"$ref":"#/$defs/AnyExpression"},{"$ref":"#/$defs/NotExpression"},{"$ref":"#/$defs/EqualsExpression"},{"$ref":"#/$defs/InExpression"},{"$ref":"#/$defs/ContainsExpression"},{"$ref":"#/$defs/ExistsExpression"}]},"GeneralSelectionReason":{"type":"object","required":["kind"],"properties":{"kind":{"enum":["routing-fact","requires","specializes","changed-policy","question","audit-coverage","unmapped-normative-change","structured-scope-analysis-unsupported","navigation-index-change","supporting-content-change"]},"source":{"$ref":"#/$defs/CanonicalId"},"fact":{"$ref":"#/$defs/CanonicalId"},"edge":{"$ref":"#/$defs/EdgeId"},"question":{"$ref":"#/$defs/CanonicalId"}},"additionalProperties":false},"PolicyImpactSelectionReason":{"type":"object","required":["kind","source","edge","relation","evidence_owner","traces"],"properties":{"kind":{"const":"policy-impact-edge"},"source":{"$ref":"#/$defs/CanonicalId"},"edge":{"$ref":"#/$defs/EdgeId"},"relation":{"$ref":"#/$defs/CanonicalId"},"evidence_owner":{"$ref":"#/$defs/CanonicalId"},"traces":{"type":"array","minItems":1,"uniqueItems":true,"items":{"$ref":"#/$defs/ImpactTraceReference"}}},"additionalProperties":false},"SelectionReason":{"oneOf":[{"$ref":"#/$defs/GeneralSelectionReason"},{"$ref":"#/$defs/PolicyImpactSelectionReason"}]},"ImpactTraceReference":{"type":"object","required":["id","graph","applicability"],"properties":{"id":{"$ref":"#/$defs/ImpactTraceId"},"graph":{"enum":["accepted","proposed"]},"applicability":{"enum":["true","false","unknown"]}},"additionalProperties":false},"ConsumerReviewObligationReadingReason":{"type":"object","required":["kind","obligation"],"properties":{"kind":{"const":"consumer-review-obligation"},"obligation":{"$ref":"#/$defs/ObligationId"}},"additionalProperties":false},"RoutingBaseReadingReason":{"type":"object","required":["kind","projection"],"properties":{"kind":{"const":"routing-base"},"projection":{"$ref":"#/$defs/CanonicalId"}},"additionalProperties":false},"RoutingRuleReadingReason":{"type":"object","required":["kind","rule","facts"],"properties":{"kind":{"const":"routing-rule"},"rule":{"$ref":"#/$defs/CanonicalId"},"facts":{"type":"array","uniqueItems":true,"items":{"$ref":"#/$defs/CanonicalId"}}},"additionalProperties":false},"RequiresReadingReason":{"type":"object","required":["kind","edge","source"],"properties":{"kind":{"const":"requires"},"edge":{"$ref":"#/$defs/EdgeId"},"source":{"$ref":"#/$defs/CanonicalId"}},"additionalProperties":false},"SpecializesReadingReason":{"type":"object","required":["kind","edge","source"],"properties":{"kind":{"const":"specializes"},"edge":{"$ref":"#/$defs/EdgeId"},"source":{"$ref":"#/$defs/CanonicalId"}},"additionalProperties":false},"ReadingPlanReason":{"oneOf":[{"$ref":"#/$defs/ConsumerReviewObligationReadingReason"},{"$ref":"#/$defs/RoutingBaseReadingReason"},{"$ref":"#/$defs/RoutingRuleReadingReason"},{"$ref":"#/$defs/RequiresReadingReason"},{"$ref":"#/$defs/SpecializesReadingReason"}]},"ReadingPlanEntry":{"type":"object","required":["target","scope","authority","reasons","state"],"properties":{"target":{"$ref":"#/$defs/CanonicalId"},"scope":{"$ref":"#/$defs/ReviewScope"},"authority":{"enum":["normative","projection","contextual","evidence"]},"reasons":{"type":"array","minItems":1,"uniqueItems":true,"items":{"$ref":"#/$defs/ReadingPlanReason"}},"state":{"enum":["selected","conditional","unresolved"]}},"additionalProperties":false},"RouteRequest":{"type":"object","required":["kind","facts"],"properties":{"kind":{"const":"route"},"facts":{"$ref":"#/$defs/FactSet"}},"additionalProperties":false},"ReadRequest":{"type":"object","required":["kind","target"],"properties":{"kind":{"const":"read"},"target":{"$ref":"#/$defs/CanonicalId"},"include_routing":{"type":"boolean"},"include_coverage":{"type":"boolean","description":"Include current repository attestation status for registered policy units in this read scope."}},"additionalProperties":false},"RelatedRequest":{"type":"object","required":["kind","target","groups","direction","transitive"],"properties":{"kind":{"const":"related"},"target":{"$ref":"#/$defs/CanonicalId"},"groups":{"type":"array","minItems":1,"uniqueItems":true,"items":{"$ref":"#/$defs/CanonicalId"}},"direction":{"enum":["incoming","outgoing","both"]},"transitive":{"type":"boolean","default":false}},"additionalProperties":false},"QueryRequest":{"oneOf":[{"$ref":"#/$defs/RouteRequest"},{"$ref":"#/$defs/ReadRequest"},{"$ref":"#/$defs/RelatedRequest"}]},"PolicyUnitDeclaration":{"type":"object","required":["kind","id","module","heading_path","semantic_revision","lifecycle"],"properties":{"kind":{"const":"policy-unit"},"id":{"$ref":"#/$defs/CanonicalId"},"module":{"$ref":"#/$defs/CanonicalId"},"heading_path":{"type":"array","minItems":1,"items":{"$ref":"#/$defs/NonEmptyString"}},"semantic_revision":{"type":"integer","minimum":1},"lifecycle":{"const":"active"},"aliases":{"type":"array","uniqueItems":true,"items":{"$ref":"#/$defs/CanonicalId"}},"predecessors":{"type":"array","uniqueItems":true,"items":{"$ref":"#/$defs/CanonicalId"}},"successors":{"type":"array","uniqueItems":true,"items":{"$ref":"#/$defs/CanonicalId"}}},"additionalProperties":false},"CanonicalModuleDeclaration":{"type":"object","required":["kind","id","role","level","applies_when","does_not_apply_when","requires","specializes","verification"],"properties":{"kind":{"const":"canonical-module"},"id":{"$ref":"#/$defs/CanonicalId"},"role":{"enum":["core","router","workflow","profile","topic","reference"]},"level":{"enum":["MUST","SHOULD","PROFILE","REFERENCE"]},"applies_when":{"$ref":"#/$defs/NonEmptyString"},"does_not_apply_when":{"$ref":"#/$defs/NonEmptyString"},"requires":{"type":"array","uniqueItems":true,"items":{"$ref":"#/$defs/CanonicalId"}},"specializes":{"type":"array","uniqueItems":true,"items":{"$ref":"#/$defs/CanonicalId"}},"verification":{"$ref":"#/$defs/NonEmptyString"}},"additionalProperties":false},"PolicyRelationshipInspection":{"type":"object","required":["relationship_kind","applicability","source_scope","consumer_scope","propagation","evidence_owner","rationale"],"properties":{"relationship_kind":{"enum":["normative-consumer","router-projection","prompt-projection","template-projection","reference-projection","fixture-projection","enforcement-suite-projection","documentation-projection","implementation-projection"]},"applicability":{"$ref":"#/$defs/ApplicabilityExpression"},"source_scope":{"oneOf":[{"$ref":"#/$defs/ReviewScope"},{"type":"null"}]},"consumer_scope":{"oneOf":[{"$ref":"#/$defs/ReviewScope"},{"type":"null"}]},"propagation":{"const":"source-to-consumer"},"evidence_owner":{"$ref":"#/$defs/CanonicalId"},"rationale":{"$ref":"#/$defs/NonEmptyString"}},"additionalProperties":false},"SemanticProposal":{"type":"object","required":["policy","accepted_semantic_revision","proposed_semantic_revision","intent","structural_digest"],"properties":{"policy":{"$ref":"#/$defs/CanonicalId"},"accepted_semantic_revision":{"oneOf":[{"type":"integer","minimum":1},{"type":"null"}]},"proposed_semantic_revision":{"type":"integer","minimum":1},"intent":{"$ref":"#/$defs/NonEmptyString"},"structural_digest":{"$ref":"#/$defs/Digest"}},"additionalProperties":false},"ChangeDescriptor":{"type":"object","required":["kind","accepted_ids","proposed_ids","scope"],"properties":{"kind":{"enum":["module","modification","addition","removal","move","split","merge","navigation-index","supporting-content"]},"accepted_ids":{"type":"array","uniqueItems":true,"items":{"$ref":"#/$defs/CanonicalId"}},"proposed_ids":{"type":"array","uniqueItems":true,"items":{"$ref":"#/$defs/CanonicalId"}},"scope":{"$ref":"#/$defs/ReviewScope"},"accepted_module":{"$ref":"#/$defs/CanonicalId"},"proposed_module":{"$ref":"#/$defs/CanonicalId"}},"additionalProperties":false},"ChangedPolicyUnit":{"type":"object","required":["policy","change_kind","classification","accepted_representation_digest","proposed_representation_digest","accepted_structural_digest","proposed_structural_digest","accepted_semantic_revision","proposed_semantic_revision","semantic_state","scope"],"properties":{"policy":{"$ref":"#/$defs/CanonicalId"},"change_kind":{"enum":["modification","addition","removal","move","split-predecessor","split-successor","merge-predecessor","merge-successor"]},"classification":{"enum":["unchanged","representation-only-candidate","possibly-semantically-changed","semantically-changed","unresolved"]},"accepted_representation_digest":{"oneOf":[{"$ref":"#/$defs/Digest"},{"type":"null"}]},"proposed_representation_digest":{"oneOf":[{"$ref":"#/$defs/Digest"},{"type":"null"}]},"accepted_structural_digest":{"oneOf":[{"$ref":"#/$defs/Digest"},{"type":"null"}]},"proposed_structural_digest":{"oneOf":[{"$ref":"#/$defs/Digest"},{"type":"null"}]},"accepted_semantic_revision":{"oneOf":[{"type":"integer","minimum":1},{"type":"null"}]},"proposed_semantic_revision":{"oneOf":[{"type":"integer","minimum":1},{"type":"null"}]},"semantic_state":{"enum":["accepted-unchanged","proposed","removed","unresolved"]},"scope":{"$ref":"#/$defs/ReviewScope"}},"additionalProperties":false},"Question":{"type":"object","required":["id","kind","prompt","state","permitted_answers"],"properties":{"id":{"$ref":"#/$defs/CanonicalId"},"kind":{"enum":["applicability-fact","normative-classification","identity-resolution","scope-resolution"]},"prompt":{"$ref":"#/$defs/NonEmptyString"},"state":{"enum":["required","answered","blocked"]},"permitted_answers":{"type":"array","minItems":1,"uniqueItems":true,"items":{"$ref":"#/$defs/NonEmptyString"}}},"additionalProperties":false},"ConsumerReviewContract":{"type":"object","required":["kind","id","version","permitted_dispositions","evidence_contract","authorization_capability","semantics"],"properties":{"kind":{"const":"consumer-review-contract"},"id":{"$ref":"#/$defs/CanonicalId"},"version":{"type":"integer","minimum":1},"permitted_dispositions":{"type":"array","minItems":1,"uniqueItems":true,"items":{"enum":["updated","reviewed-no-change","not-applicable","blocked"]}},"evidence_contract":{"$ref":"#/$defs/CanonicalId"},"authorization_capability":{"$ref":"#/$defs/CanonicalId"},"semantics":{"$ref":"#/$defs/NonEmptyString"}},"additionalProperties":false},"DecisionDependency":{"type":"object","required":["class","identity","digest"],"properties":{"class":{"enum":["policy-unit","semantic-revision","structure","representation","module-locator","applicability-fact","relationship","audit","exception","evidence","provider-contract","applicability-contract","analysis-contract"]},"identity":{"$ref":"#/$defs/NonEmptyString"},"digest":{"$ref":"#/$defs/Digest"}},"additionalProperties":false},"DecisionFingerprint":{"type":"object","required":["decision_kind","decision_contract","schema_version","dependencies"],"properties":{"decision_kind":{"$ref":"#/$defs/CanonicalId"},"decision_contract":{"$ref":"#/$defs/CanonicalId"},"schema_version":{"const":1},"dependencies":{"type":"array","minItems":1,"items":{"$ref":"#/$defs/DecisionDependency"}}},"additionalProperties":false},"FactValueContract":{"type":"object","required":["type","states","nullable"],"properties":{"type":{"enum":["boolean","enum","string","string-set","enum-set","canonical-id"]},"states":{"const":["known","known-absent"]},"nullable":{"type":"boolean"},"values":{"type":"array","minItems":1,"uniqueItems":true,"items":{"type":"string"}}},"additionalProperties":false},"EvidenceReference":{"type":"object","required":["id","digest","provider_contract","provider_contract_version"],"properties":{"id":{"$ref":"#/$defs/CanonicalId"},"digest":{"$ref":"#/$defs/Digest"},"provider_contract":{"$ref":"#/$defs/CanonicalId"},"provider_contract_version":{"$ref":"#/$defs/NonEmptyString"}},"additionalProperties":false},"CompletionProof":{"type":"object","required":["required_coverage_subjects","certificate_subjects","reached_consumer_obligations","disposition_obligations","required_fact_requirements","observed_fact_requirements","non_consumer_obligations_resolved","applicability_resolved","authorization_valid","evidence_valid"],"properties":{"required_coverage_subjects":{"type":"array","uniqueItems":true,"items":{"$ref":"#/$defs/CanonicalId"}},"certificate_subjects":{"type":"array","uniqueItems":true,"items":{"$ref":"#/$defs/CanonicalId"}},"reached_consumer_obligations":{"type":"array","uniqueItems":true,"items":{"$ref":"#/$defs/ObligationId"}},"disposition_obligations":{"type":"array","uniqueItems":true,"items":{"$ref":"#/$defs/ObligationId"}},"required_fact_requirements":{"type":"array","uniqueItems":true,"items":{"$ref":"#/$defs/FactRequirementId"}},"observed_fact_requirements":{"type":"array","uniqueItems":true,"items":{"$ref":"#/$defs/FactRequirementId"}},"non_consumer_obligations_resolved":{"const":true},"applicability_resolved":{"const":true},"authorization_valid":{"const":true},"evidence_valid":{"const":true}},"additionalProperties":false},"Timestamp":{"type":"integer","minimum":0},"SnapshotId":{"type":"string","pattern":"^snapshot:v1:[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"},"AnalysisId":{"type":"string","pattern":"^analysis:sha256:[0-9a-f]{64}$"},"ProposalId":{"type":"string","pattern":"^proposal:v1:[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"},"ProposalRevisionId":{"type":"string","pattern":"^proposal-revision:sha256:[0-9a-f]{64}$"},"ReadinessId":{"type":"string","pattern":"^readiness:sha256:[0-9a-f]{64}$"},"ApplicationId":{"type":"string","pattern":"^application:sha256:[0-9a-f]{64}$"},"ChildId":{"type":"string","pattern":"^sha256:[0-9a-f]{64}$"},"AuthorizationId":{"type":"string","pattern":"^authorization:sha256:[0-9a-f]{64}$"},"SnapshotHandle":{"type":"object","required":["kind","id","schema_version"],"properties":{"kind":{"const":"snapshot-handle"},"id":{"$ref":"#/$defs/SnapshotId"},"schema_version":{"const":5}},"additionalProperties":false},"AnalysisHandle":{"type":"object","required":["kind","id","schema_version"],"properties":{"kind":{"const":"analysis-handle"},"id":{"$ref":"#/$defs/AnalysisId"},"schema_version":{"const":7}},"additionalProperties":false},"ProposalHandle":{"type":"object","required":["kind","id","schema_version"],"properties":{"kind":{"const":"proposal-handle"},"id":{"$ref":"#/$defs/ProposalId"},"schema_version":{"const":1}},"additionalProperties":false},"ProposalRevisionHandle":{"type":"object","required":["kind","id","schema_version"],"properties":{"kind":{"const":"proposal-revision-handle"},"id":{"$ref":"#/$defs/ProposalRevisionId"},"schema_version":{"const":1}},"additionalProperties":false},"ReadinessHandle":{"type":"object","required":["kind","id","schema_version"],"properties":{"kind":{"const":"readiness-handle"},"id":{"$ref":"#/$defs/ReadinessId"},"schema_version":{"const":1}},"additionalProperties":false},"ApplicationHandle":{"type":"object","required":["kind","id","schema_version"],"properties":{"kind":{"const":"application-handle"},"id":{"$ref":"#/$defs/ApplicationId"},"schema_version":{"const":1}},"additionalProperties":false},"SnapshotChildHandle":{"type":"object","required":["kind","snapshot","child_kind","child_id","schema_version"],"properties":{"kind":{"const":"snapshot-child-handle"},"snapshot":{"$ref":"#/$defs/SnapshotHandle"},"child_kind":{"enum":["policy","relationship"]},"child_id":{"$ref":"#/$defs/NonEmptyString"},"schema_version":{"const":5}},"additionalProperties":false},"AnalysisChildHandle":{"type":"object","required":["kind","analysis","child_kind","child_id","schema_version"],"properties":{"kind":{"const":"analysis-child-handle"},"analysis":{"$ref":"#/$defs/AnalysisHandle"},"child_kind":{"enum":["context","fact-requirement","fact-observation","obligation","coverage-requirement","coverage-certificate"]},"child_id":{"$ref":"#/$defs/ChildId"},"schema_version":{"const":7}},"additionalProperties":false},"AnalysisMaterialHandle":{"oneOf":[{"$ref":"#/$defs/SnapshotHandle"},{"$ref":"#/$defs/ProposalRevisionHandle"}]},"InspectableHandle":{"oneOf":[{"$ref":"#/$defs/SnapshotHandle"},{"$ref":"#/$defs/AnalysisHandle"},{"$ref":"#/$defs/SnapshotChildHandle"},{"$ref":"#/$defs/AnalysisChildHandle"}]},"ActiveSnapshotSummary":{"type":"object","required":["snapshot","lifecycle","source_revision","created_at"],"properties":{"snapshot":{"$ref":"#/$defs/SnapshotHandle"},"lifecycle":{"const":"active"},"source_revision":{"$ref":"#/$defs/NonEmptyString"},"created_at":{"$ref":"#/$defs/Timestamp"}},"additionalProperties":false},"QuarantinedSnapshotSummary":{"type":"object","required":["snapshot","lifecycle","source_revision","created_at","purge_deadline"],"properties":{"snapshot":{"$ref":"#/$defs/SnapshotHandle"},"lifecycle":{"const":"quarantined"},"source_revision":{"$ref":"#/$defs/NonEmptyString"},"created_at":{"$ref":"#/$defs/Timestamp"},"purge_deadline":{"$ref":"#/$defs/Timestamp"}},"additionalProperties":false},"SnapshotSummary":{"oneOf":[{"$ref":"#/$defs/ActiveSnapshotSummary"},{"$ref":"#/$defs/QuarantinedSnapshotSummary"}]},"CreateSnapshotCall":{"type":"object","required":["kind"],"properties":{"kind":{"const":"create-snapshot"}},"additionalProperties":false},"CreateSnapshotResult":{"type":"object","required":["kind","snapshot"],"properties":{"kind":{"const":"create-snapshot-result"},"snapshot":{"$ref":"#/$defs/ActiveSnapshotSummary"}},"additionalProperties":false},"FindSnapshotsCall":{"type":"object","required":["kind"],"properties":{"kind":{"const":"find-snapshots"},"lifecycle":{"enum":["active","quarantined"],"default":"active"},"after":{"$ref":"#/$defs/SnapshotHandle"},"limit":{"type":"integer","minimum":1,"default":50}},"additionalProperties":false},"FindSnapshotsResult":{"type":"object","required":["kind","snapshots"],"properties":{"kind":{"const":"find-snapshots-result"},"snapshots":{"type":"array","items":{"$ref":"#/$defs/SnapshotSummary"}},"continuation":{"$ref":"#/$defs/SnapshotHandle"}},"additionalProperties":false},"StandardsChangePurpose":{"type":"object","required":["summary","rationale","evidence"],"properties":{"summary":{"$ref":"#/$defs/NonEmptyString"},"rationale":{"$ref":"#/$defs/NonEmptyString"},"evidence":{"type":"array","minItems":1,"uniqueItems":true,"items":{"$ref":"#/$defs/EvidenceReference"}}},"additionalProperties":false},"StandardContent":{"type":"object","required":["id","title","role","level","applies_when","does_not_apply_when","verification","body"],"properties":{"id":{"$ref":"#/$defs/CanonicalId"},"title":{"$ref":"#/$defs/NonEmptyString"},"role":{"enum":["core","router","workflow","profile","topic","reference"]},"level":{"enum":["MUST","SHOULD","PROFILE","REFERENCE"]},"applies_when":{"$ref":"#/$defs/NonEmptyString"},"does_not_apply_when":{"$ref":"#/$defs/NonEmptyString"},"verification":{"$ref":"#/$defs/NonEmptyString"},"body":{"$ref":"#/$defs/NonEmptyString"}},"additionalProperties":false},"NewPolicyUnit":{"type":"object","required":["id","heading_chain","semantic_revision","intent","aliases","predecessors","successors"],"properties":{"id":{"$ref":"#/$defs/CanonicalId"},"heading_chain":{"type":"array","minItems":1,"items":{"$ref":"#/$defs/NonEmptyString"}},"semantic_revision":{"const":1},"intent":{"$ref":"#/$defs/NonEmptyString"},"aliases":{"type":"array","uniqueItems":true,"items":{"$ref":"#/$defs/CanonicalId"}},"predecessors":{"type":"array","uniqueItems":true,"items":{"$ref":"#/$defs/CanonicalId"}},"successors":{"type":"array","uniqueItems":true,"items":{"$ref":"#/$defs/CanonicalId"}}},"additionalProperties":false},"PreservePolicySemantics":{"type":"object","required":["kind","semantic_revision","intent"],"properties":{"kind":{"const":"preserve"},"semantic_revision":{"type":"integer","minimum":1},"intent":{"$ref":"#/$defs/NonEmptyString"}},"additionalProperties":false},"ChangePolicySemantics":{"type":"object","required":["kind","accepted_semantic_revision","proposed_semantic_revision","intent"],"properties":{"kind":{"const":"change"},"accepted_semantic_revision":{"type":"integer","minimum":1},"proposed_semantic_revision":{"type":"integer","minimum":1},"intent":{"$ref":"#/$defs/NonEmptyString"}},"additionalProperties":false},"PolicySemanticIntent":{"oneOf":[{"$ref":"#/$defs/PreservePolicySemantics"},{"$ref":"#/$defs/ChangePolicySemantics"}]},"CreateStandardEdit":{"type":"object","required":["kind","standard","requires","specializes","policy_units"],"properties":{"kind":{"const":"create-standard"},"standard":{"$ref":"#/$defs/StandardContent"},"requires":{"type":"array","uniqueItems":true,"items":{"$ref":"#/$defs/CanonicalId"}},"specializes":{"type":"array","uniqueItems":true,"items":{"$ref":"#/$defs/CanonicalId"}},"policy_units":{"type":"array","uniqueItems":true,"items":{"$ref":"#/$defs/NewPolicyUnit"}}},"additionalProperties":false},"RegisterPolicyUnitEdit":{"type":"object","description":"Register an explicitly selected policy scope in an existing standard. The Engine owns declaration placement and validates the final candidate.","required":["kind","standard","policy_unit"],"properties":{"kind":{"const":"register-policy-unit"},"standard":{"$ref":"#/$defs/CanonicalId"},"policy_unit":{"$ref":"#/$defs/NewPolicyUnit"}},"additionalProperties":false},"ReviseStandardEdit":{"type":"object","required":["kind","standard"],"properties":{"kind":{"const":"revise-standard"},"standard":{"$ref":"#/$defs/StandardContent"},"scope_updates":{"type":"array","items":{"$ref":"#/$defs/PolicyScopeUpdate"}}},"additionalProperties":false},"RevisePolicyUnitEdit":{"type":"object","required":["kind","policy","title","body","semantics"],"properties":{"kind":{"const":"revise-policy-unit"},"policy":{"$ref":"#/$defs/CanonicalId"},"title":{"$ref":"#/$defs/NonEmptyString"},"body":{"$ref":"#/$defs/NonEmptyString"},"semantics":{"$ref":"#/$defs/PolicySemanticIntent"}},"additionalProperties":false},"MovePolicyUnitEdit":{"type":"object","required":["kind","policy","standard","semantics"],"properties":{"kind":{"const":"move-policy-unit"},"policy":{"$ref":"#/$defs/CanonicalId"},"standard":{"$ref":"#/$defs/CanonicalId"},"after_policy":{"$ref":"#/$defs/CanonicalId"},"semantics":{"$ref":"#/$defs/PolicySemanticIntent"}},"additionalProperties":false},"RetirePolicyUnitEdit":{"type":"object","required":["kind","policy","retired_semantic_revision","successors","relationship_dispositions","evidence"],"properties":{"kind":{"const":"retire-policy-unit"},"policy":{"$ref":"#/$defs/CanonicalId"},"retired_semantic_revision":{"type":"integer","minimum":1},"successors":{"type":"array","uniqueItems":true,"items":{"$ref":"#/$defs/CanonicalId"}},"relationship_dispositions":{"type":"array","uniqueItems":true,"items":{"$ref":"#/$defs/RelationshipDisposition"}},"evidence":{"type":"array","minItems":1,"uniqueItems":true,"items":{"$ref":"#/$defs/EvidenceReference"}}},"additionalProperties":false},"RetireStandardEdit":{"type":"object","required":["kind","standard","successors","relationship_dispositions","evidence"],"properties":{"kind":{"const":"retire-standard"},"standard":{"$ref":"#/$defs/CanonicalId"},"successors":{"type":"array","uniqueItems":true,"items":{"$ref":"#/$defs/CanonicalId"}},"relationship_dispositions":{"type":"array","uniqueItems":true,"items":{"$ref":"#/$defs/RelationshipDisposition"}},"evidence":{"type":"array","minItems":1,"uniqueItems":true,"items":{"$ref":"#/$defs/EvidenceReference"}}},"additionalProperties":false},"ReplaceStandardRelationshipsEdit":{"type":"object","required":["kind","standard","requires","specializes","rationale"],"properties":{"kind":{"const":"replace-standard-relationships"},"standard":{"$ref":"#/$defs/CanonicalId"},"requires":{"type":"array","uniqueItems":true,"items":{"$ref":"#/$defs/CanonicalId"}},"specializes":{"type":"array","uniqueItems":true,"items":{"$ref":"#/$defs/CanonicalId"}},"rationale":{"$ref":"#/$defs/NonEmptyString"}},"additionalProperties":false},"AuthoringTargetHandle":{"type":"object","required":["kind","snapshot","id","schema_version"],"properties":{"kind":{"const":"authoring-target-handle"},"snapshot":{"$ref":"#/$defs/SnapshotHandle"},"id":{"$ref":"#/$defs/ChildId"},"schema_version":{"const":5}},"additionalProperties":false},"RelationshipConsumer":{"oneOf":[{"$ref":"#/$defs/CanonicalId"},{"$ref":"#/$defs/AuthoringTargetHandle"}]},"PolicyRelationship":{"type":"object","required":["source_policy","consumer","relation","applicability","source_scope","consumer_scope","evidence_owner","rationale"],"properties":{"source_policy":{"$ref":"#/$defs/CanonicalId"},"consumer":{"$ref":"#/$defs/RelationshipConsumer"},"relation":{"enum":["normative-consumer","router-projection","prompt-projection","template-projection","reference-projection","fixture-projection","enforcement-suite-projection","documentation-projection","implementation-projection"]},"applicability":{"$ref":"#/$defs/ApplicabilityExpression"},"source_scope":{"oneOf":[{"$ref":"#/$defs/ReviewScope"},{"type":"null"}]},"consumer_scope":{"oneOf":[{"$ref":"#/$defs/ReviewScope"},{"type":"null"}]},"evidence_owner":{"$ref":"#/$defs/CanonicalId"},"rationale":{"$ref":"#/$defs/NonEmptyString"}},"additionalProperties":false},"PutPolicyRelationshipEdit":{"type":"object","required":["kind","relationship"],"properties":{"kind":{"const":"put-policy-relationship"},"relationship":{"$ref":"#/$defs/PolicyRelationship"}},"additionalProperties":false},"RemovePolicyRelationshipEdit":{"type":"object","required":["kind","relationship"],"properties":{"kind":{"const":"remove-policy-relationship"},"relationship":{"$ref":"#/$defs/PolicyRelationship"}},"additionalProperties":false},"ModuleRelationshipKey":{"type":"object","required":["kind","relation","source","target"],"properties":{"kind":{"const":"module-relationship"},"relation":{"enum":["requires","specializes"]},"source":{"$ref":"#/$defs/CanonicalId"},"target":{"$ref":"#/$defs/CanonicalId"}},"additionalProperties":false},"PolicyRelationshipKey":{"type":"object","required":["kind","source_policy","consumer","relation"],"properties":{"kind":{"const":"policy-relationship"},"source_policy":{"$ref":"#/$defs/CanonicalId"},"consumer":{"$ref":"#/$defs/RelationshipConsumer"},"relation":{"$ref":"#/$defs/CanonicalId"}},"additionalProperties":false},"RelationshipKey":{"oneOf":[{"$ref":"#/$defs/ModuleRelationshipKey"},{"$ref":"#/$defs/PolicyRelationshipKey"}]},"RelationshipDisposition":{"type":"object","required":["relationship","disposition","rationale","evidence"],"properties":{"relationship":{"$ref":"#/$defs/RelationshipKey"},"disposition":{"enum":["remove","retarget"]},"replacement_consumer":{"$ref":"#/$defs/RelationshipConsumer"},"rationale":{"$ref":"#/$defs/NonEmptyString"},"evidence":{"type":"array","minItems":1,"uniqueItems":true,"items":{"$ref":"#/$defs/EvidenceReference"}}},"additionalProperties":false},"StandardEdit":{"oneOf":[{"$ref":"#/$defs/CreateStandardEdit"},{"$ref":"#/$defs/RegisterPolicyUnitEdit"},{"$ref":"#/$defs/ReviseStandardEdit"},{"$ref":"#/$defs/RevisePolicyUnitEdit"},{"$ref":"#/$defs/MovePolicyUnitEdit"},{"$ref":"#/$defs/RetirePolicyUnitEdit"},{"$ref":"#/$defs/RetireStandardEdit"},{"$ref":"#/$defs/ReplaceStandardRelationshipsEdit"},{"$ref":"#/$defs/PutPolicyRelationshipEdit"},{"$ref":"#/$defs/RemovePolicyRelationshipEdit"},{"$ref":"#/$defs/PutRoutingRuleEdit"},{"$ref":"#/$defs/RemoveRoutingRuleEdit"},{"$ref":"#/$defs/PutRoutingFactEdit"},{"$ref":"#/$defs/RemoveRoutingFactEdit"},{"$ref":"#/$defs/AuditPolicyUnitEdit"},{"$ref":"#/$defs/RewriteNavigationIndexEdit"},{"$ref":"#/$defs/PutDecisionProvenanceEdit"},{"$ref":"#/$defs/RetireDecisionProvenanceEdit"},{"$ref":"#/$defs/ApproveApplicationContentEdit"},{"$ref":"#/$defs/WithdrawApplicationContentEdit"},{"$ref":"#/$defs/ReviseOperationalArtifactEdit"}]},"StandardsChangeSet":{"type":"object","required":["purpose","edits"],"properties":{"purpose":{"$ref":"#/$defs/StandardsChangePurpose"},"edits":{"type":"array","minItems":1,"uniqueItems":true,"items":{"$ref":"#/$defs/StandardEdit"}}},"additionalProperties":false},"ProposalSummary":{"type":"object","required":["proposal","head_revision"],"properties":{"proposal":{"$ref":"#/$defs/ProposalHandle"},"head_revision":{"$ref":"#/$defs/ProposalRevisionHandle"}},"additionalProperties":false},"CreateProposalCall":{"type":"object","required":["kind","base_snapshot","change_set"],"properties":{"kind":{"const":"create-proposal"},"base_snapshot":{"$ref":"#/$defs/SnapshotHandle"},"change_set":{"$ref":"#/$defs/StandardsChangeSet"}},"additionalProperties":false},"CreateProposalResult":{"type":"object","required":["kind","proposal","revision"],"properties":{"kind":{"const":"create-proposal-result"},"proposal":{"$ref":"#/$defs/ProposalHandle"},"revision":{"$ref":"#/$defs/ProposalRevisionHandle"}},"additionalProperties":false},"FindProposalsCall":{"type":"object","required":["kind"],"properties":{"kind":{"const":"find-proposals"},"after":{"$ref":"#/$defs/ProposalHandle"},"limit":{"type":"integer","minimum":1,"default":50}},"additionalProperties":false},"FindProposalsResult":{"type":"object","required":["kind","proposals"],"properties":{"kind":{"const":"find-proposals-result"},"proposals":{"type":"array","items":{"$ref":"#/$defs/ProposalSummary"}},"continuation":{"$ref":"#/$defs/ProposalHandle"}},"additionalProperties":false},"ReviseProposalCall":{"type":"object","required":["kind","expected_revision","change_set"],"properties":{"kind":{"const":"revise-proposal"},"expected_revision":{"$ref":"#/$defs/ProposalRevisionHandle"},"change_set":{"$ref":"#/$defs/StandardsChangeSet"}},"additionalProperties":false},"ReviseProposalResult":{"type":"object","required":["kind","proposal","revision"],"properties":{"kind":{"const":"revise-proposal-result"},"proposal":{"$ref":"#/$defs/ProposalHandle"},"revision":{"$ref":"#/$defs/ProposalRevisionHandle"}},"additionalProperties":false},"DeleteSnapshotCall":{"type":"object","required":["kind","snapshot"],"properties":{"kind":{"const":"delete-snapshot"},"snapshot":{"$ref":"#/$defs/SnapshotHandle"}},"additionalProperties":false},"DeleteSnapshotResult":{"type":"object","required":["kind","snapshot","purge_deadline"],"properties":{"kind":{"const":"delete-snapshot-result"},"snapshot":{"$ref":"#/$defs/SnapshotHandle"},"purge_deadline":{"$ref":"#/$defs/Timestamp"}},"additionalProperties":false},"UndeleteSnapshotCall":{"type":"object","required":["kind","snapshot"],"properties":{"kind":{"const":"undelete-snapshot"},"snapshot":{"$ref":"#/$defs/SnapshotHandle"}},"additionalProperties":false},"UndeleteSnapshotResult":{"type":"object","required":["kind","snapshot"],"properties":{"kind":{"const":"undelete-snapshot-result"},"snapshot":{"$ref":"#/$defs/ActiveSnapshotSummary"}},"additionalProperties":false},"QueryNextOperation":{"type":"object","required":["operation","request_kind","snapshot"],"properties":{"operation":{"const":"query"},"request_kind":{"enum":["route","read","related"]},"target":{"$ref":"#/$defs/CanonicalId"},"snapshot":{"$ref":"#/$defs/SnapshotHandle"}},"additionalProperties":false},"QueryProposalNextOperation":{"type":"object","required":["operation","request_kind","revision"],"properties":{"operation":{"const":"query_proposal"},"request_kind":{"enum":["route","read","related"]},"target":{"$ref":"#/$defs/CanonicalId"},"revision":{"$ref":"#/$defs/ProposalRevisionHandle"}},"additionalProperties":false},"ResolveNextOperation":{"type":"object","required":["operation","request_kind","analysis"],"properties":{"operation":{"const":"resolve"},"request_kind":{"enum":["provide-fact","consumer-disposition","impact-disposition","coverage-attestation"]},"target":{"$ref":"#/$defs/CanonicalId"},"work":{"$ref":"#/$defs/AnalysisChildHandle"},"analysis":{"$ref":"#/$defs/AnalysisHandle"}},"additionalProperties":false},"InspectNextOperation":{"type":"object","required":["operation","request_kind","handle"],"properties":{"operation":{"const":"inspect"},"request_kind":{"const":"inspect"},"handle":{"$ref":"#/$defs/InspectableHandle"}},"additionalProperties":false},"NextOperation":{"oneOf":[{"$ref":"#/$defs/QueryNextOperation"},{"$ref":"#/$defs/ResolveNextOperation"},{"$ref":"#/$defs/InspectNextOperation"},{"$ref":"#/$defs/FocusedQueryNextOperation"}]},"QueryCall":{"type":"object","required":["snapshot","request"],"properties":{"snapshot":{"$ref":"#/$defs/SnapshotHandle"},"request":{"$ref":"#/$defs/QueryRequest"}},"additionalProperties":false},"QueryProposalCall":{"type":"object","required":["revision","request"],"properties":{"revision":{"$ref":"#/$defs/ProposalRevisionHandle"},"request":{"$ref":"#/$defs/QueryRequest"}},"additionalProperties":false},"AnalyzeProposalCall":{"type":"object","required":["revision"],"properties":{"revision":{"$ref":"#/$defs/ProposalRevisionHandle"}},"additionalProperties":false},"ReviewDecision":{"type":"object","required":["owner","decision","rationale","evidence"],"properties":{"owner":{"enum":["consumer","impact","audit"]},"decision":{"const":"accept"},"rationale":{"$ref":"#/$defs/NonEmptyString"},"evidence":{"type":"array","minItems":1,"uniqueItems":true,"items":{"$ref":"#/$defs/EvidenceReference"}}},"additionalProperties":false},"ReviewProposalCall":{"type":"object","required":["kind","analysis","decisions"],"properties":{"kind":{"const":"review-proposal"},"analysis":{"$ref":"#/$defs/AnalysisHandle"},"decisions":{"type":"array","minItems":3,"maxItems":3,"uniqueItems":true,"items":{"$ref":"#/$defs/ReviewDecision"}},"prior_readiness":{"$ref":"#/$defs/ReadinessHandle"}},"additionalProperties":false},"ReviewProposalResult":{"type":"object","required":["kind","readiness","revision","status"],"properties":{"kind":{"const":"review-proposal-result"},"readiness":{"$ref":"#/$defs/ReadinessHandle"},"revision":{"$ref":"#/$defs/ProposalRevisionHandle"},"status":{"const":"ready"}},"additionalProperties":false},"ApplyProposalCall":{"type":"object","required":["kind","readiness"],"properties":{"kind":{"const":"apply-proposal"},"readiness":{"$ref":"#/$defs/ReadinessHandle"}},"additionalProperties":false},"ApplyProposalResult":{"type":"object","required":["kind","application","status"],"properties":{"kind":{"const":"apply-proposal-result"},"application":{"$ref":"#/$defs/ApplicationHandle"},"status":{"const":"applied"}},"additionalProperties":false},"RecoverApplicationCall":{"type":"object","required":["kind","readiness"],"properties":{"kind":{"const":"recover-application"},"readiness":{"$ref":"#/$defs/ReadinessHandle"}},"additionalProperties":false},"RecoverApplicationResult":{"type":"object","required":["kind","application","status"],"properties":{"kind":{"const":"recover-application-result"},"application":{"$ref":"#/$defs/ApplicationHandle"},"status":{"const":"applied"}},"additionalProperties":false},"ApplicationRecoveryRequiredResult":{"type":"object","required":["kind","application","status","code","outcome","message"],"properties":{"kind":{"const":"application-recovery-required-result"},"application":{"$ref":"#/$defs/ApplicationHandle"},"status":{"const":"recovery-required"},"code":{"enum":["APPLICATION.PUBLICATION_UNAVAILABLE","APPLICATION.OBSERVATION_UNAVAILABLE","APPLICATION.OUTCOME_PERSISTENCE_UNAVAILABLE","APPLICATION.RECOVERY_TARGET_UNCERTAIN","APPLICATION.RECOVERY_TARGET_DIVERGED"]},"outcome":{"const":"unavailable"},"message":{"$ref":"#/$defs/NonEmptyString"}},"additionalProperties":false},"PolicySummary":{"type":"object","required":["handle","authority","scope"],"properties":{"handle":{"$ref":"#/$defs/SnapshotChildHandle"},"authority":{"enum":["normative","projection","contextual","evidence"]},"scope":{"$ref":"#/$defs/ReviewScope"}},"additionalProperties":false},"RelationshipSummary":{"type":"object","required":["handle","source","target","relation","groups","direction","traversal_eligible","applicability"],"properties":{"handle":{"$ref":"#/$defs/SnapshotChildHandle"},"source":{"$ref":"#/$defs/CanonicalId"},"target":{"$ref":"#/$defs/CanonicalId"},"relation":{"$ref":"#/$defs/CanonicalId"},"groups":{"type":"array","items":{"$ref":"#/$defs/CanonicalId"},"minItems":1,"uniqueItems":true},"direction":{"enum":["incoming","outgoing"]},"traversal_eligible":{"type":"boolean"},"applicability":{"enum":["true","false","unknown","not-declared"]}},"additionalProperties":false},"ProposalPolicySummary":{"type":"object","required":["id","authority","scope"],"properties":{"id":{"$ref":"#/$defs/CanonicalId"},"authority":{"enum":["normative","projection","contextual","evidence"]},"scope":{"$ref":"#/$defs/ReviewScope"}},"additionalProperties":false},"ProposalRelationshipSummary":{"type":"object","required":["source","target","relation","groups","direction","traversal_eligible","applicability"],"properties":{"source":{"$ref":"#/$defs/CanonicalId"},"target":{"$ref":"#/$defs/CanonicalId"},"relation":{"$ref":"#/$defs/CanonicalId"},"groups":{"type":"array","items":{"$ref":"#/$defs/CanonicalId"},"minItems":1,"uniqueItems":true},"direction":{"enum":["incoming","outgoing"]},"traversal_eligible":{"type":"boolean"},"applicability":{"enum":["true","false","unknown","not-declared"]}},"additionalProperties":false},"RouteResult":{"type":"object","required":["kind","snapshot","reading_plan","unresolved_questions","next_operations"],"properties":{"kind":{"const":"route-result"},"snapshot":{"$ref":"#/$defs/SnapshotHandle"},"reading_plan":{"type":"array","items":{"$ref":"#/$defs/ReadingPlanEntry"}},"unresolved_questions":{"type":"array","items":{"$ref":"#/$defs/Question"}},"next_operations":{"type":"array","items":{"$ref":"#/$defs/NextOperation"}},"summary":{"type":"string"}},"additionalProperties":false},"ReadResult":{"type":"object","required":["kind","snapshot","policy","content","requires","specializes","related","next_operations"],"properties":{"kind":{"const":"read-result"},"snapshot":{"$ref":"#/$defs/SnapshotHandle"},"policy":{"$ref":"#/$defs/PolicySummary"},"content":{"type":"string"},"requires":{"type":"array","items":{"$ref":"#/$defs/CanonicalId"},"uniqueItems":true},"specializes":{"type":"array","items":{"$ref":"#/$defs/CanonicalId"},"uniqueItems":true},"related":{"type":"array","items":{"$ref":"#/$defs/RelationshipSummary"}},"next_operations":{"type":"array","items":{"$ref":"#/$defs/NextOperation"}},"summary":{"type":"string"},"routing":{"$ref":"#/$defs/RoutingConfiguration"},"coverage":{"$ref":"#/$defs/ReadCoverage"},"application_exposure":{"$ref":"#/$defs/ApplicationExposureState"},"provenance":{"type":"array","items":{"$ref":"#/$defs/CanonicalId"}}},"additionalProperties":false},"PolicyUnitMapping":{"type":"object","required":["state","policy_units"],"properties":{"state":{"enum":["exact-policy-unit","policy-units-present","incomplete"]},"reason":{"const":"no-policy-units"},"policy_units":{"type":"array","items":{"$ref":"#/$defs/CanonicalId"},"uniqueItems":true}},"additionalProperties":false},"RelatedResult":{"type":"object","required":["kind","snapshot","target","policy_unit_mapping","relationships","next_operations"],"properties":{"kind":{"const":"related-result"},"snapshot":{"$ref":"#/$defs/SnapshotHandle"},"target":{"$ref":"#/$defs/CanonicalId"},"authoring_target":{"$ref":"#/$defs/AuthoringTargetHandle"},"policy_unit_mapping":{"$ref":"#/$defs/PolicyUnitMapping"},"relationships":{"type":"array","items":{"$ref":"#/$defs/RelationshipSummary"}},"next_operations":{"type":"array","items":{"$ref":"#/$defs/NextOperation"}},"summary":{"type":"string"}},"additionalProperties":false},"QueryResult":{"oneOf":[{"$ref":"#/$defs/RouteResult"},{"$ref":"#/$defs/ReadResult"},{"$ref":"#/$defs/RelatedResult"},{"$ref":"#/$defs/NavigationIndexesResult"},{"$ref":"#/$defs/ProvenanceReadResult"},{"$ref":"#/$defs/OperationalReadResult"}]},"ProposalRouteResult":{"type":"object","required":["kind","revision","reading_plan","unresolved_questions","next_operations"],"properties":{"kind":{"const":"proposal-route-result"},"revision":{"$ref":"#/$defs/ProposalRevisionHandle"},"reading_plan":{"type":"array","items":{"$ref":"#/$defs/ReadingPlanEntry"}},"unresolved_questions":{"type":"array","items":{"$ref":"#/$defs/Question"}},"next_operations":{"type":"array","items":{"$ref":"#/$defs/QueryProposalNextOperation"}},"summary":{"type":"string"}},"additionalProperties":false},"ProposalReadResult":{"type":"object","required":["kind","revision","policy","content","requires","specializes","related","next_operations"],"properties":{"kind":{"const":"proposal-read-result"},"revision":{"$ref":"#/$defs/ProposalRevisionHandle"},"policy":{"$ref":"#/$defs/ProposalPolicySummary"},"content":{"type":"string"},"requires":{"type":"array","items":{"$ref":"#/$defs/CanonicalId"},"uniqueItems":true},"specializes":{"type":"array","items":{"$ref":"#/$defs/CanonicalId"},"uniqueItems":true},"related":{"type":"array","items":{"$ref":"#/$defs/ProposalRelationshipSummary"}},"next_operations":{"type":"array","items":{"$ref":"#/$defs/QueryProposalNextOperation"}},"summary":{"type":"string"},"routing":{"$ref":"#/$defs/RoutingConfiguration"},"coverage":{"$ref":"#/$defs/ReadCoverage"},"application_exposure":{"$ref":"#/$defs/ApplicationExposureState"},"provenance":{"type":"array","items":{"$ref":"#/$defs/CanonicalId"}}},"additionalProperties":false},"ProposalRelatedResult":{"type":"object","required":["kind","revision","target","policy_unit_mapping","relationships","next_operations"],"properties":{"kind":{"const":"proposal-related-result"},"revision":{"$ref":"#/$defs/ProposalRevisionHandle"},"target":{"$ref":"#/$defs/CanonicalId"},"authoring_target":{"$ref":"#/$defs/AuthoringTargetHandle"},"policy_unit_mapping":{"$ref":"#/$defs/PolicyUnitMapping"},"relationships":{"type":"array","items":{"$ref":"#/$defs/ProposalRelationshipSummary"}},"next_operations":{"type":"array","items":{"$ref":"#/$defs/QueryProposalNextOperation"}},"summary":{"type":"string"}},"additionalProperties":false},"QueryProposalResult":{"oneOf":[{"$ref":"#/$defs/ProposalRouteResult"},{"$ref":"#/$defs/ProposalReadResult"},{"$ref":"#/$defs/ProposalRelatedResult"},{"$ref":"#/$defs/NavigationIndexesResult"},{"$ref":"#/$defs/ProvenanceReadResult"},{"$ref":"#/$defs/OperationalReadResult"}]},"AnalysisRequest":{"type":"object","required":["kind","base_snapshot","proposed_snapshot","changes","semantic_proposals","contract_version"],"properties":{"kind":{"const":"analysis-request"},"base_snapshot":{"$ref":"#/$defs/SnapshotHandle"},"proposed_snapshot":{"$ref":"#/$defs/SnapshotHandle"},"changes":{"type":"array","items":{"$ref":"#/$defs/ChangeDescriptor"},"minItems":1},"semantic_proposals":{"type":"array","items":{"$ref":"#/$defs/SemanticProposal"},"uniqueItems":true},"prior_analysis":{"$ref":"#/$defs/AnalysisHandle"},"contract_version":{"const":6}},"additionalProperties":false},"PrepareCall":{"type":"object","required":["request"],"properties":{"request":{"$ref":"#/$defs/AnalysisRequest"}},"additionalProperties":false},"AnalysisContext":{"type":"object","required":["kind","handle","subjects","changes","semantic_proposals"],"properties":{"kind":{"const":"analysis-context"},"handle":{"$ref":"#/$defs/AnalysisChildHandle"},"subjects":{"type":"array","items":{"$ref":"#/$defs/ChangedPolicyUnit"},"uniqueItems":true},"changes":{"type":"array","items":{"$ref":"#/$defs/ChangeDescriptor"},"minItems":1,"uniqueItems":true},"semantic_proposals":{"type":"array","items":{"$ref":"#/$defs/SemanticProposal"},"uniqueItems":true}},"additionalProperties":false},"AuthorizationReference":{"type":"object","required":["id","issuer","capability","authority_digest"],"properties":{"id":{"$ref":"#/$defs/AuthorizationId"},"issuer":{"$ref":"#/$defs/CanonicalId"},"capability":{"$ref":"#/$defs/CanonicalId"},"authority_digest":{"$ref":"#/$defs/Digest"}},"additionalProperties":false},"ProviderReference":{"type":"object","required":["id","contract","contract_version","input_digest"],"properties":{"id":{"$ref":"#/$defs/CanonicalId"},"contract":{"$ref":"#/$defs/CanonicalId"},"contract_version":{"$ref":"#/$defs/NonEmptyString"},"input_digest":{"$ref":"#/$defs/Digest"}},"additionalProperties":false},"AuthorizationRecord":{"type":"object","required":["reference","issuer_semantic_revision","principal","action","subject_kind","subject_id","authorization_evidence","revocation_authority","revocation_authority_semantic_revision","revocation_evidence"],"properties":{"reference":{"$ref":"#/$defs/AuthorizationReference"},"issuer_semantic_revision":{"type":"integer","minimum":1},"principal":{"$ref":"#/$defs/CanonicalId"},"action":{"$ref":"#/$defs/CanonicalId"},"subject_kind":{"$ref":"#/$defs/CanonicalId"},"subject_id":{"$ref":"#/$defs/NonEmptyString"},"authorization_evidence":{"type":"array","items":{"$ref":"#/$defs/EvidenceReference"},"minItems":1,"uniqueItems":true},"revocation_authority":{"$ref":"#/$defs/CanonicalId"},"revocation_authority_semantic_revision":{"type":"integer","minimum":1},"revocation_evidence":{"type":"array","items":{"$ref":"#/$defs/EvidenceReference"},"minItems":1,"uniqueItems":true}},"additionalProperties":false},"DomainContractReference":{"type":"object","required":["id","version"],"properties":{"id":{"$ref":"#/$defs/CanonicalId"},"version":{"$ref":"#/$defs/NonEmptyString"}},"additionalProperties":false},"AnalysisExecutionContractView":{"type":"object","required":["authorization_authority_digest","providers"],"properties":{"authorization_authority_digest":{"oneOf":[{"$ref":"#/$defs/Digest"},{"type":"null"}]},"providers":{"type":"array","items":{"$ref":"#/$defs/ProviderReference"},"uniqueItems":true}},"additionalProperties":false},"FactRequirement":{"type":"object","required":["kind","handle","fact","fact_semantic_revision","fact_contract_digest","context","value_contract","answer_contract","evidence_contract","authorization_capability"],"properties":{"kind":{"const":"fact-requirement"},"handle":{"$ref":"#/$defs/AnalysisChildHandle"},"fact":{"$ref":"#/$defs/CanonicalId"},"fact_semantic_revision":{"type":"integer","minimum":1},"fact_contract_digest":{"$ref":"#/$defs/Digest"},"context":{"$ref":"#/$defs/AnalysisChildHandle"},"value_contract":{"$ref":"#/$defs/FactValueContract"},"answer_contract":{"$ref":"#/$defs/CanonicalId"},"evidence_contract":{"$ref":"#/$defs/CanonicalId"},"authorization_capability":{"$ref":"#/$defs/CanonicalId"}},"additionalProperties":false},"FactRequirementWork":{"type":"object","required":["requirement","prompt","dependent_programs"],"properties":{"requirement":{"$ref":"#/$defs/FactRequirement"},"prompt":{"$ref":"#/$defs/NonEmptyString"},"dependent_programs":{"type":"array","items":{"$ref":"#/$defs/NonEmptyString"},"minItems":1,"uniqueItems":true}},"additionalProperties":false},"FactObservation":{"type":"object","required":["kind","handle","requirement","value","evidence","authorization"],"properties":{"kind":{"const":"fact-observation"},"handle":{"$ref":"#/$defs/AnalysisChildHandle"},"requirement":{"$ref":"#/$defs/AnalysisChildHandle"},"value":{"$ref":"#/$defs/FactValue"},"evidence":{"type":"array","items":{"$ref":"#/$defs/EvidenceReference"},"minItems":1,"uniqueItems":true},"authorization":{"$ref":"#/$defs/AuthorizationReference"},"provider":{"$ref":"#/$defs/ProviderReference"}},"additionalProperties":false},"Obligation":{"type":"object","required":["handle","kind","target","scope","reasons","state","permitted_submissions","fingerprint"],"properties":{"handle":{"$ref":"#/$defs/AnalysisChildHandle"},"kind":{"enum":["consumer-review","impact-review","lifecycle-impact-review","audit-coverage","unmapped-normative-change"]},"target":{"$ref":"#/$defs/CanonicalId"},"scope":{"$ref":"#/$defs/ReviewScope"},"reasons":{"type":"array","items":{"$ref":"#/$defs/SelectionReason"},"minItems":1,"uniqueItems":true},"state":{"enum":["required","resolved","blocked"]},"applicability":{"enum":["true","false","unknown","not-declared"]},"permitted_submissions":{"type":"array","items":{"enum":["consumer-disposition","impact-disposition","coverage-attestation"]},"minItems":1,"uniqueItems":true},"review_contract":{"$ref":"#/$defs/ConsumerReviewContract"},"fingerprint":{"$ref":"#/$defs/DecisionFingerprint"}},"additionalProperties":false},"ProvideFactSubmission":{"type":"object","required":["kind","requirement","value","evidence"],"properties":{"kind":{"const":"provide-fact"},"requirement":{"$ref":"#/$defs/AnalysisChildHandle"},"value":{"$ref":"#/$defs/FactValue"},"evidence":{"type":"array","items":{"$ref":"#/$defs/EvidenceReference"},"minItems":1,"uniqueItems":true}},"additionalProperties":false},"ConsumerDispositionSubmission":{"type":"object","required":["kind","obligation","result","rationale","evidence","fingerprint"],"properties":{"kind":{"const":"consumer-disposition"},"obligation":{"$ref":"#/$defs/AnalysisChildHandle"},"result":{"enum":["updated","reviewed-no-change","not-applicable","blocked"]},"rationale":{"$ref":"#/$defs/NonEmptyString"},"evidence":{"type":"array","items":{"$ref":"#/$defs/EvidenceReference"},"minItems":1},"fingerprint":{"$ref":"#/$defs/DecisionFingerprint"}},"additionalProperties":false},"ImpactDispositionSubmission":{"type":"object","required":["kind","obligation","result","rationale","evidence","fingerprint"],"properties":{"kind":{"const":"impact-disposition"},"obligation":{"$ref":"#/$defs/AnalysisChildHandle"},"result":{"enum":["confirmed","resolved-no-impact","requires-change","blocked"]},"rationale":{"$ref":"#/$defs/NonEmptyString"},"evidence":{"type":"array","items":{"$ref":"#/$defs/EvidenceReference"},"minItems":1},"fingerprint":{"$ref":"#/$defs/DecisionFingerprint"}},"additionalProperties":false},"CoverageAttestationClaim":{"type":"object","required":["requirement","conclusion","evidence","explicit_exclusions","rationale","auditor_provenance"],"properties":{"requirement":{"$ref":"#/$defs/AnalysisChildHandle"},"conclusion":{"const":"complete"},"evidence":{"type":"array","items":{"$ref":"#/$defs/EvidenceReference"},"minItems":1,"uniqueItems":true},"explicit_exclusions":{"type":"array","items":{"$ref":"#/$defs/EvidenceReference"},"uniqueItems":true},"rationale":{"$ref":"#/$defs/NonEmptyString"},"auditor_provenance":{"$ref":"#/$defs/NonEmptyString"}},"additionalProperties":false},"CoverageAttestationSubmission":{"type":"object","required":["kind","claim"],"properties":{"kind":{"const":"coverage-attestation"},"claim":{"$ref":"#/$defs/CoverageAttestationClaim"}},"additionalProperties":false},"Submission":{"oneOf":[{"$ref":"#/$defs/ProvideFactSubmission"},{"$ref":"#/$defs/ConsumerDispositionSubmission"},{"$ref":"#/$defs/ImpactDispositionSubmission"},{"$ref":"#/$defs/CoverageAttestationSubmission"}]},"ResolveCall":{"type":"object","required":["analysis","submission"],"properties":{"analysis":{"$ref":"#/$defs/AnalysisHandle"},"submission":{"$ref":"#/$defs/Submission"}},"additionalProperties":false},"CoverageRequirement":{"type":"object","required":["kind","handle","subject","owner","semantic_revision","relationship_kinds","horizon","required_evidence_contract"],"properties":{"kind":{"const":"coverage-requirement"},"handle":{"$ref":"#/$defs/AnalysisChildHandle"},"subject":{"$ref":"#/$defs/CanonicalId"},"owner":{"$ref":"#/$defs/CanonicalId"},"semantic_revision":{"type":"integer","minimum":1},"relationship_kinds":{"type":"array","items":{"$ref":"#/$defs/CanonicalId"},"uniqueItems":true},"horizon":{"$ref":"#/$defs/CanonicalId"},"required_evidence_contract":{"$ref":"#/$defs/CanonicalId"}},"additionalProperties":false},"CoverageAttestation":{"type":"object","required":["kind","requirement","conclusion","evidence","explicit_exclusions","rationale","auditor_provenance","schema_version","authorization"],"properties":{"kind":{"const":"coverage-attestation"},"requirement":{"$ref":"#/$defs/AnalysisChildHandle"},"conclusion":{"const":"complete"},"evidence":{"type":"array","items":{"$ref":"#/$defs/EvidenceReference"},"minItems":1},"explicit_exclusions":{"type":"array","items":{"$ref":"#/$defs/EvidenceReference"}},"rationale":{"$ref":"#/$defs/NonEmptyString"},"auditor_provenance":{"$ref":"#/$defs/NonEmptyString"},"schema_version":{"const":4},"authorization":{"$ref":"#/$defs/AuthorizationReference"}},"additionalProperties":false},"CoverageCertificate":{"type":"object","required":["kind","handle","requirement","subject","owner","semantic_revision","horizon_digest","relationship_digest","evidence_digests","fact_schema_digest"],"properties":{"kind":{"const":"coverage-certificate"},"handle":{"$ref":"#/$defs/AnalysisChildHandle"},"requirement":{"$ref":"#/$defs/AnalysisChildHandle"},"subject":{"$ref":"#/$defs/CanonicalId"},"owner":{"$ref":"#/$defs/CanonicalId"},"semantic_revision":{"type":"integer","minimum":1},"horizon_digest":{"$ref":"#/$defs/Digest"},"relationship_digest":{"$ref":"#/$defs/Digest"},"evidence_digests":{"type":"array","items":{"$ref":"#/$defs/Digest"},"uniqueItems":true},"fact_schema_digest":{"$ref":"#/$defs/Digest"}},"additionalProperties":false},"DispositionRecord":{"type":"object","required":["obligation","kind","result","rationale","evidence","authorization","fingerprint"],"properties":{"obligation":{"$ref":"#/$defs/AnalysisChildHandle"},"kind":{"enum":["consumer-disposition","impact-disposition"]},"result":{"$ref":"#/$defs/NonEmptyString"},"rationale":{"$ref":"#/$defs/NonEmptyString"},"evidence":{"type":"array","items":{"$ref":"#/$defs/EvidenceReference"}},"authorization":{"$ref":"#/$defs/AuthorizationReference"},"fingerprint":{"$ref":"#/$defs/DecisionFingerprint"}},"additionalProperties":false},"AnalysisState":{"type":"object","required":["kind","handle","base_snapshot","proposed_reference","changes","semantic_proposals","fact_observations","dispositions","coverage_attestations","authorization_records","domain_contracts","execution_contracts","contract_version"],"properties":{"kind":{"const":"analysis-state"},"handle":{"$ref":"#/$defs/AnalysisHandle"},"base_snapshot":{"$ref":"#/$defs/SnapshotHandle"},"proposed_reference":{"$ref":"#/$defs/AnalysisMaterialHandle"},"changes":{"type":"array","items":{"$ref":"#/$defs/ChangeDescriptor"},"minItems":1,"uniqueItems":true},"semantic_proposals":{"type":"array","items":{"$ref":"#/$defs/SemanticProposal"},"uniqueItems":true},"fact_observations":{"type":"array","items":{"$ref":"#/$defs/FactObservation"},"uniqueItems":true},"dispositions":{"type":"array","items":{"$ref":"#/$defs/DispositionRecord"},"uniqueItems":true},"coverage_attestations":{"type":"array","items":{"$ref":"#/$defs/CoverageAttestation"},"uniqueItems":true},"authorization_records":{"type":"array","items":{"$ref":"#/$defs/AuthorizationRecord"},"uniqueItems":true},"domain_contracts":{"type":"array","items":{"$ref":"#/$defs/DomainContractReference"},"minItems":1,"uniqueItems":true},"execution_contracts":{"$ref":"#/$defs/AnalysisExecutionContractView"},"contract_version":{"const":7}},"additionalProperties":false},"PendingResult":{"type":"object","required":["kind","handle","status","context","changes","changed_units","obligations","fact_requirements","reading_plan","next_operations"],"properties":{"kind":{"const":"pending-result"},"handle":{"$ref":"#/$defs/AnalysisHandle"},"status":{"const":"needs-action"},"context":{"$ref":"#/$defs/AnalysisContext"},"changes":{"type":"array","items":{"$ref":"#/$defs/ChangeDescriptor"}},"changed_units":{"type":"array","items":{"$ref":"#/$defs/ChangedPolicyUnit"}},"obligations":{"type":"array","items":{"$ref":"#/$defs/Obligation"}},"fact_requirements":{"type":"array","items":{"$ref":"#/$defs/FactRequirementWork"}},"reading_plan":{"type":"array","items":{"$ref":"#/$defs/ReadingPlanEntry"}},"next_operations":{"type":"array","items":{"$ref":"#/$defs/NextOperation"}},"summary":{"type":"string"}},"additionalProperties":false},"CompleteResult":{"type":"object","required":["kind","handle","status","context","changes","changed_units","coverage_certificates","fact_observations","dispositions","reading_plan","completion"],"properties":{"kind":{"const":"complete-result"},"handle":{"$ref":"#/$defs/AnalysisHandle"},"status":{"const":"complete"},"context":{"$ref":"#/$defs/AnalysisContext"},"changes":{"type":"array","items":{"$ref":"#/$defs/ChangeDescriptor"}},"changed_units":{"type":"array","items":{"$ref":"#/$defs/ChangedPolicyUnit"}},"coverage_certificates":{"type":"array","items":{"$ref":"#/$defs/CoverageCertificate"},"uniqueItems":true},"fact_observations":{"type":"array","items":{"$ref":"#/$defs/FactObservation"},"uniqueItems":true},"dispositions":{"type":"array","items":{"$ref":"#/$defs/DispositionRecord"}},"reading_plan":{"type":"array","items":{"$ref":"#/$defs/ReadingPlanEntry"}},"completion":{"$ref":"#/$defs/CompletionProof"},"summary":{"type":"string"}},"additionalProperties":false},"RepositoryPath":{"type":"array","items":{"$ref":"#/$defs/NonEmptyString"},"minItems":1},"ProvenanceRecord":{"type":"object","required":["snapshot","path"],"properties":{"snapshot":{"$ref":"#/$defs/SnapshotHandle"},"path":{"$ref":"#/$defs/RepositoryPath"}},"additionalProperties":false},"SnapshotInspectionResult":{"type":"object","required":["kind","snapshot"],"properties":{"kind":{"const":"snapshot-inspection-result"},"snapshot":{"$ref":"#/$defs/SnapshotSummary"}},"additionalProperties":false},"PolicyInspectionResult":{"type":"object","required":["kind","policy","declaration","representation_digest","structural_digest","provenance"],"properties":{"kind":{"const":"policy-inspection-result"},"policy":{"$ref":"#/$defs/SnapshotChildHandle"},"declaration":{"oneOf":[{"$ref":"#/$defs/CanonicalModuleDeclaration"},{"$ref":"#/$defs/PolicyUnitDeclaration"}]},"representation_digest":{"$ref":"#/$defs/Digest"},"structural_digest":{"$ref":"#/$defs/Digest"},"provenance":{"$ref":"#/$defs/ProvenanceRecord"}},"additionalProperties":false},"RelationshipInspectionResult":{"type":"object","required":["kind","relationship","policy_semantics","provenance"],"properties":{"kind":{"const":"relationship-inspection-result"},"relationship":{"$ref":"#/$defs/RelationshipSummary"},"policy_semantics":{"oneOf":[{"$ref":"#/$defs/PolicyRelationshipInspection"},{"type":"null"}]},"provenance":{"$ref":"#/$defs/ProvenanceRecord"}},"additionalProperties":false},"AnalysisInspectionResult":{"type":"object","required":["kind","state"],"properties":{"kind":{"const":"analysis-inspection-result"},"state":{"$ref":"#/$defs/AnalysisState"}},"additionalProperties":false},"AnalysisChildArtifact":{"oneOf":[{"$ref":"#/$defs/AnalysisContext"},{"$ref":"#/$defs/FactRequirement"},{"$ref":"#/$defs/FactObservation"},{"$ref":"#/$defs/Obligation"},{"$ref":"#/$defs/CoverageRequirement"},{"$ref":"#/$defs/CoverageCertificate"}]},"AnalysisChildInspectionResult":{"type":"object","required":["kind","handle","artifact"],"properties":{"kind":{"const":"analysis-child-inspection-result"},"handle":{"$ref":"#/$defs/AnalysisChildHandle"},"artifact":{"$ref":"#/$defs/AnalysisChildArtifact"}},"additionalProperties":false},"InspectionResult":{"oneOf":[{"$ref":"#/$defs/SnapshotInspectionResult"},{"$ref":"#/$defs/PolicyInspectionResult"},{"$ref":"#/$defs/RelationshipInspectionResult"},{"$ref":"#/$defs/AnalysisInspectionResult"},{"$ref":"#/$defs/AnalysisChildInspectionResult"}]},"InspectCall":{"type":"object","required":["handle"],"properties":{"handle":{"$ref":"#/$defs/InspectableHandle"}},"additionalProperties":false},"RejectedResult":{"type":"object","required":["kind","code","outcome","message","details","next_operations"],"properties":{"kind":{"const":"rejected-result"},"code":{"$ref":"#/$defs/CanonicalId"},"outcome":{"enum":["invalid","unavailable","unsupported","unauthorized"]},"target":{"$ref":"#/$defs/NonEmptyString"},"message":{"$ref":"#/$defs/NonEmptyString"},"details":{"type":"object","additionalProperties":{"$ref":"#/$defs/ScalarValue"}},"next_operations":{"type":"array","items":{"$ref":"#/$defs/NextOperation"}}},"additionalProperties":false},"AuthoredRoutingRule":{"type":"object","required":["id","target","when","condition"],"properties":{"id":{"$ref":"#/$defs/CanonicalId"},"target":{"$ref":"#/$defs/CanonicalId"},"when":{"$ref":"#/$defs/ApplicabilityExpression"},"condition":{"$ref":"#/$defs/NonEmptyString"}},"additionalProperties":false},"AuthoredRoutingFact":{"type":"object","required":["id","semantic_revision","type","nullable","values","aliases","meaning","prompt"],"properties":{"id":{"$ref":"#/$defs/CanonicalId"},"semantic_revision":{"type":"integer","minimum":1},"type":{"enum":["boolean","enum","string","string-set","enum-set","canonical-id"]},"nullable":{"type":"boolean"},"values":{"type":"array","items":{"type":"string"},"uniqueItems":true},"aliases":{"type":"array","items":{"$ref":"#/$defs/CanonicalId"},"uniqueItems":true},"meaning":{"$ref":"#/$defs/NonEmptyString"},"prompt":{"$ref":"#/$defs/NonEmptyString"}},"additionalProperties":false},"PutRoutingRuleEdit":{"type":"object","required":["kind","rule","rationale"],"properties":{"kind":{"const":"put-routing-rule"},"rule":{"$ref":"#/$defs/AuthoredRoutingRule"},"rationale":{"$ref":"#/$defs/NonEmptyString"}},"additionalProperties":false},"RemoveRoutingRuleEdit":{"type":"object","required":["kind","rule","rationale"],"properties":{"kind":{"const":"remove-routing-rule"},"rule":{"$ref":"#/$defs/CanonicalId"},"rationale":{"$ref":"#/$defs/NonEmptyString"}},"additionalProperties":false},"PutRoutingFactEdit":{"type":"object","required":["kind","fact","rationale"],"properties":{"kind":{"const":"put-routing-fact"},"fact":{"$ref":"#/$defs/AuthoredRoutingFact"},"rationale":{"$ref":"#/$defs/NonEmptyString"}},"additionalProperties":false},"RemoveRoutingFactEdit":{"type":"object","required":["kind","fact","rationale"],"properties":{"kind":{"const":"remove-routing-fact"},"fact":{"$ref":"#/$defs/CanonicalId"},"rationale":{"$ref":"#/$defs/NonEmptyString"}},"additionalProperties":false},"VerificationFailure":{"type":"object","additionalProperties":false,"required":["code","message","suite","check"],"properties":{"code":{"$ref":"#/$defs/NonEmptyString"},"message":{"$ref":"#/$defs/NonEmptyString"},"suite":{"type":["string","null"]},"check":{"type":["string","null"]}}},"VerificationReport":{"type":"object","additionalProperties":false,"required":["passed","exit_code","suites","checks","failures"],"properties":{"passed":{"type":"boolean"},"exit_code":{"enum":[0,1,2,3,4]},"suites":{"type":"integer","minimum":0},"checks":{"type":"integer","minimum":0},"failures":{"type":"array","items":{"$ref":"#/$defs/VerificationFailure"}}}},"VerifyRepositoryCall":{"type":"object","additionalProperties":false,"required":["kind","refresh_verification_inputs"],"properties":{"kind":{"const":"verify-repository"},"refresh_verification_inputs":{"type":"boolean"}}},"VerifyRepositoryResult":{"type":"object","additionalProperties":false,"required":["kind","refreshed_verification_inputs","verification"],"properties":{"kind":{"const":"verify-repository-result"},"refreshed_verification_inputs":{"type":"boolean"},"verification":{"$ref":"#/$defs/VerificationReport"}}},"VerifyProposalCall":{"type":"object","additionalProperties":false,"required":["kind","revision"],"properties":{"kind":{"const":"verify-proposal"},"revision":{"$ref":"#/$defs/ProposalRevisionHandle"},"readiness":{"$ref":"#/$defs/ReadinessHandle"}}},"VerifyProposalResult":{"type":"object","additionalProperties":false,"required":["kind","revision","verification"],"properties":{"kind":{"const":"verify-proposal-result"},"revision":{"$ref":"#/$defs/ProposalRevisionHandle"},"verification":{"$ref":"#/$defs/VerificationReport"},"readiness":{"$ref":"#/$defs/ReadinessHandle"}}},"RoutingConfiguration":{"type":"object","additionalProperties":false,"required":["facts","rules"],"properties":{"facts":{"type":"array","items":{"$ref":"#/$defs/AuthoredRoutingFact"}},"rules":{"type":"array","items":{"$ref":"#/$defs/AuthoredRoutingRule"}}}},"PolicyCoverageStatus":{"type":"object","required":["subject","requirement_id","status"],"properties":{"subject":{"$ref":"#/$defs/CanonicalId"},"requirement_id":{"$ref":"#/$defs/Digest"},"status":{"enum":["current-attestation","review-required"]},"authority":{"$ref":"#/$defs/CoverageAuditAuthority"}},"additionalProperties":false},"ReadCoverage":{"type":"object","description":"Repository attestation status bound to this snapshot or proposal. Empty subjects means no registered policy units in scope, not complete coverage. Analysis-local attestations are not repository certificates.","required":["subjects"],"properties":{"subjects":{"type":"array","items":{"$ref":"#/$defs/PolicyCoverageStatus"}}},"additionalProperties":false},"AuditPolicyUnitEdit":{"type":"object","required":["kind","policy","rationale"],"properties":{"kind":{"const":"audit-policy-unit"},"policy":{"$ref":"#/$defs/CanonicalId"},"rationale":{"$ref":"#/$defs/NonEmptyString"}},"additionalProperties":false},"CoverageAuditAuthority":{"type":"object","required":["issuer","principal","authorization_id"],"properties":{"issuer":{"$ref":"#/$defs/NonEmptyString"},"principal":{"$ref":"#/$defs/NonEmptyString"},"authorization_id":{"$ref":"#/$defs/NonEmptyString"}},"additionalProperties":false},"EvidenceCheckRetirement":{"type":"object","additionalProperties":false,"required":["suite","check"],"properties":{"suite":{"type":"string","minLength":1},"check":{"type":"string","minLength":1}}},"EvidenceSuiteDescription":{"type":"object","additionalProperties":false,"required":["suite","description"],"properties":{"suite":{"type":"string","minLength":1},"description":{"type":"string","minLength":1}}},"EvidenceRelationshipUpdate":{"type":"object","additionalProperties":false,"required":["source_policy","consumer","relation","evidence_owner","rationale"],"properties":{"source_policy":{"type":"string","minLength":1},"consumer":{"type":"string","minLength":1},"relation":{"type":"string","minLength":1},"evidence_owner":{"type":"string","minLength":1},"rationale":{"type":"string","minLength":1}}},"EvidenceConsumerRegistration":{"type":"object","additionalProperties":false,"required":["path","artifact_kind","source_policies","relation","evidence_owner","rationale"],"properties":{"path":{"type":"string","minLength":1},"artifact_kind":{"type":"string","enum":["implementation-artifact","fixture"]},"source_policies":{"type":"array","items":{"type":"string","minLength":1},"minItems":1,"uniqueItems":true},"relation":{"type":"string","enum":["implementation-projection","fixture-projection"]},"evidence_owner":{"type":"string","minLength":1},"rationale":{"type":"string","minLength":1}}},"EvidenceMaintenancePlan":{"type":"object","additionalProperties":false,"required":["prune_stale_certificates","retire_suites","retire_checks","retire_inputs","suite_descriptions","replacement_evidence_owner","replacement_evidence_rationale","relationship_updates","consumer_registrations"],"properties":{"prune_stale_certificates":{"type":"boolean"},"retire_suites":{"type":"array","items":{"type":"string","minLength":1},"uniqueItems":true},"retire_checks":{"type":"array","items":{"$ref":"#/$defs/EvidenceCheckRetirement"}},"retire_inputs":{"type":"array","items":{"type":"string","minLength":1},"uniqueItems":true},"suite_descriptions":{"type":"array","items":{"$ref":"#/$defs/EvidenceSuiteDescription"}},"replacement_evidence_owner":{"type":"string","minLength":1},"replacement_evidence_rationale":{"type":"string","minLength":1},"relationship_updates":{"type":"array","items":{"$ref":"#/$defs/EvidenceRelationshipUpdate"}},"consumer_registrations":{"type":"array","items":{"$ref":"#/$defs/EvidenceConsumerRegistration"}},"unregister_policy_subjects":{"type":"array","items":{"type":"string","minLength":1},"uniqueItems":true,"description":"Remove selected review-subject registrations and their source relationships while preserving normative Markdown."}}},"MaintainEvidenceCall":{"type":"object","additionalProperties":false,"required":["kind","expected_revision","evidence","plan","apply"],"properties":{"kind":{"const":"maintain-evidence"},"expected_revision":{"type":"string","minLength":1},"evidence":{"type":"array","items":{"$ref":"#/$defs/EvidenceReference"},"minItems":1},"plan":{"$ref":"#/$defs/EvidenceMaintenancePlan"},"apply":{"type":"boolean"}}},"MaintainEvidenceResult":{"type":"object","additionalProperties":false,"required":["kind","applied","changed_files","removed_files","verification"],"properties":{"kind":{"const":"maintain-evidence-result"},"applied":{"type":"boolean"},"changed_files":{"type":"array","items":{"type":"string","minLength":1}},"removed_files":{"type":"array","items":{"type":"string","minLength":1}},"verification":{"$ref":"#/$defs/VerificationReport"}}},"RouteCall":{"type":"object","required":["facts"],"properties":{"facts":{"$ref":"#/$defs/FactSet"},"snapshot":{"$ref":"#/$defs/SnapshotHandle"}},"additionalProperties":false},"ReadCall":{"type":"object","required":["target"],"properties":{"target":{"$ref":"#/$defs/CanonicalId"},"include_routing":{"type":"boolean"},"include_coverage":{"type":"boolean","description":"Include current repository attestation status for registered policy units in this read scope."},"snapshot":{"$ref":"#/$defs/SnapshotHandle"},"detail":{"enum":["compact","full"],"description":"Compact preserves exact policy and essential authority; full includes all relationship rows."}},"additionalProperties":false},"RelatedCall":{"type":"object","required":["target","groups","direction","transitive"],"properties":{"target":{"$ref":"#/$defs/CanonicalId"},"groups":{"type":"array","minItems":1,"uniqueItems":true,"items":{"$ref":"#/$defs/CanonicalId"}},"direction":{"enum":["incoming","outgoing","both"]},"transitive":{"type":"boolean","default":false},"snapshot":{"$ref":"#/$defs/SnapshotHandle"}},"additionalProperties":false},"CompactReadResult":{"type":"object","required":["kind","snapshot","policy","content","requires","specializes","next_operations","detail"],"properties":{"kind":{"const":"compact-read-result"},"snapshot":{"$ref":"#/$defs/SnapshotHandle"},"policy":{"$ref":"#/$defs/PolicySummary"},"content":{"type":"string"},"requires":{"type":"array","items":{"$ref":"#/$defs/CanonicalId"},"uniqueItems":true},"specializes":{"type":"array","items":{"$ref":"#/$defs/CanonicalId"},"uniqueItems":true},"next_operations":{"type":"array","items":{"$ref":"#/$defs/NextOperation"}},"summary":{"type":"string"},"routing":{"$ref":"#/$defs/RoutingConfiguration"},"coverage":{"$ref":"#/$defs/ReadCoverage"},"detail":{"const":"compact"},"application_exposure":{"$ref":"#/$defs/ApplicationExposureState"},"provenance":{"type":"array","items":{"$ref":"#/$defs/CanonicalId"}}},"additionalProperties":false},"RoutingFactsCall":{"type":"object","additionalProperties":false,"required":[],"properties":{"snapshot":{"$ref":"#/$defs/SnapshotHandle"}}},"RoutingFactsResult":{"type":"object","additionalProperties":false,"required":["kind","snapshot","facts"],"properties":{"kind":{"const":"routing-facts-result"},"snapshot":{"$ref":"#/$defs/SnapshotHandle"},"facts":{"type":"array","items":{"$ref":"#/$defs/AuthoredRoutingFact"}}}},"RoutingQuestion":{"type":"object","additionalProperties":false,"required":["id","kind","prompt","state","fact"],"properties":{"id":{"$ref":"#/$defs/CanonicalId"},"kind":{"const":"applicability-fact"},"prompt":{"$ref":"#/$defs/NonEmptyString"},"state":{"const":"required"},"fact":{"$ref":"#/$defs/AuthoredRoutingFact"}}},"RoutingRuleExplanation":{"type":"object","additionalProperties":false,"required":["id","target","when","state"],"properties":{"id":{"$ref":"#/$defs/CanonicalId"},"target":{"$ref":"#/$defs/CanonicalId"},"when":{"$ref":"#/$defs/ApplicabilityExpression"},"state":{"enum":["selected","unresolved"]}}},"AgentRouteResult":{"type":"object","required":["kind","snapshot","reading_plan","unresolved_questions","next_operations","facts","rules"],"properties":{"kind":{"const":"agent-route-result"},"snapshot":{"$ref":"#/$defs/SnapshotHandle"},"reading_plan":{"type":"array","items":{"$ref":"#/$defs/ReadingPlanEntry"}},"unresolved_questions":{"type":"array","items":{"$ref":"#/$defs/RoutingQuestion"}},"next_operations":{"type":"array","items":{"$ref":"#/$defs/NextOperation"}},"summary":{"type":"string"},"facts":{"$ref":"#/$defs/FactSet"},"rules":{"type":"array","items":{"$ref":"#/$defs/RoutingRuleExplanation"}}},"additionalProperties":false},"WorkflowContext":{"oneOf":[{"$ref":"#/$defs/ProposalRevisionHandle"},{"$ref":"#/$defs/AnalysisHandle"},{"$ref":"#/$defs/ReadinessHandle"}]},"ProposeCall":{"type":"object","additionalProperties":false,"properties":{"snapshot":{"$ref":"#/$defs/SnapshotHandle"},"change_set":{"$ref":"#/$defs/StandardsChangeSet"}},"required":["change_set"]},"ReviseCall":{"type":"object","additionalProperties":false,"properties":{"context":{"$ref":"#/$defs/WorkflowContext"},"change_set":{"$ref":"#/$defs/StandardsChangeSet"}},"required":["context","change_set"]},"AnalyzeCall":{"type":"object","additionalProperties":false,"properties":{"context":{"$ref":"#/$defs/WorkflowContext"}},"required":["context"]},"ResolveWorkflowCall":{"type":"object","additionalProperties":false,"properties":{"context":{"$ref":"#/$defs/WorkflowContext"},"submission":{"$ref":"#/$defs/Submission"}},"required":["context","submission"]},"ReviewCall":{"type":"object","additionalProperties":false,"properties":{"context":{"$ref":"#/$defs/WorkflowContext"},"decisions":{"type":"array","minItems":3,"maxItems":3,"uniqueItems":true,"items":{"$ref":"#/$defs/ReviewDecision"}}},"required":["context","decisions"]},"ApplyCall":{"type":"object","additionalProperties":false,"properties":{"context":{"$ref":"#/$defs/WorkflowContext"}},"required":["context"]},"RecoverCall":{"type":"object","additionalProperties":false,"properties":{"context":{"$ref":"#/$defs/WorkflowContext"}},"required":["context"]},"WorkflowStatusCall":{"type":"object","additionalProperties":false,"properties":{"context":{"$ref":"#/$defs/WorkflowContext"}},"required":["context"]},"ResumeCall":{"type":"object","additionalProperties":false,"properties":{"context":{"$ref":"#/$defs/WorkflowContext"}},"required":["context"]},"WorkflowContinuation":{"type":"object","additionalProperties":false,"properties":{"operation":{"enum":["revise","analyze","resolve_workflow","review","apply","recover","workflow_status","resume"]},"context":{"$ref":"#/$defs/WorkflowContext"},"required_inputs":{"type":"array","uniqueItems":true,"items":{"enum":["change_set","submission","decisions"]}}},"required":["operation","context","required_inputs"]},"WorkflowOutcome":{"oneOf":[{"$ref":"#/$defs/CreateProposalResult"},{"$ref":"#/$defs/ReviseProposalResult"},{"$ref":"#/$defs/PendingResult"},{"$ref":"#/$defs/CompleteResult"},{"$ref":"#/$defs/ReviewProposalResult"},{"$ref":"#/$defs/ApplyProposalResult"},{"$ref":"#/$defs/ApplicationRecoveryRequiredResult"},{"$ref":"#/$defs/RecoverApplicationResult"},{"$ref":"#/$defs/RejectedResult"}]},"WorkflowResult":{"type":"object","additionalProperties":false,"properties":{"kind":{"const":"workflow-result"},"context":{"$ref":"#/$defs/WorkflowContext"},"proposal":{"$ref":"#/$defs/ProposalHandle"},"revision":{"$ref":"#/$defs/ProposalRevisionHandle"},"status":{"enum":["draft","needs-action","complete","requires-change","ready","recovery-required","applied","rejected","stale"]},"next_operations":{"type":"array","items":{"$ref":"#/$defs/WorkflowContinuation"}},"outcome":{"$ref":"#/$defs/WorkflowOutcome"}},"required":["kind","context","proposal","revision","status","next_operations"]},"FocusedQueryNextOperation":{"type":"object","required":["operation","request_kind","snapshot"],"properties":{"operation":{"enum":["route","read","related"]},"request_kind":{"enum":["route","read","related"]},"target":{"$ref":"#/$defs/CanonicalId"},"snapshot":{"$ref":"#/$defs/SnapshotHandle"}},"additionalProperties":false},"RewriteNavigationIndexEdit":{"type":"object","required":["kind","entrypoint","destinations","rationale"],"properties":{"kind":{"const":"rewrite-navigation-index"},"entrypoint":{"$ref":"#/$defs/AuthoringTargetHandle"},"destinations":{"type":"array","items":{"$ref":"#/$defs/CanonicalId"},"minItems":1,"uniqueItems":true},"rationale":{"$ref":"#/$defs/NonEmptyString"},"retargets":{"type":"array","items":{"$ref":"#/$defs/NavigationRetarget"},"uniqueItems":true}},"additionalProperties":false},"NavigationIndexEntry":{"type":"object","required":["id","entrypoint","destinations"],"properties":{"id":{"$ref":"#/$defs/CanonicalId"},"entrypoint":{"$ref":"#/$defs/AuthoringTargetHandle"},"destinations":{"type":"array","items":{"$ref":"#/$defs/CanonicalId"},"uniqueItems":true},"content":{"$ref":"#/$defs/NonEmptyString"}},"additionalProperties":false},"NavigationIndexesResult":{"type":"object","required":["kind","authority","indexes","next_operations"],"properties":{"kind":{"const":"navigation-indexes-result"},"authority":{"oneOf":[{"$ref":"#/$defs/SnapshotHandle"},{"$ref":"#/$defs/ProposalRevisionHandle"}]},"indexes":{"type":"array","items":{"$ref":"#/$defs/NavigationIndexEntry"},"minItems":1},"next_operations":{"type":"array","items":{"$ref":"#/$defs/NextOperation"},"maxItems":0}},"additionalProperties":false},"NavigationRetarget":{"type":"object","required":["entrypoint","standard"],"properties":{"entrypoint":{"$ref":"#/$defs/AuthoringTargetHandle"},"standard":{"$ref":"#/$defs/CanonicalId"}},"additionalProperties":false},"ApplicationNextOperation":{"type":"object","additionalProperties":false,"required":["operation","snapshot"],"properties":{"operation":{"enum":["read","related","routing_facts","route","query","inspect"]},"snapshot":{"$ref":"#/$defs/SnapshotHandle"},"target":{"$ref":"#/$defs/CanonicalId"},"handle":{"$ref":"#/$defs/SnapshotChildHandle"}}},"ApplicationRejectedResult":{"type":"object","additionalProperties":false,"required":["kind","purpose","code","outcome","message","next_operations"],"properties":{"kind":{"const":"application-rejected-result"},"purpose":{"const":"application"},"code":{"enum":["APPLICATION.CONTENT_UNAVAILABLE","APPLICATION.INPUT_INVALID","APPLICATION.OPERATION_UNAVAILABLE","APPLICATION.INTERNAL_UNAVAILABLE","APPLICATION.UNSUPPORTED_CAPTURE","APPLICATION.RESULT_LIMIT"]},"outcome":{"enum":["invalid","unsupported","unavailable"]},"message":{"type":"string"},"next_operations":{"type":"array","items":{"$ref":"#/$defs/ApplicationNextOperation"}}}},"ApplicationPolicy":{"type":"object","additionalProperties":false,"required":["id","handle","role","level"],"properties":{"id":{"$ref":"#/$defs/CanonicalId"},"handle":{"$ref":"#/$defs/SnapshotChildHandle"},"role":{"enum":["core","router","topic","workflow","profile","reference","prompt","template"]},"level":{"enum":["MUST","SHOULD","PROFILE","REFERENCE"]}}},"ApplicationRelationship":{"type":"object","additionalProperties":false,"required":["handle","source","target","relation","groups","direction"],"properties":{"handle":{"$ref":"#/$defs/SnapshotChildHandle"},"source":{"$ref":"#/$defs/CanonicalId"},"target":{"$ref":"#/$defs/CanonicalId"},"relation":{"type":"string"},"groups":{"type":"array","items":{"$ref":"#/$defs/CanonicalId"}},"direction":{"enum":["incoming","outgoing"]}}},"ApplicationReadResult":{"type":"object","additionalProperties":false,"required":["kind","purpose","snapshot","policy","content","scope","requires","specializes","next_operations"],"properties":{"kind":{"const":"application-read-result"},"purpose":{"const":"application"},"snapshot":{"$ref":"#/$defs/SnapshotHandle"},"policy":{"$ref":"#/$defs/ApplicationPolicy"},"content":{"type":"string"},"scope":{"$ref":"#/$defs/ReviewScope"},"requires":{"type":"array","items":{"$ref":"#/$defs/CanonicalId"}},"specializes":{"type":"array","items":{"$ref":"#/$defs/CanonicalId"}},"related":{"type":"array","items":{"$ref":"#/$defs/ApplicationRelationship"}},"next_operations":{"type":"array","items":{"$ref":"#/$defs/ApplicationNextOperation"}}}},"ApplicationRelatedResult":{"type":"object","additionalProperties":false,"required":["kind","purpose","snapshot","target","relationships","next_operations"],"properties":{"kind":{"const":"application-related-result"},"purpose":{"const":"application"},"snapshot":{"$ref":"#/$defs/SnapshotHandle"},"target":{"$ref":"#/$defs/CanonicalId"},"relationships":{"type":"array","items":{"$ref":"#/$defs/ApplicationRelationship"}},"next_operations":{"type":"array","items":{"$ref":"#/$defs/ApplicationNextOperation"}}}},"ApplicationReadingEntry":{"type":"object","additionalProperties":false,"required":["target","scope","authority","state"],"properties":{"target":{"$ref":"#/$defs/CanonicalId"},"scope":{"$ref":"#/$defs/ReviewScope"},"authority":{"enum":["normative","contextual"]},"state":{"const":"selected"}}},"ApplicationQuestion":{"type":"object","additionalProperties":false,"required":["fact"],"properties":{"fact":{"$ref":"#/$defs/AuthoredRoutingFact"}}},"ApplicationRouteResult":{"type":"object","additionalProperties":false,"required":["kind","purpose","snapshot","status","reading_plan","unresolved_questions","next_operations"],"properties":{"kind":{"const":"application-route-result"},"purpose":{"const":"application"},"snapshot":{"$ref":"#/$defs/SnapshotHandle"},"status":{"enum":["complete","needs-facts"]},"reading_plan":{"type":"array","items":{"$ref":"#/$defs/ApplicationReadingEntry"}},"unresolved_questions":{"type":"array","items":{"$ref":"#/$defs/ApplicationQuestion"}},"next_operations":{"type":"array","items":{"$ref":"#/$defs/ApplicationNextOperation"}}}},"ApplicationRoutingFactsResult":{"type":"object","additionalProperties":false,"required":["kind","purpose","snapshot","facts","next_operations"],"properties":{"kind":{"const":"application-routing-facts-result"},"purpose":{"const":"application"},"snapshot":{"$ref":"#/$defs/SnapshotHandle"},"facts":{"type":"array","items":{"$ref":"#/$defs/AuthoredRoutingFact"}},"next_operations":{"type":"array","items":{"$ref":"#/$defs/ApplicationNextOperation"}}}},"ApplicationReadCall":{"type":"object","additionalProperties":false,"required":["target"],"properties":{"target":{"$ref":"#/$defs/CanonicalId"},"snapshot":{"$ref":"#/$defs/SnapshotHandle"},"detail":{"enum":["compact","full"]}}},"ApplicationReadRequest":{"type":"object","additionalProperties":false,"required":["kind","target"],"properties":{"kind":{"const":"read"},"target":{"$ref":"#/$defs/CanonicalId"},"detail":{"enum":["compact","full"]}}},"ApplicationQueryRequest":{"oneOf":[{"$ref":"#/$defs/RouteRequest"},{"$ref":"#/$defs/ApplicationReadRequest"},{"$ref":"#/$defs/RelatedRequest"}]},"ApplicationQueryCall":{"type":"object","additionalProperties":false,"required":["snapshot","request"],"properties":{"snapshot":{"$ref":"#/$defs/SnapshotHandle"},"request":{"$ref":"#/$defs/ApplicationQueryRequest"}}},"ApplicationInspectCall":{"type":"object","additionalProperties":false,"required":["handle"],"properties":{"handle":{"$ref":"#/$defs/SnapshotChildHandle"}}},"AuthoredDecisionProvenance":{"type":"object","additionalProperties":false,"required":["id","subject","origin","rationale","evidence"],"properties":{"id":{"$ref":"#/$defs/CanonicalId"},"subject":{"$ref":"#/$defs/CanonicalId"},"origin":{"enum":["documented-original","reconstructed-history","current-justification","unrecorded"]},"rationale":{"type":"string"},"evidence":{"type":"array","items":{"$ref":"#/$defs/EvidenceReference"}},"assumptions":{"type":"array","items":{"type":"string"}},"limits":{"type":"array","items":{"type":"string"}},"alternatives":{"type":"array","items":{"type":"string"}},"reconsideration":{"type":"array","items":{"type":"string"}},"supersedes":{"type":"array","items":{"type":"string"}}}},"DecisionProvenanceRecord":{"type":"object","additionalProperties":false,"required":["id","subject","origin","rationale","evidence","assumptions","limits","alternatives","reconsideration","supersedes","subject_binding","retired"],"properties":{"id":{"$ref":"#/$defs/CanonicalId"},"subject":{"$ref":"#/$defs/CanonicalId"},"origin":{"enum":["documented-original","reconstructed-history","current-justification","unrecorded"]},"rationale":{"type":"string"},"evidence":{"type":"array","items":{"$ref":"#/$defs/EvidenceReference"}},"assumptions":{"type":"array","items":{"type":"string"}},"limits":{"type":"array","items":{"type":"string"}},"alternatives":{"type":"array","items":{"type":"string"}},"reconsideration":{"type":"array","items":{"type":"string"}},"supersedes":{"type":"array","items":{"type":"string"}},"subject_binding":{"$ref":"#/$defs/Digest"},"retired":{"type":"boolean"}}},"ApplicationExposureState":{"enum":["unreviewed","current","needs-review"]},"ProvenanceReadResult":{"type":"object","additionalProperties":false,"required":["kind","authority","record","state","next_operations"],"properties":{"kind":{"const":"provenance-read-result"},"authority":{"oneOf":[{"$ref":"#/$defs/SnapshotHandle"},{"$ref":"#/$defs/ProposalRevisionHandle"}]},"record":{"$ref":"#/$defs/DecisionProvenanceRecord"},"state":{"enum":["current","needs-review","retired"]},"next_operations":{"type":"array","items":{"$ref":"#/$defs/NextOperation"}}}},"OperationalReadResult":{"type":"object","additionalProperties":false,"required":["kind","authority","target","canonical_id","role","content","application_exposure","next_operations"],"properties":{"kind":{"const":"operational-read-result"},"authority":{"oneOf":[{"$ref":"#/$defs/SnapshotHandle"},{"$ref":"#/$defs/ProposalRevisionHandle"}]},"target":{"$ref":"#/$defs/AuthoringTargetHandle"},"canonical_id":{"$ref":"#/$defs/CanonicalId"},"role":{"enum":["prompt","template"]},"content":{"type":"string"},"application_exposure":{"$ref":"#/$defs/ApplicationExposureState"},"next_operations":{"type":"array","items":{"$ref":"#/$defs/NextOperation"}}}},"PutDecisionProvenanceEdit":{"type":"object","additionalProperties":false,"required":["kind","record"],"properties":{"kind":{"const":"put-provenance"},"record":{"$ref":"#/$defs/AuthoredDecisionProvenance"}}},"RetireDecisionProvenanceEdit":{"type":"object","additionalProperties":false,"required":["kind","id"],"properties":{"kind":{"const":"retire-provenance"},"id":{"$ref":"#/$defs/CanonicalId"}}},"ApproveApplicationContentEdit":{"type":"object","additionalProperties":false,"required":["kind","target"],"properties":{"kind":{"const":"approve-application-content"},"target":{"oneOf":[{"$ref":"#/$defs/CanonicalId"},{"$ref":"#/$defs/AuthoringTargetHandle"}]}}},"WithdrawApplicationContentEdit":{"type":"object","additionalProperties":false,"required":["kind","target"],"properties":{"kind":{"const":"withdraw-application-content"},"target":{"oneOf":[{"$ref":"#/$defs/CanonicalId"},{"$ref":"#/$defs/AuthoringTargetHandle"}]}}},"ReviseOperationalArtifactEdit":{"type":"object","additionalProperties":false,"required":["kind","target","title","body"],"properties":{"kind":{"const":"revise-operational-artifact"},"target":{"$ref":"#/$defs/AuthoringTargetHandle"},"title":{"$ref":"#/$defs/NonEmptyString"},"body":{"type":"string"}}},"PolicyScopeUpdate":{"type":"object","additionalProperties":false,"required":["policy","heading_path","semantics"],"properties":{"policy":{"$ref":"#/$defs/CanonicalId"},"heading_path":{"type":"array","minItems":1,"items":{"$ref":"#/$defs/NonEmptyString"}},"semantics":{"$ref":"#/$defs/PolicySemanticIntent"}}},"ReadManyItem":{"type":"object","required":["target"],"properties":{"target":{"$ref":"#/$defs/CanonicalId"},"include_routing":{"type":"boolean"},"include_coverage":{"type":"boolean","description":"Include current repository attestation status for registered policy units in this read scope."},"detail":{"enum":["compact","full"],"description":"Compact preserves exact policy and essential authority; full includes all relationship rows."}},"additionalProperties":false},"ReadManyCall":{"type":"object","additionalProperties":false,"required":["snapshot","items"],"description":"Read 1–32 selected items from one explicit snapshot, preserving order. The complete JSON result is limited to 2 MiB; any failed item rejects the entire request.","properties":{"snapshot":{"$ref":"#/$defs/SnapshotHandle"},"items":{"type":"array","minItems":1,"maxItems":32,"uniqueItems":true,"items":{"$ref":"#/$defs/ReadManyItem"}}}},"ReadManyResult":{"type":"object","additionalProperties":false,"required":["kind","snapshot","items"],"properties":{"kind":{"const":"read-many-result"},"snapshot":{"$ref":"#/$defs/SnapshotHandle"},"items":{"type":"array","minItems":1,"maxItems":32,"items":{"oneOf":[{"$ref":"#/$defs/CompactReadResult"},{"$ref":"#/$defs/ReadResult"},{"$ref":"#/$defs/NavigationIndexesResult"},{"$ref":"#/$defs/ProvenanceReadResult"},{"$ref":"#/$defs/OperationalReadResult"}]}}}},"ApplicationReadManyItem":{"type":"object","additionalProperties":false,"required":["target"],"properties":{"target":{"$ref":"#/$defs/CanonicalId"},"detail":{"enum":["compact","full"]}}},"ApplicationReadManyCall":{"type":"object","additionalProperties":false,"required":["snapshot","items"],"description":"Read 1–32 selected items from one explicit snapshot, preserving order. The complete JSON result is limited to 2 MiB; any failed item rejects the entire request.","properties":{"snapshot":{"$ref":"#/$defs/SnapshotHandle"},"items":{"type":"array","minItems":1,"maxItems":32,"uniqueItems":true,"items":{"$ref":"#/$defs/ApplicationReadManyItem"}}}},"ApplicationReadManyResult":{"type":"object","additionalProperties":false,"required":["kind","snapshot","items","purpose"],"properties":{"kind":{"const":"application-read-many-result"},"snapshot":{"$ref":"#/$defs/SnapshotHandle"},"items":{"type":"array","minItems":1,"maxItems":32,"items":{"oneOf":[{"$ref":"#/$defs/ApplicationReadResult"}]}},"purpose":{"const":"application"}}}}}') +DEFINITION_METADATA = freeze_json({'ActiveSnapshotSummary': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'lifecycle': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'source_revision': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'created_at': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'AgentRouteResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'reading_plan': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'unresolved_questions': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'next_operations': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'summary': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'facts': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'rules': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'AllExpression': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'operator': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'expressions': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'AlwaysExpression': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'operator': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'AnalysisChildArtifact': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'AnalysisChildHandle': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'analysis': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'child_kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'child_id': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'schema_version': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'AnalysisChildInspectionResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'handle': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'artifact': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'AnalysisContext': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'handle': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'subjects': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'changes': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'semantic_proposals': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'AnalysisExecutionContractView': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'authorization_authority_digest': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'providers': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'AnalysisHandle': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'id': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'schema_version': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'AnalysisId': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'AnalysisInspectionResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'state': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'AnalysisMaterialHandle': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'AnalysisRequest': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'base_snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'proposed_snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'changes': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'semantic_proposals': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'prior_analysis': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'contract_version': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'AnalysisState': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'handle': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'base_snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'proposed_reference': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'changes': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'semantic_proposals': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'fact_observations': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'dispositions': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'coverage_attestations': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'authorization_records': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'domain_contracts': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'execution_contracts': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'contract_version': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'AnalyzeCall': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'context': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'AnalyzeProposalCall': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'revision': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'AnyExpression': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'operator': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'expressions': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ApplicabilityExpression': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'ApplicationExposureState': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'ApplicationHandle': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'id': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'schema_version': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ApplicationId': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'ApplicationInspectCall': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'handle': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ApplicationNextOperation': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'operation': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'target': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'handle': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ApplicationPolicy': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'id': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'handle': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'role': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'level': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ApplicationQueryCall': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'request': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ApplicationQueryRequest': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'ApplicationQuestion': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'fact': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ApplicationReadCall': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'target': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'detail': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ApplicationReadManyCall': {'title': None, 'description': 'Read 1–32 selected items from one explicit snapshot, preserving order. The complete JSON result is limited to 2 MiB; any failed item rejects the entire request.', 'has_default': False, 'default': None, 'properties': {'snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'items': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ApplicationReadManyItem': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'target': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'detail': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ApplicationReadManyResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'items': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'purpose': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ApplicationReadRequest': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'target': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'detail': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ApplicationReadResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'purpose': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'policy': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'content': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'scope': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'requires': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'specializes': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'related': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'next_operations': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ApplicationReadingEntry': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'target': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'scope': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'authority': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'state': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ApplicationRecoveryRequiredResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'application': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'status': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'code': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'outcome': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'message': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ApplicationRejectedResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'purpose': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'code': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'outcome': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'message': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'next_operations': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ApplicationRelatedResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'purpose': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'target': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'relationships': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'next_operations': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ApplicationRelationship': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'handle': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'source': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'target': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'relation': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'groups': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'direction': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ApplicationRouteResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'purpose': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'status': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'reading_plan': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'unresolved_questions': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'next_operations': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ApplicationRoutingFactsResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'purpose': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'facts': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'next_operations': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ApplyCall': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'context': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ApplyProposalCall': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'readiness': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ApplyProposalResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'application': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'status': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ApproveApplicationContentEdit': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'target': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'AuditPolicyUnitEdit': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'policy': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'rationale': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'AuthoredDecisionProvenance': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'id': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'subject': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'origin': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'rationale': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'evidence': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'assumptions': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'limits': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'alternatives': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'reconsideration': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'supersedes': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'AuthoredRoutingFact': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'id': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'semantic_revision': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'type': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'nullable': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'values': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'aliases': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'meaning': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'prompt': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'AuthoredRoutingRule': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'id': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'target': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'when': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'condition': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'AuthoringTargetHandle': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'id': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'schema_version': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'AuthorizationId': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'AuthorizationRecord': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'reference': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'issuer_semantic_revision': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'principal': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'action': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'subject_kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'subject_id': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'authorization_evidence': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'revocation_authority': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'revocation_authority_semantic_revision': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'revocation_evidence': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'AuthorizationReference': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'id': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'issuer': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'capability': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'authority_digest': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'CanonicalId': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'CanonicalModuleDeclaration': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'id': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'role': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'level': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'applies_when': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'does_not_apply_when': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'requires': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'specializes': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'verification': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ChangeDescriptor': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'accepted_ids': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'proposed_ids': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'scope': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'accepted_module': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'proposed_module': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ChangePolicySemantics': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'accepted_semantic_revision': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'proposed_semantic_revision': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'intent': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ChangedPolicyUnit': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'policy': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'change_kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'classification': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'accepted_representation_digest': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'proposed_representation_digest': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'accepted_structural_digest': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'proposed_structural_digest': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'accepted_semantic_revision': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'proposed_semantic_revision': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'semantic_state': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'scope': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ChildId': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'CompactReadResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'policy': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'content': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'requires': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'specializes': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'next_operations': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'summary': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'routing': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'coverage': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'detail': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'application_exposure': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'provenance': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'CompleteResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'handle': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'status': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'context': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'changes': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'changed_units': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'coverage_certificates': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'fact_observations': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'dispositions': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'reading_plan': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'completion': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'summary': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'CompletionProof': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'required_coverage_subjects': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'certificate_subjects': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'reached_consumer_obligations': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'disposition_obligations': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'required_fact_requirements': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'observed_fact_requirements': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'non_consumer_obligations_resolved': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'applicability_resolved': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'authorization_valid': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'evidence_valid': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ConsumerDispositionSubmission': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'obligation': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'result': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'rationale': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'evidence': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'fingerprint': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ConsumerReviewContract': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'id': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'version': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'permitted_dispositions': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'evidence_contract': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'authorization_capability': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'semantics': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ConsumerReviewObligationReadingReason': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'obligation': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ContainsExpression': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'operator': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'fact': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'value': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'CoverageAttestation': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'requirement': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'conclusion': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'evidence': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'explicit_exclusions': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'rationale': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'auditor_provenance': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'schema_version': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'authorization': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'CoverageAttestationClaim': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'requirement': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'conclusion': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'evidence': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'explicit_exclusions': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'rationale': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'auditor_provenance': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'CoverageAttestationSubmission': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'claim': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'CoverageAuditAuthority': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'issuer': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'principal': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'authorization_id': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'CoverageCertificate': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'handle': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'requirement': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'subject': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'owner': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'semantic_revision': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'horizon_digest': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'relationship_digest': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'evidence_digests': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'fact_schema_digest': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'CoverageRequirement': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'handle': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'subject': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'owner': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'semantic_revision': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'relationship_kinds': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'horizon': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'required_evidence_contract': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'CreateProposalCall': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'base_snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'change_set': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'CreateProposalResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'proposal': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'revision': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'CreateSnapshotCall': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'CreateSnapshotResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'CreateStandardEdit': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'standard': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'requires': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'specializes': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'policy_units': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'DecisionDependency': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'class': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'identity': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'digest': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'DecisionFingerprint': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'decision_kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'decision_contract': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'schema_version': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'dependencies': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'DecisionProvenanceRecord': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'id': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'subject': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'origin': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'rationale': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'evidence': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'assumptions': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'limits': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'alternatives': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'reconsideration': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'supersedes': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'subject_binding': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'retired': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'DeleteSnapshotCall': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'DeleteSnapshotResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'purge_deadline': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'Digest': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'DispositionRecord': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'obligation': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'result': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'rationale': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'evidence': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'authorization': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'fingerprint': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'DomainContractReference': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'id': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'version': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'EdgeId': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'EqualsExpression': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'operator': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'fact': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'value': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'EvidenceCheckRetirement': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'suite': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'check': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'EvidenceConsumerRegistration': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'path': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'artifact_kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'source_policies': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'relation': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'evidence_owner': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'rationale': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'EvidenceMaintenancePlan': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'prune_stale_certificates': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'retire_suites': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'retire_checks': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'retire_inputs': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'suite_descriptions': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'replacement_evidence_owner': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'replacement_evidence_rationale': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'relationship_updates': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'consumer_registrations': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'unregister_policy_subjects': {'title': None, 'description': 'Remove selected review-subject registrations and their source relationships while preserving normative Markdown.', 'has_default': False, 'default': None}}}, 'EvidenceReference': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'id': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'digest': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'provider_contract': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'provider_contract_version': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'EvidenceRelationshipUpdate': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'source_policy': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'consumer': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'relation': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'evidence_owner': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'rationale': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'EvidenceSuiteDescription': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'suite': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'description': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ExistsExpression': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'operator': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'fact': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'FactObservation': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'handle': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'requirement': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'value': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'evidence': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'authorization': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'provider': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'FactRequirement': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'handle': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'fact': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'fact_semantic_revision': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'fact_contract_digest': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'context': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'value_contract': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'answer_contract': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'evidence_contract': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'authorization_capability': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'FactRequirementId': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'FactRequirementWork': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'requirement': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'prompt': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'dependent_programs': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'FactSet': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'FactValue': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'FactValueContract': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'type': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'states': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'nullable': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'values': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'FindProposalsCall': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'after': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'limit': {'title': None, 'description': None, 'has_default': True, 'default': 50}}}, 'FindProposalsResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'proposals': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'continuation': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'FindSnapshotsCall': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'lifecycle': {'title': None, 'description': None, 'has_default': True, 'default': 'active'}, 'after': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'limit': {'title': None, 'description': None, 'has_default': True, 'default': 50}}}, 'FindSnapshotsResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'snapshots': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'continuation': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'FocusedQueryNextOperation': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'operation': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'request_kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'target': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'GeneralSelectionReason': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'source': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'fact': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'edge': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'question': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ImpactDispositionSubmission': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'obligation': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'result': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'rationale': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'evidence': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'fingerprint': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ImpactTraceId': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'ImpactTraceReference': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'id': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'graph': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'applicability': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'InExpression': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'operator': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'fact': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'values': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'InspectCall': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'handle': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'InspectNextOperation': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'operation': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'request_kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'handle': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'InspectableHandle': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'InspectionResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'MaintainEvidenceCall': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'expected_revision': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'evidence': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'plan': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'apply': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'MaintainEvidenceResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'applied': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'changed_files': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'removed_files': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'verification': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ModuleRelationshipKey': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'relation': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'source': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'target': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'MovePolicyUnitEdit': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'policy': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'standard': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'after_policy': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'semantics': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'NavigationIndexEntry': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'id': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'entrypoint': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'destinations': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'content': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'NavigationIndexesResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'authority': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'indexes': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'next_operations': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'NavigationRetarget': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'entrypoint': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'standard': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'NewPolicyUnit': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'id': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'heading_chain': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'semantic_revision': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'intent': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'aliases': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'predecessors': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'successors': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'NextOperation': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'NonEmptyString': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'NotExpression': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'operator': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'expression': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'Obligation': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'handle': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'target': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'scope': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'reasons': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'state': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'applicability': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'permitted_submissions': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'review_contract': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'fingerprint': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ObligationId': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'OperationalReadResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'authority': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'target': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'canonical_id': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'role': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'content': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'application_exposure': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'next_operations': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'PendingResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'handle': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'status': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'context': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'changes': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'changed_units': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'obligations': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'fact_requirements': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'reading_plan': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'next_operations': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'summary': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'PolicyCoverageStatus': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'subject': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'requirement_id': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'status': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'authority': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'PolicyImpactSelectionReason': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'source': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'edge': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'relation': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'evidence_owner': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'traces': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'PolicyInspectionResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'policy': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'declaration': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'representation_digest': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'structural_digest': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'provenance': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'PolicyRelationship': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'source_policy': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'consumer': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'relation': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'applicability': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'source_scope': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'consumer_scope': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'evidence_owner': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'rationale': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'PolicyRelationshipInspection': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'relationship_kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'applicability': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'source_scope': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'consumer_scope': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'propagation': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'evidence_owner': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'rationale': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'PolicyRelationshipKey': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'source_policy': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'consumer': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'relation': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'PolicyScopeUpdate': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'policy': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'heading_path': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'semantics': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'PolicySemanticIntent': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'PolicySummary': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'handle': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'authority': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'scope': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'PolicyUnitDeclaration': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'id': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'module': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'heading_path': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'semantic_revision': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'lifecycle': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'aliases': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'predecessors': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'successors': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'PolicyUnitMapping': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'state': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'reason': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'policy_units': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'PrepareCall': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'request': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'PreservePolicySemantics': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'semantic_revision': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'intent': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ProposalHandle': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'id': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'schema_version': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ProposalId': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'ProposalPolicySummary': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'id': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'authority': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'scope': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ProposalReadResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'revision': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'policy': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'content': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'requires': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'specializes': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'related': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'next_operations': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'summary': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'routing': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'coverage': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'application_exposure': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'provenance': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ProposalRelatedResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'revision': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'target': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'authoring_target': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'policy_unit_mapping': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'relationships': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'next_operations': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'summary': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ProposalRelationshipSummary': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'source': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'target': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'relation': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'groups': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'direction': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'traversal_eligible': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'applicability': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ProposalRevisionHandle': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'id': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'schema_version': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ProposalRevisionId': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'ProposalRouteResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'revision': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'reading_plan': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'unresolved_questions': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'next_operations': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'summary': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ProposalSummary': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'proposal': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'head_revision': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ProposeCall': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'change_set': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ProvenanceReadResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'authority': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'record': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'state': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'next_operations': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ProvenanceRecord': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'path': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ProvideFactSubmission': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'requirement': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'value': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'evidence': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ProviderReference': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'id': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'contract': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'contract_version': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'input_digest': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'PutDecisionProvenanceEdit': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'record': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'PutPolicyRelationshipEdit': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'relationship': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'PutRoutingFactEdit': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'fact': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'rationale': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'PutRoutingRuleEdit': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'rule': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'rationale': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'QuarantinedSnapshotSummary': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'lifecycle': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'source_revision': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'created_at': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'purge_deadline': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'QueryCall': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'request': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'QueryNextOperation': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'operation': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'request_kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'target': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'QueryProposalCall': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'revision': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'request': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'QueryProposalNextOperation': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'operation': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'request_kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'target': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'revision': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'QueryProposalResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'QueryRequest': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'QueryResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'Question': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'id': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'prompt': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'state': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'permitted_answers': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ReadCall': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'target': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'include_routing': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'include_coverage': {'title': None, 'description': 'Include current repository attestation status for registered policy units in this read scope.', 'has_default': False, 'default': None}, 'snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'detail': {'title': None, 'description': 'Compact preserves exact policy and essential authority; full includes all relationship rows.', 'has_default': False, 'default': None}}}, 'ReadCoverage': {'title': None, 'description': 'Repository attestation status bound to this snapshot or proposal. Empty subjects means no registered policy units in scope, not complete coverage. Analysis-local attestations are not repository certificates.', 'has_default': False, 'default': None, 'properties': {'subjects': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ReadManyCall': {'title': None, 'description': 'Read 1–32 selected items from one explicit snapshot, preserving order. The complete JSON result is limited to 2 MiB; any failed item rejects the entire request.', 'has_default': False, 'default': None, 'properties': {'snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'items': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ReadManyItem': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'target': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'include_routing': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'include_coverage': {'title': None, 'description': 'Include current repository attestation status for registered policy units in this read scope.', 'has_default': False, 'default': None}, 'detail': {'title': None, 'description': 'Compact preserves exact policy and essential authority; full includes all relationship rows.', 'has_default': False, 'default': None}}}, 'ReadManyResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'items': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ReadRequest': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'target': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'include_routing': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'include_coverage': {'title': None, 'description': 'Include current repository attestation status for registered policy units in this read scope.', 'has_default': False, 'default': None}}}, 'ReadResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'policy': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'content': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'requires': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'specializes': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'related': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'next_operations': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'summary': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'routing': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'coverage': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'application_exposure': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'provenance': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ReadinessHandle': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'id': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'schema_version': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ReadinessId': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'ReadingPlanEntry': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'target': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'scope': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'authority': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'reasons': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'state': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ReadingPlanReason': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'RecoverApplicationCall': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'readiness': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'RecoverApplicationResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'application': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'status': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'RecoverCall': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'context': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'RegisterPolicyUnitEdit': {'title': None, 'description': 'Register an explicitly selected policy scope in an existing standard. The Engine owns declaration placement and validates the final candidate.', 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'standard': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'policy_unit': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'RejectedResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'code': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'outcome': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'target': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'message': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'details': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'next_operations': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'RelatedCall': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'target': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'groups': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'direction': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'transitive': {'title': None, 'description': None, 'has_default': True, 'default': False}, 'snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'RelatedRequest': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'target': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'groups': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'direction': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'transitive': {'title': None, 'description': None, 'has_default': True, 'default': False}}}, 'RelatedResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'target': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'authoring_target': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'policy_unit_mapping': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'relationships': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'next_operations': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'summary': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'RelationshipConsumer': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'RelationshipDisposition': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'relationship': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'disposition': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'replacement_consumer': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'rationale': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'evidence': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'RelationshipInspectionResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'relationship': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'policy_semantics': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'provenance': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'RelationshipKey': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'RelationshipSummary': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'handle': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'source': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'target': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'relation': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'groups': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'direction': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'traversal_eligible': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'applicability': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'RemovePolicyRelationshipEdit': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'relationship': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'RemoveRoutingFactEdit': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'fact': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'rationale': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'RemoveRoutingRuleEdit': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'rule': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'rationale': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ReplaceStandardRelationshipsEdit': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'standard': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'requires': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'specializes': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'rationale': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'RepositoryPath': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'RequiresReadingReason': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'edge': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'source': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ResolveCall': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'analysis': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'submission': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ResolveNextOperation': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'operation': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'request_kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'target': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'work': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'analysis': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ResolveWorkflowCall': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'context': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'submission': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ResumeCall': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'context': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'RetireDecisionProvenanceEdit': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'id': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'RetirePolicyUnitEdit': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'policy': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'retired_semantic_revision': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'successors': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'relationship_dispositions': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'evidence': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'RetireStandardEdit': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'standard': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'successors': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'relationship_dispositions': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'evidence': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ReviewCall': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'context': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'decisions': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ReviewDecision': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'owner': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'decision': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'rationale': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'evidence': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ReviewProposalCall': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'analysis': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'decisions': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'prior_readiness': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ReviewProposalResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'readiness': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'revision': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'status': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ReviewScope': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'ReviseCall': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'context': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'change_set': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ReviseOperationalArtifactEdit': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'target': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'title': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'body': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'RevisePolicyUnitEdit': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'policy': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'title': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'body': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'semantics': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ReviseProposalCall': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'expected_revision': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'change_set': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ReviseProposalResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'proposal': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'revision': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ReviseStandardEdit': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'standard': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'scope_updates': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'RewriteNavigationIndexEdit': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'entrypoint': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'destinations': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'rationale': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'retargets': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'RouteCall': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'facts': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'RouteRequest': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'facts': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'RouteResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'reading_plan': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'unresolved_questions': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'next_operations': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'summary': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'RoutingBaseReadingReason': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'projection': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'RoutingConfiguration': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'facts': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'rules': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'RoutingFactsCall': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'RoutingFactsResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'facts': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'RoutingQuestion': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'id': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'prompt': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'state': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'fact': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'RoutingRuleExplanation': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'id': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'target': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'when': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'state': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'RoutingRuleReadingReason': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'rule': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'facts': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ScalarValue': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'SelectionReason': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'SemanticProposal': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'policy': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'accepted_semantic_revision': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'proposed_semantic_revision': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'intent': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'structural_digest': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'SnapshotChildHandle': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'child_kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'child_id': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'schema_version': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'SnapshotHandle': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'id': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'schema_version': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'SnapshotId': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'SnapshotInspectionResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'SnapshotSummary': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'SpecializesReadingReason': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'edge': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'source': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'StandardContent': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'id': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'title': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'role': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'level': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'applies_when': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'does_not_apply_when': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'verification': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'body': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'StandardEdit': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'StandardsChangePurpose': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'summary': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'rationale': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'evidence': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'StandardsChangeSet': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'purpose': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'edits': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'StructuredScope': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'heading_path': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'Submission': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'Timestamp': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'UndeleteSnapshotCall': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'UndeleteSnapshotResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'VerificationFailure': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'code': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'message': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'suite': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'check': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'VerificationReport': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'passed': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'exit_code': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'suites': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'checks': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'failures': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'VerifyProposalCall': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'revision': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'readiness': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'VerifyProposalResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'revision': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'verification': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'readiness': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'VerifyRepositoryCall': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'refresh_verification_inputs': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'VerifyRepositoryResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'refreshed_verification_inputs': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'verification': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'WholeArtifactScope': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'WithdrawApplicationContentEdit': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'target': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'WorkflowContext': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'WorkflowContinuation': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'operation': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'context': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'required_inputs': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'WorkflowOutcome': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'WorkflowResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'context': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'proposal': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'revision': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'status': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'next_operations': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'outcome': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'WorkflowStatusCall': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'context': {'title': None, 'description': None, 'has_default': False, 'default': None}}}}) @dataclass(frozen=True, slots=True) class ActiveSnapshotSummary: @@ -4571,6 +4571,32 @@ def from_value(cls, value: object) -> RecoverCall: def as_contract(self) -> dict[str, object]: return model_as_contract(self) +@dataclass(frozen=True, slots=True) +class RegisterPolicyUnitEdit: + 'Register an explicitly selected policy scope in an existing standard. The Engine owns declaration placement and validates the final candidate.' + __definition__: ClassVar[str] = 'RegisterPolicyUnitEdit' + __contract_fields__: ClassVar = MappingProxyType({ + 'kind': 'kind', + 'standard': 'standard', + 'policy_unit': 'policy_unit', + }) + kind: Literal['register-policy-unit'] + standard: CanonicalId + policy_unit: NewPolicyUnit + + def __post_init__(self) -> None: + _RUNTIME.normalize_model(self) + + @classmethod + def from_value(cls, value: object) -> RegisterPolicyUnitEdit: + selected = _RUNTIME.decode(cls.__definition__, value) + if not isinstance(selected, cls): + raise TypeError('decoded value has the wrong generated type') + return selected + + def as_contract(self) -> dict[str, object]: + return model_as_contract(self) + @dataclass(frozen=True, slots=True) class RejectedResult: '' @@ -6292,7 +6318,7 @@ def as_contract(self) -> dict[str, object]: SelectionReason: TypeAlias = GeneralSelectionReason | PolicyImpactSelectionReason SnapshotId: TypeAlias = str SnapshotSummary: TypeAlias = ActiveSnapshotSummary | QuarantinedSnapshotSummary -StandardEdit: TypeAlias = CreateStandardEdit | ReviseStandardEdit | RevisePolicyUnitEdit | MovePolicyUnitEdit | RetirePolicyUnitEdit | RetireStandardEdit | ReplaceStandardRelationshipsEdit | PutPolicyRelationshipEdit | RemovePolicyRelationshipEdit | PutRoutingRuleEdit | RemoveRoutingRuleEdit | PutRoutingFactEdit | RemoveRoutingFactEdit | AuditPolicyUnitEdit | RewriteNavigationIndexEdit | PutDecisionProvenanceEdit | RetireDecisionProvenanceEdit | ApproveApplicationContentEdit | WithdrawApplicationContentEdit | ReviseOperationalArtifactEdit +StandardEdit: TypeAlias = CreateStandardEdit | RegisterPolicyUnitEdit | ReviseStandardEdit | RevisePolicyUnitEdit | MovePolicyUnitEdit | RetirePolicyUnitEdit | RetireStandardEdit | ReplaceStandardRelationshipsEdit | PutPolicyRelationshipEdit | RemovePolicyRelationshipEdit | PutRoutingRuleEdit | RemoveRoutingRuleEdit | PutRoutingFactEdit | RemoveRoutingFactEdit | AuditPolicyUnitEdit | RewriteNavigationIndexEdit | PutDecisionProvenanceEdit | RetireDecisionProvenanceEdit | ApproveApplicationContentEdit | WithdrawApplicationContentEdit | ReviseOperationalArtifactEdit Submission: TypeAlias = ProvideFactSubmission | ConsumerDispositionSubmission | ImpactDispositionSubmission | CoverageAttestationSubmission Timestamp: TypeAlias = int | float WorkflowContext: TypeAlias = ProposalRevisionHandle | AnalysisHandle | ReadinessHandle @@ -6455,6 +6481,7 @@ def as_contract(self) -> dict[str, object]: 'RecoverApplicationCall': RecoverApplicationCall, 'RecoverApplicationResult': RecoverApplicationResult, 'RecoverCall': RecoverCall, + 'RegisterPolicyUnitEdit': RegisterPolicyUnitEdit, 'RejectedResult': RejectedResult, 'RelatedCall': RelatedCall, 'RelatedRequest': RelatedRequest, @@ -6709,6 +6736,7 @@ def decode_contract(definition: str, value: object) -> object: 'RecoverApplicationCall', 'RecoverApplicationResult', 'RecoverCall', + 'RegisterPolicyUnitEdit', 'RejectedResult', 'RelatedCall', 'RelatedRequest', diff --git a/tools/standards_engine/standards_engine/logical_authoring.py b/tools/standards_engine/standards_engine/logical_authoring.py index 39592c1a..a4127709 100644 --- a/tools/standards_engine/standards_engine/logical_authoring.py +++ b/tools/standards_engine/standards_engine/logical_authoring.py @@ -373,6 +373,15 @@ def _edit(value: object) -> LogicalEdit: return RevisePolicyUnit.from_mapping(raw) if kind == "replace-standard-relationships": return ReplaceStandardRelationships.from_mapping(raw) + if kind == "register-policy-unit": + _exact(raw, {"kind", "standard", "policy_unit"}, "register-policy-unit edit") + standard = _semantic_id(raw["standard"], "standard ID") + unit = _new_policy_unit(raw["policy_unit"]) + return _structured( + {"kind": kind, "standard": standard, "policy_unit": unit}, + target=str(unit["id"]), + facet="policy", + ) if kind == "create-standard": _exact( raw, @@ -1024,8 +1033,16 @@ def compile_current(current: dict[str, bytes]) -> Any: if edit.as_contract()["kind"] in _ROUTING_EDITS ] routing_applied = False + registrations = [edit.as_contract() for edit in change_set.edits + if edit.as_contract()["kind"] == "register-policy-unit"] + registrations_applied = False for edit in sorted((edit for edit in change_set.edits if edit.as_contract()["kind"] not in SUPPORT_EDIT_KINDS), key=_projection_order): + if edit.as_contract()["kind"] == "register-policy-unit": + if not registrations_applied: + self._register_policy_units(files, registrations) + registrations_applied = True + continue if edit.as_contract()["kind"] in _ROUTING_EDITS: if not routing_applied: _edit_routing(files, routing_edits) @@ -1207,6 +1224,55 @@ def _create_standard( files, POLICY_UNIT_REGISTRY, "sources", sidecar, present=True ) + @staticmethod + def _register_policy_units( + files: dict[str, bytes], + edits: Iterable[Mapping[str, object]], + ) -> None: + # Resolve owners after content edits, then stage the complete group. + # The canonical loader validates all new identities and scopes together, + # rather than observing a half-registered same-change-set corpus. + corpus = load_canonical_standards_corpus(FrozenContentSource(files)) + staged: dict[str, tuple[list[dict[str, object]], list[dict[str, object]]]] = {} + for edit in edits: + standard = str(edit["standard"]) + module = corpus.resolve_module(standard) + if module is None or module.module_id != standard: + raise _error( + "AUTHORING.STANDARD_UNAVAILABLE", + "unavailable", + f"standard {standard!r} is unavailable", + ) + unit = _mapping(edit["policy_unit"], "new policy unit") + identity = str(unit["id"]) + if ( + corpus.resolve_policy_unit(identity) is not None + or corpus.resolve_module(identity) is not None + or any(corpus.resolve_module(alias) is not None for alias in unit["aliases"]) + ): + raise _invalid( + "AUTHORING.POLICY_UNIT_EXISTS", + f"policy identity {identity!r} is already reserved", + ) + sidecar = _ensure_policy_sidecar(files, standard) + if sidecar not in staged: + staged[sidecar] = _policy_sidecar(files[sidecar]) + active, _ = staged[sidecar] + active.append({ + "id": identity, + "module": standard, + "heading_path": unit["heading_chain"], + "semantic_revision": 1, + "aliases": unit["aliases"], + "predecessors": unit["predecessors"], + "successors": unit["successors"], + }) + for sidecar, (active, retired) in staged.items(): + files[sidecar] = _render_policy_sidecar(active, retired) + # Validate the complete registration group before any relationship can + # consume it. Outer projection ownership keeps failed candidates private. + load_canonical_standards_corpus(FrozenContentSource(files)) + @staticmethod def _revise_standard( files: dict[str, bytes], @@ -1740,6 +1806,7 @@ def _projection_order(edit: LogicalEdit) -> tuple[int, str]: "remove-routing-fact": 45, "revise-policy-unit": 20, "move-policy-unit": 30, + "register-policy-unit": 35, "replace-standard-relationships": 40, "put-policy-relationship": 40, "remove-policy-relationship": 40, @@ -1976,10 +2043,16 @@ def _ensure_policy_sidecar(files: dict[str, bytes], module: str) -> str: if any(item.get("module") == module for item in units): return path path = _policy_sidecar_path(module) + if path in sources: + units, _ = _policy_sidecar(files[path]) + if not units: + # Retiring the last active unit leaves the registered owner and its + # tombstones intact. Reuse that owner for a fresh policy identity. + return path if path in files: raise _invalid( "AUTHORING.PROJECTION_DISAGREEMENT", - "derived policy-unit sidecar already exists but is unregistered", + "derived policy-unit sidecar already exists without the selected owner", ) files[path] = _render_policy_sidecar([], []) _set_registry_list(files, POLICY_UNIT_REGISTRY, "sources", path, present=True) @@ -2338,6 +2411,7 @@ def _analysis_module_ids(program: LogicalProgram) -> tuple[str, ...]: elif kind in { "replace-standard-relationships", "retire-standard", + "register-policy-unit", }: selected.add(str(raw["standard"])) return tuple(sorted(selected)) @@ -2390,6 +2464,9 @@ def retain(policy: str, semantics: Mapping[str, object]) -> None: for unit_value in raw["policy_units"]: unit = _mapping(unit_value, "new policy unit") semantic_intents[str(unit["id"])] = (None, 1, str(unit["intent"])) + elif raw["kind"] == "register-policy-unit": + unit = _mapping(raw["policy_unit"], "new policy unit") + semantic_intents[str(unit["id"])] = (None, 1, str(unit["intent"])) elif raw["kind"] == "revise-standard": for update in raw.get("scope_updates", []): retain(update["policy"], update["semantics"]) diff --git a/tools/standards_engine/tests/mcp_policy_registration_client.py b/tools/standards_engine/tests/mcp_policy_registration_client.py new file mode 100644 index 00000000..ebf38cc3 --- /dev/null +++ b/tools/standards_engine/tests/mcp_policy_registration_client.py @@ -0,0 +1,238 @@ +"""Qualify registration using the actual MCP SDK and a disposable Git repository. + +Run after committing the candidate and refreshing its verification inputs: + PYTHONPATH=. CLIENT_PYTHON tools/standards_engine/tests/mcp_policy_registration_client.py \ + --engine-python /path/to/locked-engine-python --output /tmp/registration-result.json + +The client environment uses the repository's existing MCP SDK qualification +setup. Fixture review decisions authorize only this temporary repository; the +user's installed store and blocked proposal are not opened by this harness. +""" +from __future__ import annotations + +import argparse +import asyncio +from datetime import timedelta +import json +import os +from pathlib import Path +import subprocess +import tempfile + +from mcp import ClientSession, StdioServerParameters +from mcp.client.stdio import stdio_client + +from tools.standards_engine.tests.test_agent_workflow import ROOT, evidence, prepare_repository + + +MODULE = "topic.registration-client" +FIRST = MODULE + ".first" +SECOND = MODULE + ".second" +CONSUMER = "reference.testing.registration-client" +PROVENANCE = "provenance.registration-client" +PRIVATE = "REGISTRATION_PRIVATE_REASON_83721" + + +def require(condition: bool, observed: object) -> None: + if not condition: + raise AssertionError(observed) + + +def owner(identity: str, *, reference: bool = False) -> dict[str, object]: + return {"id": identity, "title": "Registration Client Fixture", + "role": "reference" if reference else "topic", + "level": "REFERENCE" if reference else "MUST", + "applies_when": "The isolated registration fixture is selected.", + "does_not_apply_when": "The fixture is outside the selected task.", + "verification": "The actual MCP registration walkthrough observes publication.", + "body": "## First Scope\n\nRetain the selected result.\n\n## Second Scope\n\nReview the next result.\n"} + + +def registration(identity: str, heading: str) -> dict[str, object]: + return {"kind": "register-policy-unit", "standard": MODULE, + "policy_unit": {"id": identity, "heading_chain": [heading], + "semantic_revision": 1, "intent": "Give the existing fixture scope a stable identity.", + "aliases": [], "predecessors": [], "successors": []}} + + +async def walkthrough(engine_python: str) -> dict[str, object]: + with tempfile.TemporaryDirectory(prefix="standards-registration-mcp-") as temporary: + repo = Path(temporary) / "repository" + prepare_repository(repo) + calls = [] + resolutions = [] + + def parameters(purpose="authoring"): + return StdioServerParameters( + command=engine_python, + args=["-P", "-m", "tools.standards_engine.standards_engine.mcp", + "--purpose", purpose, "--repo-root", str(repo)], + env={**os.environ, "PYTHONPATH": str(ROOT)}, + ) + + def change(edits): + return {"purpose": { + "summary": "Qualify existing-standard policy registration.", + "rationale": "Exercise the real publication path in this disposable fixture only.", + "evidence": [evidence(repo)], + }, "edits": edits} + + async def call(client, name, arguments, *, error=False): + result = await client.call_tool(name, arguments) + calls.append(name) + require(bool(result.isError) == error, result) + require(result.structuredContent is not None, result) + return result.structuredContent + + async def complete(client, proposed): + seen = set() + while proposed.get("status") == "needs-action": + identity = json.dumps(proposed["context"], sort_keys=True) + require(identity not in seen, proposed) + seen.add(identity) + outcome = proposed["outcome"] + require(not outcome.get("fact_requirements"), outcome) + operations = [item for item in outcome["next_operations"] + if item.get("operation") == "resolve"] + require(bool(operations), outcome) + selected = next((item for item in operations + if item["request_kind"] == "consumer-disposition"), operations[0]) + kind = selected["request_kind"] + resolutions.append(kind) + if kind == "coverage-attestation": + submission = {"kind": kind, "claim": { + "requirement": selected["work"], "conclusion": "complete", + "evidence": [evidence(repo)], "explicit_exclusions": [], + "rationale": "The fixture owns the explicitly declared synthetic consumer horizon.", + "auditor_provenance": "Registration MCP test fixture; not a production standards audit.", + }} + else: + require(kind in {"consumer-disposition", "impact-disposition"}, selected) + obligation = next(item for item in outcome["obligations"] + if item["handle"] == selected["work"]) + submission = { + "kind": kind, "obligation": selected["work"], + "result": "reviewed-no-change" if kind == "consumer-disposition" else "confirmed", + "fingerprint": obligation["fingerprint"], + "rationale": "Explicit fixture decision for this exact synthetic registration and consumer.", + "evidence": [evidence(repo)], + } + proposed = await call(client, "resolve_workflow", { + "context": proposed["context"], "submission": submission, + }) + require(proposed.get("status") == "complete", proposed) + return proposed + + async def publish(client, proposed): + completed = await complete(client, proposed) + ready = await call(client, "review", {"context": completed["context"], "decisions": [ + {"owner": selected, "decision": "accept", "evidence": [evidence(repo)], + "rationale": "Accept this exact isolated registration fixture after its explicit dispositions."} + for selected in ("consumer", "impact", "audit") + ]}) + require(ready.get("status") == "ready", ready) + applied = await call(client, "apply", {"context": ready["context"]}) + require(applied.get("status") == "applied", applied) + return applied + + async with stdio_client(parameters()) as streams: + async with ClientSession(*streams, read_timeout_seconds=timedelta(seconds=600)) as client: + await client.initialize() + catalog = await client.list_tools() + propose_tool = next(tool for tool in catalog.tools if tool.name == "propose") + require("register-policy-unit" in json.dumps(propose_tool.inputSchema), propose_tool) + initial = [] + for identity, reference in ((MODULE, False), (CONSUMER, True)): + initial.append({"kind": "create-standard", "standard": owner(identity, reference=reference), + "requires": [], "specializes": [], "policy_units": []}) + await publish(client, await call(client, "propose", {"change_set": change(initial)})) + before = await call(client, "read", {"target": MODULE, "detail": "full"}) + historical_snapshot = before["snapshot"] + first = await call(client, "propose", {"change_set": change([registration(FIRST, "First Scope")])}) + # Retain a real pending/current workflow, then replace the server. + first_context, first_revision = first["context"], first["revision"] + + async with stdio_client(parameters()) as streams: + async with ClientSession(*streams, read_timeout_seconds=timedelta(seconds=600)) as client: + await client.initialize() + resumed = await call(client, "workflow_status", {"context": first_context}) + require(resumed["revision"] == first_revision, resumed) + await publish(client, resumed) + after = await call(client, "read", {"target": MODULE, "detail": "full"}) + require(after["content"] == before["content"], after) + first_policy = await call(client, "read", {"target": FIRST}) + require(first_policy["policy"]["scope"]["heading_path"] == ["First Scope"], first_policy) + + revised_owner = owner(MODULE) + revised_owner["body"] = revised_owner["body"].replace("Second Scope", "Revised Second Scope") + rewrite = {"kind": "revise-standard", "standard": revised_owner, + "scope_updates": [{"policy": FIRST, "heading_path": ["First Scope"], + "semantics": {"kind": "preserve", "semantic_revision": 1, + "intent": "Preserve the registered first scope."}}]} + association = {"kind": "put-policy-relationship", "relationship": { + "source_policy": SECOND, "consumer": CONSUMER, "relation": "reference-projection", + "applicability": {"operator": "always"}, "source_scope": None, "consumer_scope": None, + "evidence_owner": "review:consumer", "rationale": "The synthetic reference consumes this scope.", + }} + reason = {"kind": "put-provenance", "record": { + "id": PROVENANCE, "subject": SECOND, "origin": "current-justification", + "rationale": PRIVATE, "evidence": [evidence(repo)], + }} + second = await call(client, "propose", {"change_set": change([ + association, reason, registration(SECOND, "Revised Second Scope"), rewrite, + {"kind": "approve-application-content", "target": MODULE}, + ])}) + before_failure = subprocess.check_output(["git", "rev-parse", "main"], cwd=repo) + invalid = registration(MODULE + ".unavailable", "Missing Scope") + await call(client, "revise", {"context": second["context"], + "change_set": change([invalid])}, error=True) + require(subprocess.check_output(["git", "rev-parse", "main"], cwd=repo) == before_failure, + "Rejected revision changed accepted main") + status = await call(client, "workflow_status", {"context": second["context"]}) + require(status["revision"] == second["revision"], status) + await publish(client, status) + latest_snapshot = (await call(client, "read", {"target": SECOND}))["snapshot"] + + async with stdio_client(parameters()) as streams: + async with ClientSession(*streams, read_timeout_seconds=timedelta(seconds=600)) as client: + await client.initialize() + current = await call(client, "read", {"snapshot": latest_snapshot, "target": SECOND, "detail": "full"}) + require(current["policy"]["scope"]["heading_path"] == ["Revised Second Scope"], current) + require(any(item["source"] == SECOND and item["target"] == CONSUMER + for item in current["related"]), current) + reason = await call(client, "read", {"snapshot": latest_snapshot, "target": PROVENANCE}) + require(reason["record"]["rationale"] == PRIVATE, reason) + old = await call(client, "read", {"snapshot": historical_snapshot, "target": MODULE}) + require(old["content"] == before["content"], old) + + async with stdio_client(parameters("application")) as streams: + async with ClientSession(*streams, read_timeout_seconds=timedelta(seconds=600)) as client: + await client.initialize() + current = await call(client, "read", {"target": SECOND, "detail": "full"}) + require(current["kind"] == "application-read-result", current) + require("Revised Second Scope" in current["content"], current) + require(PRIVATE not in json.dumps(current), current) + await call(client, "read", {"target": PROVENANCE}, error=True) + + return {"status": "passed", "client": "official MCP Python SDK", "calls": calls, + "resolutions": resolutions, "existing_unmapped_owner": True, + "existing_populated_owner": True, "same_candidate_rewrite_and_relationship": True, + "cold_pending_workflow": True, "cold_snapshot_readback": True, + "rejected_revision_preserved_candidate": True, "application_provenance_isolation": True, + "fixture_only": True} + + +def main() -> None: + parser = argparse.ArgumentParser(description=__doc__) + parser.add_argument("--engine-python", required=True) + parser.add_argument("--output", type=Path, required=True) + arguments = parser.parse_args() + # The output is written only after every required observation succeeds. + result = asyncio.run(walkthrough(arguments.engine_python)) + arguments.output.parent.mkdir(parents=True, exist_ok=True) + arguments.output.write_text(json.dumps(result, indent=2) + "\n") + print(json.dumps(result, indent=2)) + + +if __name__ == "__main__": + main() diff --git a/tools/standards_engine/tests/test_policy_registration.py b/tools/standards_engine/tests/test_policy_registration.py new file mode 100644 index 00000000..41ab191c --- /dev/null +++ b/tools/standards_engine/tests/test_policy_registration.py @@ -0,0 +1,274 @@ +"""Existing-owner registration through the real logical compiler and metadata. + +These integration tests require the complete repository and its ordinary +verification inputs. Contract-only tests live in test_registration_contract.py. +""" +from __future__ import annotations + +import copy +import tomllib +import unittest + +from tools.standards_engine.standards_engine.authoring import AuthoringError +from tools.standards_engine.standards_engine.engine import StandardsEngine +from tools.standards_engine.standards_engine.logical_authoring import ( + LogicalAuthoringCompiler, LogicalProgram, StandardsChangeSet, +) +from tools.standards_engine.tests import test_logical_authoring as fixture +from tools.standards_metadata.standards_metadata import MetadataError + + +MODULE = "topic.registration-fixture" +EXISTING = MODULE + ".existing" +ADDED = MODULE + ".added" +EVIDENCE = { + "id": "evidence:registration-fixture", "digest": "sha256:" + "1" * 64, + "provider_contract": "standards-evidence", "provider_contract_version": "1", +} + + +def unit(identity: str, heading: str) -> dict[str, object]: + return {"id": identity, "heading_chain": [heading], "semantic_revision": 1, + "intent": "Identify the selected scope for explicit consumer review.", + "aliases": [], "predecessors": [], "successors": []} + + +def register(identity: str = ADDED, heading: str = "Additional Scope") -> dict[str, object]: + return {"kind": "register-policy-unit", "standard": MODULE, + "policy_unit": unit(identity, heading)} + + +def change(edits: list[dict[str, object]]) -> StandardsChangeSet: + return StandardsChangeSet.from_mapping({ + "purpose": {"summary": "Exercise existing-owner registration.", + "rationale": "The fixture verifies an explicit logical authoring transition.", + "evidence": [EVIDENCE]}, + "edits": edits, + }) + + +def create_owner(with_policy: bool = False) -> dict[str, object]: + edit = fixture.LogicalAuthoringTests.new_standard_edit() + edit["standard"].update({ + "id": MODULE, "title": "Registration Fixture", "body": ( + "## Existing Scope\n\nPreserve the existing owner's result.\n\n" + "## Additional Scope\n\nReview the selected additional scope.\n\n" + "## Further Scope\n\nKeep a separate ownership decision.\n" + ), + }) + edit["policy_units"] = [unit(EXISTING, "Existing Scope")] if with_policy else [] + if with_policy: + edit["policy_units"][0]["aliases"] = [MODULE + ".legacy-alias"] + return edit + + +def relationship(policy: str = ADDED) -> dict[str, object]: + result = fixture.LogicalAuthoringTests.new_relationship() + result["source_policy"] = policy + return {"kind": "put-policy-relationship", "relationship": result} + + +class PolicyRegistrationTests(unittest.TestCase): + @classmethod + def setUpClass(cls) -> None: + # Reuse the established capture fixture, not a hand-written metadata or + # graph implementation. Creation occurs before the registration base. + fixture.LogicalAuthoringTests.setUpClass() + shared = fixture.LogicalAuthoringTests + compiler = LogicalAuthoringCompiler(StandardsEngine._compile) + cls.owners = {} + for populated in (False, True): + cls.owners[populated] = compiler.compile( + shared.base, LogicalProgram([change([create_owner(populated)])]), + base_repository_paths=shared.repository_paths, compiled_base=shared.compiled, + ) + + def project(self, changes, *, populated=False, base=None, predecessor=None): + base = self.owners[populated] if base is None else base + return LogicalAuthoringCompiler(StandardsEngine._compile).compile( + base.source, LogicalProgram(changes), base_repository_paths=base.repository_paths, + compiled_base=base.compiled, predecessor=predecessor, + ) + + def test_registers_on_preexisting_unmapped_owner_without_rewriting_prose(self): + base = self.owners[False] + before = dict(base.source.files) + module = base.compiled.corpus.resolve_module(MODULE) + projected = self.project([change([register()])]) + policy = projected.compiled.corpus.resolve_policy_unit(ADDED) + self.assertEqual(policy.module, MODULE) + self.assertEqual(policy.heading_path, ("Additional Scope",)) + self.assertEqual(policy.semantic_revision, 1) + self.assertEqual(projected.source.read_bytes(module.path), base.source.read_bytes(module.path)) + self.assertEqual(dict(base.source.files), before) + self.assertIn(MODULE, projected.analysis_module_ids) + self.assertNotIn(ADDED, projected.compiled.repository_coverage.covered_subjects) + semantic = next(value for value in projected.semantic_proposals if value["policy"] == ADDED) + self.assertIsNone(semantic["accepted_semantic_revision"]) + self.assertEqual(semantic["proposed_semantic_revision"], 1) + + def test_existing_unit_and_alias_are_preserved_in_the_same_sidecar(self): + base = self.owners[True] + old = base.compiled.corpus.resolve_policy_unit(EXISTING) + projected = self.project([change([register()])], populated=True) + self.assertEqual(projected.compiled.corpus.resolve_policy_unit(EXISTING), old) + added = projected.compiled.corpus.resolve_policy_unit(ADDED) + self.assertEqual(added.source, old.source) + self.assertEqual(projected.compiled.corpus.resolve_policy_unit(MODULE + ".legacy-alias"), old) + + def test_multiple_registrations_share_one_registered_owner_and_ignore_input_order(self): + edits = [register(), register(MODULE + ".further", "Further Scope")] + first = self.project([change(edits)]) + second = self.project([change(list(reversed(edits)))]) + self.assertEqual(first.source.files, second.source.files) + self.assertEqual(first.semantic_proposals, second.semantic_proposals) + policies = first.compiled.corpus.policy_unit_corpus.for_module(MODULE) + self.assertEqual(len(policies), 2) + self.assertEqual(len({policy.source for policy in policies}), 1) + sources = tomllib.loads(first.source.read_bytes( + "evaluation/standards-effectiveness/policy-units/registry.toml").decode())["sources"] + self.assertEqual(sources.count(policies[0].source), 1) + + def test_same_candidate_rewrite_register_relationship_and_provenance(self): + standard = create_owner(True)["standard"] + standard["body"] = standard["body"].replace("Additional Scope", "Revised Additional Scope") + rewrite = {"kind": "revise-standard", "standard": standard, + "scope_updates": [{"policy": EXISTING, "heading_path": ["Existing Scope"], + "semantics": {"kind": "preserve", "semantic_revision": 1, + "intent": "Preserve the existing policy."}}]} + provenance = {"kind": "put-provenance", "record": { + "id": "provenance.registration-fixture", "subject": ADDED, + "origin": "current-justification", "rationale": "Private fixture rationale.", + "evidence": [EVIDENCE], + }} + edits = [provenance, relationship(), register(heading="Revised Additional Scope"), rewrite] + projected = self.project([change(edits)], populated=True) + reversed_projection = self.project([change(list(reversed(edits)))], populated=True) + self.assertEqual(projected.source.files, reversed_projection.source.files) + self.assertEqual(projected.compiled.corpus.resolve_policy_unit(ADDED).heading_path, + ("Revised Additional Scope",)) + self.assertEqual(projected.compiled.supporting.provenance[ + "provenance.registration-fixture"].subject, ADDED) + self.assertTrue(any(value.source == ADDED for value in projected.compiled.policy_impact.semantics.values())) + + def test_registered_empty_owner_retains_tombstones(self): + retirement = {"kind": "retire-policy-unit", "policy": EXISTING, + "retired_semantic_revision": 1, "successors": [], + "relationship_dispositions": [], "evidence": [EVIDENCE]} + retired_base = self.project([change([retirement])], populated=True) + tombstone = retired_base.compiled.corpus.resolve_policy_unit(EXISTING) + projected = self.project([change([register()])], base=retired_base) + self.assertEqual(projected.compiled.corpus.resolve_policy_unit(EXISTING), tombstone) + self.assertEqual(projected.compiled.corpus.resolve_policy_unit(ADDED).source, tombstone.source) + with self.assertRaises(AuthoringError): + self.project([change([register(EXISTING)])], base=retired_base) + + def test_reserved_identity_and_module_alias_collisions_are_rejected(self): + for identity in (EXISTING, MODULE + ".legacy-alias", MODULE): + with self.subTest(identity=identity), self.assertRaises(AuthoringError): + self.project([change([register(identity)])], populated=True) + collision = register() + collision["policy_unit"]["aliases"] = [MODULE] + with self.assertRaises(AuthoringError): + self.project([change([collision])], populated=True) + + def test_canonical_metadata_rejects_missing_ambiguous_and_overlapping_scopes(self): + for heading in ("Missing Scope", "Existing Scope"): + with self.subTest(heading=heading), self.assertRaises(MetadataError): + self.project([change([register(heading=heading)])], populated=True) + standard = create_owner()["standard"] + standard["body"] += "\n## Additional Scope\n\nA duplicate heading is ambiguous.\n" + with self.assertRaises(MetadataError): + self.project([change([{"kind": "revise-standard", "standard": standard}, register()])]) + standard = create_owner(True)["standard"] + standard["body"] = standard["body"].replace( + "Preserve the existing owner's result.", + "Preserve the existing owner's result.\n\n### Nested Scope\n\nNested text.", + ) + nested = register() + nested["policy_unit"]["heading_chain"] = ["Existing Scope", "Nested Scope"] + rewrite = {"kind": "revise-standard", "standard": standard, + "scope_updates": [{"policy": EXISTING, "heading_path": ["Existing Scope"], + "semantics": {"kind": "preserve", "semantic_revision": 1, + "intent": "Preserve fixture meaning."}}]} + with self.assertRaises(MetadataError): + self.project([change([rewrite, nested])], populated=True) + + def test_new_alias_conflict_is_rejected_for_the_complete_group(self): + first, second = register(), register(MODULE + ".further", "Further Scope") + first["policy_unit"]["aliases"] = ["registration.shared-alias"] + second["policy_unit"]["aliases"] = ["registration.shared-alias"] + with self.assertRaises(MetadataError): + self.project([change([first, second])]) + + def test_existing_lineage_validation_remains_authoritative(self): + invalid = register() + invalid["policy_unit"]["predecessors"] = [MODULE + ".unknown-predecessor"] + with self.assertRaises(MetadataError): + self.project([change([invalid])]) + + def test_unknown_module_and_conflicting_logical_edits_are_rejected(self): + missing = register() + missing["standard"] = "topic.unavailable-registration-fixture" + with self.assertRaises(AuthoringError): + self.project([change([missing])]) + with self.assertRaises(AuthoringError): + change([register(), register()]) + with self.assertRaises(AuthoringError): + change([register(), {"kind": "revise-policy-unit", "policy": ADDED, + "title": "Additional Scope", "body": "Owned result.", + "semantics": {"kind": "preserve", "semantic_revision": 1, + "intent": "Conflicting facet fixture."}}]) + + def test_full_replay_and_incremental_successor_produce_identical_authority(self): + prefix = (change([register()]),) + previous = self.project(prefix) + self.assertIsNotNone(previous._continuation) + original = dict(previous.source.files) + program = (*prefix, change([register(MODULE + ".further", "Further Scope"), relationship()])) + cold = self.project(program) + warm = self.project(program, predecessor=previous) + self.assertEqual(warm.source.files, cold.source.files) + self.assertEqual(warm.repository_paths, cold.repository_paths) + self.assertEqual(warm.semantic_proposals, cold.semantic_proposals) + self.assertEqual(warm.analysis_policy_ids, cold.analysis_policy_ids) + self.assertEqual(warm.analysis_module_ids, cold.analysis_module_ids) + self.assertEqual(dict(previous.source.files), original) + + def test_failed_suffix_preserves_the_predecessor_and_original_base(self): + prefix = (change([register()]),) + previous = self.project(prefix) + before_base = dict(self.owners[False].source.files) + before_prefix = dict(previous.source.files) + failed = (*prefix, change([register(MODULE + ".further", "Missing Scope")])) + for seed in (None, previous): + with self.subTest(incremental=seed is not None), self.assertRaises(MetadataError): + self.project(failed, predecessor=seed) + self.assertEqual(dict(self.owners[False].source.files), before_base) + self.assertEqual(dict(previous.source.files), before_prefix) + + def test_caller_mutation_cannot_rewrite_a_registered_edit(self): + request = register() + selected = change([request]) + expected = copy.deepcopy(selected.as_contract()) + request["policy_unit"]["heading_chain"].append("Changed") + self.assertEqual(selected.as_contract(), expected) + projected = self.project([selected]) + self.assertEqual(projected.compiled.corpus.resolve_policy_unit(ADDED).heading_path, + ("Additional Scope",)) + + def test_later_preservation_keeps_original_absent_identity_semantics(self): + program = [change([register()]), change([{ + "kind": "revise-policy-unit", "policy": ADDED, "title": "Additional Scope", + "body": "Review the selected additional scope with its owner.", + "semantics": {"kind": "preserve", "semantic_revision": 1, + "intent": "Clarify the same fixture obligation."}, + }])] + projected = self.project(program) + semantic = next(value for value in projected.semantic_proposals if value["policy"] == ADDED) + self.assertIsNone(semantic["accepted_semantic_revision"]) + self.assertEqual(semantic["proposed_semantic_revision"], 1) + + +if __name__ == "__main__": + unittest.main() diff --git a/tools/standards_engine/tests/test_registration_contract.py b/tools/standards_engine/tests/test_registration_contract.py new file mode 100644 index 00000000..92631881 --- /dev/null +++ b/tools/standards_engine/tests/test_registration_contract.py @@ -0,0 +1,142 @@ +"""Public contract regression for explicit existing-standard registration.""" +from __future__ import annotations + +import copy +import json +from pathlib import Path +import sys +import tomllib +import types +import unittest + +from tools.standards_contracts.standards_contracts import ContractError, compile_contracts + + +ROOT = Path(__file__).resolve().parents[3] +CONTRACTS = ROOT / "tools/standards_engine/contracts" + + +def registration() -> dict[str, object]: + return { + "kind": "register-policy-unit", + "standard": "topic.registration-fixture", + "policy_unit": { + "id": "topic.registration-fixture.policy", + "heading_chain": ["Registered Scope"], + "semantic_revision": 1, + "intent": "Identify the selected existing scope for explicit review.", + "aliases": [], + "predecessors": [], + "successors": [], + }, + } + + +class RegistrationContractTests(unittest.TestCase): + @classmethod + def setUpClass(cls) -> None: + cls.schema = json.loads((CONTRACTS / "a1-contract.schema.json").read_text()) + cls.interface = tomllib.loads((CONTRACTS / "a1-interface.toml").read_text()) + cls.contracts = compile_contracts(cls.schema, cls.interface) + cls.artifacts = cls.contracts.project() + cls.generated = types.ModuleType("registration_generated_contract_test") + sys.modules[cls.generated.__name__] = cls.generated + exec(compile(cls.artifacts.python_source, "generated_registration.py", "exec"), cls.generated.__dict__) + + @classmethod + def tearDownClass(cls) -> None: + sys.modules.pop(cls.generated.__name__, None) + + def test_registration_is_reachable_from_the_real_proposal_contract(self) -> None: + edit = registration() + self.contracts.validate("RegisterPolicyUnitEdit", edit) + self.contracts.validate("StandardEdit", edit) + self.contracts.validate("ProposeCall", { + "change_set": { + "purpose": { + "summary": "Register an existing scope.", + "rationale": "Make consumer maintenance possible.", + "evidence": [{"id": "evidence:registration-fixture", + "digest": "sha256:" + "1" * 64, + "provider_contract": "repository-content", + "provider_contract_version": "1"}], + }, + "edits": [edit], + }, + }) + + def test_generated_model_roundtrips_and_owns_nested_values(self) -> None: + edit = registration() + expected = copy.deepcopy(edit) + value = self.generated.RegisterPolicyUnitEdit.from_value(edit) + edit["policy_unit"]["heading_chain"].append("Changed by caller") + self.assertEqual(value.as_contract(), expected) + returned = value.as_contract() + returned["policy_unit"]["aliases"].append("caller.alias") + self.assertEqual(value.as_contract(), expected) + self.assertEqual(value.policy_unit.semantic_revision, 1) + + def test_closed_fields_and_required_members(self) -> None: + for member in ("standard", "policy_unit", "kind"): + edit = registration() + del edit[member] + with self.subTest(missing=member), self.assertRaises(ContractError): + self.contracts.validate("StandardEdit", edit) + for target in ("edit", "unit"): + edit = registration() + (edit if target == "edit" else edit["policy_unit"])["path"] = "../registry.toml" + with self.subTest(target=target), self.assertRaises(ContractError): + self.contracts.validate("RegisterPolicyUnitEdit", edit) + + def test_new_identity_has_revision_one_and_an_explicit_scope(self) -> None: + mutations = [ + ("semantic_revision", 0), ("semantic_revision", 2), + ("semantic_revision", True), ("heading_chain", []), + ("heading_chain", [""]), ("heading_chain", "Heading"), + ("intent", ""), ("aliases", ["same.alias", "same.alias"]), + ("id", ""), + ] + for field, value in mutations: + edit = registration() + edit["policy_unit"][field] = value + with self.subTest(field=field, value=value), self.assertRaises(ContractError): + self.generated.RegisterPolicyUnitEdit.from_value(edit) + + def test_registration_has_no_body_or_storage_mutation_fields(self) -> None: + self.assertEqual( + set(self.schema["$defs"]["RegisterPolicyUnitEdit"]["properties"]), + {"kind", "standard", "policy_unit"}, + ) + self.assertEqual( + self.schema["$defs"]["RegisterPolicyUnitEdit"]["properties"]["policy_unit"], + {"$ref": "#/$defs/NewPolicyUnit"}, + ) + + def test_earlier_edit_contracts_keep_their_existing_meaning(self) -> None: + for name in ("CreateStandardEdit", "ReviseStandardEdit", "RevisePolicyUnitEdit"): + self.assertIn(name, self.schema["$defs"]) + values = self.schema["$defs"]["StandardEdit"]["oneOf"] + references = [entry["$ref"] for entry in values] + self.assertEqual(references.count("#/$defs/RegisterPolicyUnitEdit"), 1) + self.assertEqual(len(references), len(set(references))) + + def test_checked_in_contract_projections_are_current(self) -> None: + generated_python = ROOT / "tools/standards_engine/standards_engine/_generated_contract.py" + generated_tools = CONTRACTS / "generated/agent-tools.json" + self.assertEqual(generated_python.read_text(), self.artifacts.python_source) + self.assertEqual(generated_tools.read_text(), self.artifacts.agent_tools_json) + self.assertEqual(self.artifacts.agent_tools["interface_schema_version"], self.interface["interface_schema_version"]) + self.assertEqual(self.interface["request_contract_version"], 6) + self.assertEqual(self.interface["result_projection_version"], 7) + + def test_authored_contract_examples_match_the_current_interface(self) -> None: + examples = json.loads((CONTRACTS / "examples/a1-examples.json").read_text()) + self.assertEqual(examples["interface_schema_version"], self.interface["interface_schema_version"]) + self.assertTrue(any(item["definition"] == "RegisterPolicyUnitEdit" for item in examples["examples"])) + for example in examples["examples"]: + with self.subTest(example=example["name"]): + self.contracts.validate(example["definition"], example["value"]) + + +if __name__ == "__main__": + unittest.main() From b14e807e9e129c1226669973cbb425cd0476dde5 Mon Sep 17 00:00:00 2001 From: MrScripty Date: Thu, 24 Sep 2026 17:32:29 -0700 Subject: [PATCH 20/26] docs(engine): record policy registration qualification --- .../execution-ledger.md | 6 +++ .../existing-policy-registration/issues.md | 8 ++-- .../existing-policy-registration/plan.md | 38 +++++++++---------- .../reports/verification.md | 24 ++++++------ 4 files changed, 41 insertions(+), 35 deletions(-) diff --git a/docs/plans/existing-policy-registration/execution-ledger.md b/docs/plans/existing-policy-registration/execution-ledger.md index 2310835e..db2d6fe5 100644 --- a/docs/plans/existing-policy-registration/execution-ledger.md +++ b/docs/plans/existing-policy-registration/execution-ledger.md @@ -15,3 +15,9 @@ Implemented the closed `register-policy-unit` edit, grouped registration before The baseline schema rejected the new edit before implementation. Fourteen available existing contract tests and eight new contract tests passed. Nine explicitly isolated owner-mechanism checks passed; their excluded boundaries are recorded in the report. Full-checkout integration collection failed on unavailable `tools.graph_engine`, so canonical metadata/replay and real MCP publication remain unexecuted. Generated public projections, source syntax, exact baseline input hashes and package round-trip checks passed. The plan is Verifying with blocked objective acceptance, not Accepted. No real standards content, upstream history, installed server or user proposal store was changed. The final evidence and the required next qualification slice are recorded in [reports/verification.md](reports/verification.md). + +## September 24, 2026 — Complete-checkout qualification and local integration + +Applied the archive patch to the complete local implementation branch, refreshed the tracked suite-input manifest through the temporary-store verifier, and committed candidate `e7fc783b` as MrScripty. The new contract tests (8), registration integration tests (14), focused logical-authoring (31), metadata (43), policy-impact (10), contracts (52), and analysis (114) suites passed. Structural verification passed 73 suites and 121 checks. + +The precommit full Engine suite had one fixture failure because it clones committed `HEAD` and received new contract files with the old committed manifest. After committing the candidate, that case passed alone and the complete 281-test Engine suite passed. The official MCP Python SDK 1.30.0 walkthrough then passed in a disposable clone/store, including publication, restart and cold readback. R1–R6 are satisfied for the code correction. Installed-client refresh and the preserved content proposal remain separate; no real standards content or user proposal store was changed. diff --git a/docs/plans/existing-policy-registration/issues.md b/docs/plans/existing-policy-registration/issues.md index e679b717..c544eb75 100644 --- a/docs/plans/existing-policy-registration/issues.md +++ b/docs/plans/existing-policy-registration/issues.md @@ -2,11 +2,11 @@ | ID | Severity | Evidence and owner | Disposition | Verification / revisit | | --- | --- | --- | --- | --- | -| PR-01 | high | Logical authoring lacks registration on an existing module; policy relationships require registered sources. | Fix in this slice. | Generic registration, final-candidate composition and MCP publication tests. | -| PR-02 | high | The local environment cannot clone GitHub and the available recovered source is partial. Verification owner. | Continue bounded source work; qualify only claims reached by actual checks. | Full checkout with locked runtime is required for complete package/MCP acceptance. | -| PR-03 | medium | Existing sidecar helper treats a registered tombstone-only derived sidecar as unregistered. Logical-authoring owner. | Fix in this slice because new registration must preserve the owner's retired identity history. | Register a fresh unit after all previous active units were retired; tombstones retained. | +| PR-01 | high | Logical authoring lacked registration on an existing module; policy relationships require registered sources. | Resolved in the code correction. | Generic registration, final-candidate composition and MCP publication tests passed. | +| PR-02 | high | The original delivery environment could not clone GitHub and its recovered source was partial. Verification owner. | Resolved for code qualification in the complete local checkout. | Supported Python 3.12.3, full 281-test Engine suite and official MCP client passed. | +| PR-03 | medium | Existing sidecar helper treated a registered tombstone-only derived sidecar as unregistered. Logical-authoring owner. | Resolved; reuse the owner and retain retired identity history. | Fresh registration after all previous active units were retired passed. | | PR-04 | high | Preserved proposal and its current store are on the user's machine, not in this environment. Integration owner. | Preserve by access boundary; no resets or inferred readiness. | Inspect and resume through installed authoring operations after qualification. | ## Current dispositions -PR-01 and PR-03 are implemented in source; their complete canonical/runtime acceptance is blocked by PR-02. The new schema and generated consumers are verified. PR-04 remains a deployment boundary: the external proposal was untouched and must be inspected through the qualified installed authoring interface before resuming. No issue is closed by assuming that isolated checks replace its required real evidence. +PR-01 and PR-03 are resolved: the canonical registration tests, full 281-test Engine suite and official MCP SDK walkthrough passed in the complete checkout. PR-02's environment block was resolved for code qualification by using the complete local checkout and supported Python 3.12.3 environment. PR-04 remains a deployment boundary: the external proposal was untouched and must be inspected through the qualified installed authoring interface before resuming. See the [verification report](reports/verification.md) for the exact evidence. diff --git a/docs/plans/existing-policy-registration/plan.md b/docs/plans/existing-policy-registration/plan.md index 3c3e2486..e3903d4d 100644 --- a/docs/plans/existing-policy-registration/plan.md +++ b/docs/plans/existing-policy-registration/plan.md @@ -1,9 +1,9 @@ # Existing-Standard Policy Registration -**Plan status:** `Verifying` -**Acceptance status:** `blocked` -**Current phase:** Full-checkout and real-MCP qualification of the implemented source. -**Next slice:** Run the canonical compiler, replay and MCP publication regressions in a full supported checkout; repair any findings before content migration. +**Plan status:** `Accepted` +**Acceptance status:** `satisfied` for the code capability. +**Current phase:** Qualified local source integrated; installed deployment and preserved content-proposal work remain separate. +**Next slice:** Install the qualified Engine, refresh the client catalog, and inspect the preserved proposal through supported authoring operations before continuing the content migration. **Repository baseline:** `MrScripty/Coding-Standards@5a9dcb08effda50a485e6ae08d9fe4c349c74eda`. **Admission:** The owner requested this plan and its implementation. Canonical plan path: `docs/plans/existing-policy-registration/plan.md`; operation: `start`. **Composed-design review:** applicable; see below. @@ -25,7 +25,7 @@ No backward-compatibility layer is required. Extend the current contract coheren ## Baseline and bounded findings -The existing `create-standard` can introduce initial policy units, `revise-standard.scope_updates` addresses the registered set, and `revise-policy-unit`/`put-policy-relationship` require registered identities. The parser and projection lack registration on an existing standard. The affected source was recovered from prior delivery archives and checked against published Git blob identities. Direct Git download is unavailable in this environment; the recovered tree is partial. Full-repository and installed-MCP acceptance are distinct from checks that can run against the available files. +At baseline, `create-standard` could introduce initial policy units, `revise-standard.scope_updates` addressed the registered set, and `revise-policy-unit`/`put-policy-relationship` required registered identities. The parser and projection lacked registration on an existing standard. The affected source was recovered from prior delivery archives and checked against published Git blob identities. That delivery tree was partial; the later complete-checkout and real-MCP qualification is recorded in the [verification report](reports/verification.md). ## Binding Decisions @@ -85,7 +85,7 @@ Preserve prior operations, existing policy identities/tombstones, prose, review ### M2 — Qualify and hand off -**Status:** `Blocked`. **Goal:** prove source and consumer behavior at their actual boundaries and provide a safe patch package. +**Status:** `Completed`. **Goal:** prove source and consumer behavior at their actual boundaries and provide a safe patch package. Write set: M1 corrective changes, evidence/plan lifecycle, package manifest and delivery instructions outside the repository. Run available focused checks; run full-checkout logical/contract/package suites and real MCP publication when dependencies are present. Bind each result to the actual source and environment. Report missing environmental evidence explicitly rather than treating an isolated test as installed acceptance. Provide complete changed files and a base-bound patch, hashes, plan, tests and installation/resume instructions. No push, production publication, live proposal mutation or store reset is part of delivery. @@ -94,17 +94,17 @@ Write set: M1 corrective changes, evidence/plan lifecycle, package manifest and | ID | Observable criterion | Kind | Environment | Mode | Status | Evidence | | --- | --- | --- | --- | --- | --- | --- | | R1 | Current schema and generated models admit the new edit and reject malformed declarations; projections are current. | contract | not-applicable | automated | satisfied | [Contract evidence](reports/verification.md) | -| R2 | Existing standards with zero or other units retain prose, identities and tombstones after registration. | integration | representative | automated | blocked | Canonical metadata/compiler run requires a full checkout; isolated owner probes are supporting only. | -| R3 | Same-candidate rewrite, registrations, relationships and provenance resolve correctly independent of edit ordering. | integration | representative | automated | blocked | Complete authority compiler is unavailable locally. | -| R4 | Invalid candidates preserve accepted and predecessor state; full replay and incremental construction agree. | integration | representative | automated | blocked | Full compiler/replay regressions are supplied but unexecuted. | -| R5 | Real MCP discovers, authors, resolves, reviews, publishes, restarts and reads the registration in an isolated repository. | system | required-real | automated | blocked | Full checkout, supported locked interpreter and actual client processes are required. | +| R2 | Existing standards with zero or other units retain prose, identities and tombstones after registration. | integration | representative | automated | satisfied | Fourteen canonical registration tests and the [MCP walkthrough](reports/verification.md) passed. | +| R3 | Same-candidate rewrite, registrations, relationships and provenance resolve correctly independent of edit ordering. | integration | representative | automated | satisfied | Canonical registration tests and the [MCP walkthrough](reports/verification.md) passed. | +| R4 | Invalid candidates preserve accepted and predecessor state; full replay and incremental construction agree. | integration | representative | automated | satisfied | Canonical replay tests and the full 281-test Engine suite passed; see [verification](reports/verification.md). | +| R5 | Real MCP discovers, authors, resolves, reviews, publishes, restarts and reads the registration in an isolated repository. | system | required-real | automated | satisfied | Official MCP Python SDK 1.30.0 walkthrough passed in a disposable clone; see [verification](reports/verification.md). | | R6 | ZIP patch reproduces the intended changed-file tree and excludes real normative content and the external proposal store. | release-artifact | not-applicable | automated | satisfied | [Package round-trip evidence](reports/verification.md) | -For R2–R4 use the canonical metadata, graph, analysis and logical compiler in a supported Python 3.11/3.12 environment. R5 additionally uses the existing official MCP SDK qualification environment, actual local subprocesses, Git and SQLite. The available Python 3.13 observations do not qualify that installed environment. +R2–R4 were qualified with the canonical metadata, graph, analysis and logical compiler in Python 3.12.3. R5 additionally used the official MCP Python SDK 1.30.0, actual local subprocesses, Git and SQLite. The original Python 3.13 observations remain delivery evidence only. ## Blockers -A complete Git checkout and supported locked runtime are unavailable here. Direct source download is unavailable and the recovered source omits modules needed by Engine startup. This blocks R2–R5; it does not turn the passed contract/isolated checks into acceptance. The installed user store and proposal are outside this environment. +The original delivery environment lacked a complete Git checkout and supported runtime. The local integration used the complete checkout and a Python 3.12.3 environment with the locked contract dependencies; R2–R5 now have canonical and MCP evidence. The installed user store and proposal were not accessed and remain a separate deployment boundary. ## Re-Plan Triggers @@ -114,13 +114,13 @@ A required operation or invariant that cannot be expressed with these owners tri Add the regression before production changes and show that the baseline rejects the new edit. Derive focused expectations from the intended behavior, not copied generated outputs. Validate runtime and schema separately. Use a full-checkout MCP client to exercise actual publication, with explicit fixture decisions confined to disposable test repositories. -The plan is `Accepted` only when all required claims have matching evidence. Source implementation can be delivered as `Implemented`/`Verifying` with environment-gated evidence explicitly outstanding. Resume the preserved content proposal only after installing the candidate, refreshing the MCP contract and satisfying H0. Earlier Core text/review evidence remains historical evidence; the revised candidate receives the affected current review rather than inheriting old readiness. +All required code-capability claims now have matching evidence. Resume the preserved content proposal only after installing the candidate, refreshing the MCP contract and satisfying the separate content handoff. Earlier Core text/review evidence remains historical evidence; the revised candidate receives the affected current review rather than inheriting old readiness. ## Systemic Finding Audit The bounded invariant family is explicit policy identity authoring through the public logical-edit contract. Inspect the parser, registration representation, projection ordering, semantic/coverage inputs, generated schemas, proposal consumers and actual MCP path. The missing operation spans these projections of one owner; it is not evidence that all standards or graph mechanisms need redesign. -The new edit reuses the existing declaration/metadata authority and the existing authoring lifecycle. Sibling creation, revision and retirement operations establish preserved contracts; only the shared tombstone-sidecar reuse case needed a corrective change. Generated outputs come from the existing compiler. Code inspection and isolated observations support the composition, while full consumer acceptance remains blocked. Stop expansion when these named consumers are qualified or a specific new consequence changes scope. +The new edit reuses the existing declaration/metadata authority and the existing authoring lifecycle. Sibling creation, revision and retirement operations establish preserved contracts; only the shared tombstone-sidecar reuse case needed a corrective change. Generated outputs come from the existing compiler. The canonical tests and official MCP client now qualify the named consumers. ## Version And Material Boundaries @@ -130,12 +130,12 @@ Canonical policy identity/scope belongs to metadata; edit intent and atomic stag ## Repository Isolation -All work occurs in a disposable partial reconstruction under `/mnt/data/policy-registration-work`. It is not the user's checkout or installed MCP store. ZIP integration is owned by the user's repository integrator. No upstream branch, remote, live proposal, shared history or user workspace is modified. Temporary repositories used to prove patch application contain only package-selected fixture files and confer no upstream commit identity. +The initial package was built in a disposable partial reconstruction under `/mnt/data/policy-registration-work`. Integration then occurred in this complete local checkout on the implementation branch. The MCP walkthrough used a separate disposable clone and store; the installed proposal store and remote branch were not changed. ## Final Acceptance -- Acceptance status: `blocked`. -- Source status: `Implemented`; the new contract, projection, tests and technical handoff are supplied. +- Acceptance status: `satisfied` for R1–R6 in the complete checkout and disposable MCP client. +- Source status: `Integrated` in the local implementation branch; the new contract, projection, tests and technical handoff are committed. - Deferred independent feature work: `none`. -- Required outstanding work: canonical full-checkout/replay tests, generated suite-input refresh, structural checks and actual MCP publication qualification. -- Final plan status: `Verifying`. Accept after R1–R6 are satisfied; the content guide's H0 remains closed until then. +- Required deployment work: install the qualified Engine, refresh/reconnect the actual client catalog, and inspect the preserved proposal through supported authoring operations. Real standards-content migration and review remain separate. +- Final plan status: `Accepted` for the code correction. The content guide's H0 still requires its own installed-client and content-workflow evidence. diff --git a/docs/plans/existing-policy-registration/reports/verification.md b/docs/plans/existing-policy-registration/reports/verification.md index da99e775..617cb6bf 100644 --- a/docs/plans/existing-policy-registration/reports/verification.md +++ b/docs/plans/existing-policy-registration/reports/verification.md @@ -1,7 +1,7 @@ # Existing-Policy Registration — Implementation And Verification -**Source implementation:** delivered. -**Objective acceptance:** blocked on complete-checkout and installed-boundary evidence. +**Source implementation:** integrated in the local code branch. +**Objective acceptance:** satisfied for the code capability in the complete checkout; installed deployment and the preserved content proposal remain separate. **Date:** September 24, 2026. **Upstream baseline:** `5a9dcb08effda50a485e6ae08d9fe4c349c74eda`, branch `implementation/purpose-separated-standards-engine`. @@ -9,9 +9,9 @@ The delivered patch was applied to the complete local checkout on the same implementation branch. The archive integrity and patch hash matched its manifest, `git apply --check` succeeded, and only the declared patch files were staged. A Python 3.12.3 environment with the repository's locked contract dependencies ran the new contract tests (8 passed), the new full-compiler registration tests (14 passed), and the focused logical-authoring (31), metadata (43), policy-impact (10), contracts (52), and analysis (114) suites successfully. Canonical public-contract projection freshness passed. -The temporary-store repository verification refreshed the tracked `suite-inputs.json` through its owner and passed 73 suites and 121 structural checks. The manifest diff contains the expected changed contract/source digests and repository-index digest. A precommit run of the full Engine suite passed 280 of 281 tests. Its sole failure was `test_main_advancement_and_cold_historical_read_use_exact_captures`: that fixture clones committed `HEAD`, then copies the new contract files from the working tree, leaving the clone's committed verification manifest stale. Recheck this case after committing the candidate, as the package's application instructions require. +The temporary-store repository verification refreshed the tracked `suite-inputs.json` through its owner and passed 73 suites and 121 structural checks. The manifest diff contains the expected changed contract/source digests and repository-index digest. A precommit run of the full Engine suite passed 280 of 281 tests. Its sole failure was `test_main_advancement_and_cold_historical_read_use_exact_captures`: that fixture clones committed `HEAD`, then copies the new contract files from the working tree, leaving the clone's committed verification manifest stale. After committing candidate `e7fc783b`, that case passed alone and the full Engine suite passed all 281 tests in 371.421 seconds. -The official MCP SDK client walkthrough has not run in this checkout. The available Python environments do not contain the `mcp` client package, and a download attempt failed DNS resolution. This qualification has not opened the installed proposal store or published real standards content. +The official MCP Python SDK 1.30.0 was installed into a temporary client directory and the supplied walkthrough passed against a disposable repository and store. Its result records registration in previously unmapped and populated owners, same-candidate rewrite with relationship/provenance, reviewed publication, cold pending-workflow and snapshot readback, rejected-revision isolation, and application-purpose provenance filtering. This qualification has not opened the installed proposal store or published real standards content. ## Implemented behavior @@ -25,7 +25,7 @@ Interface edition 33 replaces edition 32 for discovery of the expanded edit voca Technical authoring documentation and the guide's H0 handoff now explicitly include registration within existing modules. The rest of the standards-content migration remains separate. This source package does not certify H0: actual consumer qualification below is still required. -## Source and environment boundary +## Original delivery environment boundary Direct repository download was unavailable. Source was reconstructed from existing delivery archives and a small number of retrieved baseline files. Before editing, each of the nine existing files included in the patch was checked against its published Git blob identity at the baseline. All matched. New files are the plan/evidence and feature tests. No recovered dependency file is distributed as a feature change. @@ -33,7 +33,7 @@ The reconstruction is **not a complete Git checkout**. It lacks the graph engine The blocked proposal `503f233b-5c9f-442f-a04f-99f330142bae` was never opened, edited, published or reset. No real normative body, policy-unit declaration, consumer relationship or application exposure approval was changed. No upstream commit or push is claimed. -## Executed evidence +## Original delivery evidence | Observation | Result | Proof boundary | | --- | --- | --- | @@ -60,19 +60,19 @@ python isolated_registration_probe.py /path/to/recovered/source Raw outputs, baseline rejection, and the one-off probe are included in the ZIP's `verification/` directory. The full-checkout attempt is retained separately from successful logs. -## Supplied but unexecuted acceptance coverage +## Originally supplied but unexecuted acceptance coverage `test_policy_registration.py` contains fourteen integration cases using the existing real compiler/capture fixture. It starts from an already-created module so registration is actually against existing authority. It covers empty and populated policy mappings, unchanged prose/aliases, multiple registrations, same-candidate rewrite and relationships/provenance, tombstone-only owners, unavailable/reserved identities, scope/alias/lineage rejection, failed candidate isolation, mutation resistance and full/incremental replay equivalence. `mcp_policy_registration_client.py` extends the existing official SDK qualification approach. It creates and publishes synthetic owners in a disposable repository, registers a policy in an accepted previously unmapped owner, resumes that pending workflow after process replacement, then registers another scope alongside a rewrite, consumer relationship and provenance. It includes explicit fixture coverage/consumer/impact decisions, reviewed publication, a rejected successor preserving its predecessor, cold historical/current readback and application-purpose rationale isolation. The harness has no option for selecting the user's real repository/store as its mutation target. -Neither file has been runtime-qualified in this environment. Their Python syntax is checked. Run them with the full source and supported environments before claiming the blocker resolved end to end. A future failure requires an ordinary bounded repair; a syntax pass is not a substitute for that execution. +At original delivery, neither file had been runtime-qualified in the partial reconstruction. Both were subsequently exercised in the complete checkout as recorded above. -## Generated verification inputs +## Original delivery state of generated verification inputs -The repository's complete `suite-inputs.json` manifest was deliberately **not** regenerated from a partial tree or manually edited. The schema's generated Python and tool definitions are included and current. The full verification-input manifest must be regenerated through its existing owner in the complete checkout, after adding these new files to its tracked membership. The package's application instructions show a temporary-store native invocation so this does not require opening the preserved production proposal store. +The repository's complete `suite-inputs.json` manifest was deliberately **not** regenerated from the partial delivery tree or manually edited. It was regenerated through its existing owner in the complete checkout using the package's temporary-store native invocation, without opening the preserved production proposal store. -The complete structural checkpoint, full package suites, official MCP walkthrough, installed Codex catalog and any independent external code review remain outstanding. This report is an implementation/self-review record, not independent acceptance. +At original package delivery, the complete structural checkpoint, full package suites, official MCP walkthrough, installed Codex catalog and any independent external code review remained outstanding. The first three have since passed in the complete checkout as recorded above. Installed client/catalog qualification and any independent review remain deployment or review activities outside this code integration. ## Material self-review @@ -82,7 +82,7 @@ The added public operation is intentionally a logical edit within `propose`/`rev ## Integration and resume boundary -Apply the patch to a reviewed local code branch, refresh the verification-input projection with a temporary verification store, and run the supplied full-checkout tests. Commit the candidate before the SDK walkthrough clones it. Integrate the qualified code using the repository's normal process, then restart the server and refresh the client catalog for interface 33. +The patch was applied to the local implementation branch, the verification-input projection was refreshed through a temporary store, and the candidate was committed before the SDK walkthrough cloned it. Installation into the actual Engine process and client catalog refresh for interface 33 remain deployment steps. Read the preserved proposal's actual state through supported authoring operations. `workflow_status` reconstructs its exact context; `resume` selects its explicit current revision where needed. It does not rebase the original accepted source. A changed accepted base may require the Engine's supported stale-state disposition or a new proposal carrying the preserved draft/evidence against current authority. Keep the original records and follow returned decisions rather than editing stored bytes. From c56674a27511c09bf1a6d6be874f971109f0e89d Mon Sep 17 00:00:00 2001 From: MrScripty Date: Thu, 24 Sep 2026 18:25:56 -0700 Subject: [PATCH 21/26] fix(engine): reuse registered sidecar after policy movement --- docs/plans/moved-policy-sidecar/issues.md | 10 ++ docs/plans/moved-policy-sidecar/plan.md | 88 +++++++++++ .../moved-policy-sidecar/verification.md | 66 +++++++++ .../generated/suite-inputs.json | 4 +- .../standards_engine/logical_authoring.py | 9 +- .../tests/test_policy_registration.py | 129 ++++++++++++++++- .../tests/test_policy_sidecar_selection.py | 137 ++++++++++++++++++ 7 files changed, 435 insertions(+), 8 deletions(-) create mode 100644 docs/plans/moved-policy-sidecar/issues.md create mode 100644 docs/plans/moved-policy-sidecar/plan.md create mode 100644 docs/plans/moved-policy-sidecar/verification.md create mode 100644 tools/standards_engine/tests/test_policy_sidecar_selection.py diff --git a/docs/plans/moved-policy-sidecar/issues.md b/docs/plans/moved-policy-sidecar/issues.md new file mode 100644 index 00000000..89469343 --- /dev/null +++ b/docs/plans/moved-policy-sidecar/issues.md @@ -0,0 +1,10 @@ +# Findings And Dispositions + +| ID | Severity | Owner | State and evidence | Disposition | +| --- | --- | --- | --- | --- | +| SIDE-01 | Blocking for the reported draft | Logical authoring / `_ensure_policy_sidecar` | Source corrected. The baseline rejects registered derived storage when its active declaration belongs to another module. Four focused cases failed before correction and all ten passed afterward at the isolated source boundary. | Reuse registered storage and preserve declaration-owned identities. Complete the added canonical compiler checks and installed readback. | +| SIDE-02 | Verification limitation | Integration / deployment | Complete repository imports and the supported installed environment are unavailable here. A real compiler-test invocation fails on the missing `authoring` package in the partial tree. | Run supplied tests in the full supported checkout; record results before accepting installed publication capability. Do not substitute isolated tests for this claim. | +| SIDE-03 | Medium, separately scoped | Router projection | `_project_route_guidance` uses the exact `## S1 Rust Library Bug-Fix Route` heading as its end boundary at b14e807e. The user reports retaining that heading as a reference pointer. | Preserve the reviewed pointer in this correction. A separate code change should establish a durable region identity independent of presentation wording and inspect all Router consumers. No ad hoc heading aliases are introduced here. | +| SIDE-04 | Operational | MCP process owner | The user observed a stale catalog; a fresh connection exposed interface 33. This patch changes behavior within that interface. | Restart the installed server process and reconnect after installation. Interface 33 alone is not evidence that this new implementation is loaded. | + +No production policy records, proposal revisions, review records or Router prose were edited. The reported proposal state and independent review are user-supplied information, not observations from a local store inspection. diff --git a/docs/plans/moved-policy-sidecar/plan.md b/docs/plans/moved-policy-sidecar/plan.md new file mode 100644 index 00000000..08f24098 --- /dev/null +++ b/docs/plans/moved-policy-sidecar/plan.md @@ -0,0 +1,88 @@ +# Moved-Policy Sidecar Reuse + +**Plan status:** `Verifying` +**Acceptance status:** `pending canonical-compiler and installed-workflow evidence` +**Current phase:** Source correction complete; full-checkout and installed qualification remain. +**Next slice:** Run the supplied canonical compiler regressions in the complete supported checkout, then verify the retained draft through the refreshed MCP. +**Canonical plan:** `docs/plans/moved-policy-sidecar/plan.md`; operation: `continue` the existing registration repair. +**Source baseline:** `MrScripty/Coding-Standards@b14e807e9e129c1226669973cbb425cd0476dde5`. +**Composed-design review:** Applicable and bounded below. +**Execution ledger and evidence:** [verification.md](verification.md). +**Issues:** [issues.md](issues.md). + +## Objective + +Register a policy in an existing module when its derived declaration file is already registered and stores a policy now owned by another module. Preserve every existing policy identity, owner, scope, revision, alias, lineage record and tombstone. Preserve the original proposal and source bytes outside the explicit candidate. + +The reported case is `core.toml` containing `core.simplicity-and-complection`, whose declared module is `topic.code-design`. This is valid existing source, not a request to move that policy back to Core. The generic storage correction applies to any such registered sidecar; repository-specific policy names belong only in the issue evidence. + +## Authority And Standards + +Apply the current Core, Router, Implementation and Verification workflows and the prospective positive-guidance guide's generic design, proportional scope and code/content separation. Relevant concerns are library behavior, persisted declaration integrity and deterministic replay; public schema, IPC dispatch and authorization contracts remain unchanged. This repair follows the established code workstream rather than revising normative content. + +Use the exact published affected-file blobs as the source baseline. The available checkout is partial because direct Git download failed. Any isolated-source observations remain distinct from full-module import, canonical corpus compilation and installed MCP evidence. The current reported live proposal is `503f233b-5c9f-442f-a04f-99f330142bae`, revision prefix `7d21edc9`; it is outside this environment and will not be accessed or changed. + +## Binding Design + +The policy registry authorizes declaration-file membership. Each active declaration's `module` field identifies its current logical owner. A sidecar filename is a storage convention, not an exclusive ownership assertion. + +Keep the existing selection order: reuse a registered sidecar already containing a policy for the requested module; otherwise reuse the registered derived path regardless of the current owners of its surviving declarations; otherwise create a new file only when the derived path is unoccupied. Retain the existing typed rejection for an occupied unregistered path and normal parsing failures. + +The selected registered file has already been parsed during the existing scan. Reuse it without rewriting its bytes at selection time. The registration owner continues to append to the complete parsed declaration set and serialize active declarations and tombstones together. No alternative filename allocator, relocation, duplicate declarations, migration, special Core branch or new schema is required. + +## Write Set + +- `tools/standards_engine/standards_engine/logical_authoring.py`: only `_ensure_policy_sidecar`. +- `tools/standards_engine/tests/test_policy_sidecar_selection.py`: focused storage-selection and preservation regressions. +- `tools/standards_engine/tests/test_policy_registration.py`: real-compiler regressions using synthetic moved-policy storage, including grouped edits and replay. +- This plan directory: scope, evidence, limitations and handoff. +- The generated suite-input manifest, only through its owning generator in a complete checkout. It is not manually rewritten in a partial source tree. + +No real standards, declaration files, Router text, registry entries, application approvals, proposal data, generated API contracts or interface versions change. Interface 33 remains the current contract for this correction. + +## Design Review + +**Independent responsibilities:** registry membership selects eligible storage; declaration fields own logical identity; registration owns append/serialization; the existing compiler owns complete-candidate validation. Their owners remain unchanged. + +**Identity and representation:** filename and logical module can diverge after relocation. The existing source demonstrates that divergence. Reusing registered storage preserves identity instead of deriving identity from placement. + +**Caller knowledge:** callers still provide module and policy identities/scopes. They gain no filesystem arguments or knowledge of where earlier policies were stored. + +**Representative change paths:** registration appends one declaration; movement still updates the selected policy through the existing move path; tombstones remain in their existing file; unrelated module bodies remain unchanged. + +**Failure and replay:** invalid input remains owned by the canonical validator; unregistered collisions remain errors. Deterministic selection uses the same registry order in complete and incremental replay. No new accepted baseline or cache authority is introduced. + +**Deletion review:** remove the `not units` restriction at the registered derived path. Additional ownership maps, file migrations, compatibility paths or permanent verification machinery supply no deciding value for this defect. + +## Implementation Slice + +1. Add tests that distinguish the currently failing foreign-owned registered path from an unregistered collision. Demonstrate failure with the exact baseline source. +2. Replace the empty-only reuse condition with registered-path reuse. Keep first-match priority, parsing, collision handling and file creation unchanged. +3. Exercise preservation of foreign-owned declarations, mixed owners, tombstones, existing storage preference, repeated selection and untouched source bytes. +4. Extend the real compiler suite with a synthetic historical-storage fixture, registration plus consumer/provenance, grouped registrations sharing one sidecar, failed-candidate immutability, and full/incremental equality. +5. Review the exact diff, record evidence by claim, and package full changed files with a base-bound patch and checksums. Preserve existing draft/review evidence. + +## Acceptance + +| Claim | Kind | Environment | Mode | Status | +| --- | --- | --- | --- | --- | +| S1: A registered derived path with foreign-owned active declarations is reusable without selection-time mutation. | focused | deterministic | automated | satisfied at isolated source boundary | +| S2: Existing preference, tombstones, mixed ownership, collision rejection and parse failures remain intact. | focused | deterministic | automated | satisfied at isolated source boundary | +| S3: Canonical registration, relationships/provenance and full/incremental replay preserve old declarations and accepted inputs. | integration | complete supported checkout | automated | pending: complete checkout unavailable | +| S4: The package changes only the admitted files and applies exactly to their verified baseline. | release-artifact | deterministic | automated | satisfied by package reproduction record | +| S5: The installed Engine can advance the retained coordinated draft without the reported projection disagreement. | user-workflow | user's actual installation/store | manual | pending: external installation | + +Source-only execution can prove the pure selector's behavior but does not satisfy S3 or S5. Keep the plan `Verifying` where those claims await the supported checkout or the user's installed workflow. Compilation, packaging and syntax results establish their named properties only. + +## Handoff + +Apply the patch after comparing current local changes, regenerate verification inputs through the existing generator, and run the normal focused and affected integration tests. Restart the MCP server process and reconnect the client so calls execute the corrected implementation; the catalog remains interface 33 because the wire contract is unchanged. + +Use the existing proposal store. Inspect the exact saved revision through supported status/resume operations, reconcile any accepted-branch drift, and obtain current analysis/readiness before publication. Preserve historical reviews while letting the Engine identify any newly affected obligations. No database reset, raw store modification, premature application, or automatic new proposal is part of this repair. + +## Source Evidence + +- `logical_authoring.py`, `_ensure_policy_sidecar`, at the baseline commit: registered derived storage is accepted only when active declarations are empty. +- `evaluation/standards-effectiveness/policy-units/core.toml`: the existing moved policy remains in the registered Core-named sidecar. +- `logical_authoring.py`, `_register_policy_units`: selected active declarations and tombstones are retained and final canonical validation is already present. +- Core/Implementation/Verification at the same commit: bounded write set, coherent repair, preserved authority and claim-specific evidence. diff --git a/docs/plans/moved-policy-sidecar/verification.md b/docs/plans/moved-policy-sidecar/verification.md new file mode 100644 index 00000000..949cf064 --- /dev/null +++ b/docs/plans/moved-policy-sidecar/verification.md @@ -0,0 +1,66 @@ +# Moved-Policy Sidecar Repair: Execution And Verification + +**Source implementation:** Complete for the bounded selector correction. +**Plan status:** `Verifying`; canonical-compiler and installed-workflow evidence remain outstanding. +**Baseline:** `b14e807e9e129c1226669973cbb425cd0476dde5`, implementation branch. + +## Source And Preserved State + +The two existing changed files were recovered from the prior delivery ZIP and verified against their current published Git blob identities: + +| Path | Baseline Git blob | +| --- | --- | +| `tools/standards_engine/standards_engine/logical_authoring.py` | `a4127709eb3d07c64983ca075bba0f5d3b3f6363` | +| `tools/standards_engine/tests/test_policy_registration.py` | `41ab191ca3a7b385fa0018c82cbcf0958b39f3a9` | + +The observed `core.toml` declaration was also retained as verification evidence and matches blob `8f3cb702ed8579237ec962c7277b288292905ae2`. It is not included as a replacement repository file. Its policy `core.simplicity-and-complection` declares module `topic.code-design` and semantic revision 2. + +Direct Git transport failed DNS resolution. Prior archives supplied the affected files, but not a complete repository. The local packaging Git baseline is synthetic and is not presented as the user's actual Git history. The package manifest identifies the real source baseline and exact changed-file inputs. + +The user's store, proposal `503f233b-5c9f-442f-a04f-99f330142bae`, draft revision prefix `7d21edc9`, approvals and independent review were not accessed or modified. Real normative prose, policy declarations, registries, Router text and exposure records remain unchanged. + +## Correction + +`_ensure_policy_sidecar` now reuses the registered derived sidecar when no registered sidecar already contains a declaration for the requested module. Active declarations for other modules no longer make that registered file unavailable. + +The existing scan still parses the registered file. Existing matching-owner preference, unregistered-path collision rejection and new-file registration remain unchanged. Selection writes no existing file. Registration keeps its existing append/serialization path, which carries all active declarations and tombstones into the candidate. + +An AST comparison establishes that the only changed production function is `_ensure_policy_sidecar`. There is no Core-specific branch, new filename scheme, file relocation, policy renaming, identity migration or schema change. Interface 33 and persisted representations are unchanged. + +## Executed Evidence + +| Observation | Result | Boundary | +| --- | --- | --- | +| Ten new focused selector/serialization regressions against original source | Four cases fail with `AUTHORING.PROJECTION_DISAGREEMENT`; six pass | Exact selected production function bodies; package imports excluded | +| The same ten regressions after correction | Ten pass | Same source-level boundary and unchanged test assertions | +| Previously supplied isolated registration-mechanism probe | Nine pass | Supporting only: the probe substitutes metadata resolution/validation | +| Syntax compilation of the three changed/new Python files | Pass on available Python 3.13.5 | Syntax, not runtime integration | +| Python 3.11 grammar parsing of the same files | Pass | Grammar only; not execution on Python 3.11 | +| Production AST scope comparison | Pass | Only the admitted selector changes | +| Full compiler integration test invocation | Collection fails: `tools.standards_engine.standards_engine.authoring` is absent | No canonical compiler tests are claimed as executed | +| Patch reproduction, hashes and archive integrity | Recorded in package verification artifacts | Changed-file packaging, not installation | + +The focused source runner executes the actual AST bodies of the selector and its TOML/registry helpers with the same checked-in test assertions. Error definitions are a retained excerpt from the same published revision. It does not load the full authoring module, metadata validator, graph, store or MCP. These limits are explicit; passing those ten tests is not presented as a full Engine run. + +No network calls, fabricated module implementations or fallbacks were added to production. The supplementary source runner is a package-local diagnostic, not a new permanent repository verification framework. + +## Integration Regressions Added, Not Executed Here + +`test_policy_registration.py` gains a synthetic legacy-storage fixture. It creates two modules through the actual logical compiler, retains the second module's policy declaration in the first module's sidecar, refreshes fixture inputs using the owning projector, and recompiles that frozen fixture with the real Engine. No fixture creation touches real accepted source or the user's store. + +Four tests then cover: + +- Registration while preserving the moved policy, its alias, registry membership and both module bodies. +- Grouped registrations for two logical owners that share a physical sidecar, independent of request order. +- A same-candidate module rewrite, registration, consumer relationship and provenance record without losing the moved declaration. +- Full/incremental replay agreement, plus failed-suffix preservation of original and predecessor material. + +The pure selector suite additionally covers tombstones, mixed logical owners, existing matching-owner preference, empty storage, repeated selection, malformed files and unregistered occupied paths. + +## Remaining Acceptance And Resume + +S1 and S2 have focused source-level evidence; S3 requires the full canonical compiler and replay checks; S4 is established by the package reproduction record; S5 requires the actual installed workflow. The plan remains `Verifying` until the latter claims are established at their named boundaries. + +Apply and verify the patch in the complete checkout, refresh generated verification inputs through the existing owner, and restart the MCP server process before reconnecting. A catalog reporting interface 33 identifies the wire contract, not the implementation revision; qualify the corrected behavior itself. + +Inspect and resume the exact preserved proposal through supported operations. Follow any current stale-base or review obligations. Retained material review remains useful evidence, while readiness and publication remain the existing Engine's responsibility. This package does not authorize or attempt real standards publication. diff --git a/evaluation/standards-effectiveness/generated/suite-inputs.json b/evaluation/standards-effectiveness/generated/suite-inputs.json index 3e632924..ea6162ce 100644 --- a/evaluation/standards-effectiveness/generated/suite-inputs.json +++ b/evaluation/standards-effectiveness/generated/suite-inputs.json @@ -7135,7 +7135,7 @@ ] }, { - "digest": "sha256:c13c22e0612adcabcc7c185964ba5641c5e545e16a4792d5fe3b62cdd818537f", + "digest": "sha256:20595c637c8cb5e537322a467839232b4088c4b970ddd11ae32af6ee6c69b2c3", "path": "tools/standards_engine/standards_engine/logical_authoring.py", "state": "present", "uses": [ @@ -13326,7 +13326,7 @@ "path": "evaluation/standards-effectiveness/suite-registry.toml" }, "repository_index": { - "digest": "sha256:ae569bce7aa23d04cf81d33e83815a0b7b417f798d677e31641ec716c67f1ccc", + "digest": "sha256:75c69a59bbe132a7b5ccfaf8a7b7309c6d3895bb87d48511217f9b4fff5a127a", "uses": [ { "check": "python-package-contract", diff --git a/tools/standards_engine/standards_engine/logical_authoring.py b/tools/standards_engine/standards_engine/logical_authoring.py index a4127709..ea45fae2 100644 --- a/tools/standards_engine/standards_engine/logical_authoring.py +++ b/tools/standards_engine/standards_engine/logical_authoring.py @@ -2044,11 +2044,10 @@ def _ensure_policy_sidecar(files: dict[str, bytes], module: str) -> str: return path path = _policy_sidecar_path(module) if path in sources: - units, _ = _policy_sidecar(files[path]) - if not units: - # Retiring the last active unit leaves the registered owner and its - # tombstones intact. Reuse that owner for a fresh policy identity. - return path + # Registered storage can outlive a policy's move to another module. + # Declaration fields own current module identity; reuse this file and + # preserve all of its active declarations and tombstones when appending. + return path if path in files: raise _invalid( "AUTHORING.PROJECTION_DISAGREEMENT", diff --git a/tools/standards_engine/tests/test_policy_registration.py b/tools/standards_engine/tests/test_policy_registration.py index 41ab191c..83ca14bd 100644 --- a/tools/standards_engine/tests/test_policy_registration.py +++ b/tools/standards_engine/tests/test_policy_registration.py @@ -6,21 +6,27 @@ from __future__ import annotations import copy +from dataclasses import replace import tomllib import unittest from tools.standards_engine.standards_engine.authoring import AuthoringError +from tools.standards_engine.standards_engine import logical_authoring as logical from tools.standards_engine.standards_engine.engine import StandardsEngine from tools.standards_engine.standards_engine.logical_authoring import ( LogicalAuthoringCompiler, LogicalProgram, StandardsChangeSet, ) from tools.standards_engine.tests import test_logical_authoring as fixture -from tools.standards_metadata.standards_metadata import MetadataError +from tools.standards_metadata.standards_metadata import ( + FrozenContentSource, MetadataError, POLICY_UNIT_REGISTRY, +) MODULE = "topic.registration-fixture" EXISTING = MODULE + ".existing" ADDED = MODULE + ".added" +DESTINATION = "topic.registration-destination" +MOVED = MODULE + ".moved" EVIDENCE = { "id": "evidence:registration-fixture", "digest": "sha256:" + "1" * 64, "provider_contract": "standards-evidence", "provider_contract_version": "1", @@ -83,6 +89,47 @@ def setUpClass(cls) -> None: base_repository_paths=shared.repository_paths, compiled_base=shared.compiled, ) + @classmethod + def moved_storage_base(cls): + """Capture valid legacy placement independently of selector behavior. + + Fixture-only relocation leaves the declaration's logical module and + identity unchanged. The real metadata compiler validates the result. + """ + if "_moved_storage" in cls.__dict__: + return cls._moved_storage + shared = fixture.LogicalAuthoringTests + destination = create_owner(False) + destination["standard"].update({ + "id": DESTINATION, "title": "Registration Destination", + "body": "## Moved Scope\n\nPreserve the moved decision.\n\n" + "## Further Scope\n\nIdentify a separate decision.\n", + }) + moved = unit(MOVED, "Moved Scope") + moved["aliases"] = [MOVED + ".alias"] + destination["policy_units"] = [moved] + created = LogicalAuthoringCompiler(StandardsEngine._compile).compile( + shared.base, LogicalProgram([change([create_owner(False), destination])]), + base_repository_paths=shared.repository_paths, compiled_base=shared.compiled, + ) + files = dict(created.source.files) + original = created.compiled.corpus.resolve_policy_unit(MOVED).source + target = logical._policy_sidecar_path(MODULE) + if target in files: + raise AssertionError("The synthetic origin must start without a sidecar.") + files[target] = files.pop(original) + logical._set_registry_list(files, POLICY_UNIT_REGISTRY, "sources", original, present=False) + logical._set_registry_list(files, POLICY_UNIT_REGISTRY, "sources", target, present=True) + paths = logical._refresh_suite_input_projection( + files, frozenset(dict(created.source.files)), created.repository_paths, + ) + source = FrozenContentSource(files) + cls._moved_storage = replace( + created, source=source, compiled=StandardsEngine._compile(source), + repository_paths=paths, _continuation=None, + ) + return cls._moved_storage + def project(self, changes, *, populated=False, base=None, predecessor=None): base = self.owners[populated] if base is None else base return LogicalAuthoringCompiler(StandardsEngine._compile).compile( @@ -257,6 +304,86 @@ def test_caller_mutation_cannot_rewrite_a_registered_edit(self): self.assertEqual(projected.compiled.corpus.resolve_policy_unit(ADDED).heading_path, ("Additional Scope",)) + def test_registration_reuses_storage_after_its_policy_changed_modules(self): + base = self.moved_storage_base() + before = dict(base.source.files) + old = base.compiled.corpus.resolve_policy_unit(MOVED) + self.assertEqual(old.module, DESTINATION) + self.assertEqual(old.source, logical._policy_sidecar_path(MODULE)) + self.assertFalse(base.compiled.corpus.policy_unit_corpus.for_module(MODULE)) + projected = self.project([change([register()])], base=base) + added = projected.compiled.corpus.resolve_policy_unit(ADDED) + self.assertEqual(added.source, old.source) + self.assertEqual(projected.compiled.corpus.resolve_policy_unit(MOVED), old) + self.assertEqual(projected.compiled.corpus.resolve_policy_unit(MOVED + ".alias"), old) + for owner in (MODULE, DESTINATION): + path = base.compiled.corpus.resolve_module(owner).path + self.assertEqual(projected.source.read_bytes(path), before[path]) + self.assertEqual(projected.source.read_bytes(POLICY_UNIT_REGISTRY), before[POLICY_UNIT_REGISTRY]) + self.assertEqual(dict(base.source.files), before) + + def test_grouped_registration_shares_moved_storage_across_logical_owners(self): + base = self.moved_storage_base() + other = register(DESTINATION + ".additional", "Further Scope") + other["standard"] = DESTINATION + edits = [register(), other] + projected = self.project([change(edits)], base=base) + reversed_projection = self.project([change(list(reversed(edits)))], base=base) + self.assertEqual(projected.source.files, reversed_projection.source.files) + self.assertEqual({projected.compiled.corpus.resolve_policy_unit(identity).source + for identity in (MOVED, ADDED, DESTINATION + ".additional")}, + {logical._policy_sidecar_path(MODULE)}) + self.assertEqual(projected.compiled.corpus.resolve_policy_unit(MOVED), + base.compiled.corpus.resolve_policy_unit(MOVED)) + + def test_moved_storage_composes_with_rewrite_relationship_and_provenance(self): + base = self.moved_storage_base() + standard = create_owner(False)["standard"] + standard["body"] = standard["body"].replace("Additional Scope", "Reviewed Scope") + edits = [ + {"kind": "revise-standard", "standard": standard, "scope_updates": []}, + register(heading="Reviewed Scope"), relationship(), + {"kind": "put-provenance", "record": { + "id": "provenance.moved-storage", "subject": ADDED, + "origin": "current-justification", "rationale": "Private fixture evidence.", + "evidence": [EVIDENCE], + }}, + ] + projected = self.project([change(edits)], base=base) + self.assertEqual(projected.compiled.corpus.resolve_policy_unit(MOVED), + base.compiled.corpus.resolve_policy_unit(MOVED)) + self.assertEqual(projected.compiled.corpus.resolve_policy_unit(ADDED).heading_path, + ("Reviewed Scope",)) + self.assertEqual(projected.compiled.supporting.provenance[ + "provenance.moved-storage"].subject, ADDED) + self.assertTrue(any(value.source == ADDED + for value in projected.compiled.policy_impact.semantics.values())) + + def test_moved_storage_full_and_incremental_replay_agree_and_keep_base(self): + base = self.moved_storage_base() + before = dict(base.source.files) + prefix = (change([register()]),) + previous = self.project(prefix, base=base) + previous_files = dict(previous.source.files) + other = register(DESTINATION + ".additional", "Further Scope") + other["standard"] = DESTINATION + program = (*prefix, change([other, relationship()])) + cold = self.project(program, base=base) + warm = self.project(program, base=base, predecessor=previous) + self.assertEqual(warm.source.files, cold.source.files) + self.assertEqual(warm.repository_paths, cold.repository_paths) + self.assertEqual(warm.semantic_proposals, cold.semantic_proposals) + self.assertEqual(warm.analysis_policy_ids, cold.analysis_policy_ids) + self.assertEqual(warm.analysis_module_ids, cold.analysis_module_ids) + self.assertEqual(warm.compiled.corpus.resolve_policy_unit(MOVED), + base.compiled.corpus.resolve_policy_unit(MOVED)) + failed = (*prefix, change([register(MODULE + ".missing", "Absent Scope")])) + for seed in (None, previous): + with self.subTest(incremental=seed is not None), self.assertRaises(MetadataError): + self.project(failed, base=base, predecessor=seed) + self.assertEqual(dict(previous.source.files), previous_files) + self.assertEqual(dict(base.source.files), before) + def test_later_preservation_keeps_original_absent_identity_semantics(self): program = [change([register()]), change([{ "kind": "revise-policy-unit", "policy": ADDED, "title": "Additional Scope", diff --git a/tools/standards_engine/tests/test_policy_sidecar_selection.py b/tools/standards_engine/tests/test_policy_sidecar_selection.py new file mode 100644 index 00000000..8f78c33d --- /dev/null +++ b/tools/standards_engine/tests/test_policy_sidecar_selection.py @@ -0,0 +1,137 @@ +"""A registered declaration file is storage, not exclusive module ownership.""" +from __future__ import annotations + +import tomllib +import unittest + +from tools.standards_engine.standards_engine.authoring import AuthoringError +from tools.standards_engine.standards_engine.logical_authoring import ( + _ensure_policy_sidecar, + _policy_sidecar, + _policy_sidecar_path, + _render_policy_sidecar, + _set_registry_list, +) +from tools.standards_metadata.standards_metadata import POLICY_UNIT_REGISTRY + + +OWNER = "topic.sidecar-origin" +DESTINATION = "topic.sidecar-destination" + + +def declaration(identity: str, module: str) -> dict[str, object]: + return { + "id": identity, + "module": module, + "heading_path": ["Selected Scope"], + "semantic_revision": 2, + "aliases": [identity + ".alias"], + } + + +class PolicySidecarSelectionTests(unittest.TestCase): + def setUp(self) -> None: + self.path = _policy_sidecar_path(OWNER) + self.files = {POLICY_UNIT_REGISTRY: b"schema_version = 1\nsources = []\n"} + self.moved = declaration(OWNER + ".moved", DESTINATION) + self.retired = { + "id": OWNER + ".retired", + "retired_semantic_revision": 3, + "successors": [], + "evidence": "evidence:sidecar-retirement", + } + + def install(self, path: str, units, tombstones=()) -> None: + self.files[path] = _render_policy_sidecar(units, tombstones) + _set_registry_list(self.files, POLICY_UNIT_REGISTRY, "sources", path, present=True) + + def assert_selection_preserves_files(self, module: str, path: str) -> None: + before = dict(self.files) + self.assertEqual(_ensure_policy_sidecar(self.files, module), path) + self.assertEqual(self.files, before) + + def test_registered_derived_path_preserves_a_moved_policy(self) -> None: + self.install(self.path, [self.moved]) + self.assert_selection_preserves_files(OWNER, self.path) + + def test_registered_derived_path_preserves_moved_policy_and_tombstones(self) -> None: + self.install(self.path, [self.moved], [self.retired]) + self.assert_selection_preserves_files(OWNER, self.path) + active, retired = _policy_sidecar(self.files[self.path]) + self.assertEqual(active, [self.moved]) + self.assertEqual(retired, [self.retired]) + + def test_shared_storage_preserves_every_declared_owner(self) -> None: + third = declaration("topic.third.existing", "topic.third") + self.install(self.path, [self.moved, third], [self.retired]) + self.assert_selection_preserves_files(OWNER, self.path) + self.assert_selection_preserves_files(DESTINATION, self.path) + self.assert_selection_preserves_files("topic.third", self.path) + + def test_existing_module_storage_remains_preferred_over_derived_storage(self) -> None: + alternate = _policy_sidecar_path("topic.shared-storage") + self.install(self.path, [self.moved]) + self.install(alternate, [declaration(OWNER + ".current", OWNER)]) + self.assert_selection_preserves_files(OWNER, alternate) + + def test_existing_module_storage_is_used_without_creating_derived_path(self) -> None: + alternate = _policy_sidecar_path("topic.shared-storage") + self.install(alternate, [declaration(OWNER + ".current", OWNER)]) + self.assert_selection_preserves_files(OWNER, alternate) + self.assertNotIn(self.path, self.files) + + def test_registered_empty_and_tombstone_only_storage_remain_usable(self) -> None: + for retired in ([], [self.retired]): + with self.subTest(tombstones=bool(retired)): + self.setUp() + self.install(self.path, [], retired) + self.assert_selection_preserves_files(OWNER, self.path) + + def test_new_storage_is_created_and_registered_once(self) -> None: + self.files["topics/unrelated.md"] = b"Unrelated source remains intact.\n" + self.assertEqual(_ensure_policy_sidecar(self.files, OWNER), self.path) + self.assertEqual(_policy_sidecar(self.files[self.path]), ([], [])) + self.assert_selection_preserves_files(OWNER, self.path) + sources = tomllib.loads(self.files[POLICY_UNIT_REGISTRY].decode())["sources"] + self.assertEqual(sources, [self.path]) + self.assertEqual(self.files["topics/unrelated.md"], b"Unrelated source remains intact.\n") + + def test_unregistered_occupied_path_is_preserved_and_rejected(self) -> None: + self.files[self.path] = _render_policy_sidecar([self.moved], [self.retired]) + before = dict(self.files) + with self.assertRaises(AuthoringError) as raised: + _ensure_policy_sidecar(self.files, OWNER) + self.assertEqual(raised.exception.failure.code, "AUTHORING.PROJECTION_DISAGREEMENT") + self.assertEqual(self.files, before) + + def test_invalid_registered_storage_is_preserved_and_rejected(self) -> None: + self.install(self.path, [self.moved]) + for content in (b"not toml", b"schema_version = 99\n", b"schema_version = 1\npolicy_unit = 7\n"): + with self.subTest(content=content): + self.files[self.path] = content + before = dict(self.files) + with self.assertRaises(AuthoringError) as raised: + _ensure_policy_sidecar(self.files, OWNER) + self.assertEqual(raised.exception.failure.code, "AUTHORING.PROJECTION_DISAGREEMENT") + self.assertEqual(self.files, before) + + def test_append_preserves_foreign_identity_alias_revision_and_retirement(self) -> None: + self.install(self.path, [self.moved], [self.retired]) + registry_before = self.files[POLICY_UNIT_REGISTRY] + selected = _ensure_policy_sidecar(self.files, OWNER) + active, retired = _policy_sidecar(self.files[selected]) + added = declaration(OWNER + ".new", OWNER) + active.append(added) + self.files[selected] = _render_policy_sidecar(active, retired) + active_after, retired_after = _policy_sidecar(self.files[selected]) + self.assertEqual({item["id"]: item for item in active_after}, { + self.moved["id"]: self.moved, added["id"]: added, + }) + self.assertEqual(retired_after, [self.retired]) + self.assertEqual(self.files[POLICY_UNIT_REGISTRY], registry_before) + self.assert_selection_preserves_files(OWNER, self.path) + self.assert_selection_preserves_files(DESTINATION, self.path) + + +if __name__ == "__main__": + unittest.main() From 9091bc72ac146b47d613b1836fbd8a89bd46f9ba Mon Sep 17 00:00:00 2001 From: MrScripty Date: Thu, 24 Sep 2026 18:33:22 -0700 Subject: [PATCH 22/26] docs(engine): record moved-sidecar qualification --- docs/plans/moved-policy-sidecar/issues.md | 4 ++-- docs/plans/moved-policy-sidecar/plan.md | 16 ++++++++-------- docs/plans/moved-policy-sidecar/verification.md | 16 ++++++++++++---- 3 files changed, 22 insertions(+), 14 deletions(-) diff --git a/docs/plans/moved-policy-sidecar/issues.md b/docs/plans/moved-policy-sidecar/issues.md index 89469343..368c8306 100644 --- a/docs/plans/moved-policy-sidecar/issues.md +++ b/docs/plans/moved-policy-sidecar/issues.md @@ -2,8 +2,8 @@ | ID | Severity | Owner | State and evidence | Disposition | | --- | --- | --- | --- | --- | -| SIDE-01 | Blocking for the reported draft | Logical authoring / `_ensure_policy_sidecar` | Source corrected. The baseline rejects registered derived storage when its active declaration belongs to another module. Four focused cases failed before correction and all ten passed afterward at the isolated source boundary. | Reuse registered storage and preserve declaration-owned identities. Complete the added canonical compiler checks and installed readback. | -| SIDE-02 | Verification limitation | Integration / deployment | Complete repository imports and the supported installed environment are unavailable here. A real compiler-test invocation fails on the missing `authoring` package in the partial tree. | Run supplied tests in the full supported checkout; record results before accepting installed publication capability. Do not substitute isolated tests for this claim. | +| SIDE-01 | Blocking for the reported draft | Logical authoring / `_ensure_policy_sidecar` | Source corrected. Four focused cases failed before correction; all ten selector tests and four new canonical compiler regressions passed in the complete checkout. | Reuse registered storage and preserve declaration-owned identities. Installed readback remains part of SIDE-04. | +| SIDE-02 | Verification limitation | Integration / deployment | The original partial delivery tree could not import the full Engine. The complete local checkout passed 18 registration tests, 31 logical-authoring tests, 43 metadata tests, all 295 Engine tests and 121 structural checks. | Resolved for code qualification; the installed user's workflow remains separately pending. | | SIDE-03 | Medium, separately scoped | Router projection | `_project_route_guidance` uses the exact `## S1 Rust Library Bug-Fix Route` heading as its end boundary at b14e807e. The user reports retaining that heading as a reference pointer. | Preserve the reviewed pointer in this correction. A separate code change should establish a durable region identity independent of presentation wording and inspect all Router consumers. No ad hoc heading aliases are introduced here. | | SIDE-04 | Operational | MCP process owner | The user observed a stale catalog; a fresh connection exposed interface 33. This patch changes behavior within that interface. | Restart the installed server process and reconnect after installation. Interface 33 alone is not evidence that this new implementation is loaded. | diff --git a/docs/plans/moved-policy-sidecar/plan.md b/docs/plans/moved-policy-sidecar/plan.md index 08f24098..1f7aeaec 100644 --- a/docs/plans/moved-policy-sidecar/plan.md +++ b/docs/plans/moved-policy-sidecar/plan.md @@ -1,9 +1,9 @@ # Moved-Policy Sidecar Reuse **Plan status:** `Verifying` -**Acceptance status:** `pending canonical-compiler and installed-workflow evidence` -**Current phase:** Source correction complete; full-checkout and installed qualification remain. -**Next slice:** Run the supplied canonical compiler regressions in the complete supported checkout, then verify the retained draft through the refreshed MCP. +**Acceptance status:** `canonical-compiler evidence satisfied; installed-workflow evidence pending` +**Current phase:** Local code and complete-checkout qualification complete; installed workflow remains separate. +**Next slice:** Install the corrected Engine, restart the server, and verify the retained draft through the refreshed MCP. **Canonical plan:** `docs/plans/moved-policy-sidecar/plan.md`; operation: `continue` the existing registration repair. **Source baseline:** `MrScripty/Coding-Standards@b14e807e9e129c1226669973cbb425cd0476dde5`. **Composed-design review:** Applicable and bounded below. @@ -66,17 +66,17 @@ No real standards, declaration files, Router text, registry entries, application | Claim | Kind | Environment | Mode | Status | | --- | --- | --- | --- | --- | -| S1: A registered derived path with foreign-owned active declarations is reusable without selection-time mutation. | focused | deterministic | automated | satisfied at isolated source boundary | -| S2: Existing preference, tombstones, mixed ownership, collision rejection and parse failures remain intact. | focused | deterministic | automated | satisfied at isolated source boundary | -| S3: Canonical registration, relationships/provenance and full/incremental replay preserve old declarations and accepted inputs. | integration | complete supported checkout | automated | pending: complete checkout unavailable | +| S1: A registered derived path with foreign-owned active declarations is reusable without selection-time mutation. | focused | deterministic | automated | satisfied by focused selector and canonical compiler tests | +| S2: Existing preference, tombstones, mixed ownership, collision rejection and parse failures remain intact. | focused | deterministic | automated | satisfied by focused selector and canonical compiler tests | +| S3: Canonical registration, relationships/provenance and full/incremental replay preserve old declarations and accepted inputs. | integration | complete supported checkout | automated | satisfied: four new compiler regressions and all 18 registration tests passed | | S4: The package changes only the admitted files and applies exactly to their verified baseline. | release-artifact | deterministic | automated | satisfied by package reproduction record | | S5: The installed Engine can advance the retained coordinated draft without the reported projection disagreement. | user-workflow | user's actual installation/store | manual | pending: external installation | -Source-only execution can prove the pure selector's behavior but does not satisfy S3 or S5. Keep the plan `Verifying` where those claims await the supported checkout or the user's installed workflow. Compilation, packaging and syntax results establish their named properties only. +The complete-checkout tests now satisfy S3, and the committed candidate passed the full 295-test Engine suite. Keep the plan `Verifying` while S5 awaits the actual installed workflow; the disposable fixtures do not access the user's proposal store. ## Handoff -Apply the patch after comparing current local changes, regenerate verification inputs through the existing generator, and run the normal focused and affected integration tests. Restart the MCP server process and reconnect the client so calls execute the corrected implementation; the catalog remains interface 33 because the wire contract is unchanged. +The patch was applied to the local implementation branch, verification inputs were regenerated through their owner, and focused and affected integration tests passed. Restart the installed MCP server process and reconnect its client so calls execute the corrected implementation; the catalog remains interface 33 because the wire contract is unchanged. Use the existing proposal store. Inspect the exact saved revision through supported status/resume operations, reconcile any accepted-branch drift, and obtain current analysis/readiness before publication. Preserve historical reviews while letting the Engine identify any newly affected obligations. No database reset, raw store modification, premature application, or automatic new proposal is part of this repair. diff --git a/docs/plans/moved-policy-sidecar/verification.md b/docs/plans/moved-policy-sidecar/verification.md index 949cf064..8574618f 100644 --- a/docs/plans/moved-policy-sidecar/verification.md +++ b/docs/plans/moved-policy-sidecar/verification.md @@ -1,9 +1,17 @@ # Moved-Policy Sidecar Repair: Execution And Verification **Source implementation:** Complete for the bounded selector correction. -**Plan status:** `Verifying`; canonical-compiler and installed-workflow evidence remain outstanding. +**Plan status:** `Verifying`; canonical-compiler evidence is satisfied and installed-workflow evidence remains outstanding. **Baseline:** `b14e807e9e129c1226669973cbb425cd0476dde5`, implementation branch. +## Complete-Checkout Integration + +The ZIP and its SHA256 manifest passed integrity checks. Its patch applied cleanly to the complete local implementation branch. The generated suite-input manifest was refreshed through the Engine's temporary-store verifier; 73 suites and 121 structural checks passed. The only manifest changes were the logical-authoring source digest and repository-index digest. + +The new focused sidecar suite passed all 10 tests. Four newly supplied compiler cases initially failed in their shared fixture before reaching the selector: `created.source.files` yields `(path, bytes)` pairs, while `_refresh_suite_input_projection` requires a set of path strings. Changing the fixture to pass its path keys made all four pass. The complete registration suite passed 18 tests, logical authoring passed 31, and metadata passed 43. No production change was needed beyond the supplied selector correction. + +The code and package evidence were committed as `c56674a2` under MrScripty. The full Engine suite then passed all 295 tests in 377.921 seconds against that committed candidate. The actual installed server and proposal store were not accessed. + ## Source And Preserved State The two existing changed files were recovered from the prior delivery ZIP and verified against their current published Git blob identities: @@ -44,7 +52,7 @@ The focused source runner executes the actual AST bodies of the selector and its No network calls, fabricated module implementations or fallbacks were added to production. The supplementary source runner is a package-local diagnostic, not a new permanent repository verification framework. -## Integration Regressions Added, Not Executed Here +## Integration Regressions Originally Supplied For Later Execution `test_policy_registration.py` gains a synthetic legacy-storage fixture. It creates two modules through the actual logical compiler, retains the second module's policy declaration in the first module's sidecar, refreshes fixture inputs using the owning projector, and recompiles that frozen fixture with the real Engine. No fixture creation touches real accepted source or the user's store. @@ -59,8 +67,8 @@ The pure selector suite additionally covers tombstones, mixed logical owners, ex ## Remaining Acceptance And Resume -S1 and S2 have focused source-level evidence; S3 requires the full canonical compiler and replay checks; S4 is established by the package reproduction record; S5 requires the actual installed workflow. The plan remains `Verifying` until the latter claims are established at their named boundaries. +S1 and S2 now have focused and complete-checkout evidence; S3's canonical compiler and replay checks passed; S4 is established by the package reproduction record. S5 still requires the actual installed workflow. The plan remains `Verifying` until that external claim is established at its named boundary. -Apply and verify the patch in the complete checkout, refresh generated verification inputs through the existing owner, and restart the MCP server process before reconnecting. A catalog reporting interface 33 identifies the wire contract, not the implementation revision; qualify the corrected behavior itself. +The patch was applied and verified in the complete checkout, and generated verification inputs were refreshed through their existing owner. Restart the installed MCP server process before reconnecting. A catalog reporting interface 33 identifies the wire contract, not the implementation revision; qualify the corrected behavior itself. Inspect and resume the exact preserved proposal through supported operations. Follow any current stale-base or review obligations. Retained material review remains useful evidence, while readiness and publication remain the existing Engine's responsibility. This package does not authorize or attempt real standards publication. From 3a86d078103be540deb57f8bad731666cfb656e7 Mon Sep 17 00:00:00 2001 From: MrScripty Date: Thu, 24 Sep 2026 19:51:41 -0700 Subject: [PATCH 23/26] feat(engine): register proposal consumers and preview applications --- .../positive-guidance-and-provenance.md | 10 + .../execution-ledger.md | 37 ++ .../proposal-consumers-and-preview/issues.md | 10 + .../proposal-consumers-and-preview/plan.md | 120 ++++++ .../reports/verification.md | 86 ++++ .../generated/suite-inputs.json | 42 +- tools/standards_engine/PURPOSE-SEPARATION.md | 33 +- tools/standards_engine/contracts/README.md | 28 +- .../contracts/a1-contract.schema.json | 385 ++++++++++++++++- .../contracts/a1-interface.toml | 8 +- .../contracts/examples/a1-examples.json | 18 +- .../contracts/generated/agent-tools.json | 387 +++++++++++++++++- .../standards_engine/_generated_contract.py | 308 +++++++++++++- .../standards_engine/consumer_authoring.py | 163 ++++++++ .../standards_engine/context_projection.py | 59 ++- .../standards_engine/engine.py | 46 ++- .../standards_engine/logical_authoring.py | 28 +- .../standards_engine/standards_engine/mcp.py | 11 +- .../standards_engine/supporting.py | 8 +- .../standards_engine/supporting_authoring.py | 18 +- .../standards_engine/tools.py | 8 + tools/standards_engine/tests/test_analysis.py | 1 + .../tests/test_consumer_publication.py | 151 +++++++ .../tests/test_proposal_consumers.py | 281 +++++++++++++ 24 files changed, 2178 insertions(+), 68 deletions(-) create mode 100644 docs/plans/proposal-consumers-and-preview/execution-ledger.md create mode 100644 docs/plans/proposal-consumers-and-preview/issues.md create mode 100644 docs/plans/proposal-consumers-and-preview/plan.md create mode 100644 docs/plans/proposal-consumers-and-preview/reports/verification.md create mode 100644 tools/standards_engine/standards_engine/consumer_authoring.py create mode 100644 tools/standards_engine/tests/test_consumer_publication.py create mode 100644 tools/standards_engine/tests/test_proposal_consumers.py diff --git a/docs/guides/positive-guidance-and-provenance.md b/docs/guides/positive-guidance-and-provenance.md index ccd2cdea..0fb1348e 100644 --- a/docs/guides/positive-guidance-and-provenance.md +++ b/docs/guides/positive-guidance-and-provenance.md @@ -160,6 +160,16 @@ The handoff also exercises explicit policy-unit registration within an existing A missing necessary content operation returns to the code workstream as a bounded implementation gap. It is not a reason to bypass the Engine and edit canonical files directly. +H0 also verifies proposal-local registration of tracked fixture and documentation +consumers for policy scopes created in that draft. Use canonical candidate IDs +for their relationships. Registered Markdown skill references are eligible for +controlled authoring without granting source-code edit access. Inspect candidate +application content with authoring `preview_application`, bound to an exact +revision; ordinary application `query_proposal` is intentionally unavailable. +This preview applies the same exposure and dependency checks but does not publish +or certify the content. Refresh the running MCP process and client catalog, then +check the installed interface and these operation schemas before continuing. + ### H1 — Inventory one coherent migration boundary Read the actual canonical owner, its rule scopes, metadata, dependencies, and current exposure state through the Engine. Traverse the relevant declared consumer and support relationships. Identify materially affected prompts, templates, references, routing facts/descriptions, and existing evidence owners. diff --git a/docs/plans/proposal-consumers-and-preview/execution-ledger.md b/docs/plans/proposal-consumers-and-preview/execution-ledger.md new file mode 100644 index 00000000..82aeb169 --- /dev/null +++ b/docs/plans/proposal-consumers-and-preview/execution-ledger.md @@ -0,0 +1,37 @@ +# Execution Ledger + +## September 24, 2026 — Scope and source qualification + +Read current Engine, metadata, graph, publication and applicable standards. Recovered the exact complete source via the existing CI artifact after direct Git transport failed. Confirmed the three reported files are tracked but uncaptured and that application-purpose proposal reads are intentionally absent. Selected proposal-local source binding plus a separate authoring-only application preview. No user proposal, real normative content or installed service was touched. + +## September 24, 2026 — Implementation and local qualification + +Implemented interface 34 through the existing source, proposal, review, graph and +publication owners. Consumer declarations retain original tracked-file bytes in +the existing content-addressed logical revision; candidate previews reuse the +application view while retaining unpublished revision identity. Documentation +consumers are supported without source-code editing authority. + +Local contract/compiler/MCP tests passed. A real cold-process MCP walkthrough +published only synthetic content in a disposable Git/SQLite repository and +matched application readback to the candidate preview. Original consumer bytes, +normal-purpose exclusion of drafts, failed revisions and working-tree drift +were exercised. The original baseline compiler's 440-file frozen capture also +reconstructed successfully with the new compiler. + +The broad package run and final repairs are recorded in +[verification](reports/verification.md). Two Engine cases initially encountered +a stale generated manifest while changes were in flight; one old mock lacked +the new captured-input field. Their final three-case rerun passed, and no other +Engine failure was observed in the 307-test run. This is not a claim of one +clean final full-suite execution. The complete checkpoint passed 73 suites and +121 checks. Final focused registration/preview/MCP tests passed 28 cases. + +All 70 canonical modules and 43 related policy/prompt/skill/manifest artifacts +remain unchanged. No actual consumer declaration, user-store record or pending +standards draft was edited. No independent external code review, supported +pinned-runtime qualification or installed-user-proposal success is claimed. + +The code slice is implemented. The overall plan remains Verifying for the +external installation/proposal handoff. Catalog hot reload and general workflow +response compaction retain separate dispositions. diff --git a/docs/plans/proposal-consumers-and-preview/issues.md b/docs/plans/proposal-consumers-and-preview/issues.md new file mode 100644 index 00000000..1e39db60 --- /dev/null +++ b/docs/plans/proposal-consumers-and-preview/issues.md @@ -0,0 +1,10 @@ +# Issues + +| ID | State | Owner | Evidence and disposition | +| --- | --- | --- | --- | +| CP-1 | implemented; locally verified | Engine authoring | Consumer registration needs candidate policy resolution and exact retained file bytes. | +| CP-2 | implemented; locally verified | Registered guidance | `.agents/...` documentation needs a tracked-file registration/read/edit path with source-code writes excluded. | +| CP-3 | implemented; locally verified | Application projection | Candidate preview is missing; provide an authoring read with application semantics and candidate identity. | +| CP-4 | separately scoped | Transport/client lifecycle | Loaded catalogs survive source updates. Document process replacement and exact interface discovery; no hot-reload protocol added here. | +| CP-5 | separately scoped | Workflow output | User reports truncation of repeated large workflow results. Add focused preview requests; general workflow pagination/compaction requires its own response contract. | +| CP-6 | environment limit | Qualification | Local Python/rpds differ from pinned supported target; report actual results and preserve target qualification as a distinct claim. | diff --git a/docs/plans/proposal-consumers-and-preview/plan.md b/docs/plans/proposal-consumers-and-preview/plan.md new file mode 100644 index 00000000..2dc957b4 --- /dev/null +++ b/docs/plans/proposal-consumers-and-preview/plan.md @@ -0,0 +1,120 @@ +# Proposal-Scoped Consumer Registration And Application Preview + +**Plan status:** `Verifying` +**Acceptance status:** local code evidence recorded; supported installation and user-proposal qualification pending +**Current phase:** Source implementation and local verification complete; installed qualification and handoff remain. +**Next slice:** Qualify interface 34 in the supported installed environment and resume the preserved proposal through the returned Engine workflow. +**Canonical plan:** `docs/plans/proposal-consumers-and-preview/plan.md`; operation: `verify`. +**Source baseline:** `9091bc72ac146b47d613b1836fbd8a89bd46f9ba`. +**Composed-design review:** `applicable`; admission below. +**Execution ledger:** [execution-ledger.md](execution-ledger.md). +**Issues:** [issues.md](issues.md). +**Reports:** [verification](reports/verification.md). + +## Objective And Scope + +Allow one immutable proposal to register existing repository consumers, connect them to policy units created in that proposal, revise registered Markdown guidance, and preview its proposed application view before publication. Keep the existing graph, proposal, review, application, recovery and snapshot owners. + +The reported draft `503f233b-5c9f-442f-a04f-99f330142bae`, reviewed candidate prefix `ece4619f`, is outside this environment. This work preserves it by changing neither the user's store nor accepted standards. Real consumer names are evidence and integration cases, not special branches in production code. + +## Authority And Selected Standards + +Apply Core, Router, Implementation, Verification, Planning, Development Proportionality, Library, Generated Contract, IPC, Persistence, Contracts, Security, Code Design, and immutable-replay guidance to their affected concerns. Apply the agreed positive-guidance guide prospectively: generic requirements, explicit ownership, correct operational direction, substantive evidence, bounded repair and separate editorial work. + +The user permits replacing inferior older contracts. Select one interface edition and regenerate its actual consumers. Preserve existing draft records and historical evidence; permission to improve an API is distinct from authority to erase stores. No broad standards rewrite is part of this slice. + +## Verified Gap And Deciding Facts + +The current `maintain_evidence` operation works on an exact repository revision and its working tree, not a proposal. Its consumer registration relies on an already-declared policy relationship owner. The three reported files are tracked at the original revision but are not in the ordinary captured authority closure. Registering metadata alone would cause a later missing-input failure. + +`query_proposal` belongs to the authoring interface. Ordinary application sessions correctly lack it. A safe candidate preview must therefore be an explicit authoring operation using the application renderer, with proposal identity rather than a fabricated published snapshot. + +## Binding Design + +### Consumer admission and immutable source + +Add `register-consumer` to the logical edit algebra, with an explicit canonical consumer ID, repository-relative path, admitted artifact kind, and authority (`evidence` or `projection`). Support fixture, documentation, implementation-artifact, prompt and template consumers. A registration selects an existing regular file from the proposal's original repository revision. Canonical source and consumer ownership remain distinct; duplicate IDs, aliases, paths and canonical-module reclassification reject. + +Before recording a new revision, Engine preparation reads the selected file through the existing verified Git reader against the base snapshot's exact source revision. It retains those exact bytes in the new logical edit's private source binding. Public request schemas accept the selection, not caller-supplied captured bytes. Existing proposal identity/storage then owns the complete input closure; cold replay needs no current checkout read or new side database. + +The pure compiler validates the binding, imports original consumer material, then stages registrations before consumer relationships. Full and incremental construction use the same complete-program source identity. A registration may target a policy created in the same change set. Registration establishes existence, not coverage completeness or approval. + +Allow explicit canonical IDs to select registered consumers in the candidate, including newly registered IDs; returned snapshot-bound targets remain a useful exact selection form. A bare unregistered path does not gain write authority. + +Publication compares the candidate to original captured material augmented only by the Engine-bound consumer inputs. Registration alone leaves fixture/source bytes unchanged. An explicitly requested Markdown documentation edit uses the existing registered-guidance operation. Documentation, prompts and templates require `.md` paths; fixtures and implementation artifacts remain read-only through this content editor. Hidden repository paths such as `.agents/...` are eligible under the same tracked-file and canonical-path rules. + +### Application preview + +Add authoring-only `preview_application(revision, request)` for read, route and related requests. It reconstructs the exact proposal and uses the same eligibility, dependency closure, permitted graph and output-content construction as published application reading. + +Preview results carry the exact proposal revision and an explicit candidate result kind. They return no published snapshot handles and their continuations remain preview operations. The ordinary application catalog stays unchanged. Unreviewed/stale required material returns the normal bounded application-unavailable observation; preview supplies neither approvals nor readiness and publishes nothing. + +Keep compact read as the default and select one target/request per preview. Existing workflow-response truncation and automatic client catalog reload are separate findings; this slice documents exact process refresh and avoids claiming those mechanisms are implemented. + +### Current contract and storage + +Advance interface 33 to 34 for the new edit/preview API and regenerate models/tool schemas from the owning schema. New bound consumer data is a new logical-edit representation inside the existing content-addressed revision aggregate. Existing snapshot/store formats and unrelated handle versions retain their meaning. Old clients need the current catalog; no compatibility adapter, implicit downgrade or store reset is introduced. + +## Exact Write Set + +- `tools/standards_engine/standards_engine/consumer_authoring.py` (new): selected consumer representation, private captured binding and catalog projection. +- `logical_authoring.py`: edit admission, deterministic ordering, import closure, canonical consumer selection and projection baseline material. +- `engine.py`: source preparation, preview entrypoint, and publication baseline comparison. +- `context_projection.py`: shared application view with honest snapshot/candidate output identity. +- `supporting.py`, `supporting_authoring.py`: registered Markdown documentation read/revise/review ownership. +- `tools.py`, `mcp.py`: generated-call dispatch, focused authoring catalog and descriptions. +- Engine public schema, interface, generated contract/tool definitions, and affected examples/tests. +- Engine tests: registration, replay, source binding, previews, exposure denial and actual-process publication. +- Engine implementation/authoring technical documentation, H0 operation map, this plan directory. +- `evaluation/standards-effectiveness/generated/suite-inputs.json`, through its existing generator only. + +An additional changed file requires a concrete consumer obligation, not an unrelated cleanup. The real policy units, consumer registrations, normative prose and application manifests stay unchanged. + +## Composed-Design Admission + +1. **Independent concerns:** Git owns verified file reads; Engine preparation binds selected inputs; logical authoring owns immutable edits; metadata/graph own compiled meaning; application view owns disclosure; existing publication owns atomic state changes. +2. **Identity and state:** original snapshot and revision identify the imported file authority; exact retained bytes complete replay; a registration ID is neither coverage nor approval; preview is not publication. +3. **Caller knowledge:** callers name consumer identity/type/path and relationships. They do not choose sidecars, serialize source bytes, calculate digests, mutate stores or construct application snapshots. +4. **Representative change paths:** one fixture registration adds metadata plus a captured input; one documentation update changes its owned Markdown; a preview uses the existing renderer and a different authority envelope. Independent policy semantics stay with current owners. +5. **Interfaces:** the public schema exposes authored intent; only trusted preparation adds captured material. Canonical IDs are resolved against final candidate declarations. Purpose remains host-selected. +6. **Evolution/failure:** invalid registration leaves the prior draft intact; replay uses retained inputs after process replacement; preview failure cannot publish or weaken a required dependency. +7. **Deletion results:** removing captured bytes would make replay depend on live files; duplicating the application renderer would permit drift. Reuse the existing store and renderer. A new graph, publication workflow, metadata service, ambient source fallback and policy-specific exceptions add no deciding value and are omitted. +8. **Cumulative cost:** bound only explicitly selected files; add one edit and one focused read operation; preserve normal route/read behavior. Carry exact source bytes once per registration in the existing aggregate rather than capturing every repository file. + +## Milestones + +### M0 — Confirm the defect and recover complete source + +**Status:** `Accepted` for source qualification, not implementation acceptance. The exact CI source artifact was downloaded and its SHA-256 matched `3bec00071ddef6113c4b91d6185662afb6f57fc2bd9bfdc38c33c351178a458e`. The Git bundle resolves to the stated baseline. No user checkout/store was used. + +### M1 — Coherent implementation and focused evidence + +**Status:** `Accepted` for the local code evidence in the verification report. Use the write set above. Add failing cases for registration of uncaptured tracked consumers and preview unavailability. Implement input binding, same-candidate compilation, documentation support, application preview and schema projection together. Gate on full real-compiler and contract tests, including rejection without mutation and full/incremental equality. + +### M2 — Public workflow qualification and handoff + +**Status:** `Verifying`; local public workflow, package and checkpoint observations passed as recorded, while supported-environment and user-store observations remain external. Verify the exact new catalog and public workflow in disposable Git/SQLite stores: register policy and three consumers, add relationships/provenance, read authoring documentation, preview qualified candidate, review/apply, then compare published application content. Exercise cold replay without rereading source files. Run affected package suites, structural checkpoint and generated freshness; record interpreter/dependency scope precisely. + +Package complete changed files, patch, checksums and installation guidance. The user's actual reviewed draft remains a separate installed acceptance observation. No success claim about it is inferred from test fixtures. + +## Acceptance + +| Claim | Kind | Environment | Mode | Status | +| --- | --- | --- | --- | --- | +| C1: Same-proposal consumer registration resolves newly registered policy scopes and preserves original files. | integration | complete repository | automated | passed locally | +| C2: Captured input, identity, scope and publication topology remain coherent through cold and incremental replay. | integration | real Git/SQLite | automated | passed locally | +| C3: Registered Markdown documentation under normal or hidden directories is editable without exposing source-code writes. | integration | deterministic actual metadata/compiler | automated | passed locally | +| C4: Candidate previews use application checks and exact revision identity; ordinary application clients remain excluded from drafts. | contract/system | actual local MCP process | automated | passed locally | +| C5: A coordinated disposable proposal passes analysis/review/verification/application and readback. | user-workflow | complete local Git/SQLite/transport | automated | passed locally | +| C6: Generated contracts, affected tests, structural checks and package reproduction pass with environment limits recorded. | contract/release-artifact | recorded local environment | automated | passed locally | +| C7: The installed current Engine resumes the user's preserved proposal and clears the reported gap. | user-workflow | user's installation and store | manual | pending: external | + +## Repair, Blockers And Replan Triggers + +Repair test failures inside the admitted owners without restarting planning. Replan only if a required change alters input authority, retained-state meaning, application disclosure, code-write scope or atomic publication. A test that does not reach the changed behavior supplies no evidence for that behavior. + +The local interpreter is Python 3.13.5 with rpds-py 2026.5.1, outside the repository's pinned Python 3.11/3.12 and rpds-py 2026.6.3 qualification. Keep execution evidence useful but distinguish it from pinned deployment acceptance. The actual user store and independent model reviewer are unavailable here. + +## Handoff + +Refresh the complete installed server process and reconnect the client; verify interface 34, the `register-consumer` edit and authoring `preview_application` tool. Continue the existing proposal through supported status/resume/revise operations. Refresh only affected review/coverage obligations and current readiness; historical review evidence remains preserved. Publication still requires explicit owner authorization. diff --git a/docs/plans/proposal-consumers-and-preview/reports/verification.md b/docs/plans/proposal-consumers-and-preview/reports/verification.md new file mode 100644 index 00000000..f31e27b0 --- /dev/null +++ b/docs/plans/proposal-consumers-and-preview/reports/verification.md @@ -0,0 +1,86 @@ +# Verification: Proposal Consumer Registration And Candidate Application Preview + +**Status:** Source implementation complete; local verification recorded below. Supported-deployment and user-proposal qualification remain external. + +**Source baseline:** `9091bc72ac146b47d613b1836fbd8a89bd46f9ba` on `implementation/purpose-separated-standards-engine`. + +**Current contract:** Engine interface **34**. Analysis request/result, Snapshot, proposal, readiness and SQLite contract versions retain their existing meaning. No store reset, conversion or compatibility adapter was added. + +## Scope and source recovery + +The source was recovered as the exact complete Git bundle from the repository's existing Actions artifact `engine-source-9091bc72ac146b47d613b1836fbd8a89bd46f9ba` (run 36082647857, artifact 10843096021). The artifact SHA-256 matched `3bec00071ddef6113c4b91d6185662afb6f57fc2bd9bfdc38c33c351178a458e`. All source and functional tests used the complete repository, rather than the partial source recovery available for earlier fixes. + +The implementation used a separate local branch and disposable Git/SQLite repositories. The user's installed MCP, original store, pending proposal and reviewed content were not accessed. No remote push or publication to the user's repository occurred; synthetic publication stayed isolated. + +## Implemented outcome + +`register-consumer` is a typed logical edit in the existing `StandardsChangeSet`. It admits an explicit canonical identity, original tracked repository path, supported artifact kind and evidence/projection authority. The Engine reads the selected file at the proposal's exact original revision and privately retains its bytes in the content-addressed logical revision. Public requests supply intent, not captured bytes. The compiler can therefore resolve new consumers and draft-only policy units in one candidate, including policies introduced in an earlier draft. Cold replay uses retained original material, not a current working-tree file. + +Registration updates the existing node-catalog owner. Relationships remain explicit, and coverage and review remain independent obligations. Publication compares against the original retained consumer material: registering a fixture does not rewrite its source. Existing aliases, identities, scope validation and atomic publication mechanisms remain in place. + +Registered Markdown documentation, including `.agents/...` skill references, now participates in the existing operational-guidance read/revise/review path. Fixture and implementation consumers do not acquire arbitrary source-code write authority. Documentation remains outside application delivery until explicitly qualified. + +`preview_application` is an authoring-only read operation for an exact proposal revision. Its read, route and related variants use the same `ApplicationView` as published application reading. Candidate envelopes and continuations retain proposal identity and contain no fabricated published snapshot handles. Exposure and prerequisite checks remain effective; a preview supplies no approval, readiness, certification or publication. + +MCP discovery reports interface 34 and the configured purpose. The normal application catalog remains published-only. This is explicit process-version visibility, not hot reload. General workflow-response pagination/compaction is not part of this patch. + +## Deciding evidence + +The new regression suite exercises actual metadata, graph and logical-compiler implementations. It covers draft-only scopes, same-candidate registration, registration after a previous draft introduced the policy, two actual tracked fixture paths, a hidden-directory Markdown document, duplicate identities and paths, captured-source binding, failure without mutation, full/incremental equality, unreviewed documentation, and absence of automatic coverage certification. + +Application-view tests compare candidate and published semantic fields, routing questions, required reading paths and relationship results. They assert candidate-only continuations, no snapshot-child handles, exclusion of provenance/fixture data, and rejection of unreviewed or stale required material. + +The real-process publication test uses JSON-RPC over actual MCP stdio subprocesses, Git and SQLite. Every call starts a fresh server process. The procedure initializes the catalog, creates a coordinated proposal, registers consumers and policy links, reads revised authoring documentation, previews the candidate, rejects the same operation through the application interface, records explicit synthetic review decisions, runs preflight, applies atomically in a disposable repository, and reads the published result back. It also exercises failed duplicate registration and working-tree drift both before source capture and after capture. Fixture bytes remain unchanged; only explicitly revised documentation changes. The old preview remains bound to its original revision after publication. + +The protocol client is a small standard-library test using the repository's declared wire shape. It invokes the actual server rather than mocking the transport. It does not claim official-SDK, Codex-installed-client or user-store qualification. + +## Test results + +| Evidence | Observed result | +| --- | --- | +| Pre-change baseline registration/purpose checks | 22 passed | +| New pre-change regression observations | Unsupported consumer registration and missing candidate-preview capability reproduced | +| New registration/preview and MCP transport tests, final targeted run | 28 passed | +| Final cold-process MCP publication walkthrough | 1 passed; 168.030 seconds | +| Metadata package | 43 passed | +| Policy-impact package | 10 passed | +| Contract package | 52 run; successful with one existing interpreter-dependent skip | +| Analysis package | 114 passed | +| Verifier package after regenerating affected inputs | 168 passed | +| Broad Engine package and final affected reruns | See final execution reconciliation below | +| Complete structural checkpoint | 73 suites and 121 checks passed | +| Canonical contract projection freshness | Passed | +| Python syntax and exact diff whitespace | Passed | +| Actual baseline capture reconstructed by the new compiler | Passed; 440 original captured files | +| Unchanged real content inventory | 113 files unchanged, including all 70 canonical modules | +| Patch round trip, file checksums and archive CRC | Recorded in package verification metadata | + +### Execution reconciliation + +A broad package run overlapped late test/documentation and verification-input changes. Its initial verifier checkpoint and two Engine publication cases observed a stale generated verification-input manifest. Regenerating through the owning Engine operation restored the verifier package and the two real publication checks. The run also found one mock projection in `test_analysis.py` missing the new `captured_consumer_files` field; the fixture was updated to represent the actual typed projection. Production code did not receive a mock-specific fallback. + +The complete run, its failures and the final affected reruns are retained separately. A repaired case is not relabeled as having passed in the earlier run. Final execution counts and any remaining failures are recorded below before delivery. + +The broad Engine run completed **307 tests in 1060.417 seconds**, with two stale-input failures and the one mock error described above. No other failure was reported. The final exact rerun of all three affected cases passed **3 tests in 138.536 seconds**. Four additional candidate-view/registration cases added during review are included in the final 28-test focused run. These observations are not described as a single clean final full-suite run. + +A frozen capture created with the actual baseline interface-33 compiler contains **440 files**. The interface-34 compiler successfully reconstructed that original capture without adding source inputs or mutating a store. This checks baseline capture readability, not the contents or readiness of the user's private proposal. + +## Environment and limits + +Local runtime was Python **3.13.5**, outside the repository's declared Python 3.11/3.12 qualification. Installed jsonschema 4.26.0, referencing 0.37.0, attrs 26.1.0, jsonschema-specifications 2025.9.1 and typing-extensions 4.16.0 match the named lock versions. Local rpds-py is **2026.5.1** rather than locked **2026.6.3**. Test outcomes establish their local observed behavior; they do not substitute for the supported pinned-environment check. + +The baseline read path, metadata, graph, schema, actual compiler, full/incremental replay, real MCP, SQLite and Git publication mechanisms were exercised. The report does not claim an independent external model review, a CI run of this patch, or a successful resume/publication of the user's actual preserved proposal. + +A design self-review removed a proposed additional consumer-file freshness check after confirming that the existing readiness and compare-and-swap contract already binds publication to the exact original accepted revision. The patch reuses that authority rather than adding a redundant guard. + +## Preservation and outstanding findings + +The original normative and reference bodies, policy declarations, prompt/template bodies, skill reference bodies, node catalog, application-exposure manifest and reasoning-provenance manifest remain unchanged. The only content-guide change is the authoring H0 operation map needed to use the new capabilities. The real fixture and documentation registrations belong to the resumed standards proposal, not to this code patch. + +The user's preserved proposal `503f233b-5c9f-442f-a04f-99f330142bae` remains external. Earlier review evidence remains historical evidence; new registrations may produce additional review/coverage obligations. Use current supported status/resume and revision handles. A change to accepted authority may require normal stale-state reconciliation; do not patch the store or transfer old readiness blindly. + +Known separately scoped issues are automatic catalog replacement and large repeated workflow responses. Replace the actual server process and reconnect the client for interface 34. Use focused candidate read/route/related previews for view validation; this patch does not claim to solve arbitrary workflow output truncation. + +## Handoff + +See `APPLY.md` in the delivery package for base checks, integration, generators, exact focused tests, supported-environment qualification, MCP restart and example logical registrations. The code is ready for that qualification. The plan remains `Verifying` while external deployment/user-proposal claims are pending. diff --git a/evaluation/standards-effectiveness/generated/suite-inputs.json b/evaluation/standards-effectiveness/generated/suite-inputs.json index ea6162ce..15d3d422 100644 --- a/evaluation/standards-effectiveness/generated/suite-inputs.json +++ b/evaluation/standards-effectiveness/generated/suite-inputs.json @@ -6893,7 +6893,7 @@ ] }, { - "digest": "sha256:f8947f7d442ef05808da9cfad54a4dfb2324e9aca95c4a3475e593f5569d9d60", + "digest": "sha256:c4e8b174d6a79acecd6b6cf2d3de2fae58debc65484b6344ebb27c8b0f543f2d", "path": "tools/standards_engine/contracts/README.md", "state": "present", "uses": [ @@ -6905,7 +6905,7 @@ ] }, { - "digest": "sha256:6856c158929e7065e75f5ed340cce525eafe1270ecde291b4bf9e7dbaa5f9c63", + "digest": "sha256:809673a2c45bdef3aac60a8e081e58097d40b23269bd6de2cdc0cc49e28cba10", "path": "tools/standards_engine/contracts/a1-contract.schema.json", "state": "present", "uses": [ @@ -6922,7 +6922,7 @@ ] }, { - "digest": "sha256:1430092f0624180829df0545890ebe9319ca0fe5edcc11ccb1c0b2c20d88242d", + "digest": "sha256:81f4aee998927ffaa5e2459e31151f1b24aa44f8d2aefcaaa4e31ad1df427325", "path": "tools/standards_engine/contracts/a1-interface.toml", "state": "present", "uses": [ @@ -6939,7 +6939,7 @@ ] }, { - "digest": "sha256:1e942ce60dacb00694b2991f959741bdc3ea1477ed8e4b8da6e3e4c96633d8f5", + "digest": "sha256:bb416515ace1980388cef5190b4c30426a34343c1429501f0475aef69c8fb759", "path": "tools/standards_engine/contracts/examples/a1-examples.json", "state": "present", "uses": [ @@ -6956,7 +6956,7 @@ ] }, { - "digest": "sha256:dfdb04014603f07e827e788f06ee21600b86d3367c70f0a4ccbfd0b985797d9e", + "digest": "sha256:a682ae63d52d18d8241cdc0eebe9caf15a5ce1bd545e185fc042041482453d2f", "path": "tools/standards_engine/contracts/generated/agent-tools.json", "state": "present", "uses": [ @@ -7019,7 +7019,7 @@ ] }, { - "digest": "sha256:79745695054664b96f17eae432509e6250ea0c4e7f1d2905cf7b3431a0290823", + "digest": "sha256:86b36bfa48703150efcd654cef980a1e0ec807c3252981237463474b7cd940fc", "path": "tools/standards_engine/standards_engine/_generated_contract.py", "state": "present", "uses": [ @@ -7089,7 +7089,19 @@ ] }, { - "digest": "sha256:f8da1bd1da13767122b76ee201fa37c62704739719a8c01cb4356c23cc997fb6", + "digest": "sha256:865b499b737f476a2717b0086ca4a70ae844f01d52e8964d5dae1d5e71792394", + "path": "tools/standards_engine/standards_engine/consumer_authoring.py", + "state": "present", + "uses": [ + { + "check": "python-package-contract", + "role": "package-contract-input", + "suite": "a1c-public-cutover" + } + ] + }, + { + "digest": "sha256:21469ffc343cb8a26724925f37f1e352d38f4daff4dbd8705ef2ce50202fe5c7", "path": "tools/standards_engine/standards_engine/context_projection.py", "state": "present", "uses": [ @@ -7101,7 +7113,7 @@ ] }, { - "digest": "sha256:374525c89c87953541d735211925469beb2f3204075681f67a0b3a083931e005", + "digest": "sha256:109f1155deb9965da288feb69c18e092a0c7aea7503cb7918420208b56221b29", "path": "tools/standards_engine/standards_engine/engine.py", "state": "present", "uses": [ @@ -7135,7 +7147,7 @@ ] }, { - "digest": "sha256:20595c637c8cb5e537322a467839232b4088c4b970ddd11ae32af6ee6c69b2c3", + "digest": "sha256:f2b19ad2f88f72c056a86bbe76d4b6825876440c4242e780521f1de392202579", "path": "tools/standards_engine/standards_engine/logical_authoring.py", "state": "present", "uses": [ @@ -7147,7 +7159,7 @@ ] }, { - "digest": "sha256:3f87dbdd3157f6b98baeb6bf78c4cfdf8cfefb65be2a13e5c55e0bb58e295bb6", + "digest": "sha256:1fb0ba69c2fb8b21b4cb7b234100743d97b2ea9a7a4880f77dfedf6216fe2f60", "path": "tools/standards_engine/standards_engine/mcp.py", "state": "present", "uses": [ @@ -7212,7 +7224,7 @@ ] }, { - "digest": "sha256:79c8f4d259cb3d0eb2cc214862ece7a28cd2788a0fb8cb63039c3f4a1a5f71d6", + "digest": "sha256:9085fa001cf98c460c893f943be3a06e4b04c6ed5d1497ea56d8a2a452d5509d", "path": "tools/standards_engine/standards_engine/supporting.py", "state": "present", "uses": [ @@ -7224,7 +7236,7 @@ ] }, { - "digest": "sha256:0ce567e1aa21330df77e2428babe069723aff840a771724f33bfcc7802f28c44", + "digest": "sha256:2f11bf3e9c85c9a5ed073c884debf3010a36a0b4d6b60c5b38a52b9cb846afd7", "path": "tools/standards_engine/standards_engine/supporting_authoring.py", "state": "present", "uses": [ @@ -7236,7 +7248,7 @@ ] }, { - "digest": "sha256:c25f973967eb949de4a3168635ef36bac111d75a3f1f38000ba198d3926bde93", + "digest": "sha256:e6bb42f710ba926127205be3888609d89a7865d51297f1ba38ef5e52be45ebe4", "path": "tools/standards_engine/standards_engine/tools.py", "state": "present", "uses": [ @@ -7253,7 +7265,7 @@ ] }, { - "digest": "sha256:677ba6c5b7bda515e43e5be469be1e4f5642ecdb3d1c818605da3acc6eea7146", + "digest": "sha256:577633b5b7bb05765e0c71ac9a548e74ab60c2d243289ff1740902344c6b2db3", "path": "tools/standards_engine/tests/test_analysis.py", "state": "present", "uses": [ @@ -13326,7 +13338,7 @@ "path": "evaluation/standards-effectiveness/suite-registry.toml" }, "repository_index": { - "digest": "sha256:75c69a59bbe132a7b5ccfaf8a7b7309c6d3895bb87d48511217f9b4fff5a127a", + "digest": "sha256:dfdae593a993829e46f621e2ad87d8f58ea8b22a7392a6d9f361ef791ad0e180", "uses": [ { "check": "python-package-contract", diff --git a/tools/standards_engine/PURPOSE-SEPARATION.md b/tools/standards_engine/PURPOSE-SEPARATION.md index a24f836e..6590780e 100644 --- a/tools/standards_engine/PURPOSE-SEPARATION.md +++ b/tools/standards_engine/PURPOSE-SEPARATION.md @@ -325,7 +325,7 @@ those same bytes. The Engine does not rewrite semantic versions after review. ## Versions and coordinated cutover -Current Engine package/transport implementation: 0.2.0. Engine interface: 33. +Current Engine package/transport implementation: 0.2.0. Engine interface: 34. Analysis request: 6; result/state and Analysis handles: 7. The semantic-revision interpretation change belongs to Analysis 7. Unchanged Snapshot, proposal, readiness, application and generic identity/storage contracts keep their @@ -363,3 +363,34 @@ purposes and interrupted-publication recovery using a separately supplied client environment. The configured Codex adapter test names the authoring registration with `--server`. Pinned-platform/client acceptance and independent review are reported separately from supporting tests in another Python environment. + +## Proposal consumer inputs and application preview (interface 34) + +Use `register-consumer` inside `propose` or `revise` to declare an existing +tracked consumer. The Engine captures its original proposal-base bytes before +admission, retaining them in the immutable logical edit. Replay uses those bytes, +not the working tree or a later accepted revision. Registration, newly created +policy scopes and their consumer relationships can share one candidate. An +explicit relationship uses the registered canonical consumer ID. Registration +neither claims complete coverage nor creates a review certificate. + +The content editor supports registered Markdown documentation as well as prompts +and templates. Hidden directories have the same repository containment and +tracked-file requirements. Fixture and implementation consumers remain read-only +through this editor. Original file bytes supply publication's baseline; an +unchanged registered source is not rewritten. Fixture bytes, unrelated policy +identities and prior proposal records remain intact. + +An authoring caller uses `preview_application` with the exact draft revision and +one application read, route or related request. Candidate results carry that +revision, without published-snapshot or snapshot-child handles. Their +continuations remain candidate previews. The same application view enforces +qualification, prerequisite closure and graph filtering. A missing qualification +is a candidate-application rejection, not partial acceptance. Normal application +sessions retain their published-only operation set. + +`maintain_evidence` remains accepted-repository maintenance, not draft mutation. +Use logical registration for draft-only scopes. After installing this change, +restart the actual MCP server and reconnect the client; initialization reports +interface 34 and the configured purpose. Existing workflow-response verbosity +and hot catalog replacement are not changed by this capability. diff --git a/tools/standards_engine/contracts/README.md b/tools/standards_engine/contracts/README.md index 185a9e2e..714ea8c3 100644 --- a/tools/standards_engine/contracts/README.md +++ b/tools/standards_engine/contracts/README.md @@ -1,6 +1,6 @@ # Standards Engine Contracts -## Current contract: interface 31 +## Current contract: interface 34 Required host purpose selects application or authoring operation variants. The canonical interface declares each variant's exact input/result roots, and the @@ -15,6 +15,32 @@ semantic change against the actual compiled candidate. Older Analysis records are not reinterpreted. Unchanged Snapshot/storage primitives retain their own versions. See [the implementation contract](../PURPOSE-SEPARATION.md). +Interface 34 adds proposal-local `register-consumer` and authoring-only +`preview_application`. A registration names a canonical consumer ID, an existing +tracked repository path, artifact kind and evidence/projection authority. The +Engine binds exact original-revision bytes privately before admitting the edit; +callers supply no captured bytes. Relationships may select candidate consumer +IDs, including registrations in the same change set. Registry declarations, +relationships and coverage reviews retain separate meanings. + +Registered Markdown documentation, including hidden-directory skill references, +can use `revise-operational-artifact` alongside prompts and templates. That edit +accepts a canonical registered ID or returned exact target. Fixture and source +consumers do not acquire an editing capability. + +`preview_application` accepts an exact proposal revision and one application +read/route/related request. It applies normal exposure and prerequisite checks, +returns explicitly candidate-bound results, and provides preview-only +continuations. It is absent from ordinary application catalogs. Preflight still +checks structure rather than returning an application view. Preview does not +certify coverage, accept review, issue exposure approval or publish the draft. + +Consumer capture uses the existing immutable revision aggregate; snapshot/store +and unrelated handle versions are unchanged. Restart the installed MCP process +and reconnect its client after updating the Engine. Initialization reports the +installed interface and purpose. Read the new tool and edit schemas rather than +inferring a live update from files on disk. + The version notes below document earlier design increments, not supported compatibility paths or the current purpose-less launch contract. diff --git a/tools/standards_engine/contracts/a1-contract.schema.json b/tools/standards_engine/contracts/a1-contract.schema.json index 6272acc4..a3e794f9 100644 --- a/tools/standards_engine/contracts/a1-contract.schema.json +++ b/tools/standards_engine/contracts/a1-contract.schema.json @@ -1,6 +1,6 @@ { "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://coding-standards.local/contracts/standards-engine/a2-v32", + "$id": "https://coding-standards.local/contracts/standards-engine/a2-v34", "title": "Standards Engine A2 contract", "description": "Canonical typed contract for snapshot lifecycle, controlled authoring, navigation, inspection, and immutable standards-change analysis.", "oneOf": [ @@ -115,6 +115,12 @@ { "$ref": "#/$defs/PrepareCall" }, + { + "$ref": "#/$defs/PreviewApplicationCall" + }, + { + "$ref": "#/$defs/PreviewApplicationResult" + }, { "$ref": "#/$defs/ProposeCall" }, @@ -2770,6 +2776,9 @@ }, { "$ref": "#/$defs/ReviseOperationalArtifactEdit" + }, + { + "$ref": "#/$defs/RegisterConsumerEdit" } ] }, @@ -6672,7 +6681,8 @@ "profile", "reference", "prompt", - "template" + "template", + "documentation" ] }, "level": { @@ -7255,7 +7265,8 @@ "role": { "enum": [ "prompt", - "template" + "template", + "documentation" ] }, "content": { @@ -7364,7 +7375,14 @@ "const": "revise-operational-artifact" }, "target": { - "$ref": "#/$defs/AuthoringTargetHandle" + "oneOf": [ + { + "$ref": "#/$defs/CanonicalId" + }, + { + "$ref": "#/$defs/AuthoringTargetHandle" + } + ] }, "title": { "$ref": "#/$defs/NonEmptyString" @@ -7431,7 +7449,7 @@ "snapshot", "items" ], - "description": "Read 1–32 selected items from one explicit snapshot, preserving order. The complete JSON result is limited to 2 MiB; any failed item rejects the entire request.", + "description": "Read 1\u201332 selected items from one explicit snapshot, preserving order. The complete JSON result is limited to 2 MiB; any failed item rejects the entire request.", "properties": { "snapshot": { "$ref": "#/$defs/SnapshotHandle" @@ -7513,7 +7531,7 @@ "snapshot", "items" ], - "description": "Read 1–32 selected items from one explicit snapshot, preserving order. The complete JSON result is limited to 2 MiB; any failed item rejects the entire request.", + "description": "Read 1\u201332 selected items from one explicit snapshot, preserving order. The complete JSON result is limited to 2 MiB; any failed item rejects the entire request.", "properties": { "snapshot": { "$ref": "#/$defs/SnapshotHandle" @@ -7561,6 +7579,361 @@ "const": "application" } } + }, + "RegisterConsumerEdit": { + "type": "object", + "additionalProperties": false, + "required": [ + "kind", + "consumer", + "path", + "artifact_kind", + "authority" + ], + "properties": { + "kind": { + "const": "register-consumer" + }, + "consumer": { + "$ref": "#/$defs/CanonicalId" + }, + "path": { + "$ref": "#/$defs/NonEmptyString" + }, + "artifact_kind": { + "enum": [ + "fixture", + "documentation", + "implementation-artifact", + "prompt", + "template" + ] + }, + "authority": { + "enum": [ + "evidence", + "projection" + ] + } + }, + "description": "Register an existing tracked consumer within this proposal. The Engine captures original-revision bytes; use separate policy relationships to declare consumers and review obligations." + }, + "PreviewApplicationCall": { + "type": "object", + "additionalProperties": false, + "required": [ + "revision", + "request" + ], + "properties": { + "revision": { + "$ref": "#/$defs/ProposalRevisionHandle" + }, + "request": { + "$ref": "#/$defs/ApplicationQueryRequest" + } + }, + "description": "Authoring-only inspection of an exact draft through application qualification and filtering; this observation neither publishes nor grants ordinary application access." + }, + "CandidateApplicationNextOperation": { + "type": "object", + "additionalProperties": false, + "required": [ + "operation", + "revision", + "request" + ], + "properties": { + "operation": { + "const": "preview_application" + }, + "revision": { + "$ref": "#/$defs/ProposalRevisionHandle" + }, + "request": { + "$ref": "#/$defs/ApplicationQueryRequest" + } + } + }, + "CandidateApplicationPolicy": { + "type": "object", + "additionalProperties": false, + "required": [ + "id", + "role", + "level" + ], + "properties": { + "id": { + "$ref": "#/$defs/CanonicalId" + }, + "role": { + "enum": [ + "core", + "router", + "topic", + "workflow", + "profile", + "reference", + "prompt", + "template", + "documentation" + ] + }, + "level": { + "enum": [ + "MUST", + "SHOULD", + "PROFILE", + "REFERENCE" + ] + } + } + }, + "CandidateApplicationRelationship": { + "type": "object", + "additionalProperties": false, + "required": [ + "source", + "target", + "relation", + "groups", + "direction" + ], + "properties": { + "source": { + "$ref": "#/$defs/CanonicalId" + }, + "target": { + "$ref": "#/$defs/CanonicalId" + }, + "relation": { + "type": "string" + }, + "groups": { + "type": "array", + "items": { + "$ref": "#/$defs/CanonicalId" + } + }, + "direction": { + "enum": [ + "incoming", + "outgoing" + ] + } + } + }, + "CandidateApplicationReadResult": { + "type": "object", + "additionalProperties": false, + "required": [ + "kind", + "purpose", + "policy", + "content", + "scope", + "requires", + "specializes", + "next_operations", + "revision" + ], + "properties": { + "kind": { + "const": "candidate-application-read-result" + }, + "purpose": { + "const": "application" + }, + "policy": { + "$ref": "#/$defs/CandidateApplicationPolicy" + }, + "content": { + "type": "string" + }, + "scope": { + "$ref": "#/$defs/ReviewScope" + }, + "requires": { + "type": "array", + "items": { + "$ref": "#/$defs/CanonicalId" + } + }, + "specializes": { + "type": "array", + "items": { + "$ref": "#/$defs/CanonicalId" + } + }, + "related": { + "type": "array", + "items": { + "$ref": "#/$defs/CandidateApplicationRelationship" + } + }, + "next_operations": { + "type": "array", + "items": { + "$ref": "#/$defs/CandidateApplicationNextOperation" + } + }, + "revision": { + "$ref": "#/$defs/ProposalRevisionHandle" + } + } + }, + "CandidateApplicationRelatedResult": { + "type": "object", + "additionalProperties": false, + "required": [ + "kind", + "purpose", + "target", + "relationships", + "next_operations", + "revision" + ], + "properties": { + "kind": { + "const": "candidate-application-related-result" + }, + "purpose": { + "const": "application" + }, + "target": { + "$ref": "#/$defs/CanonicalId" + }, + "relationships": { + "type": "array", + "items": { + "$ref": "#/$defs/CandidateApplicationRelationship" + } + }, + "next_operations": { + "type": "array", + "items": { + "$ref": "#/$defs/CandidateApplicationNextOperation" + } + }, + "revision": { + "$ref": "#/$defs/ProposalRevisionHandle" + } + } + }, + "CandidateApplicationRouteResult": { + "type": "object", + "additionalProperties": false, + "required": [ + "kind", + "purpose", + "status", + "reading_plan", + "unresolved_questions", + "next_operations", + "revision" + ], + "properties": { + "kind": { + "const": "candidate-application-route-result" + }, + "purpose": { + "const": "application" + }, + "status": { + "enum": [ + "complete", + "needs-facts" + ] + }, + "reading_plan": { + "type": "array", + "items": { + "$ref": "#/$defs/ApplicationReadingEntry" + } + }, + "unresolved_questions": { + "type": "array", + "items": { + "$ref": "#/$defs/ApplicationQuestion" + } + }, + "next_operations": { + "type": "array", + "items": { + "$ref": "#/$defs/CandidateApplicationNextOperation" + } + }, + "revision": { + "$ref": "#/$defs/ProposalRevisionHandle" + } + } + }, + "CandidateApplicationRejectedResult": { + "type": "object", + "additionalProperties": false, + "required": [ + "kind", + "purpose", + "code", + "outcome", + "message", + "next_operations", + "revision" + ], + "properties": { + "kind": { + "const": "candidate-application-rejected-result" + }, + "purpose": { + "const": "application" + }, + "code": { + "enum": [ + "APPLICATION.CONTENT_UNAVAILABLE", + "APPLICATION.INPUT_INVALID", + "APPLICATION.OPERATION_UNAVAILABLE", + "APPLICATION.INTERNAL_UNAVAILABLE", + "APPLICATION.UNSUPPORTED_CAPTURE", + "APPLICATION.RESULT_LIMIT" + ] + }, + "outcome": { + "enum": [ + "invalid", + "unsupported", + "unavailable" + ] + }, + "message": { + "type": "string" + }, + "next_operations": { + "type": "array", + "items": { + "$ref": "#/$defs/CandidateApplicationNextOperation" + } + }, + "revision": { + "$ref": "#/$defs/ProposalRevisionHandle" + } + } + }, + "PreviewApplicationResult": { + "oneOf": [ + { + "$ref": "#/$defs/CandidateApplicationReadResult" + }, + { + "$ref": "#/$defs/CandidateApplicationRelatedResult" + }, + { + "$ref": "#/$defs/CandidateApplicationRouteResult" + }, + { + "$ref": "#/$defs/CandidateApplicationRejectedResult" + } + ] } } } diff --git a/tools/standards_engine/contracts/a1-interface.toml b/tools/standards_engine/contracts/a1-interface.toml index a27d91cb..a22cd151 100644 --- a/tools/standards_engine/contracts/a1-interface.toml +++ b/tools/standards_engine/contracts/a1-interface.toml @@ -1,5 +1,5 @@ schema_version = 1 -interface_schema_version = 33 +interface_schema_version = 34 request_contract_version = 6 result_projection_version = 7 @@ -207,3 +207,9 @@ input_definition = "ReadManyCall" result_definitions = ["ReadManyResult", "RejectedResult"] capability = "standards.read" variants = { "application" = { "input_definition" = "ApplicationReadManyCall", "result_definitions" = ["ApplicationReadManyResult", "ApplicationRejectedResult"] } } + +[[operations]] +id = "preview_application" +input_definition = "PreviewApplicationCall" +result_definitions = ["PreviewApplicationResult", "RejectedResult"] +capability = "standards.proposal.read" diff --git a/tools/standards_engine/contracts/examples/a1-examples.json b/tools/standards_engine/contracts/examples/a1-examples.json index 73dff34c..651f21cb 100644 --- a/tools/standards_engine/contracts/examples/a1-examples.json +++ b/tools/standards_engine/contracts/examples/a1-examples.json @@ -1,6 +1,6 @@ { "schema_version": 2, - "interface_schema_version": 33, + "interface_schema_version": 34, "examples": [ { "name": "create-snapshot", @@ -748,6 +748,22 @@ "successors": [] } } + }, + { + "name": "preview-qualified-candidate", + "definition": "PreviewApplicationCall", + "value": { + "revision": { + "kind": "proposal-revision-handle", + "id": "proposal-revision:sha256:1111111111111111111111111111111111111111111111111111111111111111", + "schema_version": 1 + }, + "request": { + "kind": "read", + "target": "core", + "detail": "compact" + } + } } ] } diff --git a/tools/standards_engine/contracts/generated/agent-tools.json b/tools/standards_engine/contracts/generated/agent-tools.json index 805c72d8..453d6361 100644 --- a/tools/standards_engine/contracts/generated/agent-tools.json +++ b/tools/standards_engine/contracts/generated/agent-tools.json @@ -605,7 +605,8 @@ "profile", "reference", "prompt", - "template" + "template", + "documentation" ] } }, @@ -1452,6 +1453,290 @@ ], "type": "object" }, + "CandidateApplicationNextOperation": { + "additionalProperties": false, + "properties": { + "operation": { + "const": "preview_application" + }, + "request": { + "$ref": "#/$defs/ApplicationQueryRequest" + }, + "revision": { + "$ref": "#/$defs/ProposalRevisionHandle" + } + }, + "required": [ + "operation", + "revision", + "request" + ], + "type": "object" + }, + "CandidateApplicationPolicy": { + "additionalProperties": false, + "properties": { + "id": { + "$ref": "#/$defs/CanonicalId" + }, + "level": { + "enum": [ + "MUST", + "SHOULD", + "PROFILE", + "REFERENCE" + ] + }, + "role": { + "enum": [ + "core", + "router", + "topic", + "workflow", + "profile", + "reference", + "prompt", + "template", + "documentation" + ] + } + }, + "required": [ + "id", + "role", + "level" + ], + "type": "object" + }, + "CandidateApplicationReadResult": { + "additionalProperties": false, + "properties": { + "content": { + "type": "string" + }, + "kind": { + "const": "candidate-application-read-result" + }, + "next_operations": { + "items": { + "$ref": "#/$defs/CandidateApplicationNextOperation" + }, + "type": "array" + }, + "policy": { + "$ref": "#/$defs/CandidateApplicationPolicy" + }, + "purpose": { + "const": "application" + }, + "related": { + "items": { + "$ref": "#/$defs/CandidateApplicationRelationship" + }, + "type": "array" + }, + "requires": { + "items": { + "$ref": "#/$defs/CanonicalId" + }, + "type": "array" + }, + "revision": { + "$ref": "#/$defs/ProposalRevisionHandle" + }, + "scope": { + "$ref": "#/$defs/ReviewScope" + }, + "specializes": { + "items": { + "$ref": "#/$defs/CanonicalId" + }, + "type": "array" + } + }, + "required": [ + "kind", + "purpose", + "policy", + "content", + "scope", + "requires", + "specializes", + "next_operations", + "revision" + ], + "type": "object" + }, + "CandidateApplicationRejectedResult": { + "additionalProperties": false, + "properties": { + "code": { + "enum": [ + "APPLICATION.CONTENT_UNAVAILABLE", + "APPLICATION.INPUT_INVALID", + "APPLICATION.OPERATION_UNAVAILABLE", + "APPLICATION.INTERNAL_UNAVAILABLE", + "APPLICATION.UNSUPPORTED_CAPTURE", + "APPLICATION.RESULT_LIMIT" + ] + }, + "kind": { + "const": "candidate-application-rejected-result" + }, + "message": { + "type": "string" + }, + "next_operations": { + "items": { + "$ref": "#/$defs/CandidateApplicationNextOperation" + }, + "type": "array" + }, + "outcome": { + "enum": [ + "invalid", + "unsupported", + "unavailable" + ] + }, + "purpose": { + "const": "application" + }, + "revision": { + "$ref": "#/$defs/ProposalRevisionHandle" + } + }, + "required": [ + "kind", + "purpose", + "code", + "outcome", + "message", + "next_operations", + "revision" + ], + "type": "object" + }, + "CandidateApplicationRelatedResult": { + "additionalProperties": false, + "properties": { + "kind": { + "const": "candidate-application-related-result" + }, + "next_operations": { + "items": { + "$ref": "#/$defs/CandidateApplicationNextOperation" + }, + "type": "array" + }, + "purpose": { + "const": "application" + }, + "relationships": { + "items": { + "$ref": "#/$defs/CandidateApplicationRelationship" + }, + "type": "array" + }, + "revision": { + "$ref": "#/$defs/ProposalRevisionHandle" + }, + "target": { + "$ref": "#/$defs/CanonicalId" + } + }, + "required": [ + "kind", + "purpose", + "target", + "relationships", + "next_operations", + "revision" + ], + "type": "object" + }, + "CandidateApplicationRelationship": { + "additionalProperties": false, + "properties": { + "direction": { + "enum": [ + "incoming", + "outgoing" + ] + }, + "groups": { + "items": { + "$ref": "#/$defs/CanonicalId" + }, + "type": "array" + }, + "relation": { + "type": "string" + }, + "source": { + "$ref": "#/$defs/CanonicalId" + }, + "target": { + "$ref": "#/$defs/CanonicalId" + } + }, + "required": [ + "source", + "target", + "relation", + "groups", + "direction" + ], + "type": "object" + }, + "CandidateApplicationRouteResult": { + "additionalProperties": false, + "properties": { + "kind": { + "const": "candidate-application-route-result" + }, + "next_operations": { + "items": { + "$ref": "#/$defs/CandidateApplicationNextOperation" + }, + "type": "array" + }, + "purpose": { + "const": "application" + }, + "reading_plan": { + "items": { + "$ref": "#/$defs/ApplicationReadingEntry" + }, + "type": "array" + }, + "revision": { + "$ref": "#/$defs/ProposalRevisionHandle" + }, + "status": { + "enum": [ + "complete", + "needs-facts" + ] + }, + "unresolved_questions": { + "items": { + "$ref": "#/$defs/ApplicationQuestion" + }, + "type": "array" + } + }, + "required": [ + "kind", + "purpose", + "status", + "reading_plan", + "unresolved_questions", + "next_operations", + "revision" + ], + "type": "object" + }, "CanonicalId": { "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]*$", "type": "string" @@ -3903,7 +4188,8 @@ "role": { "enum": [ "prompt", - "template" + "template", + "documentation" ] }, "target": { @@ -4418,6 +4704,39 @@ ], "type": "object" }, + "PreviewApplicationCall": { + "additionalProperties": false, + "description": "Authoring-only inspection of an exact draft through application qualification and filtering; this observation neither publishes nor grants ordinary application access.", + "properties": { + "request": { + "$ref": "#/$defs/ApplicationQueryRequest" + }, + "revision": { + "$ref": "#/$defs/ProposalRevisionHandle" + } + }, + "required": [ + "revision", + "request" + ], + "type": "object" + }, + "PreviewApplicationResult": { + "oneOf": [ + { + "$ref": "#/$defs/CandidateApplicationReadResult" + }, + { + "$ref": "#/$defs/CandidateApplicationRelatedResult" + }, + { + "$ref": "#/$defs/CandidateApplicationRouteResult" + }, + { + "$ref": "#/$defs/CandidateApplicationRejectedResult" + } + ] + }, "ProposalHandle": { "additionalProperties": false, "properties": { @@ -5486,6 +5805,44 @@ ], "type": "object" }, + "RegisterConsumerEdit": { + "additionalProperties": false, + "description": "Register an existing tracked consumer within this proposal. The Engine captures original-revision bytes; use separate policy relationships to declare consumers and review obligations.", + "properties": { + "artifact_kind": { + "enum": [ + "fixture", + "documentation", + "implementation-artifact", + "prompt", + "template" + ] + }, + "authority": { + "enum": [ + "evidence", + "projection" + ] + }, + "consumer": { + "$ref": "#/$defs/CanonicalId" + }, + "kind": { + "const": "register-consumer" + }, + "path": { + "$ref": "#/$defs/NonEmptyString" + } + }, + "required": [ + "kind", + "consumer", + "path", + "artifact_kind", + "authority" + ], + "type": "object" + }, "RegisterPolicyUnitEdit": { "additionalProperties": false, "description": "Register an explicitly selected policy scope in an existing standard. The Engine owns declaration placement and validates the final candidate.", @@ -6252,7 +6609,14 @@ "const": "revise-operational-artifact" }, "target": { - "$ref": "#/$defs/AuthoringTargetHandle" + "oneOf": [ + { + "$ref": "#/$defs/CanonicalId" + }, + { + "$ref": "#/$defs/AuthoringTargetHandle" + } + ] }, "title": { "$ref": "#/$defs/NonEmptyString" @@ -6893,6 +7257,9 @@ }, { "$ref": "#/$defs/ReviseOperationalArtifactEdit" + }, + { + "$ref": "#/$defs/RegisterConsumerEdit" } ] }, @@ -7338,7 +7705,7 @@ "type": "object" } }, - "interface_schema_version": 33, + "interface_schema_version": 34, "operations": [ { "capability": "standards.snapshot.create", @@ -7841,6 +8208,18 @@ ] } } + }, + { + "capability": "standards.proposal.read", + "id": "preview_application", + "input_definition": "PreviewApplicationCall", + "input_schema": { + "$ref": "#/$defs/PreviewApplicationCall" + }, + "result_definitions": [ + "PreviewApplicationResult", + "RejectedResult" + ] } ], "request_contract_version": 6, diff --git a/tools/standards_engine/standards_engine/_generated_contract.py b/tools/standards_engine/standards_engine/_generated_contract.py index 598f3e22..c312a23c 100644 --- a/tools/standards_engine/standards_engine/_generated_contract.py +++ b/tools/standards_engine/standards_engine/_generated_contract.py @@ -14,8 +14,8 @@ model_as_contract, ) -_SCHEMA = json.loads('{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"https://coding-standards.local/contracts/standards-engine/a2-v32","title":"Standards Engine A2 contract","description":"Canonical typed contract for snapshot lifecycle, controlled authoring, navigation, inspection, and immutable standards-change analysis.","oneOf":[{"$ref":"#/$defs/AgentRouteResult"},{"$ref":"#/$defs/AnalyzeCall"},{"$ref":"#/$defs/AnalyzeProposalCall"},{"$ref":"#/$defs/ApplicationInspectCall"},{"$ref":"#/$defs/ApplicationQueryCall"},{"$ref":"#/$defs/ApplicationReadCall"},{"$ref":"#/$defs/ApplicationReadManyCall"},{"$ref":"#/$defs/ApplicationReadManyResult"},{"$ref":"#/$defs/ApplicationReadResult"},{"$ref":"#/$defs/ApplicationRecoveryRequiredResult"},{"$ref":"#/$defs/ApplicationRejectedResult"},{"$ref":"#/$defs/ApplicationRelatedResult"},{"$ref":"#/$defs/ApplicationRouteResult"},{"$ref":"#/$defs/ApplicationRoutingFactsResult"},{"$ref":"#/$defs/ApplyCall"},{"$ref":"#/$defs/ApplyProposalCall"},{"$ref":"#/$defs/ApplyProposalResult"},{"$ref":"#/$defs/CompactReadResult"},{"$ref":"#/$defs/CompleteResult"},{"$ref":"#/$defs/CreateProposalCall"},{"$ref":"#/$defs/CreateProposalResult"},{"$ref":"#/$defs/CreateSnapshotCall"},{"$ref":"#/$defs/CreateSnapshotResult"},{"$ref":"#/$defs/DeleteSnapshotCall"},{"$ref":"#/$defs/DeleteSnapshotResult"},{"$ref":"#/$defs/FindProposalsCall"},{"$ref":"#/$defs/FindProposalsResult"},{"$ref":"#/$defs/FindSnapshotsCall"},{"$ref":"#/$defs/FindSnapshotsResult"},{"$ref":"#/$defs/InspectCall"},{"$ref":"#/$defs/InspectionResult"},{"$ref":"#/$defs/MaintainEvidenceCall"},{"$ref":"#/$defs/MaintainEvidenceResult"},{"$ref":"#/$defs/NavigationIndexesResult"},{"$ref":"#/$defs/OperationalReadResult"},{"$ref":"#/$defs/PendingResult"},{"$ref":"#/$defs/PrepareCall"},{"$ref":"#/$defs/ProposeCall"},{"$ref":"#/$defs/ProvenanceReadResult"},{"$ref":"#/$defs/QueryCall"},{"$ref":"#/$defs/QueryProposalCall"},{"$ref":"#/$defs/QueryProposalResult"},{"$ref":"#/$defs/QueryResult"},{"$ref":"#/$defs/ReadCall"},{"$ref":"#/$defs/ReadManyCall"},{"$ref":"#/$defs/ReadManyResult"},{"$ref":"#/$defs/ReadResult"},{"$ref":"#/$defs/RecoverApplicationCall"},{"$ref":"#/$defs/RecoverApplicationResult"},{"$ref":"#/$defs/RecoverCall"},{"$ref":"#/$defs/RejectedResult"},{"$ref":"#/$defs/RelatedCall"},{"$ref":"#/$defs/RelatedResult"},{"$ref":"#/$defs/ResolveCall"},{"$ref":"#/$defs/ResolveWorkflowCall"},{"$ref":"#/$defs/ResumeCall"},{"$ref":"#/$defs/ReviewCall"},{"$ref":"#/$defs/ReviewProposalCall"},{"$ref":"#/$defs/ReviewProposalResult"},{"$ref":"#/$defs/ReviseCall"},{"$ref":"#/$defs/ReviseProposalCall"},{"$ref":"#/$defs/ReviseProposalResult"},{"$ref":"#/$defs/RouteCall"},{"$ref":"#/$defs/RoutingFactsCall"},{"$ref":"#/$defs/RoutingFactsResult"},{"$ref":"#/$defs/UndeleteSnapshotCall"},{"$ref":"#/$defs/UndeleteSnapshotResult"},{"$ref":"#/$defs/VerifyProposalCall"},{"$ref":"#/$defs/VerifyProposalResult"},{"$ref":"#/$defs/VerifyRepositoryCall"},{"$ref":"#/$defs/VerifyRepositoryResult"},{"$ref":"#/$defs/WorkflowResult"},{"$ref":"#/$defs/WorkflowStatusCall"}],"$defs":{"NonEmptyString":{"type":"string","minLength":1},"CanonicalId":{"type":"string","pattern":"^[A-Za-z0-9][A-Za-z0-9._:/-]*$"},"EdgeId":{"type":"string","minLength":1},"Digest":{"type":"string","pattern":"^sha256:[0-9a-f]{64}$"},"ObligationId":{"type":"string","pattern":"^obligation:sha256:[0-9a-f]{64}$"},"ImpactTraceId":{"type":"string","pattern":"^impact-trace:sha256:[0-9a-f]{64}$"},"FactRequirementId":{"type":"string","pattern":"^fact-requirement:sha256:[0-9a-f]{64}$"},"ScalarValue":{"oneOf":[{"type":"boolean"},{"type":"integer"},{"type":"string"},{"type":"null"}]},"FactValue":{"oneOf":[{"type":"object","required":["type","state","value"],"properties":{"type":{"const":"boolean"},"state":{"const":"known"},"value":{"type":"boolean"}},"additionalProperties":false},{"type":"object","required":["type","state","value"],"properties":{"type":{"enum":["boolean","enum","string","string-set","enum-set","canonical-id"]},"state":{"const":"known"},"value":{"type":"null"}},"additionalProperties":false},{"type":"object","required":["type","state","value"],"properties":{"type":{"enum":["enum","string","canonical-id"]},"state":{"const":"known"},"value":{"type":"string"}},"additionalProperties":false},{"type":"object","required":["type","state","value"],"properties":{"type":{"enum":["string-set","enum-set"]},"state":{"const":"known"},"value":{"type":"array","items":{"type":"string"},"uniqueItems":true}},"additionalProperties":false},{"type":"object","required":["type","state"],"properties":{"type":{"enum":["boolean","enum","string","string-set","enum-set","canonical-id"]},"state":{"enum":["known-absent","unknown"]}},"additionalProperties":false}]},"FactSet":{"type":"object","additionalProperties":{"$ref":"#/$defs/FactValue"}},"StructuredScope":{"type":"object","required":["kind","heading_path"],"properties":{"kind":{"const":"structured"},"heading_path":{"type":"array","minItems":1,"items":{"$ref":"#/$defs/NonEmptyString"}}},"additionalProperties":false},"WholeArtifactScope":{"type":"object","required":["kind"],"properties":{"kind":{"const":"whole-artifact"}},"additionalProperties":false},"ReviewScope":{"oneOf":[{"$ref":"#/$defs/StructuredScope"},{"$ref":"#/$defs/WholeArtifactScope"}]},"AllExpression":{"type":"object","required":["operator","expressions"],"properties":{"operator":{"const":"all"},"expressions":{"type":"array","minItems":1,"items":{"$ref":"#/$defs/ApplicabilityExpression"}}},"additionalProperties":false},"AnyExpression":{"type":"object","required":["operator","expressions"],"properties":{"operator":{"const":"any"},"expressions":{"type":"array","minItems":1,"items":{"$ref":"#/$defs/ApplicabilityExpression"}}},"additionalProperties":false},"NotExpression":{"type":"object","required":["operator","expression"],"properties":{"operator":{"const":"not"},"expression":{"$ref":"#/$defs/ApplicabilityExpression"}},"additionalProperties":false},"EqualsExpression":{"type":"object","required":["operator","fact","value"],"properties":{"operator":{"const":"equals"},"fact":{"$ref":"#/$defs/CanonicalId"},"value":{"$ref":"#/$defs/ScalarValue"}},"additionalProperties":false},"InExpression":{"type":"object","required":["operator","fact","values"],"properties":{"operator":{"const":"in"},"fact":{"$ref":"#/$defs/CanonicalId"},"values":{"type":"array","minItems":1,"uniqueItems":true,"items":{"$ref":"#/$defs/ScalarValue"}}},"additionalProperties":false},"ContainsExpression":{"type":"object","required":["operator","fact","value"],"properties":{"operator":{"const":"contains"},"fact":{"$ref":"#/$defs/CanonicalId"},"value":{"$ref":"#/$defs/ScalarValue"}},"additionalProperties":false},"ExistsExpression":{"type":"object","required":["operator","fact"],"properties":{"operator":{"const":"exists"},"fact":{"$ref":"#/$defs/CanonicalId"}},"additionalProperties":false},"AlwaysExpression":{"type":"object","required":["operator"],"properties":{"operator":{"const":"always"}},"additionalProperties":false},"ApplicabilityExpression":{"oneOf":[{"$ref":"#/$defs/AlwaysExpression"},{"$ref":"#/$defs/AllExpression"},{"$ref":"#/$defs/AnyExpression"},{"$ref":"#/$defs/NotExpression"},{"$ref":"#/$defs/EqualsExpression"},{"$ref":"#/$defs/InExpression"},{"$ref":"#/$defs/ContainsExpression"},{"$ref":"#/$defs/ExistsExpression"}]},"GeneralSelectionReason":{"type":"object","required":["kind"],"properties":{"kind":{"enum":["routing-fact","requires","specializes","changed-policy","question","audit-coverage","unmapped-normative-change","structured-scope-analysis-unsupported","navigation-index-change","supporting-content-change"]},"source":{"$ref":"#/$defs/CanonicalId"},"fact":{"$ref":"#/$defs/CanonicalId"},"edge":{"$ref":"#/$defs/EdgeId"},"question":{"$ref":"#/$defs/CanonicalId"}},"additionalProperties":false},"PolicyImpactSelectionReason":{"type":"object","required":["kind","source","edge","relation","evidence_owner","traces"],"properties":{"kind":{"const":"policy-impact-edge"},"source":{"$ref":"#/$defs/CanonicalId"},"edge":{"$ref":"#/$defs/EdgeId"},"relation":{"$ref":"#/$defs/CanonicalId"},"evidence_owner":{"$ref":"#/$defs/CanonicalId"},"traces":{"type":"array","minItems":1,"uniqueItems":true,"items":{"$ref":"#/$defs/ImpactTraceReference"}}},"additionalProperties":false},"SelectionReason":{"oneOf":[{"$ref":"#/$defs/GeneralSelectionReason"},{"$ref":"#/$defs/PolicyImpactSelectionReason"}]},"ImpactTraceReference":{"type":"object","required":["id","graph","applicability"],"properties":{"id":{"$ref":"#/$defs/ImpactTraceId"},"graph":{"enum":["accepted","proposed"]},"applicability":{"enum":["true","false","unknown"]}},"additionalProperties":false},"ConsumerReviewObligationReadingReason":{"type":"object","required":["kind","obligation"],"properties":{"kind":{"const":"consumer-review-obligation"},"obligation":{"$ref":"#/$defs/ObligationId"}},"additionalProperties":false},"RoutingBaseReadingReason":{"type":"object","required":["kind","projection"],"properties":{"kind":{"const":"routing-base"},"projection":{"$ref":"#/$defs/CanonicalId"}},"additionalProperties":false},"RoutingRuleReadingReason":{"type":"object","required":["kind","rule","facts"],"properties":{"kind":{"const":"routing-rule"},"rule":{"$ref":"#/$defs/CanonicalId"},"facts":{"type":"array","uniqueItems":true,"items":{"$ref":"#/$defs/CanonicalId"}}},"additionalProperties":false},"RequiresReadingReason":{"type":"object","required":["kind","edge","source"],"properties":{"kind":{"const":"requires"},"edge":{"$ref":"#/$defs/EdgeId"},"source":{"$ref":"#/$defs/CanonicalId"}},"additionalProperties":false},"SpecializesReadingReason":{"type":"object","required":["kind","edge","source"],"properties":{"kind":{"const":"specializes"},"edge":{"$ref":"#/$defs/EdgeId"},"source":{"$ref":"#/$defs/CanonicalId"}},"additionalProperties":false},"ReadingPlanReason":{"oneOf":[{"$ref":"#/$defs/ConsumerReviewObligationReadingReason"},{"$ref":"#/$defs/RoutingBaseReadingReason"},{"$ref":"#/$defs/RoutingRuleReadingReason"},{"$ref":"#/$defs/RequiresReadingReason"},{"$ref":"#/$defs/SpecializesReadingReason"}]},"ReadingPlanEntry":{"type":"object","required":["target","scope","authority","reasons","state"],"properties":{"target":{"$ref":"#/$defs/CanonicalId"},"scope":{"$ref":"#/$defs/ReviewScope"},"authority":{"enum":["normative","projection","contextual","evidence"]},"reasons":{"type":"array","minItems":1,"uniqueItems":true,"items":{"$ref":"#/$defs/ReadingPlanReason"}},"state":{"enum":["selected","conditional","unresolved"]}},"additionalProperties":false},"RouteRequest":{"type":"object","required":["kind","facts"],"properties":{"kind":{"const":"route"},"facts":{"$ref":"#/$defs/FactSet"}},"additionalProperties":false},"ReadRequest":{"type":"object","required":["kind","target"],"properties":{"kind":{"const":"read"},"target":{"$ref":"#/$defs/CanonicalId"},"include_routing":{"type":"boolean"},"include_coverage":{"type":"boolean","description":"Include current repository attestation status for registered policy units in this read scope."}},"additionalProperties":false},"RelatedRequest":{"type":"object","required":["kind","target","groups","direction","transitive"],"properties":{"kind":{"const":"related"},"target":{"$ref":"#/$defs/CanonicalId"},"groups":{"type":"array","minItems":1,"uniqueItems":true,"items":{"$ref":"#/$defs/CanonicalId"}},"direction":{"enum":["incoming","outgoing","both"]},"transitive":{"type":"boolean","default":false}},"additionalProperties":false},"QueryRequest":{"oneOf":[{"$ref":"#/$defs/RouteRequest"},{"$ref":"#/$defs/ReadRequest"},{"$ref":"#/$defs/RelatedRequest"}]},"PolicyUnitDeclaration":{"type":"object","required":["kind","id","module","heading_path","semantic_revision","lifecycle"],"properties":{"kind":{"const":"policy-unit"},"id":{"$ref":"#/$defs/CanonicalId"},"module":{"$ref":"#/$defs/CanonicalId"},"heading_path":{"type":"array","minItems":1,"items":{"$ref":"#/$defs/NonEmptyString"}},"semantic_revision":{"type":"integer","minimum":1},"lifecycle":{"const":"active"},"aliases":{"type":"array","uniqueItems":true,"items":{"$ref":"#/$defs/CanonicalId"}},"predecessors":{"type":"array","uniqueItems":true,"items":{"$ref":"#/$defs/CanonicalId"}},"successors":{"type":"array","uniqueItems":true,"items":{"$ref":"#/$defs/CanonicalId"}}},"additionalProperties":false},"CanonicalModuleDeclaration":{"type":"object","required":["kind","id","role","level","applies_when","does_not_apply_when","requires","specializes","verification"],"properties":{"kind":{"const":"canonical-module"},"id":{"$ref":"#/$defs/CanonicalId"},"role":{"enum":["core","router","workflow","profile","topic","reference"]},"level":{"enum":["MUST","SHOULD","PROFILE","REFERENCE"]},"applies_when":{"$ref":"#/$defs/NonEmptyString"},"does_not_apply_when":{"$ref":"#/$defs/NonEmptyString"},"requires":{"type":"array","uniqueItems":true,"items":{"$ref":"#/$defs/CanonicalId"}},"specializes":{"type":"array","uniqueItems":true,"items":{"$ref":"#/$defs/CanonicalId"}},"verification":{"$ref":"#/$defs/NonEmptyString"}},"additionalProperties":false},"PolicyRelationshipInspection":{"type":"object","required":["relationship_kind","applicability","source_scope","consumer_scope","propagation","evidence_owner","rationale"],"properties":{"relationship_kind":{"enum":["normative-consumer","router-projection","prompt-projection","template-projection","reference-projection","fixture-projection","enforcement-suite-projection","documentation-projection","implementation-projection"]},"applicability":{"$ref":"#/$defs/ApplicabilityExpression"},"source_scope":{"oneOf":[{"$ref":"#/$defs/ReviewScope"},{"type":"null"}]},"consumer_scope":{"oneOf":[{"$ref":"#/$defs/ReviewScope"},{"type":"null"}]},"propagation":{"const":"source-to-consumer"},"evidence_owner":{"$ref":"#/$defs/CanonicalId"},"rationale":{"$ref":"#/$defs/NonEmptyString"}},"additionalProperties":false},"SemanticProposal":{"type":"object","required":["policy","accepted_semantic_revision","proposed_semantic_revision","intent","structural_digest"],"properties":{"policy":{"$ref":"#/$defs/CanonicalId"},"accepted_semantic_revision":{"oneOf":[{"type":"integer","minimum":1},{"type":"null"}]},"proposed_semantic_revision":{"type":"integer","minimum":1},"intent":{"$ref":"#/$defs/NonEmptyString"},"structural_digest":{"$ref":"#/$defs/Digest"}},"additionalProperties":false},"ChangeDescriptor":{"type":"object","required":["kind","accepted_ids","proposed_ids","scope"],"properties":{"kind":{"enum":["module","modification","addition","removal","move","split","merge","navigation-index","supporting-content"]},"accepted_ids":{"type":"array","uniqueItems":true,"items":{"$ref":"#/$defs/CanonicalId"}},"proposed_ids":{"type":"array","uniqueItems":true,"items":{"$ref":"#/$defs/CanonicalId"}},"scope":{"$ref":"#/$defs/ReviewScope"},"accepted_module":{"$ref":"#/$defs/CanonicalId"},"proposed_module":{"$ref":"#/$defs/CanonicalId"}},"additionalProperties":false},"ChangedPolicyUnit":{"type":"object","required":["policy","change_kind","classification","accepted_representation_digest","proposed_representation_digest","accepted_structural_digest","proposed_structural_digest","accepted_semantic_revision","proposed_semantic_revision","semantic_state","scope"],"properties":{"policy":{"$ref":"#/$defs/CanonicalId"},"change_kind":{"enum":["modification","addition","removal","move","split-predecessor","split-successor","merge-predecessor","merge-successor"]},"classification":{"enum":["unchanged","representation-only-candidate","possibly-semantically-changed","semantically-changed","unresolved"]},"accepted_representation_digest":{"oneOf":[{"$ref":"#/$defs/Digest"},{"type":"null"}]},"proposed_representation_digest":{"oneOf":[{"$ref":"#/$defs/Digest"},{"type":"null"}]},"accepted_structural_digest":{"oneOf":[{"$ref":"#/$defs/Digest"},{"type":"null"}]},"proposed_structural_digest":{"oneOf":[{"$ref":"#/$defs/Digest"},{"type":"null"}]},"accepted_semantic_revision":{"oneOf":[{"type":"integer","minimum":1},{"type":"null"}]},"proposed_semantic_revision":{"oneOf":[{"type":"integer","minimum":1},{"type":"null"}]},"semantic_state":{"enum":["accepted-unchanged","proposed","removed","unresolved"]},"scope":{"$ref":"#/$defs/ReviewScope"}},"additionalProperties":false},"Question":{"type":"object","required":["id","kind","prompt","state","permitted_answers"],"properties":{"id":{"$ref":"#/$defs/CanonicalId"},"kind":{"enum":["applicability-fact","normative-classification","identity-resolution","scope-resolution"]},"prompt":{"$ref":"#/$defs/NonEmptyString"},"state":{"enum":["required","answered","blocked"]},"permitted_answers":{"type":"array","minItems":1,"uniqueItems":true,"items":{"$ref":"#/$defs/NonEmptyString"}}},"additionalProperties":false},"ConsumerReviewContract":{"type":"object","required":["kind","id","version","permitted_dispositions","evidence_contract","authorization_capability","semantics"],"properties":{"kind":{"const":"consumer-review-contract"},"id":{"$ref":"#/$defs/CanonicalId"},"version":{"type":"integer","minimum":1},"permitted_dispositions":{"type":"array","minItems":1,"uniqueItems":true,"items":{"enum":["updated","reviewed-no-change","not-applicable","blocked"]}},"evidence_contract":{"$ref":"#/$defs/CanonicalId"},"authorization_capability":{"$ref":"#/$defs/CanonicalId"},"semantics":{"$ref":"#/$defs/NonEmptyString"}},"additionalProperties":false},"DecisionDependency":{"type":"object","required":["class","identity","digest"],"properties":{"class":{"enum":["policy-unit","semantic-revision","structure","representation","module-locator","applicability-fact","relationship","audit","exception","evidence","provider-contract","applicability-contract","analysis-contract"]},"identity":{"$ref":"#/$defs/NonEmptyString"},"digest":{"$ref":"#/$defs/Digest"}},"additionalProperties":false},"DecisionFingerprint":{"type":"object","required":["decision_kind","decision_contract","schema_version","dependencies"],"properties":{"decision_kind":{"$ref":"#/$defs/CanonicalId"},"decision_contract":{"$ref":"#/$defs/CanonicalId"},"schema_version":{"const":1},"dependencies":{"type":"array","minItems":1,"items":{"$ref":"#/$defs/DecisionDependency"}}},"additionalProperties":false},"FactValueContract":{"type":"object","required":["type","states","nullable"],"properties":{"type":{"enum":["boolean","enum","string","string-set","enum-set","canonical-id"]},"states":{"const":["known","known-absent"]},"nullable":{"type":"boolean"},"values":{"type":"array","minItems":1,"uniqueItems":true,"items":{"type":"string"}}},"additionalProperties":false},"EvidenceReference":{"type":"object","required":["id","digest","provider_contract","provider_contract_version"],"properties":{"id":{"$ref":"#/$defs/CanonicalId"},"digest":{"$ref":"#/$defs/Digest"},"provider_contract":{"$ref":"#/$defs/CanonicalId"},"provider_contract_version":{"$ref":"#/$defs/NonEmptyString"}},"additionalProperties":false},"CompletionProof":{"type":"object","required":["required_coverage_subjects","certificate_subjects","reached_consumer_obligations","disposition_obligations","required_fact_requirements","observed_fact_requirements","non_consumer_obligations_resolved","applicability_resolved","authorization_valid","evidence_valid"],"properties":{"required_coverage_subjects":{"type":"array","uniqueItems":true,"items":{"$ref":"#/$defs/CanonicalId"}},"certificate_subjects":{"type":"array","uniqueItems":true,"items":{"$ref":"#/$defs/CanonicalId"}},"reached_consumer_obligations":{"type":"array","uniqueItems":true,"items":{"$ref":"#/$defs/ObligationId"}},"disposition_obligations":{"type":"array","uniqueItems":true,"items":{"$ref":"#/$defs/ObligationId"}},"required_fact_requirements":{"type":"array","uniqueItems":true,"items":{"$ref":"#/$defs/FactRequirementId"}},"observed_fact_requirements":{"type":"array","uniqueItems":true,"items":{"$ref":"#/$defs/FactRequirementId"}},"non_consumer_obligations_resolved":{"const":true},"applicability_resolved":{"const":true},"authorization_valid":{"const":true},"evidence_valid":{"const":true}},"additionalProperties":false},"Timestamp":{"type":"integer","minimum":0},"SnapshotId":{"type":"string","pattern":"^snapshot:v1:[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"},"AnalysisId":{"type":"string","pattern":"^analysis:sha256:[0-9a-f]{64}$"},"ProposalId":{"type":"string","pattern":"^proposal:v1:[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"},"ProposalRevisionId":{"type":"string","pattern":"^proposal-revision:sha256:[0-9a-f]{64}$"},"ReadinessId":{"type":"string","pattern":"^readiness:sha256:[0-9a-f]{64}$"},"ApplicationId":{"type":"string","pattern":"^application:sha256:[0-9a-f]{64}$"},"ChildId":{"type":"string","pattern":"^sha256:[0-9a-f]{64}$"},"AuthorizationId":{"type":"string","pattern":"^authorization:sha256:[0-9a-f]{64}$"},"SnapshotHandle":{"type":"object","required":["kind","id","schema_version"],"properties":{"kind":{"const":"snapshot-handle"},"id":{"$ref":"#/$defs/SnapshotId"},"schema_version":{"const":5}},"additionalProperties":false},"AnalysisHandle":{"type":"object","required":["kind","id","schema_version"],"properties":{"kind":{"const":"analysis-handle"},"id":{"$ref":"#/$defs/AnalysisId"},"schema_version":{"const":7}},"additionalProperties":false},"ProposalHandle":{"type":"object","required":["kind","id","schema_version"],"properties":{"kind":{"const":"proposal-handle"},"id":{"$ref":"#/$defs/ProposalId"},"schema_version":{"const":1}},"additionalProperties":false},"ProposalRevisionHandle":{"type":"object","required":["kind","id","schema_version"],"properties":{"kind":{"const":"proposal-revision-handle"},"id":{"$ref":"#/$defs/ProposalRevisionId"},"schema_version":{"const":1}},"additionalProperties":false},"ReadinessHandle":{"type":"object","required":["kind","id","schema_version"],"properties":{"kind":{"const":"readiness-handle"},"id":{"$ref":"#/$defs/ReadinessId"},"schema_version":{"const":1}},"additionalProperties":false},"ApplicationHandle":{"type":"object","required":["kind","id","schema_version"],"properties":{"kind":{"const":"application-handle"},"id":{"$ref":"#/$defs/ApplicationId"},"schema_version":{"const":1}},"additionalProperties":false},"SnapshotChildHandle":{"type":"object","required":["kind","snapshot","child_kind","child_id","schema_version"],"properties":{"kind":{"const":"snapshot-child-handle"},"snapshot":{"$ref":"#/$defs/SnapshotHandle"},"child_kind":{"enum":["policy","relationship"]},"child_id":{"$ref":"#/$defs/NonEmptyString"},"schema_version":{"const":5}},"additionalProperties":false},"AnalysisChildHandle":{"type":"object","required":["kind","analysis","child_kind","child_id","schema_version"],"properties":{"kind":{"const":"analysis-child-handle"},"analysis":{"$ref":"#/$defs/AnalysisHandle"},"child_kind":{"enum":["context","fact-requirement","fact-observation","obligation","coverage-requirement","coverage-certificate"]},"child_id":{"$ref":"#/$defs/ChildId"},"schema_version":{"const":7}},"additionalProperties":false},"AnalysisMaterialHandle":{"oneOf":[{"$ref":"#/$defs/SnapshotHandle"},{"$ref":"#/$defs/ProposalRevisionHandle"}]},"InspectableHandle":{"oneOf":[{"$ref":"#/$defs/SnapshotHandle"},{"$ref":"#/$defs/AnalysisHandle"},{"$ref":"#/$defs/SnapshotChildHandle"},{"$ref":"#/$defs/AnalysisChildHandle"}]},"ActiveSnapshotSummary":{"type":"object","required":["snapshot","lifecycle","source_revision","created_at"],"properties":{"snapshot":{"$ref":"#/$defs/SnapshotHandle"},"lifecycle":{"const":"active"},"source_revision":{"$ref":"#/$defs/NonEmptyString"},"created_at":{"$ref":"#/$defs/Timestamp"}},"additionalProperties":false},"QuarantinedSnapshotSummary":{"type":"object","required":["snapshot","lifecycle","source_revision","created_at","purge_deadline"],"properties":{"snapshot":{"$ref":"#/$defs/SnapshotHandle"},"lifecycle":{"const":"quarantined"},"source_revision":{"$ref":"#/$defs/NonEmptyString"},"created_at":{"$ref":"#/$defs/Timestamp"},"purge_deadline":{"$ref":"#/$defs/Timestamp"}},"additionalProperties":false},"SnapshotSummary":{"oneOf":[{"$ref":"#/$defs/ActiveSnapshotSummary"},{"$ref":"#/$defs/QuarantinedSnapshotSummary"}]},"CreateSnapshotCall":{"type":"object","required":["kind"],"properties":{"kind":{"const":"create-snapshot"}},"additionalProperties":false},"CreateSnapshotResult":{"type":"object","required":["kind","snapshot"],"properties":{"kind":{"const":"create-snapshot-result"},"snapshot":{"$ref":"#/$defs/ActiveSnapshotSummary"}},"additionalProperties":false},"FindSnapshotsCall":{"type":"object","required":["kind"],"properties":{"kind":{"const":"find-snapshots"},"lifecycle":{"enum":["active","quarantined"],"default":"active"},"after":{"$ref":"#/$defs/SnapshotHandle"},"limit":{"type":"integer","minimum":1,"default":50}},"additionalProperties":false},"FindSnapshotsResult":{"type":"object","required":["kind","snapshots"],"properties":{"kind":{"const":"find-snapshots-result"},"snapshots":{"type":"array","items":{"$ref":"#/$defs/SnapshotSummary"}},"continuation":{"$ref":"#/$defs/SnapshotHandle"}},"additionalProperties":false},"StandardsChangePurpose":{"type":"object","required":["summary","rationale","evidence"],"properties":{"summary":{"$ref":"#/$defs/NonEmptyString"},"rationale":{"$ref":"#/$defs/NonEmptyString"},"evidence":{"type":"array","minItems":1,"uniqueItems":true,"items":{"$ref":"#/$defs/EvidenceReference"}}},"additionalProperties":false},"StandardContent":{"type":"object","required":["id","title","role","level","applies_when","does_not_apply_when","verification","body"],"properties":{"id":{"$ref":"#/$defs/CanonicalId"},"title":{"$ref":"#/$defs/NonEmptyString"},"role":{"enum":["core","router","workflow","profile","topic","reference"]},"level":{"enum":["MUST","SHOULD","PROFILE","REFERENCE"]},"applies_when":{"$ref":"#/$defs/NonEmptyString"},"does_not_apply_when":{"$ref":"#/$defs/NonEmptyString"},"verification":{"$ref":"#/$defs/NonEmptyString"},"body":{"$ref":"#/$defs/NonEmptyString"}},"additionalProperties":false},"NewPolicyUnit":{"type":"object","required":["id","heading_chain","semantic_revision","intent","aliases","predecessors","successors"],"properties":{"id":{"$ref":"#/$defs/CanonicalId"},"heading_chain":{"type":"array","minItems":1,"items":{"$ref":"#/$defs/NonEmptyString"}},"semantic_revision":{"const":1},"intent":{"$ref":"#/$defs/NonEmptyString"},"aliases":{"type":"array","uniqueItems":true,"items":{"$ref":"#/$defs/CanonicalId"}},"predecessors":{"type":"array","uniqueItems":true,"items":{"$ref":"#/$defs/CanonicalId"}},"successors":{"type":"array","uniqueItems":true,"items":{"$ref":"#/$defs/CanonicalId"}}},"additionalProperties":false},"PreservePolicySemantics":{"type":"object","required":["kind","semantic_revision","intent"],"properties":{"kind":{"const":"preserve"},"semantic_revision":{"type":"integer","minimum":1},"intent":{"$ref":"#/$defs/NonEmptyString"}},"additionalProperties":false},"ChangePolicySemantics":{"type":"object","required":["kind","accepted_semantic_revision","proposed_semantic_revision","intent"],"properties":{"kind":{"const":"change"},"accepted_semantic_revision":{"type":"integer","minimum":1},"proposed_semantic_revision":{"type":"integer","minimum":1},"intent":{"$ref":"#/$defs/NonEmptyString"}},"additionalProperties":false},"PolicySemanticIntent":{"oneOf":[{"$ref":"#/$defs/PreservePolicySemantics"},{"$ref":"#/$defs/ChangePolicySemantics"}]},"CreateStandardEdit":{"type":"object","required":["kind","standard","requires","specializes","policy_units"],"properties":{"kind":{"const":"create-standard"},"standard":{"$ref":"#/$defs/StandardContent"},"requires":{"type":"array","uniqueItems":true,"items":{"$ref":"#/$defs/CanonicalId"}},"specializes":{"type":"array","uniqueItems":true,"items":{"$ref":"#/$defs/CanonicalId"}},"policy_units":{"type":"array","uniqueItems":true,"items":{"$ref":"#/$defs/NewPolicyUnit"}}},"additionalProperties":false},"RegisterPolicyUnitEdit":{"type":"object","description":"Register an explicitly selected policy scope in an existing standard. The Engine owns declaration placement and validates the final candidate.","required":["kind","standard","policy_unit"],"properties":{"kind":{"const":"register-policy-unit"},"standard":{"$ref":"#/$defs/CanonicalId"},"policy_unit":{"$ref":"#/$defs/NewPolicyUnit"}},"additionalProperties":false},"ReviseStandardEdit":{"type":"object","required":["kind","standard"],"properties":{"kind":{"const":"revise-standard"},"standard":{"$ref":"#/$defs/StandardContent"},"scope_updates":{"type":"array","items":{"$ref":"#/$defs/PolicyScopeUpdate"}}},"additionalProperties":false},"RevisePolicyUnitEdit":{"type":"object","required":["kind","policy","title","body","semantics"],"properties":{"kind":{"const":"revise-policy-unit"},"policy":{"$ref":"#/$defs/CanonicalId"},"title":{"$ref":"#/$defs/NonEmptyString"},"body":{"$ref":"#/$defs/NonEmptyString"},"semantics":{"$ref":"#/$defs/PolicySemanticIntent"}},"additionalProperties":false},"MovePolicyUnitEdit":{"type":"object","required":["kind","policy","standard","semantics"],"properties":{"kind":{"const":"move-policy-unit"},"policy":{"$ref":"#/$defs/CanonicalId"},"standard":{"$ref":"#/$defs/CanonicalId"},"after_policy":{"$ref":"#/$defs/CanonicalId"},"semantics":{"$ref":"#/$defs/PolicySemanticIntent"}},"additionalProperties":false},"RetirePolicyUnitEdit":{"type":"object","required":["kind","policy","retired_semantic_revision","successors","relationship_dispositions","evidence"],"properties":{"kind":{"const":"retire-policy-unit"},"policy":{"$ref":"#/$defs/CanonicalId"},"retired_semantic_revision":{"type":"integer","minimum":1},"successors":{"type":"array","uniqueItems":true,"items":{"$ref":"#/$defs/CanonicalId"}},"relationship_dispositions":{"type":"array","uniqueItems":true,"items":{"$ref":"#/$defs/RelationshipDisposition"}},"evidence":{"type":"array","minItems":1,"uniqueItems":true,"items":{"$ref":"#/$defs/EvidenceReference"}}},"additionalProperties":false},"RetireStandardEdit":{"type":"object","required":["kind","standard","successors","relationship_dispositions","evidence"],"properties":{"kind":{"const":"retire-standard"},"standard":{"$ref":"#/$defs/CanonicalId"},"successors":{"type":"array","uniqueItems":true,"items":{"$ref":"#/$defs/CanonicalId"}},"relationship_dispositions":{"type":"array","uniqueItems":true,"items":{"$ref":"#/$defs/RelationshipDisposition"}},"evidence":{"type":"array","minItems":1,"uniqueItems":true,"items":{"$ref":"#/$defs/EvidenceReference"}}},"additionalProperties":false},"ReplaceStandardRelationshipsEdit":{"type":"object","required":["kind","standard","requires","specializes","rationale"],"properties":{"kind":{"const":"replace-standard-relationships"},"standard":{"$ref":"#/$defs/CanonicalId"},"requires":{"type":"array","uniqueItems":true,"items":{"$ref":"#/$defs/CanonicalId"}},"specializes":{"type":"array","uniqueItems":true,"items":{"$ref":"#/$defs/CanonicalId"}},"rationale":{"$ref":"#/$defs/NonEmptyString"}},"additionalProperties":false},"AuthoringTargetHandle":{"type":"object","required":["kind","snapshot","id","schema_version"],"properties":{"kind":{"const":"authoring-target-handle"},"snapshot":{"$ref":"#/$defs/SnapshotHandle"},"id":{"$ref":"#/$defs/ChildId"},"schema_version":{"const":5}},"additionalProperties":false},"RelationshipConsumer":{"oneOf":[{"$ref":"#/$defs/CanonicalId"},{"$ref":"#/$defs/AuthoringTargetHandle"}]},"PolicyRelationship":{"type":"object","required":["source_policy","consumer","relation","applicability","source_scope","consumer_scope","evidence_owner","rationale"],"properties":{"source_policy":{"$ref":"#/$defs/CanonicalId"},"consumer":{"$ref":"#/$defs/RelationshipConsumer"},"relation":{"enum":["normative-consumer","router-projection","prompt-projection","template-projection","reference-projection","fixture-projection","enforcement-suite-projection","documentation-projection","implementation-projection"]},"applicability":{"$ref":"#/$defs/ApplicabilityExpression"},"source_scope":{"oneOf":[{"$ref":"#/$defs/ReviewScope"},{"type":"null"}]},"consumer_scope":{"oneOf":[{"$ref":"#/$defs/ReviewScope"},{"type":"null"}]},"evidence_owner":{"$ref":"#/$defs/CanonicalId"},"rationale":{"$ref":"#/$defs/NonEmptyString"}},"additionalProperties":false},"PutPolicyRelationshipEdit":{"type":"object","required":["kind","relationship"],"properties":{"kind":{"const":"put-policy-relationship"},"relationship":{"$ref":"#/$defs/PolicyRelationship"}},"additionalProperties":false},"RemovePolicyRelationshipEdit":{"type":"object","required":["kind","relationship"],"properties":{"kind":{"const":"remove-policy-relationship"},"relationship":{"$ref":"#/$defs/PolicyRelationship"}},"additionalProperties":false},"ModuleRelationshipKey":{"type":"object","required":["kind","relation","source","target"],"properties":{"kind":{"const":"module-relationship"},"relation":{"enum":["requires","specializes"]},"source":{"$ref":"#/$defs/CanonicalId"},"target":{"$ref":"#/$defs/CanonicalId"}},"additionalProperties":false},"PolicyRelationshipKey":{"type":"object","required":["kind","source_policy","consumer","relation"],"properties":{"kind":{"const":"policy-relationship"},"source_policy":{"$ref":"#/$defs/CanonicalId"},"consumer":{"$ref":"#/$defs/RelationshipConsumer"},"relation":{"$ref":"#/$defs/CanonicalId"}},"additionalProperties":false},"RelationshipKey":{"oneOf":[{"$ref":"#/$defs/ModuleRelationshipKey"},{"$ref":"#/$defs/PolicyRelationshipKey"}]},"RelationshipDisposition":{"type":"object","required":["relationship","disposition","rationale","evidence"],"properties":{"relationship":{"$ref":"#/$defs/RelationshipKey"},"disposition":{"enum":["remove","retarget"]},"replacement_consumer":{"$ref":"#/$defs/RelationshipConsumer"},"rationale":{"$ref":"#/$defs/NonEmptyString"},"evidence":{"type":"array","minItems":1,"uniqueItems":true,"items":{"$ref":"#/$defs/EvidenceReference"}}},"additionalProperties":false},"StandardEdit":{"oneOf":[{"$ref":"#/$defs/CreateStandardEdit"},{"$ref":"#/$defs/RegisterPolicyUnitEdit"},{"$ref":"#/$defs/ReviseStandardEdit"},{"$ref":"#/$defs/RevisePolicyUnitEdit"},{"$ref":"#/$defs/MovePolicyUnitEdit"},{"$ref":"#/$defs/RetirePolicyUnitEdit"},{"$ref":"#/$defs/RetireStandardEdit"},{"$ref":"#/$defs/ReplaceStandardRelationshipsEdit"},{"$ref":"#/$defs/PutPolicyRelationshipEdit"},{"$ref":"#/$defs/RemovePolicyRelationshipEdit"},{"$ref":"#/$defs/PutRoutingRuleEdit"},{"$ref":"#/$defs/RemoveRoutingRuleEdit"},{"$ref":"#/$defs/PutRoutingFactEdit"},{"$ref":"#/$defs/RemoveRoutingFactEdit"},{"$ref":"#/$defs/AuditPolicyUnitEdit"},{"$ref":"#/$defs/RewriteNavigationIndexEdit"},{"$ref":"#/$defs/PutDecisionProvenanceEdit"},{"$ref":"#/$defs/RetireDecisionProvenanceEdit"},{"$ref":"#/$defs/ApproveApplicationContentEdit"},{"$ref":"#/$defs/WithdrawApplicationContentEdit"},{"$ref":"#/$defs/ReviseOperationalArtifactEdit"}]},"StandardsChangeSet":{"type":"object","required":["purpose","edits"],"properties":{"purpose":{"$ref":"#/$defs/StandardsChangePurpose"},"edits":{"type":"array","minItems":1,"uniqueItems":true,"items":{"$ref":"#/$defs/StandardEdit"}}},"additionalProperties":false},"ProposalSummary":{"type":"object","required":["proposal","head_revision"],"properties":{"proposal":{"$ref":"#/$defs/ProposalHandle"},"head_revision":{"$ref":"#/$defs/ProposalRevisionHandle"}},"additionalProperties":false},"CreateProposalCall":{"type":"object","required":["kind","base_snapshot","change_set"],"properties":{"kind":{"const":"create-proposal"},"base_snapshot":{"$ref":"#/$defs/SnapshotHandle"},"change_set":{"$ref":"#/$defs/StandardsChangeSet"}},"additionalProperties":false},"CreateProposalResult":{"type":"object","required":["kind","proposal","revision"],"properties":{"kind":{"const":"create-proposal-result"},"proposal":{"$ref":"#/$defs/ProposalHandle"},"revision":{"$ref":"#/$defs/ProposalRevisionHandle"}},"additionalProperties":false},"FindProposalsCall":{"type":"object","required":["kind"],"properties":{"kind":{"const":"find-proposals"},"after":{"$ref":"#/$defs/ProposalHandle"},"limit":{"type":"integer","minimum":1,"default":50}},"additionalProperties":false},"FindProposalsResult":{"type":"object","required":["kind","proposals"],"properties":{"kind":{"const":"find-proposals-result"},"proposals":{"type":"array","items":{"$ref":"#/$defs/ProposalSummary"}},"continuation":{"$ref":"#/$defs/ProposalHandle"}},"additionalProperties":false},"ReviseProposalCall":{"type":"object","required":["kind","expected_revision","change_set"],"properties":{"kind":{"const":"revise-proposal"},"expected_revision":{"$ref":"#/$defs/ProposalRevisionHandle"},"change_set":{"$ref":"#/$defs/StandardsChangeSet"}},"additionalProperties":false},"ReviseProposalResult":{"type":"object","required":["kind","proposal","revision"],"properties":{"kind":{"const":"revise-proposal-result"},"proposal":{"$ref":"#/$defs/ProposalHandle"},"revision":{"$ref":"#/$defs/ProposalRevisionHandle"}},"additionalProperties":false},"DeleteSnapshotCall":{"type":"object","required":["kind","snapshot"],"properties":{"kind":{"const":"delete-snapshot"},"snapshot":{"$ref":"#/$defs/SnapshotHandle"}},"additionalProperties":false},"DeleteSnapshotResult":{"type":"object","required":["kind","snapshot","purge_deadline"],"properties":{"kind":{"const":"delete-snapshot-result"},"snapshot":{"$ref":"#/$defs/SnapshotHandle"},"purge_deadline":{"$ref":"#/$defs/Timestamp"}},"additionalProperties":false},"UndeleteSnapshotCall":{"type":"object","required":["kind","snapshot"],"properties":{"kind":{"const":"undelete-snapshot"},"snapshot":{"$ref":"#/$defs/SnapshotHandle"}},"additionalProperties":false},"UndeleteSnapshotResult":{"type":"object","required":["kind","snapshot"],"properties":{"kind":{"const":"undelete-snapshot-result"},"snapshot":{"$ref":"#/$defs/ActiveSnapshotSummary"}},"additionalProperties":false},"QueryNextOperation":{"type":"object","required":["operation","request_kind","snapshot"],"properties":{"operation":{"const":"query"},"request_kind":{"enum":["route","read","related"]},"target":{"$ref":"#/$defs/CanonicalId"},"snapshot":{"$ref":"#/$defs/SnapshotHandle"}},"additionalProperties":false},"QueryProposalNextOperation":{"type":"object","required":["operation","request_kind","revision"],"properties":{"operation":{"const":"query_proposal"},"request_kind":{"enum":["route","read","related"]},"target":{"$ref":"#/$defs/CanonicalId"},"revision":{"$ref":"#/$defs/ProposalRevisionHandle"}},"additionalProperties":false},"ResolveNextOperation":{"type":"object","required":["operation","request_kind","analysis"],"properties":{"operation":{"const":"resolve"},"request_kind":{"enum":["provide-fact","consumer-disposition","impact-disposition","coverage-attestation"]},"target":{"$ref":"#/$defs/CanonicalId"},"work":{"$ref":"#/$defs/AnalysisChildHandle"},"analysis":{"$ref":"#/$defs/AnalysisHandle"}},"additionalProperties":false},"InspectNextOperation":{"type":"object","required":["operation","request_kind","handle"],"properties":{"operation":{"const":"inspect"},"request_kind":{"const":"inspect"},"handle":{"$ref":"#/$defs/InspectableHandle"}},"additionalProperties":false},"NextOperation":{"oneOf":[{"$ref":"#/$defs/QueryNextOperation"},{"$ref":"#/$defs/ResolveNextOperation"},{"$ref":"#/$defs/InspectNextOperation"},{"$ref":"#/$defs/FocusedQueryNextOperation"}]},"QueryCall":{"type":"object","required":["snapshot","request"],"properties":{"snapshot":{"$ref":"#/$defs/SnapshotHandle"},"request":{"$ref":"#/$defs/QueryRequest"}},"additionalProperties":false},"QueryProposalCall":{"type":"object","required":["revision","request"],"properties":{"revision":{"$ref":"#/$defs/ProposalRevisionHandle"},"request":{"$ref":"#/$defs/QueryRequest"}},"additionalProperties":false},"AnalyzeProposalCall":{"type":"object","required":["revision"],"properties":{"revision":{"$ref":"#/$defs/ProposalRevisionHandle"}},"additionalProperties":false},"ReviewDecision":{"type":"object","required":["owner","decision","rationale","evidence"],"properties":{"owner":{"enum":["consumer","impact","audit"]},"decision":{"const":"accept"},"rationale":{"$ref":"#/$defs/NonEmptyString"},"evidence":{"type":"array","minItems":1,"uniqueItems":true,"items":{"$ref":"#/$defs/EvidenceReference"}}},"additionalProperties":false},"ReviewProposalCall":{"type":"object","required":["kind","analysis","decisions"],"properties":{"kind":{"const":"review-proposal"},"analysis":{"$ref":"#/$defs/AnalysisHandle"},"decisions":{"type":"array","minItems":3,"maxItems":3,"uniqueItems":true,"items":{"$ref":"#/$defs/ReviewDecision"}},"prior_readiness":{"$ref":"#/$defs/ReadinessHandle"}},"additionalProperties":false},"ReviewProposalResult":{"type":"object","required":["kind","readiness","revision","status"],"properties":{"kind":{"const":"review-proposal-result"},"readiness":{"$ref":"#/$defs/ReadinessHandle"},"revision":{"$ref":"#/$defs/ProposalRevisionHandle"},"status":{"const":"ready"}},"additionalProperties":false},"ApplyProposalCall":{"type":"object","required":["kind","readiness"],"properties":{"kind":{"const":"apply-proposal"},"readiness":{"$ref":"#/$defs/ReadinessHandle"}},"additionalProperties":false},"ApplyProposalResult":{"type":"object","required":["kind","application","status"],"properties":{"kind":{"const":"apply-proposal-result"},"application":{"$ref":"#/$defs/ApplicationHandle"},"status":{"const":"applied"}},"additionalProperties":false},"RecoverApplicationCall":{"type":"object","required":["kind","readiness"],"properties":{"kind":{"const":"recover-application"},"readiness":{"$ref":"#/$defs/ReadinessHandle"}},"additionalProperties":false},"RecoverApplicationResult":{"type":"object","required":["kind","application","status"],"properties":{"kind":{"const":"recover-application-result"},"application":{"$ref":"#/$defs/ApplicationHandle"},"status":{"const":"applied"}},"additionalProperties":false},"ApplicationRecoveryRequiredResult":{"type":"object","required":["kind","application","status","code","outcome","message"],"properties":{"kind":{"const":"application-recovery-required-result"},"application":{"$ref":"#/$defs/ApplicationHandle"},"status":{"const":"recovery-required"},"code":{"enum":["APPLICATION.PUBLICATION_UNAVAILABLE","APPLICATION.OBSERVATION_UNAVAILABLE","APPLICATION.OUTCOME_PERSISTENCE_UNAVAILABLE","APPLICATION.RECOVERY_TARGET_UNCERTAIN","APPLICATION.RECOVERY_TARGET_DIVERGED"]},"outcome":{"const":"unavailable"},"message":{"$ref":"#/$defs/NonEmptyString"}},"additionalProperties":false},"PolicySummary":{"type":"object","required":["handle","authority","scope"],"properties":{"handle":{"$ref":"#/$defs/SnapshotChildHandle"},"authority":{"enum":["normative","projection","contextual","evidence"]},"scope":{"$ref":"#/$defs/ReviewScope"}},"additionalProperties":false},"RelationshipSummary":{"type":"object","required":["handle","source","target","relation","groups","direction","traversal_eligible","applicability"],"properties":{"handle":{"$ref":"#/$defs/SnapshotChildHandle"},"source":{"$ref":"#/$defs/CanonicalId"},"target":{"$ref":"#/$defs/CanonicalId"},"relation":{"$ref":"#/$defs/CanonicalId"},"groups":{"type":"array","items":{"$ref":"#/$defs/CanonicalId"},"minItems":1,"uniqueItems":true},"direction":{"enum":["incoming","outgoing"]},"traversal_eligible":{"type":"boolean"},"applicability":{"enum":["true","false","unknown","not-declared"]}},"additionalProperties":false},"ProposalPolicySummary":{"type":"object","required":["id","authority","scope"],"properties":{"id":{"$ref":"#/$defs/CanonicalId"},"authority":{"enum":["normative","projection","contextual","evidence"]},"scope":{"$ref":"#/$defs/ReviewScope"}},"additionalProperties":false},"ProposalRelationshipSummary":{"type":"object","required":["source","target","relation","groups","direction","traversal_eligible","applicability"],"properties":{"source":{"$ref":"#/$defs/CanonicalId"},"target":{"$ref":"#/$defs/CanonicalId"},"relation":{"$ref":"#/$defs/CanonicalId"},"groups":{"type":"array","items":{"$ref":"#/$defs/CanonicalId"},"minItems":1,"uniqueItems":true},"direction":{"enum":["incoming","outgoing"]},"traversal_eligible":{"type":"boolean"},"applicability":{"enum":["true","false","unknown","not-declared"]}},"additionalProperties":false},"RouteResult":{"type":"object","required":["kind","snapshot","reading_plan","unresolved_questions","next_operations"],"properties":{"kind":{"const":"route-result"},"snapshot":{"$ref":"#/$defs/SnapshotHandle"},"reading_plan":{"type":"array","items":{"$ref":"#/$defs/ReadingPlanEntry"}},"unresolved_questions":{"type":"array","items":{"$ref":"#/$defs/Question"}},"next_operations":{"type":"array","items":{"$ref":"#/$defs/NextOperation"}},"summary":{"type":"string"}},"additionalProperties":false},"ReadResult":{"type":"object","required":["kind","snapshot","policy","content","requires","specializes","related","next_operations"],"properties":{"kind":{"const":"read-result"},"snapshot":{"$ref":"#/$defs/SnapshotHandle"},"policy":{"$ref":"#/$defs/PolicySummary"},"content":{"type":"string"},"requires":{"type":"array","items":{"$ref":"#/$defs/CanonicalId"},"uniqueItems":true},"specializes":{"type":"array","items":{"$ref":"#/$defs/CanonicalId"},"uniqueItems":true},"related":{"type":"array","items":{"$ref":"#/$defs/RelationshipSummary"}},"next_operations":{"type":"array","items":{"$ref":"#/$defs/NextOperation"}},"summary":{"type":"string"},"routing":{"$ref":"#/$defs/RoutingConfiguration"},"coverage":{"$ref":"#/$defs/ReadCoverage"},"application_exposure":{"$ref":"#/$defs/ApplicationExposureState"},"provenance":{"type":"array","items":{"$ref":"#/$defs/CanonicalId"}}},"additionalProperties":false},"PolicyUnitMapping":{"type":"object","required":["state","policy_units"],"properties":{"state":{"enum":["exact-policy-unit","policy-units-present","incomplete"]},"reason":{"const":"no-policy-units"},"policy_units":{"type":"array","items":{"$ref":"#/$defs/CanonicalId"},"uniqueItems":true}},"additionalProperties":false},"RelatedResult":{"type":"object","required":["kind","snapshot","target","policy_unit_mapping","relationships","next_operations"],"properties":{"kind":{"const":"related-result"},"snapshot":{"$ref":"#/$defs/SnapshotHandle"},"target":{"$ref":"#/$defs/CanonicalId"},"authoring_target":{"$ref":"#/$defs/AuthoringTargetHandle"},"policy_unit_mapping":{"$ref":"#/$defs/PolicyUnitMapping"},"relationships":{"type":"array","items":{"$ref":"#/$defs/RelationshipSummary"}},"next_operations":{"type":"array","items":{"$ref":"#/$defs/NextOperation"}},"summary":{"type":"string"}},"additionalProperties":false},"QueryResult":{"oneOf":[{"$ref":"#/$defs/RouteResult"},{"$ref":"#/$defs/ReadResult"},{"$ref":"#/$defs/RelatedResult"},{"$ref":"#/$defs/NavigationIndexesResult"},{"$ref":"#/$defs/ProvenanceReadResult"},{"$ref":"#/$defs/OperationalReadResult"}]},"ProposalRouteResult":{"type":"object","required":["kind","revision","reading_plan","unresolved_questions","next_operations"],"properties":{"kind":{"const":"proposal-route-result"},"revision":{"$ref":"#/$defs/ProposalRevisionHandle"},"reading_plan":{"type":"array","items":{"$ref":"#/$defs/ReadingPlanEntry"}},"unresolved_questions":{"type":"array","items":{"$ref":"#/$defs/Question"}},"next_operations":{"type":"array","items":{"$ref":"#/$defs/QueryProposalNextOperation"}},"summary":{"type":"string"}},"additionalProperties":false},"ProposalReadResult":{"type":"object","required":["kind","revision","policy","content","requires","specializes","related","next_operations"],"properties":{"kind":{"const":"proposal-read-result"},"revision":{"$ref":"#/$defs/ProposalRevisionHandle"},"policy":{"$ref":"#/$defs/ProposalPolicySummary"},"content":{"type":"string"},"requires":{"type":"array","items":{"$ref":"#/$defs/CanonicalId"},"uniqueItems":true},"specializes":{"type":"array","items":{"$ref":"#/$defs/CanonicalId"},"uniqueItems":true},"related":{"type":"array","items":{"$ref":"#/$defs/ProposalRelationshipSummary"}},"next_operations":{"type":"array","items":{"$ref":"#/$defs/QueryProposalNextOperation"}},"summary":{"type":"string"},"routing":{"$ref":"#/$defs/RoutingConfiguration"},"coverage":{"$ref":"#/$defs/ReadCoverage"},"application_exposure":{"$ref":"#/$defs/ApplicationExposureState"},"provenance":{"type":"array","items":{"$ref":"#/$defs/CanonicalId"}}},"additionalProperties":false},"ProposalRelatedResult":{"type":"object","required":["kind","revision","target","policy_unit_mapping","relationships","next_operations"],"properties":{"kind":{"const":"proposal-related-result"},"revision":{"$ref":"#/$defs/ProposalRevisionHandle"},"target":{"$ref":"#/$defs/CanonicalId"},"authoring_target":{"$ref":"#/$defs/AuthoringTargetHandle"},"policy_unit_mapping":{"$ref":"#/$defs/PolicyUnitMapping"},"relationships":{"type":"array","items":{"$ref":"#/$defs/ProposalRelationshipSummary"}},"next_operations":{"type":"array","items":{"$ref":"#/$defs/QueryProposalNextOperation"}},"summary":{"type":"string"}},"additionalProperties":false},"QueryProposalResult":{"oneOf":[{"$ref":"#/$defs/ProposalRouteResult"},{"$ref":"#/$defs/ProposalReadResult"},{"$ref":"#/$defs/ProposalRelatedResult"},{"$ref":"#/$defs/NavigationIndexesResult"},{"$ref":"#/$defs/ProvenanceReadResult"},{"$ref":"#/$defs/OperationalReadResult"}]},"AnalysisRequest":{"type":"object","required":["kind","base_snapshot","proposed_snapshot","changes","semantic_proposals","contract_version"],"properties":{"kind":{"const":"analysis-request"},"base_snapshot":{"$ref":"#/$defs/SnapshotHandle"},"proposed_snapshot":{"$ref":"#/$defs/SnapshotHandle"},"changes":{"type":"array","items":{"$ref":"#/$defs/ChangeDescriptor"},"minItems":1},"semantic_proposals":{"type":"array","items":{"$ref":"#/$defs/SemanticProposal"},"uniqueItems":true},"prior_analysis":{"$ref":"#/$defs/AnalysisHandle"},"contract_version":{"const":6}},"additionalProperties":false},"PrepareCall":{"type":"object","required":["request"],"properties":{"request":{"$ref":"#/$defs/AnalysisRequest"}},"additionalProperties":false},"AnalysisContext":{"type":"object","required":["kind","handle","subjects","changes","semantic_proposals"],"properties":{"kind":{"const":"analysis-context"},"handle":{"$ref":"#/$defs/AnalysisChildHandle"},"subjects":{"type":"array","items":{"$ref":"#/$defs/ChangedPolicyUnit"},"uniqueItems":true},"changes":{"type":"array","items":{"$ref":"#/$defs/ChangeDescriptor"},"minItems":1,"uniqueItems":true},"semantic_proposals":{"type":"array","items":{"$ref":"#/$defs/SemanticProposal"},"uniqueItems":true}},"additionalProperties":false},"AuthorizationReference":{"type":"object","required":["id","issuer","capability","authority_digest"],"properties":{"id":{"$ref":"#/$defs/AuthorizationId"},"issuer":{"$ref":"#/$defs/CanonicalId"},"capability":{"$ref":"#/$defs/CanonicalId"},"authority_digest":{"$ref":"#/$defs/Digest"}},"additionalProperties":false},"ProviderReference":{"type":"object","required":["id","contract","contract_version","input_digest"],"properties":{"id":{"$ref":"#/$defs/CanonicalId"},"contract":{"$ref":"#/$defs/CanonicalId"},"contract_version":{"$ref":"#/$defs/NonEmptyString"},"input_digest":{"$ref":"#/$defs/Digest"}},"additionalProperties":false},"AuthorizationRecord":{"type":"object","required":["reference","issuer_semantic_revision","principal","action","subject_kind","subject_id","authorization_evidence","revocation_authority","revocation_authority_semantic_revision","revocation_evidence"],"properties":{"reference":{"$ref":"#/$defs/AuthorizationReference"},"issuer_semantic_revision":{"type":"integer","minimum":1},"principal":{"$ref":"#/$defs/CanonicalId"},"action":{"$ref":"#/$defs/CanonicalId"},"subject_kind":{"$ref":"#/$defs/CanonicalId"},"subject_id":{"$ref":"#/$defs/NonEmptyString"},"authorization_evidence":{"type":"array","items":{"$ref":"#/$defs/EvidenceReference"},"minItems":1,"uniqueItems":true},"revocation_authority":{"$ref":"#/$defs/CanonicalId"},"revocation_authority_semantic_revision":{"type":"integer","minimum":1},"revocation_evidence":{"type":"array","items":{"$ref":"#/$defs/EvidenceReference"},"minItems":1,"uniqueItems":true}},"additionalProperties":false},"DomainContractReference":{"type":"object","required":["id","version"],"properties":{"id":{"$ref":"#/$defs/CanonicalId"},"version":{"$ref":"#/$defs/NonEmptyString"}},"additionalProperties":false},"AnalysisExecutionContractView":{"type":"object","required":["authorization_authority_digest","providers"],"properties":{"authorization_authority_digest":{"oneOf":[{"$ref":"#/$defs/Digest"},{"type":"null"}]},"providers":{"type":"array","items":{"$ref":"#/$defs/ProviderReference"},"uniqueItems":true}},"additionalProperties":false},"FactRequirement":{"type":"object","required":["kind","handle","fact","fact_semantic_revision","fact_contract_digest","context","value_contract","answer_contract","evidence_contract","authorization_capability"],"properties":{"kind":{"const":"fact-requirement"},"handle":{"$ref":"#/$defs/AnalysisChildHandle"},"fact":{"$ref":"#/$defs/CanonicalId"},"fact_semantic_revision":{"type":"integer","minimum":1},"fact_contract_digest":{"$ref":"#/$defs/Digest"},"context":{"$ref":"#/$defs/AnalysisChildHandle"},"value_contract":{"$ref":"#/$defs/FactValueContract"},"answer_contract":{"$ref":"#/$defs/CanonicalId"},"evidence_contract":{"$ref":"#/$defs/CanonicalId"},"authorization_capability":{"$ref":"#/$defs/CanonicalId"}},"additionalProperties":false},"FactRequirementWork":{"type":"object","required":["requirement","prompt","dependent_programs"],"properties":{"requirement":{"$ref":"#/$defs/FactRequirement"},"prompt":{"$ref":"#/$defs/NonEmptyString"},"dependent_programs":{"type":"array","items":{"$ref":"#/$defs/NonEmptyString"},"minItems":1,"uniqueItems":true}},"additionalProperties":false},"FactObservation":{"type":"object","required":["kind","handle","requirement","value","evidence","authorization"],"properties":{"kind":{"const":"fact-observation"},"handle":{"$ref":"#/$defs/AnalysisChildHandle"},"requirement":{"$ref":"#/$defs/AnalysisChildHandle"},"value":{"$ref":"#/$defs/FactValue"},"evidence":{"type":"array","items":{"$ref":"#/$defs/EvidenceReference"},"minItems":1,"uniqueItems":true},"authorization":{"$ref":"#/$defs/AuthorizationReference"},"provider":{"$ref":"#/$defs/ProviderReference"}},"additionalProperties":false},"Obligation":{"type":"object","required":["handle","kind","target","scope","reasons","state","permitted_submissions","fingerprint"],"properties":{"handle":{"$ref":"#/$defs/AnalysisChildHandle"},"kind":{"enum":["consumer-review","impact-review","lifecycle-impact-review","audit-coverage","unmapped-normative-change"]},"target":{"$ref":"#/$defs/CanonicalId"},"scope":{"$ref":"#/$defs/ReviewScope"},"reasons":{"type":"array","items":{"$ref":"#/$defs/SelectionReason"},"minItems":1,"uniqueItems":true},"state":{"enum":["required","resolved","blocked"]},"applicability":{"enum":["true","false","unknown","not-declared"]},"permitted_submissions":{"type":"array","items":{"enum":["consumer-disposition","impact-disposition","coverage-attestation"]},"minItems":1,"uniqueItems":true},"review_contract":{"$ref":"#/$defs/ConsumerReviewContract"},"fingerprint":{"$ref":"#/$defs/DecisionFingerprint"}},"additionalProperties":false},"ProvideFactSubmission":{"type":"object","required":["kind","requirement","value","evidence"],"properties":{"kind":{"const":"provide-fact"},"requirement":{"$ref":"#/$defs/AnalysisChildHandle"},"value":{"$ref":"#/$defs/FactValue"},"evidence":{"type":"array","items":{"$ref":"#/$defs/EvidenceReference"},"minItems":1,"uniqueItems":true}},"additionalProperties":false},"ConsumerDispositionSubmission":{"type":"object","required":["kind","obligation","result","rationale","evidence","fingerprint"],"properties":{"kind":{"const":"consumer-disposition"},"obligation":{"$ref":"#/$defs/AnalysisChildHandle"},"result":{"enum":["updated","reviewed-no-change","not-applicable","blocked"]},"rationale":{"$ref":"#/$defs/NonEmptyString"},"evidence":{"type":"array","items":{"$ref":"#/$defs/EvidenceReference"},"minItems":1},"fingerprint":{"$ref":"#/$defs/DecisionFingerprint"}},"additionalProperties":false},"ImpactDispositionSubmission":{"type":"object","required":["kind","obligation","result","rationale","evidence","fingerprint"],"properties":{"kind":{"const":"impact-disposition"},"obligation":{"$ref":"#/$defs/AnalysisChildHandle"},"result":{"enum":["confirmed","resolved-no-impact","requires-change","blocked"]},"rationale":{"$ref":"#/$defs/NonEmptyString"},"evidence":{"type":"array","items":{"$ref":"#/$defs/EvidenceReference"},"minItems":1},"fingerprint":{"$ref":"#/$defs/DecisionFingerprint"}},"additionalProperties":false},"CoverageAttestationClaim":{"type":"object","required":["requirement","conclusion","evidence","explicit_exclusions","rationale","auditor_provenance"],"properties":{"requirement":{"$ref":"#/$defs/AnalysisChildHandle"},"conclusion":{"const":"complete"},"evidence":{"type":"array","items":{"$ref":"#/$defs/EvidenceReference"},"minItems":1,"uniqueItems":true},"explicit_exclusions":{"type":"array","items":{"$ref":"#/$defs/EvidenceReference"},"uniqueItems":true},"rationale":{"$ref":"#/$defs/NonEmptyString"},"auditor_provenance":{"$ref":"#/$defs/NonEmptyString"}},"additionalProperties":false},"CoverageAttestationSubmission":{"type":"object","required":["kind","claim"],"properties":{"kind":{"const":"coverage-attestation"},"claim":{"$ref":"#/$defs/CoverageAttestationClaim"}},"additionalProperties":false},"Submission":{"oneOf":[{"$ref":"#/$defs/ProvideFactSubmission"},{"$ref":"#/$defs/ConsumerDispositionSubmission"},{"$ref":"#/$defs/ImpactDispositionSubmission"},{"$ref":"#/$defs/CoverageAttestationSubmission"}]},"ResolveCall":{"type":"object","required":["analysis","submission"],"properties":{"analysis":{"$ref":"#/$defs/AnalysisHandle"},"submission":{"$ref":"#/$defs/Submission"}},"additionalProperties":false},"CoverageRequirement":{"type":"object","required":["kind","handle","subject","owner","semantic_revision","relationship_kinds","horizon","required_evidence_contract"],"properties":{"kind":{"const":"coverage-requirement"},"handle":{"$ref":"#/$defs/AnalysisChildHandle"},"subject":{"$ref":"#/$defs/CanonicalId"},"owner":{"$ref":"#/$defs/CanonicalId"},"semantic_revision":{"type":"integer","minimum":1},"relationship_kinds":{"type":"array","items":{"$ref":"#/$defs/CanonicalId"},"uniqueItems":true},"horizon":{"$ref":"#/$defs/CanonicalId"},"required_evidence_contract":{"$ref":"#/$defs/CanonicalId"}},"additionalProperties":false},"CoverageAttestation":{"type":"object","required":["kind","requirement","conclusion","evidence","explicit_exclusions","rationale","auditor_provenance","schema_version","authorization"],"properties":{"kind":{"const":"coverage-attestation"},"requirement":{"$ref":"#/$defs/AnalysisChildHandle"},"conclusion":{"const":"complete"},"evidence":{"type":"array","items":{"$ref":"#/$defs/EvidenceReference"},"minItems":1},"explicit_exclusions":{"type":"array","items":{"$ref":"#/$defs/EvidenceReference"}},"rationale":{"$ref":"#/$defs/NonEmptyString"},"auditor_provenance":{"$ref":"#/$defs/NonEmptyString"},"schema_version":{"const":4},"authorization":{"$ref":"#/$defs/AuthorizationReference"}},"additionalProperties":false},"CoverageCertificate":{"type":"object","required":["kind","handle","requirement","subject","owner","semantic_revision","horizon_digest","relationship_digest","evidence_digests","fact_schema_digest"],"properties":{"kind":{"const":"coverage-certificate"},"handle":{"$ref":"#/$defs/AnalysisChildHandle"},"requirement":{"$ref":"#/$defs/AnalysisChildHandle"},"subject":{"$ref":"#/$defs/CanonicalId"},"owner":{"$ref":"#/$defs/CanonicalId"},"semantic_revision":{"type":"integer","minimum":1},"horizon_digest":{"$ref":"#/$defs/Digest"},"relationship_digest":{"$ref":"#/$defs/Digest"},"evidence_digests":{"type":"array","items":{"$ref":"#/$defs/Digest"},"uniqueItems":true},"fact_schema_digest":{"$ref":"#/$defs/Digest"}},"additionalProperties":false},"DispositionRecord":{"type":"object","required":["obligation","kind","result","rationale","evidence","authorization","fingerprint"],"properties":{"obligation":{"$ref":"#/$defs/AnalysisChildHandle"},"kind":{"enum":["consumer-disposition","impact-disposition"]},"result":{"$ref":"#/$defs/NonEmptyString"},"rationale":{"$ref":"#/$defs/NonEmptyString"},"evidence":{"type":"array","items":{"$ref":"#/$defs/EvidenceReference"}},"authorization":{"$ref":"#/$defs/AuthorizationReference"},"fingerprint":{"$ref":"#/$defs/DecisionFingerprint"}},"additionalProperties":false},"AnalysisState":{"type":"object","required":["kind","handle","base_snapshot","proposed_reference","changes","semantic_proposals","fact_observations","dispositions","coverage_attestations","authorization_records","domain_contracts","execution_contracts","contract_version"],"properties":{"kind":{"const":"analysis-state"},"handle":{"$ref":"#/$defs/AnalysisHandle"},"base_snapshot":{"$ref":"#/$defs/SnapshotHandle"},"proposed_reference":{"$ref":"#/$defs/AnalysisMaterialHandle"},"changes":{"type":"array","items":{"$ref":"#/$defs/ChangeDescriptor"},"minItems":1,"uniqueItems":true},"semantic_proposals":{"type":"array","items":{"$ref":"#/$defs/SemanticProposal"},"uniqueItems":true},"fact_observations":{"type":"array","items":{"$ref":"#/$defs/FactObservation"},"uniqueItems":true},"dispositions":{"type":"array","items":{"$ref":"#/$defs/DispositionRecord"},"uniqueItems":true},"coverage_attestations":{"type":"array","items":{"$ref":"#/$defs/CoverageAttestation"},"uniqueItems":true},"authorization_records":{"type":"array","items":{"$ref":"#/$defs/AuthorizationRecord"},"uniqueItems":true},"domain_contracts":{"type":"array","items":{"$ref":"#/$defs/DomainContractReference"},"minItems":1,"uniqueItems":true},"execution_contracts":{"$ref":"#/$defs/AnalysisExecutionContractView"},"contract_version":{"const":7}},"additionalProperties":false},"PendingResult":{"type":"object","required":["kind","handle","status","context","changes","changed_units","obligations","fact_requirements","reading_plan","next_operations"],"properties":{"kind":{"const":"pending-result"},"handle":{"$ref":"#/$defs/AnalysisHandle"},"status":{"const":"needs-action"},"context":{"$ref":"#/$defs/AnalysisContext"},"changes":{"type":"array","items":{"$ref":"#/$defs/ChangeDescriptor"}},"changed_units":{"type":"array","items":{"$ref":"#/$defs/ChangedPolicyUnit"}},"obligations":{"type":"array","items":{"$ref":"#/$defs/Obligation"}},"fact_requirements":{"type":"array","items":{"$ref":"#/$defs/FactRequirementWork"}},"reading_plan":{"type":"array","items":{"$ref":"#/$defs/ReadingPlanEntry"}},"next_operations":{"type":"array","items":{"$ref":"#/$defs/NextOperation"}},"summary":{"type":"string"}},"additionalProperties":false},"CompleteResult":{"type":"object","required":["kind","handle","status","context","changes","changed_units","coverage_certificates","fact_observations","dispositions","reading_plan","completion"],"properties":{"kind":{"const":"complete-result"},"handle":{"$ref":"#/$defs/AnalysisHandle"},"status":{"const":"complete"},"context":{"$ref":"#/$defs/AnalysisContext"},"changes":{"type":"array","items":{"$ref":"#/$defs/ChangeDescriptor"}},"changed_units":{"type":"array","items":{"$ref":"#/$defs/ChangedPolicyUnit"}},"coverage_certificates":{"type":"array","items":{"$ref":"#/$defs/CoverageCertificate"},"uniqueItems":true},"fact_observations":{"type":"array","items":{"$ref":"#/$defs/FactObservation"},"uniqueItems":true},"dispositions":{"type":"array","items":{"$ref":"#/$defs/DispositionRecord"}},"reading_plan":{"type":"array","items":{"$ref":"#/$defs/ReadingPlanEntry"}},"completion":{"$ref":"#/$defs/CompletionProof"},"summary":{"type":"string"}},"additionalProperties":false},"RepositoryPath":{"type":"array","items":{"$ref":"#/$defs/NonEmptyString"},"minItems":1},"ProvenanceRecord":{"type":"object","required":["snapshot","path"],"properties":{"snapshot":{"$ref":"#/$defs/SnapshotHandle"},"path":{"$ref":"#/$defs/RepositoryPath"}},"additionalProperties":false},"SnapshotInspectionResult":{"type":"object","required":["kind","snapshot"],"properties":{"kind":{"const":"snapshot-inspection-result"},"snapshot":{"$ref":"#/$defs/SnapshotSummary"}},"additionalProperties":false},"PolicyInspectionResult":{"type":"object","required":["kind","policy","declaration","representation_digest","structural_digest","provenance"],"properties":{"kind":{"const":"policy-inspection-result"},"policy":{"$ref":"#/$defs/SnapshotChildHandle"},"declaration":{"oneOf":[{"$ref":"#/$defs/CanonicalModuleDeclaration"},{"$ref":"#/$defs/PolicyUnitDeclaration"}]},"representation_digest":{"$ref":"#/$defs/Digest"},"structural_digest":{"$ref":"#/$defs/Digest"},"provenance":{"$ref":"#/$defs/ProvenanceRecord"}},"additionalProperties":false},"RelationshipInspectionResult":{"type":"object","required":["kind","relationship","policy_semantics","provenance"],"properties":{"kind":{"const":"relationship-inspection-result"},"relationship":{"$ref":"#/$defs/RelationshipSummary"},"policy_semantics":{"oneOf":[{"$ref":"#/$defs/PolicyRelationshipInspection"},{"type":"null"}]},"provenance":{"$ref":"#/$defs/ProvenanceRecord"}},"additionalProperties":false},"AnalysisInspectionResult":{"type":"object","required":["kind","state"],"properties":{"kind":{"const":"analysis-inspection-result"},"state":{"$ref":"#/$defs/AnalysisState"}},"additionalProperties":false},"AnalysisChildArtifact":{"oneOf":[{"$ref":"#/$defs/AnalysisContext"},{"$ref":"#/$defs/FactRequirement"},{"$ref":"#/$defs/FactObservation"},{"$ref":"#/$defs/Obligation"},{"$ref":"#/$defs/CoverageRequirement"},{"$ref":"#/$defs/CoverageCertificate"}]},"AnalysisChildInspectionResult":{"type":"object","required":["kind","handle","artifact"],"properties":{"kind":{"const":"analysis-child-inspection-result"},"handle":{"$ref":"#/$defs/AnalysisChildHandle"},"artifact":{"$ref":"#/$defs/AnalysisChildArtifact"}},"additionalProperties":false},"InspectionResult":{"oneOf":[{"$ref":"#/$defs/SnapshotInspectionResult"},{"$ref":"#/$defs/PolicyInspectionResult"},{"$ref":"#/$defs/RelationshipInspectionResult"},{"$ref":"#/$defs/AnalysisInspectionResult"},{"$ref":"#/$defs/AnalysisChildInspectionResult"}]},"InspectCall":{"type":"object","required":["handle"],"properties":{"handle":{"$ref":"#/$defs/InspectableHandle"}},"additionalProperties":false},"RejectedResult":{"type":"object","required":["kind","code","outcome","message","details","next_operations"],"properties":{"kind":{"const":"rejected-result"},"code":{"$ref":"#/$defs/CanonicalId"},"outcome":{"enum":["invalid","unavailable","unsupported","unauthorized"]},"target":{"$ref":"#/$defs/NonEmptyString"},"message":{"$ref":"#/$defs/NonEmptyString"},"details":{"type":"object","additionalProperties":{"$ref":"#/$defs/ScalarValue"}},"next_operations":{"type":"array","items":{"$ref":"#/$defs/NextOperation"}}},"additionalProperties":false},"AuthoredRoutingRule":{"type":"object","required":["id","target","when","condition"],"properties":{"id":{"$ref":"#/$defs/CanonicalId"},"target":{"$ref":"#/$defs/CanonicalId"},"when":{"$ref":"#/$defs/ApplicabilityExpression"},"condition":{"$ref":"#/$defs/NonEmptyString"}},"additionalProperties":false},"AuthoredRoutingFact":{"type":"object","required":["id","semantic_revision","type","nullable","values","aliases","meaning","prompt"],"properties":{"id":{"$ref":"#/$defs/CanonicalId"},"semantic_revision":{"type":"integer","minimum":1},"type":{"enum":["boolean","enum","string","string-set","enum-set","canonical-id"]},"nullable":{"type":"boolean"},"values":{"type":"array","items":{"type":"string"},"uniqueItems":true},"aliases":{"type":"array","items":{"$ref":"#/$defs/CanonicalId"},"uniqueItems":true},"meaning":{"$ref":"#/$defs/NonEmptyString"},"prompt":{"$ref":"#/$defs/NonEmptyString"}},"additionalProperties":false},"PutRoutingRuleEdit":{"type":"object","required":["kind","rule","rationale"],"properties":{"kind":{"const":"put-routing-rule"},"rule":{"$ref":"#/$defs/AuthoredRoutingRule"},"rationale":{"$ref":"#/$defs/NonEmptyString"}},"additionalProperties":false},"RemoveRoutingRuleEdit":{"type":"object","required":["kind","rule","rationale"],"properties":{"kind":{"const":"remove-routing-rule"},"rule":{"$ref":"#/$defs/CanonicalId"},"rationale":{"$ref":"#/$defs/NonEmptyString"}},"additionalProperties":false},"PutRoutingFactEdit":{"type":"object","required":["kind","fact","rationale"],"properties":{"kind":{"const":"put-routing-fact"},"fact":{"$ref":"#/$defs/AuthoredRoutingFact"},"rationale":{"$ref":"#/$defs/NonEmptyString"}},"additionalProperties":false},"RemoveRoutingFactEdit":{"type":"object","required":["kind","fact","rationale"],"properties":{"kind":{"const":"remove-routing-fact"},"fact":{"$ref":"#/$defs/CanonicalId"},"rationale":{"$ref":"#/$defs/NonEmptyString"}},"additionalProperties":false},"VerificationFailure":{"type":"object","additionalProperties":false,"required":["code","message","suite","check"],"properties":{"code":{"$ref":"#/$defs/NonEmptyString"},"message":{"$ref":"#/$defs/NonEmptyString"},"suite":{"type":["string","null"]},"check":{"type":["string","null"]}}},"VerificationReport":{"type":"object","additionalProperties":false,"required":["passed","exit_code","suites","checks","failures"],"properties":{"passed":{"type":"boolean"},"exit_code":{"enum":[0,1,2,3,4]},"suites":{"type":"integer","minimum":0},"checks":{"type":"integer","minimum":0},"failures":{"type":"array","items":{"$ref":"#/$defs/VerificationFailure"}}}},"VerifyRepositoryCall":{"type":"object","additionalProperties":false,"required":["kind","refresh_verification_inputs"],"properties":{"kind":{"const":"verify-repository"},"refresh_verification_inputs":{"type":"boolean"}}},"VerifyRepositoryResult":{"type":"object","additionalProperties":false,"required":["kind","refreshed_verification_inputs","verification"],"properties":{"kind":{"const":"verify-repository-result"},"refreshed_verification_inputs":{"type":"boolean"},"verification":{"$ref":"#/$defs/VerificationReport"}}},"VerifyProposalCall":{"type":"object","additionalProperties":false,"required":["kind","revision"],"properties":{"kind":{"const":"verify-proposal"},"revision":{"$ref":"#/$defs/ProposalRevisionHandle"},"readiness":{"$ref":"#/$defs/ReadinessHandle"}}},"VerifyProposalResult":{"type":"object","additionalProperties":false,"required":["kind","revision","verification"],"properties":{"kind":{"const":"verify-proposal-result"},"revision":{"$ref":"#/$defs/ProposalRevisionHandle"},"verification":{"$ref":"#/$defs/VerificationReport"},"readiness":{"$ref":"#/$defs/ReadinessHandle"}}},"RoutingConfiguration":{"type":"object","additionalProperties":false,"required":["facts","rules"],"properties":{"facts":{"type":"array","items":{"$ref":"#/$defs/AuthoredRoutingFact"}},"rules":{"type":"array","items":{"$ref":"#/$defs/AuthoredRoutingRule"}}}},"PolicyCoverageStatus":{"type":"object","required":["subject","requirement_id","status"],"properties":{"subject":{"$ref":"#/$defs/CanonicalId"},"requirement_id":{"$ref":"#/$defs/Digest"},"status":{"enum":["current-attestation","review-required"]},"authority":{"$ref":"#/$defs/CoverageAuditAuthority"}},"additionalProperties":false},"ReadCoverage":{"type":"object","description":"Repository attestation status bound to this snapshot or proposal. Empty subjects means no registered policy units in scope, not complete coverage. Analysis-local attestations are not repository certificates.","required":["subjects"],"properties":{"subjects":{"type":"array","items":{"$ref":"#/$defs/PolicyCoverageStatus"}}},"additionalProperties":false},"AuditPolicyUnitEdit":{"type":"object","required":["kind","policy","rationale"],"properties":{"kind":{"const":"audit-policy-unit"},"policy":{"$ref":"#/$defs/CanonicalId"},"rationale":{"$ref":"#/$defs/NonEmptyString"}},"additionalProperties":false},"CoverageAuditAuthority":{"type":"object","required":["issuer","principal","authorization_id"],"properties":{"issuer":{"$ref":"#/$defs/NonEmptyString"},"principal":{"$ref":"#/$defs/NonEmptyString"},"authorization_id":{"$ref":"#/$defs/NonEmptyString"}},"additionalProperties":false},"EvidenceCheckRetirement":{"type":"object","additionalProperties":false,"required":["suite","check"],"properties":{"suite":{"type":"string","minLength":1},"check":{"type":"string","minLength":1}}},"EvidenceSuiteDescription":{"type":"object","additionalProperties":false,"required":["suite","description"],"properties":{"suite":{"type":"string","minLength":1},"description":{"type":"string","minLength":1}}},"EvidenceRelationshipUpdate":{"type":"object","additionalProperties":false,"required":["source_policy","consumer","relation","evidence_owner","rationale"],"properties":{"source_policy":{"type":"string","minLength":1},"consumer":{"type":"string","minLength":1},"relation":{"type":"string","minLength":1},"evidence_owner":{"type":"string","minLength":1},"rationale":{"type":"string","minLength":1}}},"EvidenceConsumerRegistration":{"type":"object","additionalProperties":false,"required":["path","artifact_kind","source_policies","relation","evidence_owner","rationale"],"properties":{"path":{"type":"string","minLength":1},"artifact_kind":{"type":"string","enum":["implementation-artifact","fixture"]},"source_policies":{"type":"array","items":{"type":"string","minLength":1},"minItems":1,"uniqueItems":true},"relation":{"type":"string","enum":["implementation-projection","fixture-projection"]},"evidence_owner":{"type":"string","minLength":1},"rationale":{"type":"string","minLength":1}}},"EvidenceMaintenancePlan":{"type":"object","additionalProperties":false,"required":["prune_stale_certificates","retire_suites","retire_checks","retire_inputs","suite_descriptions","replacement_evidence_owner","replacement_evidence_rationale","relationship_updates","consumer_registrations"],"properties":{"prune_stale_certificates":{"type":"boolean"},"retire_suites":{"type":"array","items":{"type":"string","minLength":1},"uniqueItems":true},"retire_checks":{"type":"array","items":{"$ref":"#/$defs/EvidenceCheckRetirement"}},"retire_inputs":{"type":"array","items":{"type":"string","minLength":1},"uniqueItems":true},"suite_descriptions":{"type":"array","items":{"$ref":"#/$defs/EvidenceSuiteDescription"}},"replacement_evidence_owner":{"type":"string","minLength":1},"replacement_evidence_rationale":{"type":"string","minLength":1},"relationship_updates":{"type":"array","items":{"$ref":"#/$defs/EvidenceRelationshipUpdate"}},"consumer_registrations":{"type":"array","items":{"$ref":"#/$defs/EvidenceConsumerRegistration"}},"unregister_policy_subjects":{"type":"array","items":{"type":"string","minLength":1},"uniqueItems":true,"description":"Remove selected review-subject registrations and their source relationships while preserving normative Markdown."}}},"MaintainEvidenceCall":{"type":"object","additionalProperties":false,"required":["kind","expected_revision","evidence","plan","apply"],"properties":{"kind":{"const":"maintain-evidence"},"expected_revision":{"type":"string","minLength":1},"evidence":{"type":"array","items":{"$ref":"#/$defs/EvidenceReference"},"minItems":1},"plan":{"$ref":"#/$defs/EvidenceMaintenancePlan"},"apply":{"type":"boolean"}}},"MaintainEvidenceResult":{"type":"object","additionalProperties":false,"required":["kind","applied","changed_files","removed_files","verification"],"properties":{"kind":{"const":"maintain-evidence-result"},"applied":{"type":"boolean"},"changed_files":{"type":"array","items":{"type":"string","minLength":1}},"removed_files":{"type":"array","items":{"type":"string","minLength":1}},"verification":{"$ref":"#/$defs/VerificationReport"}}},"RouteCall":{"type":"object","required":["facts"],"properties":{"facts":{"$ref":"#/$defs/FactSet"},"snapshot":{"$ref":"#/$defs/SnapshotHandle"}},"additionalProperties":false},"ReadCall":{"type":"object","required":["target"],"properties":{"target":{"$ref":"#/$defs/CanonicalId"},"include_routing":{"type":"boolean"},"include_coverage":{"type":"boolean","description":"Include current repository attestation status for registered policy units in this read scope."},"snapshot":{"$ref":"#/$defs/SnapshotHandle"},"detail":{"enum":["compact","full"],"description":"Compact preserves exact policy and essential authority; full includes all relationship rows."}},"additionalProperties":false},"RelatedCall":{"type":"object","required":["target","groups","direction","transitive"],"properties":{"target":{"$ref":"#/$defs/CanonicalId"},"groups":{"type":"array","minItems":1,"uniqueItems":true,"items":{"$ref":"#/$defs/CanonicalId"}},"direction":{"enum":["incoming","outgoing","both"]},"transitive":{"type":"boolean","default":false},"snapshot":{"$ref":"#/$defs/SnapshotHandle"}},"additionalProperties":false},"CompactReadResult":{"type":"object","required":["kind","snapshot","policy","content","requires","specializes","next_operations","detail"],"properties":{"kind":{"const":"compact-read-result"},"snapshot":{"$ref":"#/$defs/SnapshotHandle"},"policy":{"$ref":"#/$defs/PolicySummary"},"content":{"type":"string"},"requires":{"type":"array","items":{"$ref":"#/$defs/CanonicalId"},"uniqueItems":true},"specializes":{"type":"array","items":{"$ref":"#/$defs/CanonicalId"},"uniqueItems":true},"next_operations":{"type":"array","items":{"$ref":"#/$defs/NextOperation"}},"summary":{"type":"string"},"routing":{"$ref":"#/$defs/RoutingConfiguration"},"coverage":{"$ref":"#/$defs/ReadCoverage"},"detail":{"const":"compact"},"application_exposure":{"$ref":"#/$defs/ApplicationExposureState"},"provenance":{"type":"array","items":{"$ref":"#/$defs/CanonicalId"}}},"additionalProperties":false},"RoutingFactsCall":{"type":"object","additionalProperties":false,"required":[],"properties":{"snapshot":{"$ref":"#/$defs/SnapshotHandle"}}},"RoutingFactsResult":{"type":"object","additionalProperties":false,"required":["kind","snapshot","facts"],"properties":{"kind":{"const":"routing-facts-result"},"snapshot":{"$ref":"#/$defs/SnapshotHandle"},"facts":{"type":"array","items":{"$ref":"#/$defs/AuthoredRoutingFact"}}}},"RoutingQuestion":{"type":"object","additionalProperties":false,"required":["id","kind","prompt","state","fact"],"properties":{"id":{"$ref":"#/$defs/CanonicalId"},"kind":{"const":"applicability-fact"},"prompt":{"$ref":"#/$defs/NonEmptyString"},"state":{"const":"required"},"fact":{"$ref":"#/$defs/AuthoredRoutingFact"}}},"RoutingRuleExplanation":{"type":"object","additionalProperties":false,"required":["id","target","when","state"],"properties":{"id":{"$ref":"#/$defs/CanonicalId"},"target":{"$ref":"#/$defs/CanonicalId"},"when":{"$ref":"#/$defs/ApplicabilityExpression"},"state":{"enum":["selected","unresolved"]}}},"AgentRouteResult":{"type":"object","required":["kind","snapshot","reading_plan","unresolved_questions","next_operations","facts","rules"],"properties":{"kind":{"const":"agent-route-result"},"snapshot":{"$ref":"#/$defs/SnapshotHandle"},"reading_plan":{"type":"array","items":{"$ref":"#/$defs/ReadingPlanEntry"}},"unresolved_questions":{"type":"array","items":{"$ref":"#/$defs/RoutingQuestion"}},"next_operations":{"type":"array","items":{"$ref":"#/$defs/NextOperation"}},"summary":{"type":"string"},"facts":{"$ref":"#/$defs/FactSet"},"rules":{"type":"array","items":{"$ref":"#/$defs/RoutingRuleExplanation"}}},"additionalProperties":false},"WorkflowContext":{"oneOf":[{"$ref":"#/$defs/ProposalRevisionHandle"},{"$ref":"#/$defs/AnalysisHandle"},{"$ref":"#/$defs/ReadinessHandle"}]},"ProposeCall":{"type":"object","additionalProperties":false,"properties":{"snapshot":{"$ref":"#/$defs/SnapshotHandle"},"change_set":{"$ref":"#/$defs/StandardsChangeSet"}},"required":["change_set"]},"ReviseCall":{"type":"object","additionalProperties":false,"properties":{"context":{"$ref":"#/$defs/WorkflowContext"},"change_set":{"$ref":"#/$defs/StandardsChangeSet"}},"required":["context","change_set"]},"AnalyzeCall":{"type":"object","additionalProperties":false,"properties":{"context":{"$ref":"#/$defs/WorkflowContext"}},"required":["context"]},"ResolveWorkflowCall":{"type":"object","additionalProperties":false,"properties":{"context":{"$ref":"#/$defs/WorkflowContext"},"submission":{"$ref":"#/$defs/Submission"}},"required":["context","submission"]},"ReviewCall":{"type":"object","additionalProperties":false,"properties":{"context":{"$ref":"#/$defs/WorkflowContext"},"decisions":{"type":"array","minItems":3,"maxItems":3,"uniqueItems":true,"items":{"$ref":"#/$defs/ReviewDecision"}}},"required":["context","decisions"]},"ApplyCall":{"type":"object","additionalProperties":false,"properties":{"context":{"$ref":"#/$defs/WorkflowContext"}},"required":["context"]},"RecoverCall":{"type":"object","additionalProperties":false,"properties":{"context":{"$ref":"#/$defs/WorkflowContext"}},"required":["context"]},"WorkflowStatusCall":{"type":"object","additionalProperties":false,"properties":{"context":{"$ref":"#/$defs/WorkflowContext"}},"required":["context"]},"ResumeCall":{"type":"object","additionalProperties":false,"properties":{"context":{"$ref":"#/$defs/WorkflowContext"}},"required":["context"]},"WorkflowContinuation":{"type":"object","additionalProperties":false,"properties":{"operation":{"enum":["revise","analyze","resolve_workflow","review","apply","recover","workflow_status","resume"]},"context":{"$ref":"#/$defs/WorkflowContext"},"required_inputs":{"type":"array","uniqueItems":true,"items":{"enum":["change_set","submission","decisions"]}}},"required":["operation","context","required_inputs"]},"WorkflowOutcome":{"oneOf":[{"$ref":"#/$defs/CreateProposalResult"},{"$ref":"#/$defs/ReviseProposalResult"},{"$ref":"#/$defs/PendingResult"},{"$ref":"#/$defs/CompleteResult"},{"$ref":"#/$defs/ReviewProposalResult"},{"$ref":"#/$defs/ApplyProposalResult"},{"$ref":"#/$defs/ApplicationRecoveryRequiredResult"},{"$ref":"#/$defs/RecoverApplicationResult"},{"$ref":"#/$defs/RejectedResult"}]},"WorkflowResult":{"type":"object","additionalProperties":false,"properties":{"kind":{"const":"workflow-result"},"context":{"$ref":"#/$defs/WorkflowContext"},"proposal":{"$ref":"#/$defs/ProposalHandle"},"revision":{"$ref":"#/$defs/ProposalRevisionHandle"},"status":{"enum":["draft","needs-action","complete","requires-change","ready","recovery-required","applied","rejected","stale"]},"next_operations":{"type":"array","items":{"$ref":"#/$defs/WorkflowContinuation"}},"outcome":{"$ref":"#/$defs/WorkflowOutcome"}},"required":["kind","context","proposal","revision","status","next_operations"]},"FocusedQueryNextOperation":{"type":"object","required":["operation","request_kind","snapshot"],"properties":{"operation":{"enum":["route","read","related"]},"request_kind":{"enum":["route","read","related"]},"target":{"$ref":"#/$defs/CanonicalId"},"snapshot":{"$ref":"#/$defs/SnapshotHandle"}},"additionalProperties":false},"RewriteNavigationIndexEdit":{"type":"object","required":["kind","entrypoint","destinations","rationale"],"properties":{"kind":{"const":"rewrite-navigation-index"},"entrypoint":{"$ref":"#/$defs/AuthoringTargetHandle"},"destinations":{"type":"array","items":{"$ref":"#/$defs/CanonicalId"},"minItems":1,"uniqueItems":true},"rationale":{"$ref":"#/$defs/NonEmptyString"},"retargets":{"type":"array","items":{"$ref":"#/$defs/NavigationRetarget"},"uniqueItems":true}},"additionalProperties":false},"NavigationIndexEntry":{"type":"object","required":["id","entrypoint","destinations"],"properties":{"id":{"$ref":"#/$defs/CanonicalId"},"entrypoint":{"$ref":"#/$defs/AuthoringTargetHandle"},"destinations":{"type":"array","items":{"$ref":"#/$defs/CanonicalId"},"uniqueItems":true},"content":{"$ref":"#/$defs/NonEmptyString"}},"additionalProperties":false},"NavigationIndexesResult":{"type":"object","required":["kind","authority","indexes","next_operations"],"properties":{"kind":{"const":"navigation-indexes-result"},"authority":{"oneOf":[{"$ref":"#/$defs/SnapshotHandle"},{"$ref":"#/$defs/ProposalRevisionHandle"}]},"indexes":{"type":"array","items":{"$ref":"#/$defs/NavigationIndexEntry"},"minItems":1},"next_operations":{"type":"array","items":{"$ref":"#/$defs/NextOperation"},"maxItems":0}},"additionalProperties":false},"NavigationRetarget":{"type":"object","required":["entrypoint","standard"],"properties":{"entrypoint":{"$ref":"#/$defs/AuthoringTargetHandle"},"standard":{"$ref":"#/$defs/CanonicalId"}},"additionalProperties":false},"ApplicationNextOperation":{"type":"object","additionalProperties":false,"required":["operation","snapshot"],"properties":{"operation":{"enum":["read","related","routing_facts","route","query","inspect"]},"snapshot":{"$ref":"#/$defs/SnapshotHandle"},"target":{"$ref":"#/$defs/CanonicalId"},"handle":{"$ref":"#/$defs/SnapshotChildHandle"}}},"ApplicationRejectedResult":{"type":"object","additionalProperties":false,"required":["kind","purpose","code","outcome","message","next_operations"],"properties":{"kind":{"const":"application-rejected-result"},"purpose":{"const":"application"},"code":{"enum":["APPLICATION.CONTENT_UNAVAILABLE","APPLICATION.INPUT_INVALID","APPLICATION.OPERATION_UNAVAILABLE","APPLICATION.INTERNAL_UNAVAILABLE","APPLICATION.UNSUPPORTED_CAPTURE","APPLICATION.RESULT_LIMIT"]},"outcome":{"enum":["invalid","unsupported","unavailable"]},"message":{"type":"string"},"next_operations":{"type":"array","items":{"$ref":"#/$defs/ApplicationNextOperation"}}}},"ApplicationPolicy":{"type":"object","additionalProperties":false,"required":["id","handle","role","level"],"properties":{"id":{"$ref":"#/$defs/CanonicalId"},"handle":{"$ref":"#/$defs/SnapshotChildHandle"},"role":{"enum":["core","router","topic","workflow","profile","reference","prompt","template"]},"level":{"enum":["MUST","SHOULD","PROFILE","REFERENCE"]}}},"ApplicationRelationship":{"type":"object","additionalProperties":false,"required":["handle","source","target","relation","groups","direction"],"properties":{"handle":{"$ref":"#/$defs/SnapshotChildHandle"},"source":{"$ref":"#/$defs/CanonicalId"},"target":{"$ref":"#/$defs/CanonicalId"},"relation":{"type":"string"},"groups":{"type":"array","items":{"$ref":"#/$defs/CanonicalId"}},"direction":{"enum":["incoming","outgoing"]}}},"ApplicationReadResult":{"type":"object","additionalProperties":false,"required":["kind","purpose","snapshot","policy","content","scope","requires","specializes","next_operations"],"properties":{"kind":{"const":"application-read-result"},"purpose":{"const":"application"},"snapshot":{"$ref":"#/$defs/SnapshotHandle"},"policy":{"$ref":"#/$defs/ApplicationPolicy"},"content":{"type":"string"},"scope":{"$ref":"#/$defs/ReviewScope"},"requires":{"type":"array","items":{"$ref":"#/$defs/CanonicalId"}},"specializes":{"type":"array","items":{"$ref":"#/$defs/CanonicalId"}},"related":{"type":"array","items":{"$ref":"#/$defs/ApplicationRelationship"}},"next_operations":{"type":"array","items":{"$ref":"#/$defs/ApplicationNextOperation"}}}},"ApplicationRelatedResult":{"type":"object","additionalProperties":false,"required":["kind","purpose","snapshot","target","relationships","next_operations"],"properties":{"kind":{"const":"application-related-result"},"purpose":{"const":"application"},"snapshot":{"$ref":"#/$defs/SnapshotHandle"},"target":{"$ref":"#/$defs/CanonicalId"},"relationships":{"type":"array","items":{"$ref":"#/$defs/ApplicationRelationship"}},"next_operations":{"type":"array","items":{"$ref":"#/$defs/ApplicationNextOperation"}}}},"ApplicationReadingEntry":{"type":"object","additionalProperties":false,"required":["target","scope","authority","state"],"properties":{"target":{"$ref":"#/$defs/CanonicalId"},"scope":{"$ref":"#/$defs/ReviewScope"},"authority":{"enum":["normative","contextual"]},"state":{"const":"selected"}}},"ApplicationQuestion":{"type":"object","additionalProperties":false,"required":["fact"],"properties":{"fact":{"$ref":"#/$defs/AuthoredRoutingFact"}}},"ApplicationRouteResult":{"type":"object","additionalProperties":false,"required":["kind","purpose","snapshot","status","reading_plan","unresolved_questions","next_operations"],"properties":{"kind":{"const":"application-route-result"},"purpose":{"const":"application"},"snapshot":{"$ref":"#/$defs/SnapshotHandle"},"status":{"enum":["complete","needs-facts"]},"reading_plan":{"type":"array","items":{"$ref":"#/$defs/ApplicationReadingEntry"}},"unresolved_questions":{"type":"array","items":{"$ref":"#/$defs/ApplicationQuestion"}},"next_operations":{"type":"array","items":{"$ref":"#/$defs/ApplicationNextOperation"}}}},"ApplicationRoutingFactsResult":{"type":"object","additionalProperties":false,"required":["kind","purpose","snapshot","facts","next_operations"],"properties":{"kind":{"const":"application-routing-facts-result"},"purpose":{"const":"application"},"snapshot":{"$ref":"#/$defs/SnapshotHandle"},"facts":{"type":"array","items":{"$ref":"#/$defs/AuthoredRoutingFact"}},"next_operations":{"type":"array","items":{"$ref":"#/$defs/ApplicationNextOperation"}}}},"ApplicationReadCall":{"type":"object","additionalProperties":false,"required":["target"],"properties":{"target":{"$ref":"#/$defs/CanonicalId"},"snapshot":{"$ref":"#/$defs/SnapshotHandle"},"detail":{"enum":["compact","full"]}}},"ApplicationReadRequest":{"type":"object","additionalProperties":false,"required":["kind","target"],"properties":{"kind":{"const":"read"},"target":{"$ref":"#/$defs/CanonicalId"},"detail":{"enum":["compact","full"]}}},"ApplicationQueryRequest":{"oneOf":[{"$ref":"#/$defs/RouteRequest"},{"$ref":"#/$defs/ApplicationReadRequest"},{"$ref":"#/$defs/RelatedRequest"}]},"ApplicationQueryCall":{"type":"object","additionalProperties":false,"required":["snapshot","request"],"properties":{"snapshot":{"$ref":"#/$defs/SnapshotHandle"},"request":{"$ref":"#/$defs/ApplicationQueryRequest"}}},"ApplicationInspectCall":{"type":"object","additionalProperties":false,"required":["handle"],"properties":{"handle":{"$ref":"#/$defs/SnapshotChildHandle"}}},"AuthoredDecisionProvenance":{"type":"object","additionalProperties":false,"required":["id","subject","origin","rationale","evidence"],"properties":{"id":{"$ref":"#/$defs/CanonicalId"},"subject":{"$ref":"#/$defs/CanonicalId"},"origin":{"enum":["documented-original","reconstructed-history","current-justification","unrecorded"]},"rationale":{"type":"string"},"evidence":{"type":"array","items":{"$ref":"#/$defs/EvidenceReference"}},"assumptions":{"type":"array","items":{"type":"string"}},"limits":{"type":"array","items":{"type":"string"}},"alternatives":{"type":"array","items":{"type":"string"}},"reconsideration":{"type":"array","items":{"type":"string"}},"supersedes":{"type":"array","items":{"type":"string"}}}},"DecisionProvenanceRecord":{"type":"object","additionalProperties":false,"required":["id","subject","origin","rationale","evidence","assumptions","limits","alternatives","reconsideration","supersedes","subject_binding","retired"],"properties":{"id":{"$ref":"#/$defs/CanonicalId"},"subject":{"$ref":"#/$defs/CanonicalId"},"origin":{"enum":["documented-original","reconstructed-history","current-justification","unrecorded"]},"rationale":{"type":"string"},"evidence":{"type":"array","items":{"$ref":"#/$defs/EvidenceReference"}},"assumptions":{"type":"array","items":{"type":"string"}},"limits":{"type":"array","items":{"type":"string"}},"alternatives":{"type":"array","items":{"type":"string"}},"reconsideration":{"type":"array","items":{"type":"string"}},"supersedes":{"type":"array","items":{"type":"string"}},"subject_binding":{"$ref":"#/$defs/Digest"},"retired":{"type":"boolean"}}},"ApplicationExposureState":{"enum":["unreviewed","current","needs-review"]},"ProvenanceReadResult":{"type":"object","additionalProperties":false,"required":["kind","authority","record","state","next_operations"],"properties":{"kind":{"const":"provenance-read-result"},"authority":{"oneOf":[{"$ref":"#/$defs/SnapshotHandle"},{"$ref":"#/$defs/ProposalRevisionHandle"}]},"record":{"$ref":"#/$defs/DecisionProvenanceRecord"},"state":{"enum":["current","needs-review","retired"]},"next_operations":{"type":"array","items":{"$ref":"#/$defs/NextOperation"}}}},"OperationalReadResult":{"type":"object","additionalProperties":false,"required":["kind","authority","target","canonical_id","role","content","application_exposure","next_operations"],"properties":{"kind":{"const":"operational-read-result"},"authority":{"oneOf":[{"$ref":"#/$defs/SnapshotHandle"},{"$ref":"#/$defs/ProposalRevisionHandle"}]},"target":{"$ref":"#/$defs/AuthoringTargetHandle"},"canonical_id":{"$ref":"#/$defs/CanonicalId"},"role":{"enum":["prompt","template"]},"content":{"type":"string"},"application_exposure":{"$ref":"#/$defs/ApplicationExposureState"},"next_operations":{"type":"array","items":{"$ref":"#/$defs/NextOperation"}}}},"PutDecisionProvenanceEdit":{"type":"object","additionalProperties":false,"required":["kind","record"],"properties":{"kind":{"const":"put-provenance"},"record":{"$ref":"#/$defs/AuthoredDecisionProvenance"}}},"RetireDecisionProvenanceEdit":{"type":"object","additionalProperties":false,"required":["kind","id"],"properties":{"kind":{"const":"retire-provenance"},"id":{"$ref":"#/$defs/CanonicalId"}}},"ApproveApplicationContentEdit":{"type":"object","additionalProperties":false,"required":["kind","target"],"properties":{"kind":{"const":"approve-application-content"},"target":{"oneOf":[{"$ref":"#/$defs/CanonicalId"},{"$ref":"#/$defs/AuthoringTargetHandle"}]}}},"WithdrawApplicationContentEdit":{"type":"object","additionalProperties":false,"required":["kind","target"],"properties":{"kind":{"const":"withdraw-application-content"},"target":{"oneOf":[{"$ref":"#/$defs/CanonicalId"},{"$ref":"#/$defs/AuthoringTargetHandle"}]}}},"ReviseOperationalArtifactEdit":{"type":"object","additionalProperties":false,"required":["kind","target","title","body"],"properties":{"kind":{"const":"revise-operational-artifact"},"target":{"$ref":"#/$defs/AuthoringTargetHandle"},"title":{"$ref":"#/$defs/NonEmptyString"},"body":{"type":"string"}}},"PolicyScopeUpdate":{"type":"object","additionalProperties":false,"required":["policy","heading_path","semantics"],"properties":{"policy":{"$ref":"#/$defs/CanonicalId"},"heading_path":{"type":"array","minItems":1,"items":{"$ref":"#/$defs/NonEmptyString"}},"semantics":{"$ref":"#/$defs/PolicySemanticIntent"}}},"ReadManyItem":{"type":"object","required":["target"],"properties":{"target":{"$ref":"#/$defs/CanonicalId"},"include_routing":{"type":"boolean"},"include_coverage":{"type":"boolean","description":"Include current repository attestation status for registered policy units in this read scope."},"detail":{"enum":["compact","full"],"description":"Compact preserves exact policy and essential authority; full includes all relationship rows."}},"additionalProperties":false},"ReadManyCall":{"type":"object","additionalProperties":false,"required":["snapshot","items"],"description":"Read 1–32 selected items from one explicit snapshot, preserving order. The complete JSON result is limited to 2 MiB; any failed item rejects the entire request.","properties":{"snapshot":{"$ref":"#/$defs/SnapshotHandle"},"items":{"type":"array","minItems":1,"maxItems":32,"uniqueItems":true,"items":{"$ref":"#/$defs/ReadManyItem"}}}},"ReadManyResult":{"type":"object","additionalProperties":false,"required":["kind","snapshot","items"],"properties":{"kind":{"const":"read-many-result"},"snapshot":{"$ref":"#/$defs/SnapshotHandle"},"items":{"type":"array","minItems":1,"maxItems":32,"items":{"oneOf":[{"$ref":"#/$defs/CompactReadResult"},{"$ref":"#/$defs/ReadResult"},{"$ref":"#/$defs/NavigationIndexesResult"},{"$ref":"#/$defs/ProvenanceReadResult"},{"$ref":"#/$defs/OperationalReadResult"}]}}}},"ApplicationReadManyItem":{"type":"object","additionalProperties":false,"required":["target"],"properties":{"target":{"$ref":"#/$defs/CanonicalId"},"detail":{"enum":["compact","full"]}}},"ApplicationReadManyCall":{"type":"object","additionalProperties":false,"required":["snapshot","items"],"description":"Read 1–32 selected items from one explicit snapshot, preserving order. The complete JSON result is limited to 2 MiB; any failed item rejects the entire request.","properties":{"snapshot":{"$ref":"#/$defs/SnapshotHandle"},"items":{"type":"array","minItems":1,"maxItems":32,"uniqueItems":true,"items":{"$ref":"#/$defs/ApplicationReadManyItem"}}}},"ApplicationReadManyResult":{"type":"object","additionalProperties":false,"required":["kind","snapshot","items","purpose"],"properties":{"kind":{"const":"application-read-many-result"},"snapshot":{"$ref":"#/$defs/SnapshotHandle"},"items":{"type":"array","minItems":1,"maxItems":32,"items":{"oneOf":[{"$ref":"#/$defs/ApplicationReadResult"}]}},"purpose":{"const":"application"}}}}}') -DEFINITION_METADATA = freeze_json({'ActiveSnapshotSummary': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'lifecycle': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'source_revision': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'created_at': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'AgentRouteResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'reading_plan': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'unresolved_questions': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'next_operations': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'summary': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'facts': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'rules': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'AllExpression': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'operator': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'expressions': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'AlwaysExpression': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'operator': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'AnalysisChildArtifact': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'AnalysisChildHandle': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'analysis': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'child_kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'child_id': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'schema_version': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'AnalysisChildInspectionResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'handle': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'artifact': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'AnalysisContext': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'handle': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'subjects': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'changes': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'semantic_proposals': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'AnalysisExecutionContractView': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'authorization_authority_digest': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'providers': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'AnalysisHandle': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'id': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'schema_version': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'AnalysisId': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'AnalysisInspectionResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'state': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'AnalysisMaterialHandle': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'AnalysisRequest': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'base_snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'proposed_snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'changes': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'semantic_proposals': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'prior_analysis': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'contract_version': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'AnalysisState': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'handle': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'base_snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'proposed_reference': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'changes': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'semantic_proposals': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'fact_observations': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'dispositions': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'coverage_attestations': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'authorization_records': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'domain_contracts': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'execution_contracts': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'contract_version': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'AnalyzeCall': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'context': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'AnalyzeProposalCall': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'revision': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'AnyExpression': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'operator': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'expressions': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ApplicabilityExpression': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'ApplicationExposureState': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'ApplicationHandle': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'id': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'schema_version': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ApplicationId': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'ApplicationInspectCall': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'handle': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ApplicationNextOperation': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'operation': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'target': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'handle': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ApplicationPolicy': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'id': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'handle': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'role': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'level': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ApplicationQueryCall': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'request': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ApplicationQueryRequest': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'ApplicationQuestion': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'fact': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ApplicationReadCall': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'target': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'detail': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ApplicationReadManyCall': {'title': None, 'description': 'Read 1–32 selected items from one explicit snapshot, preserving order. The complete JSON result is limited to 2 MiB; any failed item rejects the entire request.', 'has_default': False, 'default': None, 'properties': {'snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'items': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ApplicationReadManyItem': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'target': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'detail': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ApplicationReadManyResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'items': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'purpose': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ApplicationReadRequest': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'target': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'detail': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ApplicationReadResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'purpose': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'policy': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'content': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'scope': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'requires': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'specializes': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'related': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'next_operations': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ApplicationReadingEntry': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'target': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'scope': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'authority': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'state': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ApplicationRecoveryRequiredResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'application': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'status': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'code': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'outcome': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'message': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ApplicationRejectedResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'purpose': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'code': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'outcome': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'message': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'next_operations': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ApplicationRelatedResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'purpose': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'target': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'relationships': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'next_operations': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ApplicationRelationship': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'handle': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'source': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'target': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'relation': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'groups': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'direction': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ApplicationRouteResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'purpose': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'status': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'reading_plan': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'unresolved_questions': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'next_operations': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ApplicationRoutingFactsResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'purpose': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'facts': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'next_operations': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ApplyCall': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'context': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ApplyProposalCall': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'readiness': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ApplyProposalResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'application': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'status': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ApproveApplicationContentEdit': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'target': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'AuditPolicyUnitEdit': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'policy': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'rationale': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'AuthoredDecisionProvenance': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'id': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'subject': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'origin': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'rationale': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'evidence': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'assumptions': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'limits': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'alternatives': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'reconsideration': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'supersedes': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'AuthoredRoutingFact': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'id': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'semantic_revision': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'type': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'nullable': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'values': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'aliases': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'meaning': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'prompt': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'AuthoredRoutingRule': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'id': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'target': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'when': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'condition': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'AuthoringTargetHandle': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'id': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'schema_version': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'AuthorizationId': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'AuthorizationRecord': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'reference': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'issuer_semantic_revision': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'principal': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'action': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'subject_kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'subject_id': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'authorization_evidence': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'revocation_authority': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'revocation_authority_semantic_revision': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'revocation_evidence': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'AuthorizationReference': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'id': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'issuer': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'capability': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'authority_digest': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'CanonicalId': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'CanonicalModuleDeclaration': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'id': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'role': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'level': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'applies_when': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'does_not_apply_when': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'requires': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'specializes': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'verification': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ChangeDescriptor': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'accepted_ids': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'proposed_ids': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'scope': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'accepted_module': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'proposed_module': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ChangePolicySemantics': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'accepted_semantic_revision': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'proposed_semantic_revision': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'intent': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ChangedPolicyUnit': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'policy': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'change_kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'classification': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'accepted_representation_digest': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'proposed_representation_digest': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'accepted_structural_digest': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'proposed_structural_digest': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'accepted_semantic_revision': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'proposed_semantic_revision': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'semantic_state': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'scope': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ChildId': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'CompactReadResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'policy': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'content': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'requires': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'specializes': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'next_operations': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'summary': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'routing': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'coverage': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'detail': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'application_exposure': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'provenance': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'CompleteResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'handle': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'status': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'context': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'changes': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'changed_units': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'coverage_certificates': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'fact_observations': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'dispositions': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'reading_plan': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'completion': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'summary': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'CompletionProof': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'required_coverage_subjects': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'certificate_subjects': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'reached_consumer_obligations': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'disposition_obligations': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'required_fact_requirements': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'observed_fact_requirements': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'non_consumer_obligations_resolved': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'applicability_resolved': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'authorization_valid': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'evidence_valid': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ConsumerDispositionSubmission': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'obligation': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'result': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'rationale': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'evidence': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'fingerprint': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ConsumerReviewContract': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'id': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'version': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'permitted_dispositions': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'evidence_contract': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'authorization_capability': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'semantics': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ConsumerReviewObligationReadingReason': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'obligation': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ContainsExpression': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'operator': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'fact': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'value': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'CoverageAttestation': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'requirement': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'conclusion': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'evidence': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'explicit_exclusions': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'rationale': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'auditor_provenance': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'schema_version': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'authorization': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'CoverageAttestationClaim': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'requirement': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'conclusion': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'evidence': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'explicit_exclusions': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'rationale': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'auditor_provenance': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'CoverageAttestationSubmission': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'claim': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'CoverageAuditAuthority': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'issuer': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'principal': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'authorization_id': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'CoverageCertificate': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'handle': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'requirement': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'subject': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'owner': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'semantic_revision': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'horizon_digest': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'relationship_digest': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'evidence_digests': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'fact_schema_digest': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'CoverageRequirement': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'handle': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'subject': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'owner': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'semantic_revision': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'relationship_kinds': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'horizon': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'required_evidence_contract': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'CreateProposalCall': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'base_snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'change_set': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'CreateProposalResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'proposal': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'revision': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'CreateSnapshotCall': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'CreateSnapshotResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'CreateStandardEdit': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'standard': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'requires': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'specializes': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'policy_units': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'DecisionDependency': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'class': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'identity': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'digest': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'DecisionFingerprint': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'decision_kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'decision_contract': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'schema_version': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'dependencies': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'DecisionProvenanceRecord': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'id': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'subject': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'origin': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'rationale': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'evidence': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'assumptions': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'limits': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'alternatives': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'reconsideration': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'supersedes': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'subject_binding': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'retired': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'DeleteSnapshotCall': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'DeleteSnapshotResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'purge_deadline': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'Digest': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'DispositionRecord': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'obligation': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'result': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'rationale': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'evidence': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'authorization': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'fingerprint': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'DomainContractReference': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'id': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'version': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'EdgeId': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'EqualsExpression': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'operator': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'fact': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'value': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'EvidenceCheckRetirement': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'suite': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'check': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'EvidenceConsumerRegistration': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'path': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'artifact_kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'source_policies': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'relation': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'evidence_owner': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'rationale': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'EvidenceMaintenancePlan': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'prune_stale_certificates': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'retire_suites': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'retire_checks': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'retire_inputs': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'suite_descriptions': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'replacement_evidence_owner': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'replacement_evidence_rationale': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'relationship_updates': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'consumer_registrations': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'unregister_policy_subjects': {'title': None, 'description': 'Remove selected review-subject registrations and their source relationships while preserving normative Markdown.', 'has_default': False, 'default': None}}}, 'EvidenceReference': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'id': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'digest': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'provider_contract': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'provider_contract_version': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'EvidenceRelationshipUpdate': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'source_policy': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'consumer': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'relation': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'evidence_owner': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'rationale': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'EvidenceSuiteDescription': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'suite': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'description': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ExistsExpression': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'operator': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'fact': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'FactObservation': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'handle': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'requirement': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'value': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'evidence': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'authorization': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'provider': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'FactRequirement': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'handle': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'fact': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'fact_semantic_revision': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'fact_contract_digest': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'context': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'value_contract': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'answer_contract': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'evidence_contract': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'authorization_capability': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'FactRequirementId': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'FactRequirementWork': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'requirement': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'prompt': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'dependent_programs': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'FactSet': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'FactValue': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'FactValueContract': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'type': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'states': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'nullable': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'values': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'FindProposalsCall': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'after': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'limit': {'title': None, 'description': None, 'has_default': True, 'default': 50}}}, 'FindProposalsResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'proposals': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'continuation': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'FindSnapshotsCall': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'lifecycle': {'title': None, 'description': None, 'has_default': True, 'default': 'active'}, 'after': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'limit': {'title': None, 'description': None, 'has_default': True, 'default': 50}}}, 'FindSnapshotsResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'snapshots': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'continuation': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'FocusedQueryNextOperation': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'operation': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'request_kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'target': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'GeneralSelectionReason': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'source': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'fact': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'edge': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'question': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ImpactDispositionSubmission': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'obligation': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'result': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'rationale': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'evidence': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'fingerprint': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ImpactTraceId': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'ImpactTraceReference': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'id': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'graph': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'applicability': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'InExpression': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'operator': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'fact': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'values': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'InspectCall': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'handle': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'InspectNextOperation': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'operation': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'request_kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'handle': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'InspectableHandle': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'InspectionResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'MaintainEvidenceCall': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'expected_revision': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'evidence': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'plan': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'apply': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'MaintainEvidenceResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'applied': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'changed_files': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'removed_files': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'verification': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ModuleRelationshipKey': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'relation': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'source': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'target': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'MovePolicyUnitEdit': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'policy': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'standard': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'after_policy': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'semantics': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'NavigationIndexEntry': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'id': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'entrypoint': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'destinations': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'content': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'NavigationIndexesResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'authority': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'indexes': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'next_operations': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'NavigationRetarget': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'entrypoint': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'standard': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'NewPolicyUnit': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'id': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'heading_chain': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'semantic_revision': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'intent': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'aliases': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'predecessors': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'successors': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'NextOperation': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'NonEmptyString': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'NotExpression': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'operator': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'expression': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'Obligation': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'handle': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'target': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'scope': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'reasons': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'state': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'applicability': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'permitted_submissions': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'review_contract': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'fingerprint': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ObligationId': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'OperationalReadResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'authority': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'target': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'canonical_id': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'role': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'content': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'application_exposure': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'next_operations': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'PendingResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'handle': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'status': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'context': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'changes': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'changed_units': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'obligations': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'fact_requirements': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'reading_plan': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'next_operations': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'summary': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'PolicyCoverageStatus': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'subject': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'requirement_id': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'status': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'authority': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'PolicyImpactSelectionReason': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'source': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'edge': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'relation': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'evidence_owner': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'traces': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'PolicyInspectionResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'policy': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'declaration': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'representation_digest': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'structural_digest': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'provenance': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'PolicyRelationship': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'source_policy': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'consumer': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'relation': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'applicability': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'source_scope': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'consumer_scope': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'evidence_owner': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'rationale': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'PolicyRelationshipInspection': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'relationship_kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'applicability': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'source_scope': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'consumer_scope': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'propagation': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'evidence_owner': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'rationale': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'PolicyRelationshipKey': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'source_policy': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'consumer': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'relation': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'PolicyScopeUpdate': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'policy': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'heading_path': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'semantics': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'PolicySemanticIntent': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'PolicySummary': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'handle': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'authority': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'scope': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'PolicyUnitDeclaration': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'id': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'module': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'heading_path': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'semantic_revision': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'lifecycle': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'aliases': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'predecessors': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'successors': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'PolicyUnitMapping': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'state': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'reason': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'policy_units': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'PrepareCall': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'request': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'PreservePolicySemantics': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'semantic_revision': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'intent': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ProposalHandle': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'id': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'schema_version': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ProposalId': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'ProposalPolicySummary': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'id': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'authority': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'scope': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ProposalReadResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'revision': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'policy': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'content': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'requires': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'specializes': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'related': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'next_operations': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'summary': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'routing': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'coverage': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'application_exposure': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'provenance': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ProposalRelatedResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'revision': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'target': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'authoring_target': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'policy_unit_mapping': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'relationships': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'next_operations': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'summary': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ProposalRelationshipSummary': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'source': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'target': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'relation': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'groups': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'direction': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'traversal_eligible': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'applicability': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ProposalRevisionHandle': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'id': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'schema_version': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ProposalRevisionId': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'ProposalRouteResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'revision': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'reading_plan': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'unresolved_questions': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'next_operations': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'summary': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ProposalSummary': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'proposal': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'head_revision': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ProposeCall': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'change_set': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ProvenanceReadResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'authority': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'record': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'state': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'next_operations': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ProvenanceRecord': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'path': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ProvideFactSubmission': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'requirement': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'value': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'evidence': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ProviderReference': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'id': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'contract': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'contract_version': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'input_digest': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'PutDecisionProvenanceEdit': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'record': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'PutPolicyRelationshipEdit': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'relationship': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'PutRoutingFactEdit': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'fact': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'rationale': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'PutRoutingRuleEdit': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'rule': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'rationale': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'QuarantinedSnapshotSummary': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'lifecycle': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'source_revision': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'created_at': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'purge_deadline': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'QueryCall': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'request': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'QueryNextOperation': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'operation': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'request_kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'target': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'QueryProposalCall': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'revision': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'request': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'QueryProposalNextOperation': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'operation': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'request_kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'target': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'revision': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'QueryProposalResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'QueryRequest': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'QueryResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'Question': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'id': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'prompt': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'state': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'permitted_answers': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ReadCall': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'target': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'include_routing': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'include_coverage': {'title': None, 'description': 'Include current repository attestation status for registered policy units in this read scope.', 'has_default': False, 'default': None}, 'snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'detail': {'title': None, 'description': 'Compact preserves exact policy and essential authority; full includes all relationship rows.', 'has_default': False, 'default': None}}}, 'ReadCoverage': {'title': None, 'description': 'Repository attestation status bound to this snapshot or proposal. Empty subjects means no registered policy units in scope, not complete coverage. Analysis-local attestations are not repository certificates.', 'has_default': False, 'default': None, 'properties': {'subjects': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ReadManyCall': {'title': None, 'description': 'Read 1–32 selected items from one explicit snapshot, preserving order. The complete JSON result is limited to 2 MiB; any failed item rejects the entire request.', 'has_default': False, 'default': None, 'properties': {'snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'items': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ReadManyItem': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'target': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'include_routing': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'include_coverage': {'title': None, 'description': 'Include current repository attestation status for registered policy units in this read scope.', 'has_default': False, 'default': None}, 'detail': {'title': None, 'description': 'Compact preserves exact policy and essential authority; full includes all relationship rows.', 'has_default': False, 'default': None}}}, 'ReadManyResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'items': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ReadRequest': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'target': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'include_routing': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'include_coverage': {'title': None, 'description': 'Include current repository attestation status for registered policy units in this read scope.', 'has_default': False, 'default': None}}}, 'ReadResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'policy': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'content': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'requires': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'specializes': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'related': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'next_operations': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'summary': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'routing': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'coverage': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'application_exposure': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'provenance': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ReadinessHandle': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'id': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'schema_version': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ReadinessId': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'ReadingPlanEntry': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'target': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'scope': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'authority': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'reasons': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'state': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ReadingPlanReason': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'RecoverApplicationCall': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'readiness': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'RecoverApplicationResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'application': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'status': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'RecoverCall': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'context': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'RegisterPolicyUnitEdit': {'title': None, 'description': 'Register an explicitly selected policy scope in an existing standard. The Engine owns declaration placement and validates the final candidate.', 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'standard': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'policy_unit': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'RejectedResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'code': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'outcome': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'target': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'message': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'details': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'next_operations': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'RelatedCall': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'target': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'groups': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'direction': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'transitive': {'title': None, 'description': None, 'has_default': True, 'default': False}, 'snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'RelatedRequest': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'target': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'groups': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'direction': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'transitive': {'title': None, 'description': None, 'has_default': True, 'default': False}}}, 'RelatedResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'target': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'authoring_target': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'policy_unit_mapping': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'relationships': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'next_operations': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'summary': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'RelationshipConsumer': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'RelationshipDisposition': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'relationship': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'disposition': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'replacement_consumer': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'rationale': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'evidence': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'RelationshipInspectionResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'relationship': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'policy_semantics': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'provenance': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'RelationshipKey': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'RelationshipSummary': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'handle': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'source': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'target': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'relation': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'groups': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'direction': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'traversal_eligible': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'applicability': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'RemovePolicyRelationshipEdit': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'relationship': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'RemoveRoutingFactEdit': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'fact': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'rationale': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'RemoveRoutingRuleEdit': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'rule': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'rationale': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ReplaceStandardRelationshipsEdit': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'standard': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'requires': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'specializes': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'rationale': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'RepositoryPath': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'RequiresReadingReason': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'edge': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'source': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ResolveCall': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'analysis': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'submission': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ResolveNextOperation': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'operation': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'request_kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'target': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'work': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'analysis': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ResolveWorkflowCall': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'context': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'submission': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ResumeCall': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'context': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'RetireDecisionProvenanceEdit': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'id': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'RetirePolicyUnitEdit': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'policy': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'retired_semantic_revision': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'successors': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'relationship_dispositions': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'evidence': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'RetireStandardEdit': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'standard': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'successors': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'relationship_dispositions': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'evidence': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ReviewCall': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'context': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'decisions': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ReviewDecision': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'owner': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'decision': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'rationale': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'evidence': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ReviewProposalCall': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'analysis': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'decisions': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'prior_readiness': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ReviewProposalResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'readiness': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'revision': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'status': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ReviewScope': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'ReviseCall': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'context': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'change_set': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ReviseOperationalArtifactEdit': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'target': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'title': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'body': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'RevisePolicyUnitEdit': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'policy': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'title': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'body': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'semantics': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ReviseProposalCall': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'expected_revision': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'change_set': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ReviseProposalResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'proposal': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'revision': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ReviseStandardEdit': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'standard': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'scope_updates': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'RewriteNavigationIndexEdit': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'entrypoint': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'destinations': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'rationale': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'retargets': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'RouteCall': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'facts': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'RouteRequest': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'facts': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'RouteResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'reading_plan': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'unresolved_questions': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'next_operations': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'summary': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'RoutingBaseReadingReason': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'projection': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'RoutingConfiguration': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'facts': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'rules': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'RoutingFactsCall': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'RoutingFactsResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'facts': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'RoutingQuestion': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'id': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'prompt': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'state': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'fact': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'RoutingRuleExplanation': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'id': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'target': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'when': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'state': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'RoutingRuleReadingReason': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'rule': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'facts': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ScalarValue': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'SelectionReason': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'SemanticProposal': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'policy': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'accepted_semantic_revision': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'proposed_semantic_revision': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'intent': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'structural_digest': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'SnapshotChildHandle': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'child_kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'child_id': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'schema_version': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'SnapshotHandle': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'id': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'schema_version': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'SnapshotId': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'SnapshotInspectionResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'SnapshotSummary': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'SpecializesReadingReason': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'edge': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'source': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'StandardContent': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'id': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'title': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'role': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'level': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'applies_when': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'does_not_apply_when': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'verification': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'body': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'StandardEdit': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'StandardsChangePurpose': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'summary': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'rationale': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'evidence': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'StandardsChangeSet': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'purpose': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'edits': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'StructuredScope': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'heading_path': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'Submission': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'Timestamp': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'UndeleteSnapshotCall': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'UndeleteSnapshotResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'VerificationFailure': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'code': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'message': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'suite': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'check': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'VerificationReport': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'passed': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'exit_code': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'suites': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'checks': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'failures': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'VerifyProposalCall': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'revision': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'readiness': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'VerifyProposalResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'revision': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'verification': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'readiness': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'VerifyRepositoryCall': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'refresh_verification_inputs': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'VerifyRepositoryResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'refreshed_verification_inputs': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'verification': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'WholeArtifactScope': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'WithdrawApplicationContentEdit': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'target': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'WorkflowContext': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'WorkflowContinuation': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'operation': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'context': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'required_inputs': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'WorkflowOutcome': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'WorkflowResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'context': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'proposal': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'revision': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'status': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'next_operations': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'outcome': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'WorkflowStatusCall': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'context': {'title': None, 'description': None, 'has_default': False, 'default': None}}}}) +_SCHEMA = json.loads('{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"https://coding-standards.local/contracts/standards-engine/a2-v34","title":"Standards Engine A2 contract","description":"Canonical typed contract for snapshot lifecycle, controlled authoring, navigation, inspection, and immutable standards-change analysis.","oneOf":[{"$ref":"#/$defs/AgentRouteResult"},{"$ref":"#/$defs/AnalyzeCall"},{"$ref":"#/$defs/AnalyzeProposalCall"},{"$ref":"#/$defs/ApplicationInspectCall"},{"$ref":"#/$defs/ApplicationQueryCall"},{"$ref":"#/$defs/ApplicationReadCall"},{"$ref":"#/$defs/ApplicationReadManyCall"},{"$ref":"#/$defs/ApplicationReadManyResult"},{"$ref":"#/$defs/ApplicationReadResult"},{"$ref":"#/$defs/ApplicationRecoveryRequiredResult"},{"$ref":"#/$defs/ApplicationRejectedResult"},{"$ref":"#/$defs/ApplicationRelatedResult"},{"$ref":"#/$defs/ApplicationRouteResult"},{"$ref":"#/$defs/ApplicationRoutingFactsResult"},{"$ref":"#/$defs/ApplyCall"},{"$ref":"#/$defs/ApplyProposalCall"},{"$ref":"#/$defs/ApplyProposalResult"},{"$ref":"#/$defs/CompactReadResult"},{"$ref":"#/$defs/CompleteResult"},{"$ref":"#/$defs/CreateProposalCall"},{"$ref":"#/$defs/CreateProposalResult"},{"$ref":"#/$defs/CreateSnapshotCall"},{"$ref":"#/$defs/CreateSnapshotResult"},{"$ref":"#/$defs/DeleteSnapshotCall"},{"$ref":"#/$defs/DeleteSnapshotResult"},{"$ref":"#/$defs/FindProposalsCall"},{"$ref":"#/$defs/FindProposalsResult"},{"$ref":"#/$defs/FindSnapshotsCall"},{"$ref":"#/$defs/FindSnapshotsResult"},{"$ref":"#/$defs/InspectCall"},{"$ref":"#/$defs/InspectionResult"},{"$ref":"#/$defs/MaintainEvidenceCall"},{"$ref":"#/$defs/MaintainEvidenceResult"},{"$ref":"#/$defs/NavigationIndexesResult"},{"$ref":"#/$defs/OperationalReadResult"},{"$ref":"#/$defs/PendingResult"},{"$ref":"#/$defs/PrepareCall"},{"$ref":"#/$defs/PreviewApplicationCall"},{"$ref":"#/$defs/PreviewApplicationResult"},{"$ref":"#/$defs/ProposeCall"},{"$ref":"#/$defs/ProvenanceReadResult"},{"$ref":"#/$defs/QueryCall"},{"$ref":"#/$defs/QueryProposalCall"},{"$ref":"#/$defs/QueryProposalResult"},{"$ref":"#/$defs/QueryResult"},{"$ref":"#/$defs/ReadCall"},{"$ref":"#/$defs/ReadManyCall"},{"$ref":"#/$defs/ReadManyResult"},{"$ref":"#/$defs/ReadResult"},{"$ref":"#/$defs/RecoverApplicationCall"},{"$ref":"#/$defs/RecoverApplicationResult"},{"$ref":"#/$defs/RecoverCall"},{"$ref":"#/$defs/RejectedResult"},{"$ref":"#/$defs/RelatedCall"},{"$ref":"#/$defs/RelatedResult"},{"$ref":"#/$defs/ResolveCall"},{"$ref":"#/$defs/ResolveWorkflowCall"},{"$ref":"#/$defs/ResumeCall"},{"$ref":"#/$defs/ReviewCall"},{"$ref":"#/$defs/ReviewProposalCall"},{"$ref":"#/$defs/ReviewProposalResult"},{"$ref":"#/$defs/ReviseCall"},{"$ref":"#/$defs/ReviseProposalCall"},{"$ref":"#/$defs/ReviseProposalResult"},{"$ref":"#/$defs/RouteCall"},{"$ref":"#/$defs/RoutingFactsCall"},{"$ref":"#/$defs/RoutingFactsResult"},{"$ref":"#/$defs/UndeleteSnapshotCall"},{"$ref":"#/$defs/UndeleteSnapshotResult"},{"$ref":"#/$defs/VerifyProposalCall"},{"$ref":"#/$defs/VerifyProposalResult"},{"$ref":"#/$defs/VerifyRepositoryCall"},{"$ref":"#/$defs/VerifyRepositoryResult"},{"$ref":"#/$defs/WorkflowResult"},{"$ref":"#/$defs/WorkflowStatusCall"}],"$defs":{"NonEmptyString":{"type":"string","minLength":1},"CanonicalId":{"type":"string","pattern":"^[A-Za-z0-9][A-Za-z0-9._:/-]*$"},"EdgeId":{"type":"string","minLength":1},"Digest":{"type":"string","pattern":"^sha256:[0-9a-f]{64}$"},"ObligationId":{"type":"string","pattern":"^obligation:sha256:[0-9a-f]{64}$"},"ImpactTraceId":{"type":"string","pattern":"^impact-trace:sha256:[0-9a-f]{64}$"},"FactRequirementId":{"type":"string","pattern":"^fact-requirement:sha256:[0-9a-f]{64}$"},"ScalarValue":{"oneOf":[{"type":"boolean"},{"type":"integer"},{"type":"string"},{"type":"null"}]},"FactValue":{"oneOf":[{"type":"object","required":["type","state","value"],"properties":{"type":{"const":"boolean"},"state":{"const":"known"},"value":{"type":"boolean"}},"additionalProperties":false},{"type":"object","required":["type","state","value"],"properties":{"type":{"enum":["boolean","enum","string","string-set","enum-set","canonical-id"]},"state":{"const":"known"},"value":{"type":"null"}},"additionalProperties":false},{"type":"object","required":["type","state","value"],"properties":{"type":{"enum":["enum","string","canonical-id"]},"state":{"const":"known"},"value":{"type":"string"}},"additionalProperties":false},{"type":"object","required":["type","state","value"],"properties":{"type":{"enum":["string-set","enum-set"]},"state":{"const":"known"},"value":{"type":"array","items":{"type":"string"},"uniqueItems":true}},"additionalProperties":false},{"type":"object","required":["type","state"],"properties":{"type":{"enum":["boolean","enum","string","string-set","enum-set","canonical-id"]},"state":{"enum":["known-absent","unknown"]}},"additionalProperties":false}]},"FactSet":{"type":"object","additionalProperties":{"$ref":"#/$defs/FactValue"}},"StructuredScope":{"type":"object","required":["kind","heading_path"],"properties":{"kind":{"const":"structured"},"heading_path":{"type":"array","minItems":1,"items":{"$ref":"#/$defs/NonEmptyString"}}},"additionalProperties":false},"WholeArtifactScope":{"type":"object","required":["kind"],"properties":{"kind":{"const":"whole-artifact"}},"additionalProperties":false},"ReviewScope":{"oneOf":[{"$ref":"#/$defs/StructuredScope"},{"$ref":"#/$defs/WholeArtifactScope"}]},"AllExpression":{"type":"object","required":["operator","expressions"],"properties":{"operator":{"const":"all"},"expressions":{"type":"array","minItems":1,"items":{"$ref":"#/$defs/ApplicabilityExpression"}}},"additionalProperties":false},"AnyExpression":{"type":"object","required":["operator","expressions"],"properties":{"operator":{"const":"any"},"expressions":{"type":"array","minItems":1,"items":{"$ref":"#/$defs/ApplicabilityExpression"}}},"additionalProperties":false},"NotExpression":{"type":"object","required":["operator","expression"],"properties":{"operator":{"const":"not"},"expression":{"$ref":"#/$defs/ApplicabilityExpression"}},"additionalProperties":false},"EqualsExpression":{"type":"object","required":["operator","fact","value"],"properties":{"operator":{"const":"equals"},"fact":{"$ref":"#/$defs/CanonicalId"},"value":{"$ref":"#/$defs/ScalarValue"}},"additionalProperties":false},"InExpression":{"type":"object","required":["operator","fact","values"],"properties":{"operator":{"const":"in"},"fact":{"$ref":"#/$defs/CanonicalId"},"values":{"type":"array","minItems":1,"uniqueItems":true,"items":{"$ref":"#/$defs/ScalarValue"}}},"additionalProperties":false},"ContainsExpression":{"type":"object","required":["operator","fact","value"],"properties":{"operator":{"const":"contains"},"fact":{"$ref":"#/$defs/CanonicalId"},"value":{"$ref":"#/$defs/ScalarValue"}},"additionalProperties":false},"ExistsExpression":{"type":"object","required":["operator","fact"],"properties":{"operator":{"const":"exists"},"fact":{"$ref":"#/$defs/CanonicalId"}},"additionalProperties":false},"AlwaysExpression":{"type":"object","required":["operator"],"properties":{"operator":{"const":"always"}},"additionalProperties":false},"ApplicabilityExpression":{"oneOf":[{"$ref":"#/$defs/AlwaysExpression"},{"$ref":"#/$defs/AllExpression"},{"$ref":"#/$defs/AnyExpression"},{"$ref":"#/$defs/NotExpression"},{"$ref":"#/$defs/EqualsExpression"},{"$ref":"#/$defs/InExpression"},{"$ref":"#/$defs/ContainsExpression"},{"$ref":"#/$defs/ExistsExpression"}]},"GeneralSelectionReason":{"type":"object","required":["kind"],"properties":{"kind":{"enum":["routing-fact","requires","specializes","changed-policy","question","audit-coverage","unmapped-normative-change","structured-scope-analysis-unsupported","navigation-index-change","supporting-content-change"]},"source":{"$ref":"#/$defs/CanonicalId"},"fact":{"$ref":"#/$defs/CanonicalId"},"edge":{"$ref":"#/$defs/EdgeId"},"question":{"$ref":"#/$defs/CanonicalId"}},"additionalProperties":false},"PolicyImpactSelectionReason":{"type":"object","required":["kind","source","edge","relation","evidence_owner","traces"],"properties":{"kind":{"const":"policy-impact-edge"},"source":{"$ref":"#/$defs/CanonicalId"},"edge":{"$ref":"#/$defs/EdgeId"},"relation":{"$ref":"#/$defs/CanonicalId"},"evidence_owner":{"$ref":"#/$defs/CanonicalId"},"traces":{"type":"array","minItems":1,"uniqueItems":true,"items":{"$ref":"#/$defs/ImpactTraceReference"}}},"additionalProperties":false},"SelectionReason":{"oneOf":[{"$ref":"#/$defs/GeneralSelectionReason"},{"$ref":"#/$defs/PolicyImpactSelectionReason"}]},"ImpactTraceReference":{"type":"object","required":["id","graph","applicability"],"properties":{"id":{"$ref":"#/$defs/ImpactTraceId"},"graph":{"enum":["accepted","proposed"]},"applicability":{"enum":["true","false","unknown"]}},"additionalProperties":false},"ConsumerReviewObligationReadingReason":{"type":"object","required":["kind","obligation"],"properties":{"kind":{"const":"consumer-review-obligation"},"obligation":{"$ref":"#/$defs/ObligationId"}},"additionalProperties":false},"RoutingBaseReadingReason":{"type":"object","required":["kind","projection"],"properties":{"kind":{"const":"routing-base"},"projection":{"$ref":"#/$defs/CanonicalId"}},"additionalProperties":false},"RoutingRuleReadingReason":{"type":"object","required":["kind","rule","facts"],"properties":{"kind":{"const":"routing-rule"},"rule":{"$ref":"#/$defs/CanonicalId"},"facts":{"type":"array","uniqueItems":true,"items":{"$ref":"#/$defs/CanonicalId"}}},"additionalProperties":false},"RequiresReadingReason":{"type":"object","required":["kind","edge","source"],"properties":{"kind":{"const":"requires"},"edge":{"$ref":"#/$defs/EdgeId"},"source":{"$ref":"#/$defs/CanonicalId"}},"additionalProperties":false},"SpecializesReadingReason":{"type":"object","required":["kind","edge","source"],"properties":{"kind":{"const":"specializes"},"edge":{"$ref":"#/$defs/EdgeId"},"source":{"$ref":"#/$defs/CanonicalId"}},"additionalProperties":false},"ReadingPlanReason":{"oneOf":[{"$ref":"#/$defs/ConsumerReviewObligationReadingReason"},{"$ref":"#/$defs/RoutingBaseReadingReason"},{"$ref":"#/$defs/RoutingRuleReadingReason"},{"$ref":"#/$defs/RequiresReadingReason"},{"$ref":"#/$defs/SpecializesReadingReason"}]},"ReadingPlanEntry":{"type":"object","required":["target","scope","authority","reasons","state"],"properties":{"target":{"$ref":"#/$defs/CanonicalId"},"scope":{"$ref":"#/$defs/ReviewScope"},"authority":{"enum":["normative","projection","contextual","evidence"]},"reasons":{"type":"array","minItems":1,"uniqueItems":true,"items":{"$ref":"#/$defs/ReadingPlanReason"}},"state":{"enum":["selected","conditional","unresolved"]}},"additionalProperties":false},"RouteRequest":{"type":"object","required":["kind","facts"],"properties":{"kind":{"const":"route"},"facts":{"$ref":"#/$defs/FactSet"}},"additionalProperties":false},"ReadRequest":{"type":"object","required":["kind","target"],"properties":{"kind":{"const":"read"},"target":{"$ref":"#/$defs/CanonicalId"},"include_routing":{"type":"boolean"},"include_coverage":{"type":"boolean","description":"Include current repository attestation status for registered policy units in this read scope."}},"additionalProperties":false},"RelatedRequest":{"type":"object","required":["kind","target","groups","direction","transitive"],"properties":{"kind":{"const":"related"},"target":{"$ref":"#/$defs/CanonicalId"},"groups":{"type":"array","minItems":1,"uniqueItems":true,"items":{"$ref":"#/$defs/CanonicalId"}},"direction":{"enum":["incoming","outgoing","both"]},"transitive":{"type":"boolean","default":false}},"additionalProperties":false},"QueryRequest":{"oneOf":[{"$ref":"#/$defs/RouteRequest"},{"$ref":"#/$defs/ReadRequest"},{"$ref":"#/$defs/RelatedRequest"}]},"PolicyUnitDeclaration":{"type":"object","required":["kind","id","module","heading_path","semantic_revision","lifecycle"],"properties":{"kind":{"const":"policy-unit"},"id":{"$ref":"#/$defs/CanonicalId"},"module":{"$ref":"#/$defs/CanonicalId"},"heading_path":{"type":"array","minItems":1,"items":{"$ref":"#/$defs/NonEmptyString"}},"semantic_revision":{"type":"integer","minimum":1},"lifecycle":{"const":"active"},"aliases":{"type":"array","uniqueItems":true,"items":{"$ref":"#/$defs/CanonicalId"}},"predecessors":{"type":"array","uniqueItems":true,"items":{"$ref":"#/$defs/CanonicalId"}},"successors":{"type":"array","uniqueItems":true,"items":{"$ref":"#/$defs/CanonicalId"}}},"additionalProperties":false},"CanonicalModuleDeclaration":{"type":"object","required":["kind","id","role","level","applies_when","does_not_apply_when","requires","specializes","verification"],"properties":{"kind":{"const":"canonical-module"},"id":{"$ref":"#/$defs/CanonicalId"},"role":{"enum":["core","router","workflow","profile","topic","reference"]},"level":{"enum":["MUST","SHOULD","PROFILE","REFERENCE"]},"applies_when":{"$ref":"#/$defs/NonEmptyString"},"does_not_apply_when":{"$ref":"#/$defs/NonEmptyString"},"requires":{"type":"array","uniqueItems":true,"items":{"$ref":"#/$defs/CanonicalId"}},"specializes":{"type":"array","uniqueItems":true,"items":{"$ref":"#/$defs/CanonicalId"}},"verification":{"$ref":"#/$defs/NonEmptyString"}},"additionalProperties":false},"PolicyRelationshipInspection":{"type":"object","required":["relationship_kind","applicability","source_scope","consumer_scope","propagation","evidence_owner","rationale"],"properties":{"relationship_kind":{"enum":["normative-consumer","router-projection","prompt-projection","template-projection","reference-projection","fixture-projection","enforcement-suite-projection","documentation-projection","implementation-projection"]},"applicability":{"$ref":"#/$defs/ApplicabilityExpression"},"source_scope":{"oneOf":[{"$ref":"#/$defs/ReviewScope"},{"type":"null"}]},"consumer_scope":{"oneOf":[{"$ref":"#/$defs/ReviewScope"},{"type":"null"}]},"propagation":{"const":"source-to-consumer"},"evidence_owner":{"$ref":"#/$defs/CanonicalId"},"rationale":{"$ref":"#/$defs/NonEmptyString"}},"additionalProperties":false},"SemanticProposal":{"type":"object","required":["policy","accepted_semantic_revision","proposed_semantic_revision","intent","structural_digest"],"properties":{"policy":{"$ref":"#/$defs/CanonicalId"},"accepted_semantic_revision":{"oneOf":[{"type":"integer","minimum":1},{"type":"null"}]},"proposed_semantic_revision":{"type":"integer","minimum":1},"intent":{"$ref":"#/$defs/NonEmptyString"},"structural_digest":{"$ref":"#/$defs/Digest"}},"additionalProperties":false},"ChangeDescriptor":{"type":"object","required":["kind","accepted_ids","proposed_ids","scope"],"properties":{"kind":{"enum":["module","modification","addition","removal","move","split","merge","navigation-index","supporting-content"]},"accepted_ids":{"type":"array","uniqueItems":true,"items":{"$ref":"#/$defs/CanonicalId"}},"proposed_ids":{"type":"array","uniqueItems":true,"items":{"$ref":"#/$defs/CanonicalId"}},"scope":{"$ref":"#/$defs/ReviewScope"},"accepted_module":{"$ref":"#/$defs/CanonicalId"},"proposed_module":{"$ref":"#/$defs/CanonicalId"}},"additionalProperties":false},"ChangedPolicyUnit":{"type":"object","required":["policy","change_kind","classification","accepted_representation_digest","proposed_representation_digest","accepted_structural_digest","proposed_structural_digest","accepted_semantic_revision","proposed_semantic_revision","semantic_state","scope"],"properties":{"policy":{"$ref":"#/$defs/CanonicalId"},"change_kind":{"enum":["modification","addition","removal","move","split-predecessor","split-successor","merge-predecessor","merge-successor"]},"classification":{"enum":["unchanged","representation-only-candidate","possibly-semantically-changed","semantically-changed","unresolved"]},"accepted_representation_digest":{"oneOf":[{"$ref":"#/$defs/Digest"},{"type":"null"}]},"proposed_representation_digest":{"oneOf":[{"$ref":"#/$defs/Digest"},{"type":"null"}]},"accepted_structural_digest":{"oneOf":[{"$ref":"#/$defs/Digest"},{"type":"null"}]},"proposed_structural_digest":{"oneOf":[{"$ref":"#/$defs/Digest"},{"type":"null"}]},"accepted_semantic_revision":{"oneOf":[{"type":"integer","minimum":1},{"type":"null"}]},"proposed_semantic_revision":{"oneOf":[{"type":"integer","minimum":1},{"type":"null"}]},"semantic_state":{"enum":["accepted-unchanged","proposed","removed","unresolved"]},"scope":{"$ref":"#/$defs/ReviewScope"}},"additionalProperties":false},"Question":{"type":"object","required":["id","kind","prompt","state","permitted_answers"],"properties":{"id":{"$ref":"#/$defs/CanonicalId"},"kind":{"enum":["applicability-fact","normative-classification","identity-resolution","scope-resolution"]},"prompt":{"$ref":"#/$defs/NonEmptyString"},"state":{"enum":["required","answered","blocked"]},"permitted_answers":{"type":"array","minItems":1,"uniqueItems":true,"items":{"$ref":"#/$defs/NonEmptyString"}}},"additionalProperties":false},"ConsumerReviewContract":{"type":"object","required":["kind","id","version","permitted_dispositions","evidence_contract","authorization_capability","semantics"],"properties":{"kind":{"const":"consumer-review-contract"},"id":{"$ref":"#/$defs/CanonicalId"},"version":{"type":"integer","minimum":1},"permitted_dispositions":{"type":"array","minItems":1,"uniqueItems":true,"items":{"enum":["updated","reviewed-no-change","not-applicable","blocked"]}},"evidence_contract":{"$ref":"#/$defs/CanonicalId"},"authorization_capability":{"$ref":"#/$defs/CanonicalId"},"semantics":{"$ref":"#/$defs/NonEmptyString"}},"additionalProperties":false},"DecisionDependency":{"type":"object","required":["class","identity","digest"],"properties":{"class":{"enum":["policy-unit","semantic-revision","structure","representation","module-locator","applicability-fact","relationship","audit","exception","evidence","provider-contract","applicability-contract","analysis-contract"]},"identity":{"$ref":"#/$defs/NonEmptyString"},"digest":{"$ref":"#/$defs/Digest"}},"additionalProperties":false},"DecisionFingerprint":{"type":"object","required":["decision_kind","decision_contract","schema_version","dependencies"],"properties":{"decision_kind":{"$ref":"#/$defs/CanonicalId"},"decision_contract":{"$ref":"#/$defs/CanonicalId"},"schema_version":{"const":1},"dependencies":{"type":"array","minItems":1,"items":{"$ref":"#/$defs/DecisionDependency"}}},"additionalProperties":false},"FactValueContract":{"type":"object","required":["type","states","nullable"],"properties":{"type":{"enum":["boolean","enum","string","string-set","enum-set","canonical-id"]},"states":{"const":["known","known-absent"]},"nullable":{"type":"boolean"},"values":{"type":"array","minItems":1,"uniqueItems":true,"items":{"type":"string"}}},"additionalProperties":false},"EvidenceReference":{"type":"object","required":["id","digest","provider_contract","provider_contract_version"],"properties":{"id":{"$ref":"#/$defs/CanonicalId"},"digest":{"$ref":"#/$defs/Digest"},"provider_contract":{"$ref":"#/$defs/CanonicalId"},"provider_contract_version":{"$ref":"#/$defs/NonEmptyString"}},"additionalProperties":false},"CompletionProof":{"type":"object","required":["required_coverage_subjects","certificate_subjects","reached_consumer_obligations","disposition_obligations","required_fact_requirements","observed_fact_requirements","non_consumer_obligations_resolved","applicability_resolved","authorization_valid","evidence_valid"],"properties":{"required_coverage_subjects":{"type":"array","uniqueItems":true,"items":{"$ref":"#/$defs/CanonicalId"}},"certificate_subjects":{"type":"array","uniqueItems":true,"items":{"$ref":"#/$defs/CanonicalId"}},"reached_consumer_obligations":{"type":"array","uniqueItems":true,"items":{"$ref":"#/$defs/ObligationId"}},"disposition_obligations":{"type":"array","uniqueItems":true,"items":{"$ref":"#/$defs/ObligationId"}},"required_fact_requirements":{"type":"array","uniqueItems":true,"items":{"$ref":"#/$defs/FactRequirementId"}},"observed_fact_requirements":{"type":"array","uniqueItems":true,"items":{"$ref":"#/$defs/FactRequirementId"}},"non_consumer_obligations_resolved":{"const":true},"applicability_resolved":{"const":true},"authorization_valid":{"const":true},"evidence_valid":{"const":true}},"additionalProperties":false},"Timestamp":{"type":"integer","minimum":0},"SnapshotId":{"type":"string","pattern":"^snapshot:v1:[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"},"AnalysisId":{"type":"string","pattern":"^analysis:sha256:[0-9a-f]{64}$"},"ProposalId":{"type":"string","pattern":"^proposal:v1:[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"},"ProposalRevisionId":{"type":"string","pattern":"^proposal-revision:sha256:[0-9a-f]{64}$"},"ReadinessId":{"type":"string","pattern":"^readiness:sha256:[0-9a-f]{64}$"},"ApplicationId":{"type":"string","pattern":"^application:sha256:[0-9a-f]{64}$"},"ChildId":{"type":"string","pattern":"^sha256:[0-9a-f]{64}$"},"AuthorizationId":{"type":"string","pattern":"^authorization:sha256:[0-9a-f]{64}$"},"SnapshotHandle":{"type":"object","required":["kind","id","schema_version"],"properties":{"kind":{"const":"snapshot-handle"},"id":{"$ref":"#/$defs/SnapshotId"},"schema_version":{"const":5}},"additionalProperties":false},"AnalysisHandle":{"type":"object","required":["kind","id","schema_version"],"properties":{"kind":{"const":"analysis-handle"},"id":{"$ref":"#/$defs/AnalysisId"},"schema_version":{"const":7}},"additionalProperties":false},"ProposalHandle":{"type":"object","required":["kind","id","schema_version"],"properties":{"kind":{"const":"proposal-handle"},"id":{"$ref":"#/$defs/ProposalId"},"schema_version":{"const":1}},"additionalProperties":false},"ProposalRevisionHandle":{"type":"object","required":["kind","id","schema_version"],"properties":{"kind":{"const":"proposal-revision-handle"},"id":{"$ref":"#/$defs/ProposalRevisionId"},"schema_version":{"const":1}},"additionalProperties":false},"ReadinessHandle":{"type":"object","required":["kind","id","schema_version"],"properties":{"kind":{"const":"readiness-handle"},"id":{"$ref":"#/$defs/ReadinessId"},"schema_version":{"const":1}},"additionalProperties":false},"ApplicationHandle":{"type":"object","required":["kind","id","schema_version"],"properties":{"kind":{"const":"application-handle"},"id":{"$ref":"#/$defs/ApplicationId"},"schema_version":{"const":1}},"additionalProperties":false},"SnapshotChildHandle":{"type":"object","required":["kind","snapshot","child_kind","child_id","schema_version"],"properties":{"kind":{"const":"snapshot-child-handle"},"snapshot":{"$ref":"#/$defs/SnapshotHandle"},"child_kind":{"enum":["policy","relationship"]},"child_id":{"$ref":"#/$defs/NonEmptyString"},"schema_version":{"const":5}},"additionalProperties":false},"AnalysisChildHandle":{"type":"object","required":["kind","analysis","child_kind","child_id","schema_version"],"properties":{"kind":{"const":"analysis-child-handle"},"analysis":{"$ref":"#/$defs/AnalysisHandle"},"child_kind":{"enum":["context","fact-requirement","fact-observation","obligation","coverage-requirement","coverage-certificate"]},"child_id":{"$ref":"#/$defs/ChildId"},"schema_version":{"const":7}},"additionalProperties":false},"AnalysisMaterialHandle":{"oneOf":[{"$ref":"#/$defs/SnapshotHandle"},{"$ref":"#/$defs/ProposalRevisionHandle"}]},"InspectableHandle":{"oneOf":[{"$ref":"#/$defs/SnapshotHandle"},{"$ref":"#/$defs/AnalysisHandle"},{"$ref":"#/$defs/SnapshotChildHandle"},{"$ref":"#/$defs/AnalysisChildHandle"}]},"ActiveSnapshotSummary":{"type":"object","required":["snapshot","lifecycle","source_revision","created_at"],"properties":{"snapshot":{"$ref":"#/$defs/SnapshotHandle"},"lifecycle":{"const":"active"},"source_revision":{"$ref":"#/$defs/NonEmptyString"},"created_at":{"$ref":"#/$defs/Timestamp"}},"additionalProperties":false},"QuarantinedSnapshotSummary":{"type":"object","required":["snapshot","lifecycle","source_revision","created_at","purge_deadline"],"properties":{"snapshot":{"$ref":"#/$defs/SnapshotHandle"},"lifecycle":{"const":"quarantined"},"source_revision":{"$ref":"#/$defs/NonEmptyString"},"created_at":{"$ref":"#/$defs/Timestamp"},"purge_deadline":{"$ref":"#/$defs/Timestamp"}},"additionalProperties":false},"SnapshotSummary":{"oneOf":[{"$ref":"#/$defs/ActiveSnapshotSummary"},{"$ref":"#/$defs/QuarantinedSnapshotSummary"}]},"CreateSnapshotCall":{"type":"object","required":["kind"],"properties":{"kind":{"const":"create-snapshot"}},"additionalProperties":false},"CreateSnapshotResult":{"type":"object","required":["kind","snapshot"],"properties":{"kind":{"const":"create-snapshot-result"},"snapshot":{"$ref":"#/$defs/ActiveSnapshotSummary"}},"additionalProperties":false},"FindSnapshotsCall":{"type":"object","required":["kind"],"properties":{"kind":{"const":"find-snapshots"},"lifecycle":{"enum":["active","quarantined"],"default":"active"},"after":{"$ref":"#/$defs/SnapshotHandle"},"limit":{"type":"integer","minimum":1,"default":50}},"additionalProperties":false},"FindSnapshotsResult":{"type":"object","required":["kind","snapshots"],"properties":{"kind":{"const":"find-snapshots-result"},"snapshots":{"type":"array","items":{"$ref":"#/$defs/SnapshotSummary"}},"continuation":{"$ref":"#/$defs/SnapshotHandle"}},"additionalProperties":false},"StandardsChangePurpose":{"type":"object","required":["summary","rationale","evidence"],"properties":{"summary":{"$ref":"#/$defs/NonEmptyString"},"rationale":{"$ref":"#/$defs/NonEmptyString"},"evidence":{"type":"array","minItems":1,"uniqueItems":true,"items":{"$ref":"#/$defs/EvidenceReference"}}},"additionalProperties":false},"StandardContent":{"type":"object","required":["id","title","role","level","applies_when","does_not_apply_when","verification","body"],"properties":{"id":{"$ref":"#/$defs/CanonicalId"},"title":{"$ref":"#/$defs/NonEmptyString"},"role":{"enum":["core","router","workflow","profile","topic","reference"]},"level":{"enum":["MUST","SHOULD","PROFILE","REFERENCE"]},"applies_when":{"$ref":"#/$defs/NonEmptyString"},"does_not_apply_when":{"$ref":"#/$defs/NonEmptyString"},"verification":{"$ref":"#/$defs/NonEmptyString"},"body":{"$ref":"#/$defs/NonEmptyString"}},"additionalProperties":false},"NewPolicyUnit":{"type":"object","required":["id","heading_chain","semantic_revision","intent","aliases","predecessors","successors"],"properties":{"id":{"$ref":"#/$defs/CanonicalId"},"heading_chain":{"type":"array","minItems":1,"items":{"$ref":"#/$defs/NonEmptyString"}},"semantic_revision":{"const":1},"intent":{"$ref":"#/$defs/NonEmptyString"},"aliases":{"type":"array","uniqueItems":true,"items":{"$ref":"#/$defs/CanonicalId"}},"predecessors":{"type":"array","uniqueItems":true,"items":{"$ref":"#/$defs/CanonicalId"}},"successors":{"type":"array","uniqueItems":true,"items":{"$ref":"#/$defs/CanonicalId"}}},"additionalProperties":false},"PreservePolicySemantics":{"type":"object","required":["kind","semantic_revision","intent"],"properties":{"kind":{"const":"preserve"},"semantic_revision":{"type":"integer","minimum":1},"intent":{"$ref":"#/$defs/NonEmptyString"}},"additionalProperties":false},"ChangePolicySemantics":{"type":"object","required":["kind","accepted_semantic_revision","proposed_semantic_revision","intent"],"properties":{"kind":{"const":"change"},"accepted_semantic_revision":{"type":"integer","minimum":1},"proposed_semantic_revision":{"type":"integer","minimum":1},"intent":{"$ref":"#/$defs/NonEmptyString"}},"additionalProperties":false},"PolicySemanticIntent":{"oneOf":[{"$ref":"#/$defs/PreservePolicySemantics"},{"$ref":"#/$defs/ChangePolicySemantics"}]},"CreateStandardEdit":{"type":"object","required":["kind","standard","requires","specializes","policy_units"],"properties":{"kind":{"const":"create-standard"},"standard":{"$ref":"#/$defs/StandardContent"},"requires":{"type":"array","uniqueItems":true,"items":{"$ref":"#/$defs/CanonicalId"}},"specializes":{"type":"array","uniqueItems":true,"items":{"$ref":"#/$defs/CanonicalId"}},"policy_units":{"type":"array","uniqueItems":true,"items":{"$ref":"#/$defs/NewPolicyUnit"}}},"additionalProperties":false},"RegisterPolicyUnitEdit":{"type":"object","description":"Register an explicitly selected policy scope in an existing standard. The Engine owns declaration placement and validates the final candidate.","required":["kind","standard","policy_unit"],"properties":{"kind":{"const":"register-policy-unit"},"standard":{"$ref":"#/$defs/CanonicalId"},"policy_unit":{"$ref":"#/$defs/NewPolicyUnit"}},"additionalProperties":false},"ReviseStandardEdit":{"type":"object","required":["kind","standard"],"properties":{"kind":{"const":"revise-standard"},"standard":{"$ref":"#/$defs/StandardContent"},"scope_updates":{"type":"array","items":{"$ref":"#/$defs/PolicyScopeUpdate"}}},"additionalProperties":false},"RevisePolicyUnitEdit":{"type":"object","required":["kind","policy","title","body","semantics"],"properties":{"kind":{"const":"revise-policy-unit"},"policy":{"$ref":"#/$defs/CanonicalId"},"title":{"$ref":"#/$defs/NonEmptyString"},"body":{"$ref":"#/$defs/NonEmptyString"},"semantics":{"$ref":"#/$defs/PolicySemanticIntent"}},"additionalProperties":false},"MovePolicyUnitEdit":{"type":"object","required":["kind","policy","standard","semantics"],"properties":{"kind":{"const":"move-policy-unit"},"policy":{"$ref":"#/$defs/CanonicalId"},"standard":{"$ref":"#/$defs/CanonicalId"},"after_policy":{"$ref":"#/$defs/CanonicalId"},"semantics":{"$ref":"#/$defs/PolicySemanticIntent"}},"additionalProperties":false},"RetirePolicyUnitEdit":{"type":"object","required":["kind","policy","retired_semantic_revision","successors","relationship_dispositions","evidence"],"properties":{"kind":{"const":"retire-policy-unit"},"policy":{"$ref":"#/$defs/CanonicalId"},"retired_semantic_revision":{"type":"integer","minimum":1},"successors":{"type":"array","uniqueItems":true,"items":{"$ref":"#/$defs/CanonicalId"}},"relationship_dispositions":{"type":"array","uniqueItems":true,"items":{"$ref":"#/$defs/RelationshipDisposition"}},"evidence":{"type":"array","minItems":1,"uniqueItems":true,"items":{"$ref":"#/$defs/EvidenceReference"}}},"additionalProperties":false},"RetireStandardEdit":{"type":"object","required":["kind","standard","successors","relationship_dispositions","evidence"],"properties":{"kind":{"const":"retire-standard"},"standard":{"$ref":"#/$defs/CanonicalId"},"successors":{"type":"array","uniqueItems":true,"items":{"$ref":"#/$defs/CanonicalId"}},"relationship_dispositions":{"type":"array","uniqueItems":true,"items":{"$ref":"#/$defs/RelationshipDisposition"}},"evidence":{"type":"array","minItems":1,"uniqueItems":true,"items":{"$ref":"#/$defs/EvidenceReference"}}},"additionalProperties":false},"ReplaceStandardRelationshipsEdit":{"type":"object","required":["kind","standard","requires","specializes","rationale"],"properties":{"kind":{"const":"replace-standard-relationships"},"standard":{"$ref":"#/$defs/CanonicalId"},"requires":{"type":"array","uniqueItems":true,"items":{"$ref":"#/$defs/CanonicalId"}},"specializes":{"type":"array","uniqueItems":true,"items":{"$ref":"#/$defs/CanonicalId"}},"rationale":{"$ref":"#/$defs/NonEmptyString"}},"additionalProperties":false},"AuthoringTargetHandle":{"type":"object","required":["kind","snapshot","id","schema_version"],"properties":{"kind":{"const":"authoring-target-handle"},"snapshot":{"$ref":"#/$defs/SnapshotHandle"},"id":{"$ref":"#/$defs/ChildId"},"schema_version":{"const":5}},"additionalProperties":false},"RelationshipConsumer":{"oneOf":[{"$ref":"#/$defs/CanonicalId"},{"$ref":"#/$defs/AuthoringTargetHandle"}]},"PolicyRelationship":{"type":"object","required":["source_policy","consumer","relation","applicability","source_scope","consumer_scope","evidence_owner","rationale"],"properties":{"source_policy":{"$ref":"#/$defs/CanonicalId"},"consumer":{"$ref":"#/$defs/RelationshipConsumer"},"relation":{"enum":["normative-consumer","router-projection","prompt-projection","template-projection","reference-projection","fixture-projection","enforcement-suite-projection","documentation-projection","implementation-projection"]},"applicability":{"$ref":"#/$defs/ApplicabilityExpression"},"source_scope":{"oneOf":[{"$ref":"#/$defs/ReviewScope"},{"type":"null"}]},"consumer_scope":{"oneOf":[{"$ref":"#/$defs/ReviewScope"},{"type":"null"}]},"evidence_owner":{"$ref":"#/$defs/CanonicalId"},"rationale":{"$ref":"#/$defs/NonEmptyString"}},"additionalProperties":false},"PutPolicyRelationshipEdit":{"type":"object","required":["kind","relationship"],"properties":{"kind":{"const":"put-policy-relationship"},"relationship":{"$ref":"#/$defs/PolicyRelationship"}},"additionalProperties":false},"RemovePolicyRelationshipEdit":{"type":"object","required":["kind","relationship"],"properties":{"kind":{"const":"remove-policy-relationship"},"relationship":{"$ref":"#/$defs/PolicyRelationship"}},"additionalProperties":false},"ModuleRelationshipKey":{"type":"object","required":["kind","relation","source","target"],"properties":{"kind":{"const":"module-relationship"},"relation":{"enum":["requires","specializes"]},"source":{"$ref":"#/$defs/CanonicalId"},"target":{"$ref":"#/$defs/CanonicalId"}},"additionalProperties":false},"PolicyRelationshipKey":{"type":"object","required":["kind","source_policy","consumer","relation"],"properties":{"kind":{"const":"policy-relationship"},"source_policy":{"$ref":"#/$defs/CanonicalId"},"consumer":{"$ref":"#/$defs/RelationshipConsumer"},"relation":{"$ref":"#/$defs/CanonicalId"}},"additionalProperties":false},"RelationshipKey":{"oneOf":[{"$ref":"#/$defs/ModuleRelationshipKey"},{"$ref":"#/$defs/PolicyRelationshipKey"}]},"RelationshipDisposition":{"type":"object","required":["relationship","disposition","rationale","evidence"],"properties":{"relationship":{"$ref":"#/$defs/RelationshipKey"},"disposition":{"enum":["remove","retarget"]},"replacement_consumer":{"$ref":"#/$defs/RelationshipConsumer"},"rationale":{"$ref":"#/$defs/NonEmptyString"},"evidence":{"type":"array","minItems":1,"uniqueItems":true,"items":{"$ref":"#/$defs/EvidenceReference"}}},"additionalProperties":false},"StandardEdit":{"oneOf":[{"$ref":"#/$defs/CreateStandardEdit"},{"$ref":"#/$defs/RegisterPolicyUnitEdit"},{"$ref":"#/$defs/ReviseStandardEdit"},{"$ref":"#/$defs/RevisePolicyUnitEdit"},{"$ref":"#/$defs/MovePolicyUnitEdit"},{"$ref":"#/$defs/RetirePolicyUnitEdit"},{"$ref":"#/$defs/RetireStandardEdit"},{"$ref":"#/$defs/ReplaceStandardRelationshipsEdit"},{"$ref":"#/$defs/PutPolicyRelationshipEdit"},{"$ref":"#/$defs/RemovePolicyRelationshipEdit"},{"$ref":"#/$defs/PutRoutingRuleEdit"},{"$ref":"#/$defs/RemoveRoutingRuleEdit"},{"$ref":"#/$defs/PutRoutingFactEdit"},{"$ref":"#/$defs/RemoveRoutingFactEdit"},{"$ref":"#/$defs/AuditPolicyUnitEdit"},{"$ref":"#/$defs/RewriteNavigationIndexEdit"},{"$ref":"#/$defs/PutDecisionProvenanceEdit"},{"$ref":"#/$defs/RetireDecisionProvenanceEdit"},{"$ref":"#/$defs/ApproveApplicationContentEdit"},{"$ref":"#/$defs/WithdrawApplicationContentEdit"},{"$ref":"#/$defs/ReviseOperationalArtifactEdit"},{"$ref":"#/$defs/RegisterConsumerEdit"}]},"StandardsChangeSet":{"type":"object","required":["purpose","edits"],"properties":{"purpose":{"$ref":"#/$defs/StandardsChangePurpose"},"edits":{"type":"array","minItems":1,"uniqueItems":true,"items":{"$ref":"#/$defs/StandardEdit"}}},"additionalProperties":false},"ProposalSummary":{"type":"object","required":["proposal","head_revision"],"properties":{"proposal":{"$ref":"#/$defs/ProposalHandle"},"head_revision":{"$ref":"#/$defs/ProposalRevisionHandle"}},"additionalProperties":false},"CreateProposalCall":{"type":"object","required":["kind","base_snapshot","change_set"],"properties":{"kind":{"const":"create-proposal"},"base_snapshot":{"$ref":"#/$defs/SnapshotHandle"},"change_set":{"$ref":"#/$defs/StandardsChangeSet"}},"additionalProperties":false},"CreateProposalResult":{"type":"object","required":["kind","proposal","revision"],"properties":{"kind":{"const":"create-proposal-result"},"proposal":{"$ref":"#/$defs/ProposalHandle"},"revision":{"$ref":"#/$defs/ProposalRevisionHandle"}},"additionalProperties":false},"FindProposalsCall":{"type":"object","required":["kind"],"properties":{"kind":{"const":"find-proposals"},"after":{"$ref":"#/$defs/ProposalHandle"},"limit":{"type":"integer","minimum":1,"default":50}},"additionalProperties":false},"FindProposalsResult":{"type":"object","required":["kind","proposals"],"properties":{"kind":{"const":"find-proposals-result"},"proposals":{"type":"array","items":{"$ref":"#/$defs/ProposalSummary"}},"continuation":{"$ref":"#/$defs/ProposalHandle"}},"additionalProperties":false},"ReviseProposalCall":{"type":"object","required":["kind","expected_revision","change_set"],"properties":{"kind":{"const":"revise-proposal"},"expected_revision":{"$ref":"#/$defs/ProposalRevisionHandle"},"change_set":{"$ref":"#/$defs/StandardsChangeSet"}},"additionalProperties":false},"ReviseProposalResult":{"type":"object","required":["kind","proposal","revision"],"properties":{"kind":{"const":"revise-proposal-result"},"proposal":{"$ref":"#/$defs/ProposalHandle"},"revision":{"$ref":"#/$defs/ProposalRevisionHandle"}},"additionalProperties":false},"DeleteSnapshotCall":{"type":"object","required":["kind","snapshot"],"properties":{"kind":{"const":"delete-snapshot"},"snapshot":{"$ref":"#/$defs/SnapshotHandle"}},"additionalProperties":false},"DeleteSnapshotResult":{"type":"object","required":["kind","snapshot","purge_deadline"],"properties":{"kind":{"const":"delete-snapshot-result"},"snapshot":{"$ref":"#/$defs/SnapshotHandle"},"purge_deadline":{"$ref":"#/$defs/Timestamp"}},"additionalProperties":false},"UndeleteSnapshotCall":{"type":"object","required":["kind","snapshot"],"properties":{"kind":{"const":"undelete-snapshot"},"snapshot":{"$ref":"#/$defs/SnapshotHandle"}},"additionalProperties":false},"UndeleteSnapshotResult":{"type":"object","required":["kind","snapshot"],"properties":{"kind":{"const":"undelete-snapshot-result"},"snapshot":{"$ref":"#/$defs/ActiveSnapshotSummary"}},"additionalProperties":false},"QueryNextOperation":{"type":"object","required":["operation","request_kind","snapshot"],"properties":{"operation":{"const":"query"},"request_kind":{"enum":["route","read","related"]},"target":{"$ref":"#/$defs/CanonicalId"},"snapshot":{"$ref":"#/$defs/SnapshotHandle"}},"additionalProperties":false},"QueryProposalNextOperation":{"type":"object","required":["operation","request_kind","revision"],"properties":{"operation":{"const":"query_proposal"},"request_kind":{"enum":["route","read","related"]},"target":{"$ref":"#/$defs/CanonicalId"},"revision":{"$ref":"#/$defs/ProposalRevisionHandle"}},"additionalProperties":false},"ResolveNextOperation":{"type":"object","required":["operation","request_kind","analysis"],"properties":{"operation":{"const":"resolve"},"request_kind":{"enum":["provide-fact","consumer-disposition","impact-disposition","coverage-attestation"]},"target":{"$ref":"#/$defs/CanonicalId"},"work":{"$ref":"#/$defs/AnalysisChildHandle"},"analysis":{"$ref":"#/$defs/AnalysisHandle"}},"additionalProperties":false},"InspectNextOperation":{"type":"object","required":["operation","request_kind","handle"],"properties":{"operation":{"const":"inspect"},"request_kind":{"const":"inspect"},"handle":{"$ref":"#/$defs/InspectableHandle"}},"additionalProperties":false},"NextOperation":{"oneOf":[{"$ref":"#/$defs/QueryNextOperation"},{"$ref":"#/$defs/ResolveNextOperation"},{"$ref":"#/$defs/InspectNextOperation"},{"$ref":"#/$defs/FocusedQueryNextOperation"}]},"QueryCall":{"type":"object","required":["snapshot","request"],"properties":{"snapshot":{"$ref":"#/$defs/SnapshotHandle"},"request":{"$ref":"#/$defs/QueryRequest"}},"additionalProperties":false},"QueryProposalCall":{"type":"object","required":["revision","request"],"properties":{"revision":{"$ref":"#/$defs/ProposalRevisionHandle"},"request":{"$ref":"#/$defs/QueryRequest"}},"additionalProperties":false},"AnalyzeProposalCall":{"type":"object","required":["revision"],"properties":{"revision":{"$ref":"#/$defs/ProposalRevisionHandle"}},"additionalProperties":false},"ReviewDecision":{"type":"object","required":["owner","decision","rationale","evidence"],"properties":{"owner":{"enum":["consumer","impact","audit"]},"decision":{"const":"accept"},"rationale":{"$ref":"#/$defs/NonEmptyString"},"evidence":{"type":"array","minItems":1,"uniqueItems":true,"items":{"$ref":"#/$defs/EvidenceReference"}}},"additionalProperties":false},"ReviewProposalCall":{"type":"object","required":["kind","analysis","decisions"],"properties":{"kind":{"const":"review-proposal"},"analysis":{"$ref":"#/$defs/AnalysisHandle"},"decisions":{"type":"array","minItems":3,"maxItems":3,"uniqueItems":true,"items":{"$ref":"#/$defs/ReviewDecision"}},"prior_readiness":{"$ref":"#/$defs/ReadinessHandle"}},"additionalProperties":false},"ReviewProposalResult":{"type":"object","required":["kind","readiness","revision","status"],"properties":{"kind":{"const":"review-proposal-result"},"readiness":{"$ref":"#/$defs/ReadinessHandle"},"revision":{"$ref":"#/$defs/ProposalRevisionHandle"},"status":{"const":"ready"}},"additionalProperties":false},"ApplyProposalCall":{"type":"object","required":["kind","readiness"],"properties":{"kind":{"const":"apply-proposal"},"readiness":{"$ref":"#/$defs/ReadinessHandle"}},"additionalProperties":false},"ApplyProposalResult":{"type":"object","required":["kind","application","status"],"properties":{"kind":{"const":"apply-proposal-result"},"application":{"$ref":"#/$defs/ApplicationHandle"},"status":{"const":"applied"}},"additionalProperties":false},"RecoverApplicationCall":{"type":"object","required":["kind","readiness"],"properties":{"kind":{"const":"recover-application"},"readiness":{"$ref":"#/$defs/ReadinessHandle"}},"additionalProperties":false},"RecoverApplicationResult":{"type":"object","required":["kind","application","status"],"properties":{"kind":{"const":"recover-application-result"},"application":{"$ref":"#/$defs/ApplicationHandle"},"status":{"const":"applied"}},"additionalProperties":false},"ApplicationRecoveryRequiredResult":{"type":"object","required":["kind","application","status","code","outcome","message"],"properties":{"kind":{"const":"application-recovery-required-result"},"application":{"$ref":"#/$defs/ApplicationHandle"},"status":{"const":"recovery-required"},"code":{"enum":["APPLICATION.PUBLICATION_UNAVAILABLE","APPLICATION.OBSERVATION_UNAVAILABLE","APPLICATION.OUTCOME_PERSISTENCE_UNAVAILABLE","APPLICATION.RECOVERY_TARGET_UNCERTAIN","APPLICATION.RECOVERY_TARGET_DIVERGED"]},"outcome":{"const":"unavailable"},"message":{"$ref":"#/$defs/NonEmptyString"}},"additionalProperties":false},"PolicySummary":{"type":"object","required":["handle","authority","scope"],"properties":{"handle":{"$ref":"#/$defs/SnapshotChildHandle"},"authority":{"enum":["normative","projection","contextual","evidence"]},"scope":{"$ref":"#/$defs/ReviewScope"}},"additionalProperties":false},"RelationshipSummary":{"type":"object","required":["handle","source","target","relation","groups","direction","traversal_eligible","applicability"],"properties":{"handle":{"$ref":"#/$defs/SnapshotChildHandle"},"source":{"$ref":"#/$defs/CanonicalId"},"target":{"$ref":"#/$defs/CanonicalId"},"relation":{"$ref":"#/$defs/CanonicalId"},"groups":{"type":"array","items":{"$ref":"#/$defs/CanonicalId"},"minItems":1,"uniqueItems":true},"direction":{"enum":["incoming","outgoing"]},"traversal_eligible":{"type":"boolean"},"applicability":{"enum":["true","false","unknown","not-declared"]}},"additionalProperties":false},"ProposalPolicySummary":{"type":"object","required":["id","authority","scope"],"properties":{"id":{"$ref":"#/$defs/CanonicalId"},"authority":{"enum":["normative","projection","contextual","evidence"]},"scope":{"$ref":"#/$defs/ReviewScope"}},"additionalProperties":false},"ProposalRelationshipSummary":{"type":"object","required":["source","target","relation","groups","direction","traversal_eligible","applicability"],"properties":{"source":{"$ref":"#/$defs/CanonicalId"},"target":{"$ref":"#/$defs/CanonicalId"},"relation":{"$ref":"#/$defs/CanonicalId"},"groups":{"type":"array","items":{"$ref":"#/$defs/CanonicalId"},"minItems":1,"uniqueItems":true},"direction":{"enum":["incoming","outgoing"]},"traversal_eligible":{"type":"boolean"},"applicability":{"enum":["true","false","unknown","not-declared"]}},"additionalProperties":false},"RouteResult":{"type":"object","required":["kind","snapshot","reading_plan","unresolved_questions","next_operations"],"properties":{"kind":{"const":"route-result"},"snapshot":{"$ref":"#/$defs/SnapshotHandle"},"reading_plan":{"type":"array","items":{"$ref":"#/$defs/ReadingPlanEntry"}},"unresolved_questions":{"type":"array","items":{"$ref":"#/$defs/Question"}},"next_operations":{"type":"array","items":{"$ref":"#/$defs/NextOperation"}},"summary":{"type":"string"}},"additionalProperties":false},"ReadResult":{"type":"object","required":["kind","snapshot","policy","content","requires","specializes","related","next_operations"],"properties":{"kind":{"const":"read-result"},"snapshot":{"$ref":"#/$defs/SnapshotHandle"},"policy":{"$ref":"#/$defs/PolicySummary"},"content":{"type":"string"},"requires":{"type":"array","items":{"$ref":"#/$defs/CanonicalId"},"uniqueItems":true},"specializes":{"type":"array","items":{"$ref":"#/$defs/CanonicalId"},"uniqueItems":true},"related":{"type":"array","items":{"$ref":"#/$defs/RelationshipSummary"}},"next_operations":{"type":"array","items":{"$ref":"#/$defs/NextOperation"}},"summary":{"type":"string"},"routing":{"$ref":"#/$defs/RoutingConfiguration"},"coverage":{"$ref":"#/$defs/ReadCoverage"},"application_exposure":{"$ref":"#/$defs/ApplicationExposureState"},"provenance":{"type":"array","items":{"$ref":"#/$defs/CanonicalId"}}},"additionalProperties":false},"PolicyUnitMapping":{"type":"object","required":["state","policy_units"],"properties":{"state":{"enum":["exact-policy-unit","policy-units-present","incomplete"]},"reason":{"const":"no-policy-units"},"policy_units":{"type":"array","items":{"$ref":"#/$defs/CanonicalId"},"uniqueItems":true}},"additionalProperties":false},"RelatedResult":{"type":"object","required":["kind","snapshot","target","policy_unit_mapping","relationships","next_operations"],"properties":{"kind":{"const":"related-result"},"snapshot":{"$ref":"#/$defs/SnapshotHandle"},"target":{"$ref":"#/$defs/CanonicalId"},"authoring_target":{"$ref":"#/$defs/AuthoringTargetHandle"},"policy_unit_mapping":{"$ref":"#/$defs/PolicyUnitMapping"},"relationships":{"type":"array","items":{"$ref":"#/$defs/RelationshipSummary"}},"next_operations":{"type":"array","items":{"$ref":"#/$defs/NextOperation"}},"summary":{"type":"string"}},"additionalProperties":false},"QueryResult":{"oneOf":[{"$ref":"#/$defs/RouteResult"},{"$ref":"#/$defs/ReadResult"},{"$ref":"#/$defs/RelatedResult"},{"$ref":"#/$defs/NavigationIndexesResult"},{"$ref":"#/$defs/ProvenanceReadResult"},{"$ref":"#/$defs/OperationalReadResult"}]},"ProposalRouteResult":{"type":"object","required":["kind","revision","reading_plan","unresolved_questions","next_operations"],"properties":{"kind":{"const":"proposal-route-result"},"revision":{"$ref":"#/$defs/ProposalRevisionHandle"},"reading_plan":{"type":"array","items":{"$ref":"#/$defs/ReadingPlanEntry"}},"unresolved_questions":{"type":"array","items":{"$ref":"#/$defs/Question"}},"next_operations":{"type":"array","items":{"$ref":"#/$defs/QueryProposalNextOperation"}},"summary":{"type":"string"}},"additionalProperties":false},"ProposalReadResult":{"type":"object","required":["kind","revision","policy","content","requires","specializes","related","next_operations"],"properties":{"kind":{"const":"proposal-read-result"},"revision":{"$ref":"#/$defs/ProposalRevisionHandle"},"policy":{"$ref":"#/$defs/ProposalPolicySummary"},"content":{"type":"string"},"requires":{"type":"array","items":{"$ref":"#/$defs/CanonicalId"},"uniqueItems":true},"specializes":{"type":"array","items":{"$ref":"#/$defs/CanonicalId"},"uniqueItems":true},"related":{"type":"array","items":{"$ref":"#/$defs/ProposalRelationshipSummary"}},"next_operations":{"type":"array","items":{"$ref":"#/$defs/QueryProposalNextOperation"}},"summary":{"type":"string"},"routing":{"$ref":"#/$defs/RoutingConfiguration"},"coverage":{"$ref":"#/$defs/ReadCoverage"},"application_exposure":{"$ref":"#/$defs/ApplicationExposureState"},"provenance":{"type":"array","items":{"$ref":"#/$defs/CanonicalId"}}},"additionalProperties":false},"ProposalRelatedResult":{"type":"object","required":["kind","revision","target","policy_unit_mapping","relationships","next_operations"],"properties":{"kind":{"const":"proposal-related-result"},"revision":{"$ref":"#/$defs/ProposalRevisionHandle"},"target":{"$ref":"#/$defs/CanonicalId"},"authoring_target":{"$ref":"#/$defs/AuthoringTargetHandle"},"policy_unit_mapping":{"$ref":"#/$defs/PolicyUnitMapping"},"relationships":{"type":"array","items":{"$ref":"#/$defs/ProposalRelationshipSummary"}},"next_operations":{"type":"array","items":{"$ref":"#/$defs/QueryProposalNextOperation"}},"summary":{"type":"string"}},"additionalProperties":false},"QueryProposalResult":{"oneOf":[{"$ref":"#/$defs/ProposalRouteResult"},{"$ref":"#/$defs/ProposalReadResult"},{"$ref":"#/$defs/ProposalRelatedResult"},{"$ref":"#/$defs/NavigationIndexesResult"},{"$ref":"#/$defs/ProvenanceReadResult"},{"$ref":"#/$defs/OperationalReadResult"}]},"AnalysisRequest":{"type":"object","required":["kind","base_snapshot","proposed_snapshot","changes","semantic_proposals","contract_version"],"properties":{"kind":{"const":"analysis-request"},"base_snapshot":{"$ref":"#/$defs/SnapshotHandle"},"proposed_snapshot":{"$ref":"#/$defs/SnapshotHandle"},"changes":{"type":"array","items":{"$ref":"#/$defs/ChangeDescriptor"},"minItems":1},"semantic_proposals":{"type":"array","items":{"$ref":"#/$defs/SemanticProposal"},"uniqueItems":true},"prior_analysis":{"$ref":"#/$defs/AnalysisHandle"},"contract_version":{"const":6}},"additionalProperties":false},"PrepareCall":{"type":"object","required":["request"],"properties":{"request":{"$ref":"#/$defs/AnalysisRequest"}},"additionalProperties":false},"AnalysisContext":{"type":"object","required":["kind","handle","subjects","changes","semantic_proposals"],"properties":{"kind":{"const":"analysis-context"},"handle":{"$ref":"#/$defs/AnalysisChildHandle"},"subjects":{"type":"array","items":{"$ref":"#/$defs/ChangedPolicyUnit"},"uniqueItems":true},"changes":{"type":"array","items":{"$ref":"#/$defs/ChangeDescriptor"},"minItems":1,"uniqueItems":true},"semantic_proposals":{"type":"array","items":{"$ref":"#/$defs/SemanticProposal"},"uniqueItems":true}},"additionalProperties":false},"AuthorizationReference":{"type":"object","required":["id","issuer","capability","authority_digest"],"properties":{"id":{"$ref":"#/$defs/AuthorizationId"},"issuer":{"$ref":"#/$defs/CanonicalId"},"capability":{"$ref":"#/$defs/CanonicalId"},"authority_digest":{"$ref":"#/$defs/Digest"}},"additionalProperties":false},"ProviderReference":{"type":"object","required":["id","contract","contract_version","input_digest"],"properties":{"id":{"$ref":"#/$defs/CanonicalId"},"contract":{"$ref":"#/$defs/CanonicalId"},"contract_version":{"$ref":"#/$defs/NonEmptyString"},"input_digest":{"$ref":"#/$defs/Digest"}},"additionalProperties":false},"AuthorizationRecord":{"type":"object","required":["reference","issuer_semantic_revision","principal","action","subject_kind","subject_id","authorization_evidence","revocation_authority","revocation_authority_semantic_revision","revocation_evidence"],"properties":{"reference":{"$ref":"#/$defs/AuthorizationReference"},"issuer_semantic_revision":{"type":"integer","minimum":1},"principal":{"$ref":"#/$defs/CanonicalId"},"action":{"$ref":"#/$defs/CanonicalId"},"subject_kind":{"$ref":"#/$defs/CanonicalId"},"subject_id":{"$ref":"#/$defs/NonEmptyString"},"authorization_evidence":{"type":"array","items":{"$ref":"#/$defs/EvidenceReference"},"minItems":1,"uniqueItems":true},"revocation_authority":{"$ref":"#/$defs/CanonicalId"},"revocation_authority_semantic_revision":{"type":"integer","minimum":1},"revocation_evidence":{"type":"array","items":{"$ref":"#/$defs/EvidenceReference"},"minItems":1,"uniqueItems":true}},"additionalProperties":false},"DomainContractReference":{"type":"object","required":["id","version"],"properties":{"id":{"$ref":"#/$defs/CanonicalId"},"version":{"$ref":"#/$defs/NonEmptyString"}},"additionalProperties":false},"AnalysisExecutionContractView":{"type":"object","required":["authorization_authority_digest","providers"],"properties":{"authorization_authority_digest":{"oneOf":[{"$ref":"#/$defs/Digest"},{"type":"null"}]},"providers":{"type":"array","items":{"$ref":"#/$defs/ProviderReference"},"uniqueItems":true}},"additionalProperties":false},"FactRequirement":{"type":"object","required":["kind","handle","fact","fact_semantic_revision","fact_contract_digest","context","value_contract","answer_contract","evidence_contract","authorization_capability"],"properties":{"kind":{"const":"fact-requirement"},"handle":{"$ref":"#/$defs/AnalysisChildHandle"},"fact":{"$ref":"#/$defs/CanonicalId"},"fact_semantic_revision":{"type":"integer","minimum":1},"fact_contract_digest":{"$ref":"#/$defs/Digest"},"context":{"$ref":"#/$defs/AnalysisChildHandle"},"value_contract":{"$ref":"#/$defs/FactValueContract"},"answer_contract":{"$ref":"#/$defs/CanonicalId"},"evidence_contract":{"$ref":"#/$defs/CanonicalId"},"authorization_capability":{"$ref":"#/$defs/CanonicalId"}},"additionalProperties":false},"FactRequirementWork":{"type":"object","required":["requirement","prompt","dependent_programs"],"properties":{"requirement":{"$ref":"#/$defs/FactRequirement"},"prompt":{"$ref":"#/$defs/NonEmptyString"},"dependent_programs":{"type":"array","items":{"$ref":"#/$defs/NonEmptyString"},"minItems":1,"uniqueItems":true}},"additionalProperties":false},"FactObservation":{"type":"object","required":["kind","handle","requirement","value","evidence","authorization"],"properties":{"kind":{"const":"fact-observation"},"handle":{"$ref":"#/$defs/AnalysisChildHandle"},"requirement":{"$ref":"#/$defs/AnalysisChildHandle"},"value":{"$ref":"#/$defs/FactValue"},"evidence":{"type":"array","items":{"$ref":"#/$defs/EvidenceReference"},"minItems":1,"uniqueItems":true},"authorization":{"$ref":"#/$defs/AuthorizationReference"},"provider":{"$ref":"#/$defs/ProviderReference"}},"additionalProperties":false},"Obligation":{"type":"object","required":["handle","kind","target","scope","reasons","state","permitted_submissions","fingerprint"],"properties":{"handle":{"$ref":"#/$defs/AnalysisChildHandle"},"kind":{"enum":["consumer-review","impact-review","lifecycle-impact-review","audit-coverage","unmapped-normative-change"]},"target":{"$ref":"#/$defs/CanonicalId"},"scope":{"$ref":"#/$defs/ReviewScope"},"reasons":{"type":"array","items":{"$ref":"#/$defs/SelectionReason"},"minItems":1,"uniqueItems":true},"state":{"enum":["required","resolved","blocked"]},"applicability":{"enum":["true","false","unknown","not-declared"]},"permitted_submissions":{"type":"array","items":{"enum":["consumer-disposition","impact-disposition","coverage-attestation"]},"minItems":1,"uniqueItems":true},"review_contract":{"$ref":"#/$defs/ConsumerReviewContract"},"fingerprint":{"$ref":"#/$defs/DecisionFingerprint"}},"additionalProperties":false},"ProvideFactSubmission":{"type":"object","required":["kind","requirement","value","evidence"],"properties":{"kind":{"const":"provide-fact"},"requirement":{"$ref":"#/$defs/AnalysisChildHandle"},"value":{"$ref":"#/$defs/FactValue"},"evidence":{"type":"array","items":{"$ref":"#/$defs/EvidenceReference"},"minItems":1,"uniqueItems":true}},"additionalProperties":false},"ConsumerDispositionSubmission":{"type":"object","required":["kind","obligation","result","rationale","evidence","fingerprint"],"properties":{"kind":{"const":"consumer-disposition"},"obligation":{"$ref":"#/$defs/AnalysisChildHandle"},"result":{"enum":["updated","reviewed-no-change","not-applicable","blocked"]},"rationale":{"$ref":"#/$defs/NonEmptyString"},"evidence":{"type":"array","items":{"$ref":"#/$defs/EvidenceReference"},"minItems":1},"fingerprint":{"$ref":"#/$defs/DecisionFingerprint"}},"additionalProperties":false},"ImpactDispositionSubmission":{"type":"object","required":["kind","obligation","result","rationale","evidence","fingerprint"],"properties":{"kind":{"const":"impact-disposition"},"obligation":{"$ref":"#/$defs/AnalysisChildHandle"},"result":{"enum":["confirmed","resolved-no-impact","requires-change","blocked"]},"rationale":{"$ref":"#/$defs/NonEmptyString"},"evidence":{"type":"array","items":{"$ref":"#/$defs/EvidenceReference"},"minItems":1},"fingerprint":{"$ref":"#/$defs/DecisionFingerprint"}},"additionalProperties":false},"CoverageAttestationClaim":{"type":"object","required":["requirement","conclusion","evidence","explicit_exclusions","rationale","auditor_provenance"],"properties":{"requirement":{"$ref":"#/$defs/AnalysisChildHandle"},"conclusion":{"const":"complete"},"evidence":{"type":"array","items":{"$ref":"#/$defs/EvidenceReference"},"minItems":1,"uniqueItems":true},"explicit_exclusions":{"type":"array","items":{"$ref":"#/$defs/EvidenceReference"},"uniqueItems":true},"rationale":{"$ref":"#/$defs/NonEmptyString"},"auditor_provenance":{"$ref":"#/$defs/NonEmptyString"}},"additionalProperties":false},"CoverageAttestationSubmission":{"type":"object","required":["kind","claim"],"properties":{"kind":{"const":"coverage-attestation"},"claim":{"$ref":"#/$defs/CoverageAttestationClaim"}},"additionalProperties":false},"Submission":{"oneOf":[{"$ref":"#/$defs/ProvideFactSubmission"},{"$ref":"#/$defs/ConsumerDispositionSubmission"},{"$ref":"#/$defs/ImpactDispositionSubmission"},{"$ref":"#/$defs/CoverageAttestationSubmission"}]},"ResolveCall":{"type":"object","required":["analysis","submission"],"properties":{"analysis":{"$ref":"#/$defs/AnalysisHandle"},"submission":{"$ref":"#/$defs/Submission"}},"additionalProperties":false},"CoverageRequirement":{"type":"object","required":["kind","handle","subject","owner","semantic_revision","relationship_kinds","horizon","required_evidence_contract"],"properties":{"kind":{"const":"coverage-requirement"},"handle":{"$ref":"#/$defs/AnalysisChildHandle"},"subject":{"$ref":"#/$defs/CanonicalId"},"owner":{"$ref":"#/$defs/CanonicalId"},"semantic_revision":{"type":"integer","minimum":1},"relationship_kinds":{"type":"array","items":{"$ref":"#/$defs/CanonicalId"},"uniqueItems":true},"horizon":{"$ref":"#/$defs/CanonicalId"},"required_evidence_contract":{"$ref":"#/$defs/CanonicalId"}},"additionalProperties":false},"CoverageAttestation":{"type":"object","required":["kind","requirement","conclusion","evidence","explicit_exclusions","rationale","auditor_provenance","schema_version","authorization"],"properties":{"kind":{"const":"coverage-attestation"},"requirement":{"$ref":"#/$defs/AnalysisChildHandle"},"conclusion":{"const":"complete"},"evidence":{"type":"array","items":{"$ref":"#/$defs/EvidenceReference"},"minItems":1},"explicit_exclusions":{"type":"array","items":{"$ref":"#/$defs/EvidenceReference"}},"rationale":{"$ref":"#/$defs/NonEmptyString"},"auditor_provenance":{"$ref":"#/$defs/NonEmptyString"},"schema_version":{"const":4},"authorization":{"$ref":"#/$defs/AuthorizationReference"}},"additionalProperties":false},"CoverageCertificate":{"type":"object","required":["kind","handle","requirement","subject","owner","semantic_revision","horizon_digest","relationship_digest","evidence_digests","fact_schema_digest"],"properties":{"kind":{"const":"coverage-certificate"},"handle":{"$ref":"#/$defs/AnalysisChildHandle"},"requirement":{"$ref":"#/$defs/AnalysisChildHandle"},"subject":{"$ref":"#/$defs/CanonicalId"},"owner":{"$ref":"#/$defs/CanonicalId"},"semantic_revision":{"type":"integer","minimum":1},"horizon_digest":{"$ref":"#/$defs/Digest"},"relationship_digest":{"$ref":"#/$defs/Digest"},"evidence_digests":{"type":"array","items":{"$ref":"#/$defs/Digest"},"uniqueItems":true},"fact_schema_digest":{"$ref":"#/$defs/Digest"}},"additionalProperties":false},"DispositionRecord":{"type":"object","required":["obligation","kind","result","rationale","evidence","authorization","fingerprint"],"properties":{"obligation":{"$ref":"#/$defs/AnalysisChildHandle"},"kind":{"enum":["consumer-disposition","impact-disposition"]},"result":{"$ref":"#/$defs/NonEmptyString"},"rationale":{"$ref":"#/$defs/NonEmptyString"},"evidence":{"type":"array","items":{"$ref":"#/$defs/EvidenceReference"}},"authorization":{"$ref":"#/$defs/AuthorizationReference"},"fingerprint":{"$ref":"#/$defs/DecisionFingerprint"}},"additionalProperties":false},"AnalysisState":{"type":"object","required":["kind","handle","base_snapshot","proposed_reference","changes","semantic_proposals","fact_observations","dispositions","coverage_attestations","authorization_records","domain_contracts","execution_contracts","contract_version"],"properties":{"kind":{"const":"analysis-state"},"handle":{"$ref":"#/$defs/AnalysisHandle"},"base_snapshot":{"$ref":"#/$defs/SnapshotHandle"},"proposed_reference":{"$ref":"#/$defs/AnalysisMaterialHandle"},"changes":{"type":"array","items":{"$ref":"#/$defs/ChangeDescriptor"},"minItems":1,"uniqueItems":true},"semantic_proposals":{"type":"array","items":{"$ref":"#/$defs/SemanticProposal"},"uniqueItems":true},"fact_observations":{"type":"array","items":{"$ref":"#/$defs/FactObservation"},"uniqueItems":true},"dispositions":{"type":"array","items":{"$ref":"#/$defs/DispositionRecord"},"uniqueItems":true},"coverage_attestations":{"type":"array","items":{"$ref":"#/$defs/CoverageAttestation"},"uniqueItems":true},"authorization_records":{"type":"array","items":{"$ref":"#/$defs/AuthorizationRecord"},"uniqueItems":true},"domain_contracts":{"type":"array","items":{"$ref":"#/$defs/DomainContractReference"},"minItems":1,"uniqueItems":true},"execution_contracts":{"$ref":"#/$defs/AnalysisExecutionContractView"},"contract_version":{"const":7}},"additionalProperties":false},"PendingResult":{"type":"object","required":["kind","handle","status","context","changes","changed_units","obligations","fact_requirements","reading_plan","next_operations"],"properties":{"kind":{"const":"pending-result"},"handle":{"$ref":"#/$defs/AnalysisHandle"},"status":{"const":"needs-action"},"context":{"$ref":"#/$defs/AnalysisContext"},"changes":{"type":"array","items":{"$ref":"#/$defs/ChangeDescriptor"}},"changed_units":{"type":"array","items":{"$ref":"#/$defs/ChangedPolicyUnit"}},"obligations":{"type":"array","items":{"$ref":"#/$defs/Obligation"}},"fact_requirements":{"type":"array","items":{"$ref":"#/$defs/FactRequirementWork"}},"reading_plan":{"type":"array","items":{"$ref":"#/$defs/ReadingPlanEntry"}},"next_operations":{"type":"array","items":{"$ref":"#/$defs/NextOperation"}},"summary":{"type":"string"}},"additionalProperties":false},"CompleteResult":{"type":"object","required":["kind","handle","status","context","changes","changed_units","coverage_certificates","fact_observations","dispositions","reading_plan","completion"],"properties":{"kind":{"const":"complete-result"},"handle":{"$ref":"#/$defs/AnalysisHandle"},"status":{"const":"complete"},"context":{"$ref":"#/$defs/AnalysisContext"},"changes":{"type":"array","items":{"$ref":"#/$defs/ChangeDescriptor"}},"changed_units":{"type":"array","items":{"$ref":"#/$defs/ChangedPolicyUnit"}},"coverage_certificates":{"type":"array","items":{"$ref":"#/$defs/CoverageCertificate"},"uniqueItems":true},"fact_observations":{"type":"array","items":{"$ref":"#/$defs/FactObservation"},"uniqueItems":true},"dispositions":{"type":"array","items":{"$ref":"#/$defs/DispositionRecord"}},"reading_plan":{"type":"array","items":{"$ref":"#/$defs/ReadingPlanEntry"}},"completion":{"$ref":"#/$defs/CompletionProof"},"summary":{"type":"string"}},"additionalProperties":false},"RepositoryPath":{"type":"array","items":{"$ref":"#/$defs/NonEmptyString"},"minItems":1},"ProvenanceRecord":{"type":"object","required":["snapshot","path"],"properties":{"snapshot":{"$ref":"#/$defs/SnapshotHandle"},"path":{"$ref":"#/$defs/RepositoryPath"}},"additionalProperties":false},"SnapshotInspectionResult":{"type":"object","required":["kind","snapshot"],"properties":{"kind":{"const":"snapshot-inspection-result"},"snapshot":{"$ref":"#/$defs/SnapshotSummary"}},"additionalProperties":false},"PolicyInspectionResult":{"type":"object","required":["kind","policy","declaration","representation_digest","structural_digest","provenance"],"properties":{"kind":{"const":"policy-inspection-result"},"policy":{"$ref":"#/$defs/SnapshotChildHandle"},"declaration":{"oneOf":[{"$ref":"#/$defs/CanonicalModuleDeclaration"},{"$ref":"#/$defs/PolicyUnitDeclaration"}]},"representation_digest":{"$ref":"#/$defs/Digest"},"structural_digest":{"$ref":"#/$defs/Digest"},"provenance":{"$ref":"#/$defs/ProvenanceRecord"}},"additionalProperties":false},"RelationshipInspectionResult":{"type":"object","required":["kind","relationship","policy_semantics","provenance"],"properties":{"kind":{"const":"relationship-inspection-result"},"relationship":{"$ref":"#/$defs/RelationshipSummary"},"policy_semantics":{"oneOf":[{"$ref":"#/$defs/PolicyRelationshipInspection"},{"type":"null"}]},"provenance":{"$ref":"#/$defs/ProvenanceRecord"}},"additionalProperties":false},"AnalysisInspectionResult":{"type":"object","required":["kind","state"],"properties":{"kind":{"const":"analysis-inspection-result"},"state":{"$ref":"#/$defs/AnalysisState"}},"additionalProperties":false},"AnalysisChildArtifact":{"oneOf":[{"$ref":"#/$defs/AnalysisContext"},{"$ref":"#/$defs/FactRequirement"},{"$ref":"#/$defs/FactObservation"},{"$ref":"#/$defs/Obligation"},{"$ref":"#/$defs/CoverageRequirement"},{"$ref":"#/$defs/CoverageCertificate"}]},"AnalysisChildInspectionResult":{"type":"object","required":["kind","handle","artifact"],"properties":{"kind":{"const":"analysis-child-inspection-result"},"handle":{"$ref":"#/$defs/AnalysisChildHandle"},"artifact":{"$ref":"#/$defs/AnalysisChildArtifact"}},"additionalProperties":false},"InspectionResult":{"oneOf":[{"$ref":"#/$defs/SnapshotInspectionResult"},{"$ref":"#/$defs/PolicyInspectionResult"},{"$ref":"#/$defs/RelationshipInspectionResult"},{"$ref":"#/$defs/AnalysisInspectionResult"},{"$ref":"#/$defs/AnalysisChildInspectionResult"}]},"InspectCall":{"type":"object","required":["handle"],"properties":{"handle":{"$ref":"#/$defs/InspectableHandle"}},"additionalProperties":false},"RejectedResult":{"type":"object","required":["kind","code","outcome","message","details","next_operations"],"properties":{"kind":{"const":"rejected-result"},"code":{"$ref":"#/$defs/CanonicalId"},"outcome":{"enum":["invalid","unavailable","unsupported","unauthorized"]},"target":{"$ref":"#/$defs/NonEmptyString"},"message":{"$ref":"#/$defs/NonEmptyString"},"details":{"type":"object","additionalProperties":{"$ref":"#/$defs/ScalarValue"}},"next_operations":{"type":"array","items":{"$ref":"#/$defs/NextOperation"}}},"additionalProperties":false},"AuthoredRoutingRule":{"type":"object","required":["id","target","when","condition"],"properties":{"id":{"$ref":"#/$defs/CanonicalId"},"target":{"$ref":"#/$defs/CanonicalId"},"when":{"$ref":"#/$defs/ApplicabilityExpression"},"condition":{"$ref":"#/$defs/NonEmptyString"}},"additionalProperties":false},"AuthoredRoutingFact":{"type":"object","required":["id","semantic_revision","type","nullable","values","aliases","meaning","prompt"],"properties":{"id":{"$ref":"#/$defs/CanonicalId"},"semantic_revision":{"type":"integer","minimum":1},"type":{"enum":["boolean","enum","string","string-set","enum-set","canonical-id"]},"nullable":{"type":"boolean"},"values":{"type":"array","items":{"type":"string"},"uniqueItems":true},"aliases":{"type":"array","items":{"$ref":"#/$defs/CanonicalId"},"uniqueItems":true},"meaning":{"$ref":"#/$defs/NonEmptyString"},"prompt":{"$ref":"#/$defs/NonEmptyString"}},"additionalProperties":false},"PutRoutingRuleEdit":{"type":"object","required":["kind","rule","rationale"],"properties":{"kind":{"const":"put-routing-rule"},"rule":{"$ref":"#/$defs/AuthoredRoutingRule"},"rationale":{"$ref":"#/$defs/NonEmptyString"}},"additionalProperties":false},"RemoveRoutingRuleEdit":{"type":"object","required":["kind","rule","rationale"],"properties":{"kind":{"const":"remove-routing-rule"},"rule":{"$ref":"#/$defs/CanonicalId"},"rationale":{"$ref":"#/$defs/NonEmptyString"}},"additionalProperties":false},"PutRoutingFactEdit":{"type":"object","required":["kind","fact","rationale"],"properties":{"kind":{"const":"put-routing-fact"},"fact":{"$ref":"#/$defs/AuthoredRoutingFact"},"rationale":{"$ref":"#/$defs/NonEmptyString"}},"additionalProperties":false},"RemoveRoutingFactEdit":{"type":"object","required":["kind","fact","rationale"],"properties":{"kind":{"const":"remove-routing-fact"},"fact":{"$ref":"#/$defs/CanonicalId"},"rationale":{"$ref":"#/$defs/NonEmptyString"}},"additionalProperties":false},"VerificationFailure":{"type":"object","additionalProperties":false,"required":["code","message","suite","check"],"properties":{"code":{"$ref":"#/$defs/NonEmptyString"},"message":{"$ref":"#/$defs/NonEmptyString"},"suite":{"type":["string","null"]},"check":{"type":["string","null"]}}},"VerificationReport":{"type":"object","additionalProperties":false,"required":["passed","exit_code","suites","checks","failures"],"properties":{"passed":{"type":"boolean"},"exit_code":{"enum":[0,1,2,3,4]},"suites":{"type":"integer","minimum":0},"checks":{"type":"integer","minimum":0},"failures":{"type":"array","items":{"$ref":"#/$defs/VerificationFailure"}}}},"VerifyRepositoryCall":{"type":"object","additionalProperties":false,"required":["kind","refresh_verification_inputs"],"properties":{"kind":{"const":"verify-repository"},"refresh_verification_inputs":{"type":"boolean"}}},"VerifyRepositoryResult":{"type":"object","additionalProperties":false,"required":["kind","refreshed_verification_inputs","verification"],"properties":{"kind":{"const":"verify-repository-result"},"refreshed_verification_inputs":{"type":"boolean"},"verification":{"$ref":"#/$defs/VerificationReport"}}},"VerifyProposalCall":{"type":"object","additionalProperties":false,"required":["kind","revision"],"properties":{"kind":{"const":"verify-proposal"},"revision":{"$ref":"#/$defs/ProposalRevisionHandle"},"readiness":{"$ref":"#/$defs/ReadinessHandle"}}},"VerifyProposalResult":{"type":"object","additionalProperties":false,"required":["kind","revision","verification"],"properties":{"kind":{"const":"verify-proposal-result"},"revision":{"$ref":"#/$defs/ProposalRevisionHandle"},"verification":{"$ref":"#/$defs/VerificationReport"},"readiness":{"$ref":"#/$defs/ReadinessHandle"}}},"RoutingConfiguration":{"type":"object","additionalProperties":false,"required":["facts","rules"],"properties":{"facts":{"type":"array","items":{"$ref":"#/$defs/AuthoredRoutingFact"}},"rules":{"type":"array","items":{"$ref":"#/$defs/AuthoredRoutingRule"}}}},"PolicyCoverageStatus":{"type":"object","required":["subject","requirement_id","status"],"properties":{"subject":{"$ref":"#/$defs/CanonicalId"},"requirement_id":{"$ref":"#/$defs/Digest"},"status":{"enum":["current-attestation","review-required"]},"authority":{"$ref":"#/$defs/CoverageAuditAuthority"}},"additionalProperties":false},"ReadCoverage":{"type":"object","description":"Repository attestation status bound to this snapshot or proposal. Empty subjects means no registered policy units in scope, not complete coverage. Analysis-local attestations are not repository certificates.","required":["subjects"],"properties":{"subjects":{"type":"array","items":{"$ref":"#/$defs/PolicyCoverageStatus"}}},"additionalProperties":false},"AuditPolicyUnitEdit":{"type":"object","required":["kind","policy","rationale"],"properties":{"kind":{"const":"audit-policy-unit"},"policy":{"$ref":"#/$defs/CanonicalId"},"rationale":{"$ref":"#/$defs/NonEmptyString"}},"additionalProperties":false},"CoverageAuditAuthority":{"type":"object","required":["issuer","principal","authorization_id"],"properties":{"issuer":{"$ref":"#/$defs/NonEmptyString"},"principal":{"$ref":"#/$defs/NonEmptyString"},"authorization_id":{"$ref":"#/$defs/NonEmptyString"}},"additionalProperties":false},"EvidenceCheckRetirement":{"type":"object","additionalProperties":false,"required":["suite","check"],"properties":{"suite":{"type":"string","minLength":1},"check":{"type":"string","minLength":1}}},"EvidenceSuiteDescription":{"type":"object","additionalProperties":false,"required":["suite","description"],"properties":{"suite":{"type":"string","minLength":1},"description":{"type":"string","minLength":1}}},"EvidenceRelationshipUpdate":{"type":"object","additionalProperties":false,"required":["source_policy","consumer","relation","evidence_owner","rationale"],"properties":{"source_policy":{"type":"string","minLength":1},"consumer":{"type":"string","minLength":1},"relation":{"type":"string","minLength":1},"evidence_owner":{"type":"string","minLength":1},"rationale":{"type":"string","minLength":1}}},"EvidenceConsumerRegistration":{"type":"object","additionalProperties":false,"required":["path","artifact_kind","source_policies","relation","evidence_owner","rationale"],"properties":{"path":{"type":"string","minLength":1},"artifact_kind":{"type":"string","enum":["implementation-artifact","fixture"]},"source_policies":{"type":"array","items":{"type":"string","minLength":1},"minItems":1,"uniqueItems":true},"relation":{"type":"string","enum":["implementation-projection","fixture-projection"]},"evidence_owner":{"type":"string","minLength":1},"rationale":{"type":"string","minLength":1}}},"EvidenceMaintenancePlan":{"type":"object","additionalProperties":false,"required":["prune_stale_certificates","retire_suites","retire_checks","retire_inputs","suite_descriptions","replacement_evidence_owner","replacement_evidence_rationale","relationship_updates","consumer_registrations"],"properties":{"prune_stale_certificates":{"type":"boolean"},"retire_suites":{"type":"array","items":{"type":"string","minLength":1},"uniqueItems":true},"retire_checks":{"type":"array","items":{"$ref":"#/$defs/EvidenceCheckRetirement"}},"retire_inputs":{"type":"array","items":{"type":"string","minLength":1},"uniqueItems":true},"suite_descriptions":{"type":"array","items":{"$ref":"#/$defs/EvidenceSuiteDescription"}},"replacement_evidence_owner":{"type":"string","minLength":1},"replacement_evidence_rationale":{"type":"string","minLength":1},"relationship_updates":{"type":"array","items":{"$ref":"#/$defs/EvidenceRelationshipUpdate"}},"consumer_registrations":{"type":"array","items":{"$ref":"#/$defs/EvidenceConsumerRegistration"}},"unregister_policy_subjects":{"type":"array","items":{"type":"string","minLength":1},"uniqueItems":true,"description":"Remove selected review-subject registrations and their source relationships while preserving normative Markdown."}}},"MaintainEvidenceCall":{"type":"object","additionalProperties":false,"required":["kind","expected_revision","evidence","plan","apply"],"properties":{"kind":{"const":"maintain-evidence"},"expected_revision":{"type":"string","minLength":1},"evidence":{"type":"array","items":{"$ref":"#/$defs/EvidenceReference"},"minItems":1},"plan":{"$ref":"#/$defs/EvidenceMaintenancePlan"},"apply":{"type":"boolean"}}},"MaintainEvidenceResult":{"type":"object","additionalProperties":false,"required":["kind","applied","changed_files","removed_files","verification"],"properties":{"kind":{"const":"maintain-evidence-result"},"applied":{"type":"boolean"},"changed_files":{"type":"array","items":{"type":"string","minLength":1}},"removed_files":{"type":"array","items":{"type":"string","minLength":1}},"verification":{"$ref":"#/$defs/VerificationReport"}}},"RouteCall":{"type":"object","required":["facts"],"properties":{"facts":{"$ref":"#/$defs/FactSet"},"snapshot":{"$ref":"#/$defs/SnapshotHandle"}},"additionalProperties":false},"ReadCall":{"type":"object","required":["target"],"properties":{"target":{"$ref":"#/$defs/CanonicalId"},"include_routing":{"type":"boolean"},"include_coverage":{"type":"boolean","description":"Include current repository attestation status for registered policy units in this read scope."},"snapshot":{"$ref":"#/$defs/SnapshotHandle"},"detail":{"enum":["compact","full"],"description":"Compact preserves exact policy and essential authority; full includes all relationship rows."}},"additionalProperties":false},"RelatedCall":{"type":"object","required":["target","groups","direction","transitive"],"properties":{"target":{"$ref":"#/$defs/CanonicalId"},"groups":{"type":"array","minItems":1,"uniqueItems":true,"items":{"$ref":"#/$defs/CanonicalId"}},"direction":{"enum":["incoming","outgoing","both"]},"transitive":{"type":"boolean","default":false},"snapshot":{"$ref":"#/$defs/SnapshotHandle"}},"additionalProperties":false},"CompactReadResult":{"type":"object","required":["kind","snapshot","policy","content","requires","specializes","next_operations","detail"],"properties":{"kind":{"const":"compact-read-result"},"snapshot":{"$ref":"#/$defs/SnapshotHandle"},"policy":{"$ref":"#/$defs/PolicySummary"},"content":{"type":"string"},"requires":{"type":"array","items":{"$ref":"#/$defs/CanonicalId"},"uniqueItems":true},"specializes":{"type":"array","items":{"$ref":"#/$defs/CanonicalId"},"uniqueItems":true},"next_operations":{"type":"array","items":{"$ref":"#/$defs/NextOperation"}},"summary":{"type":"string"},"routing":{"$ref":"#/$defs/RoutingConfiguration"},"coverage":{"$ref":"#/$defs/ReadCoverage"},"detail":{"const":"compact"},"application_exposure":{"$ref":"#/$defs/ApplicationExposureState"},"provenance":{"type":"array","items":{"$ref":"#/$defs/CanonicalId"}}},"additionalProperties":false},"RoutingFactsCall":{"type":"object","additionalProperties":false,"required":[],"properties":{"snapshot":{"$ref":"#/$defs/SnapshotHandle"}}},"RoutingFactsResult":{"type":"object","additionalProperties":false,"required":["kind","snapshot","facts"],"properties":{"kind":{"const":"routing-facts-result"},"snapshot":{"$ref":"#/$defs/SnapshotHandle"},"facts":{"type":"array","items":{"$ref":"#/$defs/AuthoredRoutingFact"}}}},"RoutingQuestion":{"type":"object","additionalProperties":false,"required":["id","kind","prompt","state","fact"],"properties":{"id":{"$ref":"#/$defs/CanonicalId"},"kind":{"const":"applicability-fact"},"prompt":{"$ref":"#/$defs/NonEmptyString"},"state":{"const":"required"},"fact":{"$ref":"#/$defs/AuthoredRoutingFact"}}},"RoutingRuleExplanation":{"type":"object","additionalProperties":false,"required":["id","target","when","state"],"properties":{"id":{"$ref":"#/$defs/CanonicalId"},"target":{"$ref":"#/$defs/CanonicalId"},"when":{"$ref":"#/$defs/ApplicabilityExpression"},"state":{"enum":["selected","unresolved"]}}},"AgentRouteResult":{"type":"object","required":["kind","snapshot","reading_plan","unresolved_questions","next_operations","facts","rules"],"properties":{"kind":{"const":"agent-route-result"},"snapshot":{"$ref":"#/$defs/SnapshotHandle"},"reading_plan":{"type":"array","items":{"$ref":"#/$defs/ReadingPlanEntry"}},"unresolved_questions":{"type":"array","items":{"$ref":"#/$defs/RoutingQuestion"}},"next_operations":{"type":"array","items":{"$ref":"#/$defs/NextOperation"}},"summary":{"type":"string"},"facts":{"$ref":"#/$defs/FactSet"},"rules":{"type":"array","items":{"$ref":"#/$defs/RoutingRuleExplanation"}}},"additionalProperties":false},"WorkflowContext":{"oneOf":[{"$ref":"#/$defs/ProposalRevisionHandle"},{"$ref":"#/$defs/AnalysisHandle"},{"$ref":"#/$defs/ReadinessHandle"}]},"ProposeCall":{"type":"object","additionalProperties":false,"properties":{"snapshot":{"$ref":"#/$defs/SnapshotHandle"},"change_set":{"$ref":"#/$defs/StandardsChangeSet"}},"required":["change_set"]},"ReviseCall":{"type":"object","additionalProperties":false,"properties":{"context":{"$ref":"#/$defs/WorkflowContext"},"change_set":{"$ref":"#/$defs/StandardsChangeSet"}},"required":["context","change_set"]},"AnalyzeCall":{"type":"object","additionalProperties":false,"properties":{"context":{"$ref":"#/$defs/WorkflowContext"}},"required":["context"]},"ResolveWorkflowCall":{"type":"object","additionalProperties":false,"properties":{"context":{"$ref":"#/$defs/WorkflowContext"},"submission":{"$ref":"#/$defs/Submission"}},"required":["context","submission"]},"ReviewCall":{"type":"object","additionalProperties":false,"properties":{"context":{"$ref":"#/$defs/WorkflowContext"},"decisions":{"type":"array","minItems":3,"maxItems":3,"uniqueItems":true,"items":{"$ref":"#/$defs/ReviewDecision"}}},"required":["context","decisions"]},"ApplyCall":{"type":"object","additionalProperties":false,"properties":{"context":{"$ref":"#/$defs/WorkflowContext"}},"required":["context"]},"RecoverCall":{"type":"object","additionalProperties":false,"properties":{"context":{"$ref":"#/$defs/WorkflowContext"}},"required":["context"]},"WorkflowStatusCall":{"type":"object","additionalProperties":false,"properties":{"context":{"$ref":"#/$defs/WorkflowContext"}},"required":["context"]},"ResumeCall":{"type":"object","additionalProperties":false,"properties":{"context":{"$ref":"#/$defs/WorkflowContext"}},"required":["context"]},"WorkflowContinuation":{"type":"object","additionalProperties":false,"properties":{"operation":{"enum":["revise","analyze","resolve_workflow","review","apply","recover","workflow_status","resume"]},"context":{"$ref":"#/$defs/WorkflowContext"},"required_inputs":{"type":"array","uniqueItems":true,"items":{"enum":["change_set","submission","decisions"]}}},"required":["operation","context","required_inputs"]},"WorkflowOutcome":{"oneOf":[{"$ref":"#/$defs/CreateProposalResult"},{"$ref":"#/$defs/ReviseProposalResult"},{"$ref":"#/$defs/PendingResult"},{"$ref":"#/$defs/CompleteResult"},{"$ref":"#/$defs/ReviewProposalResult"},{"$ref":"#/$defs/ApplyProposalResult"},{"$ref":"#/$defs/ApplicationRecoveryRequiredResult"},{"$ref":"#/$defs/RecoverApplicationResult"},{"$ref":"#/$defs/RejectedResult"}]},"WorkflowResult":{"type":"object","additionalProperties":false,"properties":{"kind":{"const":"workflow-result"},"context":{"$ref":"#/$defs/WorkflowContext"},"proposal":{"$ref":"#/$defs/ProposalHandle"},"revision":{"$ref":"#/$defs/ProposalRevisionHandle"},"status":{"enum":["draft","needs-action","complete","requires-change","ready","recovery-required","applied","rejected","stale"]},"next_operations":{"type":"array","items":{"$ref":"#/$defs/WorkflowContinuation"}},"outcome":{"$ref":"#/$defs/WorkflowOutcome"}},"required":["kind","context","proposal","revision","status","next_operations"]},"FocusedQueryNextOperation":{"type":"object","required":["operation","request_kind","snapshot"],"properties":{"operation":{"enum":["route","read","related"]},"request_kind":{"enum":["route","read","related"]},"target":{"$ref":"#/$defs/CanonicalId"},"snapshot":{"$ref":"#/$defs/SnapshotHandle"}},"additionalProperties":false},"RewriteNavigationIndexEdit":{"type":"object","required":["kind","entrypoint","destinations","rationale"],"properties":{"kind":{"const":"rewrite-navigation-index"},"entrypoint":{"$ref":"#/$defs/AuthoringTargetHandle"},"destinations":{"type":"array","items":{"$ref":"#/$defs/CanonicalId"},"minItems":1,"uniqueItems":true},"rationale":{"$ref":"#/$defs/NonEmptyString"},"retargets":{"type":"array","items":{"$ref":"#/$defs/NavigationRetarget"},"uniqueItems":true}},"additionalProperties":false},"NavigationIndexEntry":{"type":"object","required":["id","entrypoint","destinations"],"properties":{"id":{"$ref":"#/$defs/CanonicalId"},"entrypoint":{"$ref":"#/$defs/AuthoringTargetHandle"},"destinations":{"type":"array","items":{"$ref":"#/$defs/CanonicalId"},"uniqueItems":true},"content":{"$ref":"#/$defs/NonEmptyString"}},"additionalProperties":false},"NavigationIndexesResult":{"type":"object","required":["kind","authority","indexes","next_operations"],"properties":{"kind":{"const":"navigation-indexes-result"},"authority":{"oneOf":[{"$ref":"#/$defs/SnapshotHandle"},{"$ref":"#/$defs/ProposalRevisionHandle"}]},"indexes":{"type":"array","items":{"$ref":"#/$defs/NavigationIndexEntry"},"minItems":1},"next_operations":{"type":"array","items":{"$ref":"#/$defs/NextOperation"},"maxItems":0}},"additionalProperties":false},"NavigationRetarget":{"type":"object","required":["entrypoint","standard"],"properties":{"entrypoint":{"$ref":"#/$defs/AuthoringTargetHandle"},"standard":{"$ref":"#/$defs/CanonicalId"}},"additionalProperties":false},"ApplicationNextOperation":{"type":"object","additionalProperties":false,"required":["operation","snapshot"],"properties":{"operation":{"enum":["read","related","routing_facts","route","query","inspect"]},"snapshot":{"$ref":"#/$defs/SnapshotHandle"},"target":{"$ref":"#/$defs/CanonicalId"},"handle":{"$ref":"#/$defs/SnapshotChildHandle"}}},"ApplicationRejectedResult":{"type":"object","additionalProperties":false,"required":["kind","purpose","code","outcome","message","next_operations"],"properties":{"kind":{"const":"application-rejected-result"},"purpose":{"const":"application"},"code":{"enum":["APPLICATION.CONTENT_UNAVAILABLE","APPLICATION.INPUT_INVALID","APPLICATION.OPERATION_UNAVAILABLE","APPLICATION.INTERNAL_UNAVAILABLE","APPLICATION.UNSUPPORTED_CAPTURE","APPLICATION.RESULT_LIMIT"]},"outcome":{"enum":["invalid","unsupported","unavailable"]},"message":{"type":"string"},"next_operations":{"type":"array","items":{"$ref":"#/$defs/ApplicationNextOperation"}}}},"ApplicationPolicy":{"type":"object","additionalProperties":false,"required":["id","handle","role","level"],"properties":{"id":{"$ref":"#/$defs/CanonicalId"},"handle":{"$ref":"#/$defs/SnapshotChildHandle"},"role":{"enum":["core","router","topic","workflow","profile","reference","prompt","template","documentation"]},"level":{"enum":["MUST","SHOULD","PROFILE","REFERENCE"]}}},"ApplicationRelationship":{"type":"object","additionalProperties":false,"required":["handle","source","target","relation","groups","direction"],"properties":{"handle":{"$ref":"#/$defs/SnapshotChildHandle"},"source":{"$ref":"#/$defs/CanonicalId"},"target":{"$ref":"#/$defs/CanonicalId"},"relation":{"type":"string"},"groups":{"type":"array","items":{"$ref":"#/$defs/CanonicalId"}},"direction":{"enum":["incoming","outgoing"]}}},"ApplicationReadResult":{"type":"object","additionalProperties":false,"required":["kind","purpose","snapshot","policy","content","scope","requires","specializes","next_operations"],"properties":{"kind":{"const":"application-read-result"},"purpose":{"const":"application"},"snapshot":{"$ref":"#/$defs/SnapshotHandle"},"policy":{"$ref":"#/$defs/ApplicationPolicy"},"content":{"type":"string"},"scope":{"$ref":"#/$defs/ReviewScope"},"requires":{"type":"array","items":{"$ref":"#/$defs/CanonicalId"}},"specializes":{"type":"array","items":{"$ref":"#/$defs/CanonicalId"}},"related":{"type":"array","items":{"$ref":"#/$defs/ApplicationRelationship"}},"next_operations":{"type":"array","items":{"$ref":"#/$defs/ApplicationNextOperation"}}}},"ApplicationRelatedResult":{"type":"object","additionalProperties":false,"required":["kind","purpose","snapshot","target","relationships","next_operations"],"properties":{"kind":{"const":"application-related-result"},"purpose":{"const":"application"},"snapshot":{"$ref":"#/$defs/SnapshotHandle"},"target":{"$ref":"#/$defs/CanonicalId"},"relationships":{"type":"array","items":{"$ref":"#/$defs/ApplicationRelationship"}},"next_operations":{"type":"array","items":{"$ref":"#/$defs/ApplicationNextOperation"}}}},"ApplicationReadingEntry":{"type":"object","additionalProperties":false,"required":["target","scope","authority","state"],"properties":{"target":{"$ref":"#/$defs/CanonicalId"},"scope":{"$ref":"#/$defs/ReviewScope"},"authority":{"enum":["normative","contextual"]},"state":{"const":"selected"}}},"ApplicationQuestion":{"type":"object","additionalProperties":false,"required":["fact"],"properties":{"fact":{"$ref":"#/$defs/AuthoredRoutingFact"}}},"ApplicationRouteResult":{"type":"object","additionalProperties":false,"required":["kind","purpose","snapshot","status","reading_plan","unresolved_questions","next_operations"],"properties":{"kind":{"const":"application-route-result"},"purpose":{"const":"application"},"snapshot":{"$ref":"#/$defs/SnapshotHandle"},"status":{"enum":["complete","needs-facts"]},"reading_plan":{"type":"array","items":{"$ref":"#/$defs/ApplicationReadingEntry"}},"unresolved_questions":{"type":"array","items":{"$ref":"#/$defs/ApplicationQuestion"}},"next_operations":{"type":"array","items":{"$ref":"#/$defs/ApplicationNextOperation"}}}},"ApplicationRoutingFactsResult":{"type":"object","additionalProperties":false,"required":["kind","purpose","snapshot","facts","next_operations"],"properties":{"kind":{"const":"application-routing-facts-result"},"purpose":{"const":"application"},"snapshot":{"$ref":"#/$defs/SnapshotHandle"},"facts":{"type":"array","items":{"$ref":"#/$defs/AuthoredRoutingFact"}},"next_operations":{"type":"array","items":{"$ref":"#/$defs/ApplicationNextOperation"}}}},"ApplicationReadCall":{"type":"object","additionalProperties":false,"required":["target"],"properties":{"target":{"$ref":"#/$defs/CanonicalId"},"snapshot":{"$ref":"#/$defs/SnapshotHandle"},"detail":{"enum":["compact","full"]}}},"ApplicationReadRequest":{"type":"object","additionalProperties":false,"required":["kind","target"],"properties":{"kind":{"const":"read"},"target":{"$ref":"#/$defs/CanonicalId"},"detail":{"enum":["compact","full"]}}},"ApplicationQueryRequest":{"oneOf":[{"$ref":"#/$defs/RouteRequest"},{"$ref":"#/$defs/ApplicationReadRequest"},{"$ref":"#/$defs/RelatedRequest"}]},"ApplicationQueryCall":{"type":"object","additionalProperties":false,"required":["snapshot","request"],"properties":{"snapshot":{"$ref":"#/$defs/SnapshotHandle"},"request":{"$ref":"#/$defs/ApplicationQueryRequest"}}},"ApplicationInspectCall":{"type":"object","additionalProperties":false,"required":["handle"],"properties":{"handle":{"$ref":"#/$defs/SnapshotChildHandle"}}},"AuthoredDecisionProvenance":{"type":"object","additionalProperties":false,"required":["id","subject","origin","rationale","evidence"],"properties":{"id":{"$ref":"#/$defs/CanonicalId"},"subject":{"$ref":"#/$defs/CanonicalId"},"origin":{"enum":["documented-original","reconstructed-history","current-justification","unrecorded"]},"rationale":{"type":"string"},"evidence":{"type":"array","items":{"$ref":"#/$defs/EvidenceReference"}},"assumptions":{"type":"array","items":{"type":"string"}},"limits":{"type":"array","items":{"type":"string"}},"alternatives":{"type":"array","items":{"type":"string"}},"reconsideration":{"type":"array","items":{"type":"string"}},"supersedes":{"type":"array","items":{"type":"string"}}}},"DecisionProvenanceRecord":{"type":"object","additionalProperties":false,"required":["id","subject","origin","rationale","evidence","assumptions","limits","alternatives","reconsideration","supersedes","subject_binding","retired"],"properties":{"id":{"$ref":"#/$defs/CanonicalId"},"subject":{"$ref":"#/$defs/CanonicalId"},"origin":{"enum":["documented-original","reconstructed-history","current-justification","unrecorded"]},"rationale":{"type":"string"},"evidence":{"type":"array","items":{"$ref":"#/$defs/EvidenceReference"}},"assumptions":{"type":"array","items":{"type":"string"}},"limits":{"type":"array","items":{"type":"string"}},"alternatives":{"type":"array","items":{"type":"string"}},"reconsideration":{"type":"array","items":{"type":"string"}},"supersedes":{"type":"array","items":{"type":"string"}},"subject_binding":{"$ref":"#/$defs/Digest"},"retired":{"type":"boolean"}}},"ApplicationExposureState":{"enum":["unreviewed","current","needs-review"]},"ProvenanceReadResult":{"type":"object","additionalProperties":false,"required":["kind","authority","record","state","next_operations"],"properties":{"kind":{"const":"provenance-read-result"},"authority":{"oneOf":[{"$ref":"#/$defs/SnapshotHandle"},{"$ref":"#/$defs/ProposalRevisionHandle"}]},"record":{"$ref":"#/$defs/DecisionProvenanceRecord"},"state":{"enum":["current","needs-review","retired"]},"next_operations":{"type":"array","items":{"$ref":"#/$defs/NextOperation"}}}},"OperationalReadResult":{"type":"object","additionalProperties":false,"required":["kind","authority","target","canonical_id","role","content","application_exposure","next_operations"],"properties":{"kind":{"const":"operational-read-result"},"authority":{"oneOf":[{"$ref":"#/$defs/SnapshotHandle"},{"$ref":"#/$defs/ProposalRevisionHandle"}]},"target":{"$ref":"#/$defs/AuthoringTargetHandle"},"canonical_id":{"$ref":"#/$defs/CanonicalId"},"role":{"enum":["prompt","template","documentation"]},"content":{"type":"string"},"application_exposure":{"$ref":"#/$defs/ApplicationExposureState"},"next_operations":{"type":"array","items":{"$ref":"#/$defs/NextOperation"}}}},"PutDecisionProvenanceEdit":{"type":"object","additionalProperties":false,"required":["kind","record"],"properties":{"kind":{"const":"put-provenance"},"record":{"$ref":"#/$defs/AuthoredDecisionProvenance"}}},"RetireDecisionProvenanceEdit":{"type":"object","additionalProperties":false,"required":["kind","id"],"properties":{"kind":{"const":"retire-provenance"},"id":{"$ref":"#/$defs/CanonicalId"}}},"ApproveApplicationContentEdit":{"type":"object","additionalProperties":false,"required":["kind","target"],"properties":{"kind":{"const":"approve-application-content"},"target":{"oneOf":[{"$ref":"#/$defs/CanonicalId"},{"$ref":"#/$defs/AuthoringTargetHandle"}]}}},"WithdrawApplicationContentEdit":{"type":"object","additionalProperties":false,"required":["kind","target"],"properties":{"kind":{"const":"withdraw-application-content"},"target":{"oneOf":[{"$ref":"#/$defs/CanonicalId"},{"$ref":"#/$defs/AuthoringTargetHandle"}]}}},"ReviseOperationalArtifactEdit":{"type":"object","additionalProperties":false,"required":["kind","target","title","body"],"properties":{"kind":{"const":"revise-operational-artifact"},"target":{"oneOf":[{"$ref":"#/$defs/CanonicalId"},{"$ref":"#/$defs/AuthoringTargetHandle"}]},"title":{"$ref":"#/$defs/NonEmptyString"},"body":{"type":"string"}}},"PolicyScopeUpdate":{"type":"object","additionalProperties":false,"required":["policy","heading_path","semantics"],"properties":{"policy":{"$ref":"#/$defs/CanonicalId"},"heading_path":{"type":"array","minItems":1,"items":{"$ref":"#/$defs/NonEmptyString"}},"semantics":{"$ref":"#/$defs/PolicySemanticIntent"}}},"ReadManyItem":{"type":"object","required":["target"],"properties":{"target":{"$ref":"#/$defs/CanonicalId"},"include_routing":{"type":"boolean"},"include_coverage":{"type":"boolean","description":"Include current repository attestation status for registered policy units in this read scope."},"detail":{"enum":["compact","full"],"description":"Compact preserves exact policy and essential authority; full includes all relationship rows."}},"additionalProperties":false},"ReadManyCall":{"type":"object","additionalProperties":false,"required":["snapshot","items"],"description":"Read 1–32 selected items from one explicit snapshot, preserving order. The complete JSON result is limited to 2 MiB; any failed item rejects the entire request.","properties":{"snapshot":{"$ref":"#/$defs/SnapshotHandle"},"items":{"type":"array","minItems":1,"maxItems":32,"uniqueItems":true,"items":{"$ref":"#/$defs/ReadManyItem"}}}},"ReadManyResult":{"type":"object","additionalProperties":false,"required":["kind","snapshot","items"],"properties":{"kind":{"const":"read-many-result"},"snapshot":{"$ref":"#/$defs/SnapshotHandle"},"items":{"type":"array","minItems":1,"maxItems":32,"items":{"oneOf":[{"$ref":"#/$defs/CompactReadResult"},{"$ref":"#/$defs/ReadResult"},{"$ref":"#/$defs/NavigationIndexesResult"},{"$ref":"#/$defs/ProvenanceReadResult"},{"$ref":"#/$defs/OperationalReadResult"}]}}}},"ApplicationReadManyItem":{"type":"object","additionalProperties":false,"required":["target"],"properties":{"target":{"$ref":"#/$defs/CanonicalId"},"detail":{"enum":["compact","full"]}}},"ApplicationReadManyCall":{"type":"object","additionalProperties":false,"required":["snapshot","items"],"description":"Read 1–32 selected items from one explicit snapshot, preserving order. The complete JSON result is limited to 2 MiB; any failed item rejects the entire request.","properties":{"snapshot":{"$ref":"#/$defs/SnapshotHandle"},"items":{"type":"array","minItems":1,"maxItems":32,"uniqueItems":true,"items":{"$ref":"#/$defs/ApplicationReadManyItem"}}}},"ApplicationReadManyResult":{"type":"object","additionalProperties":false,"required":["kind","snapshot","items","purpose"],"properties":{"kind":{"const":"application-read-many-result"},"snapshot":{"$ref":"#/$defs/SnapshotHandle"},"items":{"type":"array","minItems":1,"maxItems":32,"items":{"oneOf":[{"$ref":"#/$defs/ApplicationReadResult"}]}},"purpose":{"const":"application"}}},"RegisterConsumerEdit":{"type":"object","additionalProperties":false,"required":["kind","consumer","path","artifact_kind","authority"],"properties":{"kind":{"const":"register-consumer"},"consumer":{"$ref":"#/$defs/CanonicalId"},"path":{"$ref":"#/$defs/NonEmptyString"},"artifact_kind":{"enum":["fixture","documentation","implementation-artifact","prompt","template"]},"authority":{"enum":["evidence","projection"]}},"description":"Register an existing tracked consumer within this proposal. The Engine captures original-revision bytes; use separate policy relationships to declare consumers and review obligations."},"PreviewApplicationCall":{"type":"object","additionalProperties":false,"required":["revision","request"],"properties":{"revision":{"$ref":"#/$defs/ProposalRevisionHandle"},"request":{"$ref":"#/$defs/ApplicationQueryRequest"}},"description":"Authoring-only inspection of an exact draft through application qualification and filtering; this observation neither publishes nor grants ordinary application access."},"CandidateApplicationNextOperation":{"type":"object","additionalProperties":false,"required":["operation","revision","request"],"properties":{"operation":{"const":"preview_application"},"revision":{"$ref":"#/$defs/ProposalRevisionHandle"},"request":{"$ref":"#/$defs/ApplicationQueryRequest"}}},"CandidateApplicationPolicy":{"type":"object","additionalProperties":false,"required":["id","role","level"],"properties":{"id":{"$ref":"#/$defs/CanonicalId"},"role":{"enum":["core","router","topic","workflow","profile","reference","prompt","template","documentation"]},"level":{"enum":["MUST","SHOULD","PROFILE","REFERENCE"]}}},"CandidateApplicationRelationship":{"type":"object","additionalProperties":false,"required":["source","target","relation","groups","direction"],"properties":{"source":{"$ref":"#/$defs/CanonicalId"},"target":{"$ref":"#/$defs/CanonicalId"},"relation":{"type":"string"},"groups":{"type":"array","items":{"$ref":"#/$defs/CanonicalId"}},"direction":{"enum":["incoming","outgoing"]}}},"CandidateApplicationReadResult":{"type":"object","additionalProperties":false,"required":["kind","purpose","policy","content","scope","requires","specializes","next_operations","revision"],"properties":{"kind":{"const":"candidate-application-read-result"},"purpose":{"const":"application"},"policy":{"$ref":"#/$defs/CandidateApplicationPolicy"},"content":{"type":"string"},"scope":{"$ref":"#/$defs/ReviewScope"},"requires":{"type":"array","items":{"$ref":"#/$defs/CanonicalId"}},"specializes":{"type":"array","items":{"$ref":"#/$defs/CanonicalId"}},"related":{"type":"array","items":{"$ref":"#/$defs/CandidateApplicationRelationship"}},"next_operations":{"type":"array","items":{"$ref":"#/$defs/CandidateApplicationNextOperation"}},"revision":{"$ref":"#/$defs/ProposalRevisionHandle"}}},"CandidateApplicationRelatedResult":{"type":"object","additionalProperties":false,"required":["kind","purpose","target","relationships","next_operations","revision"],"properties":{"kind":{"const":"candidate-application-related-result"},"purpose":{"const":"application"},"target":{"$ref":"#/$defs/CanonicalId"},"relationships":{"type":"array","items":{"$ref":"#/$defs/CandidateApplicationRelationship"}},"next_operations":{"type":"array","items":{"$ref":"#/$defs/CandidateApplicationNextOperation"}},"revision":{"$ref":"#/$defs/ProposalRevisionHandle"}}},"CandidateApplicationRouteResult":{"type":"object","additionalProperties":false,"required":["kind","purpose","status","reading_plan","unresolved_questions","next_operations","revision"],"properties":{"kind":{"const":"candidate-application-route-result"},"purpose":{"const":"application"},"status":{"enum":["complete","needs-facts"]},"reading_plan":{"type":"array","items":{"$ref":"#/$defs/ApplicationReadingEntry"}},"unresolved_questions":{"type":"array","items":{"$ref":"#/$defs/ApplicationQuestion"}},"next_operations":{"type":"array","items":{"$ref":"#/$defs/CandidateApplicationNextOperation"}},"revision":{"$ref":"#/$defs/ProposalRevisionHandle"}}},"CandidateApplicationRejectedResult":{"type":"object","additionalProperties":false,"required":["kind","purpose","code","outcome","message","next_operations","revision"],"properties":{"kind":{"const":"candidate-application-rejected-result"},"purpose":{"const":"application"},"code":{"enum":["APPLICATION.CONTENT_UNAVAILABLE","APPLICATION.INPUT_INVALID","APPLICATION.OPERATION_UNAVAILABLE","APPLICATION.INTERNAL_UNAVAILABLE","APPLICATION.UNSUPPORTED_CAPTURE","APPLICATION.RESULT_LIMIT"]},"outcome":{"enum":["invalid","unsupported","unavailable"]},"message":{"type":"string"},"next_operations":{"type":"array","items":{"$ref":"#/$defs/CandidateApplicationNextOperation"}},"revision":{"$ref":"#/$defs/ProposalRevisionHandle"}}},"PreviewApplicationResult":{"oneOf":[{"$ref":"#/$defs/CandidateApplicationReadResult"},{"$ref":"#/$defs/CandidateApplicationRelatedResult"},{"$ref":"#/$defs/CandidateApplicationRouteResult"},{"$ref":"#/$defs/CandidateApplicationRejectedResult"}]}}}') +DEFINITION_METADATA = freeze_json({'ActiveSnapshotSummary': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'lifecycle': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'source_revision': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'created_at': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'AgentRouteResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'reading_plan': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'unresolved_questions': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'next_operations': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'summary': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'facts': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'rules': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'AllExpression': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'operator': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'expressions': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'AlwaysExpression': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'operator': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'AnalysisChildArtifact': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'AnalysisChildHandle': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'analysis': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'child_kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'child_id': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'schema_version': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'AnalysisChildInspectionResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'handle': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'artifact': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'AnalysisContext': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'handle': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'subjects': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'changes': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'semantic_proposals': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'AnalysisExecutionContractView': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'authorization_authority_digest': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'providers': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'AnalysisHandle': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'id': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'schema_version': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'AnalysisId': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'AnalysisInspectionResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'state': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'AnalysisMaterialHandle': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'AnalysisRequest': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'base_snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'proposed_snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'changes': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'semantic_proposals': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'prior_analysis': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'contract_version': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'AnalysisState': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'handle': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'base_snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'proposed_reference': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'changes': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'semantic_proposals': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'fact_observations': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'dispositions': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'coverage_attestations': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'authorization_records': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'domain_contracts': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'execution_contracts': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'contract_version': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'AnalyzeCall': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'context': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'AnalyzeProposalCall': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'revision': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'AnyExpression': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'operator': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'expressions': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ApplicabilityExpression': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'ApplicationExposureState': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'ApplicationHandle': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'id': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'schema_version': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ApplicationId': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'ApplicationInspectCall': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'handle': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ApplicationNextOperation': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'operation': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'target': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'handle': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ApplicationPolicy': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'id': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'handle': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'role': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'level': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ApplicationQueryCall': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'request': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ApplicationQueryRequest': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'ApplicationQuestion': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'fact': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ApplicationReadCall': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'target': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'detail': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ApplicationReadManyCall': {'title': None, 'description': 'Read 1–32 selected items from one explicit snapshot, preserving order. The complete JSON result is limited to 2 MiB; any failed item rejects the entire request.', 'has_default': False, 'default': None, 'properties': {'snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'items': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ApplicationReadManyItem': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'target': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'detail': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ApplicationReadManyResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'items': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'purpose': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ApplicationReadRequest': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'target': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'detail': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ApplicationReadResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'purpose': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'policy': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'content': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'scope': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'requires': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'specializes': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'related': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'next_operations': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ApplicationReadingEntry': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'target': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'scope': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'authority': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'state': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ApplicationRecoveryRequiredResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'application': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'status': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'code': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'outcome': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'message': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ApplicationRejectedResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'purpose': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'code': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'outcome': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'message': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'next_operations': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ApplicationRelatedResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'purpose': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'target': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'relationships': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'next_operations': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ApplicationRelationship': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'handle': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'source': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'target': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'relation': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'groups': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'direction': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ApplicationRouteResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'purpose': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'status': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'reading_plan': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'unresolved_questions': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'next_operations': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ApplicationRoutingFactsResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'purpose': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'facts': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'next_operations': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ApplyCall': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'context': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ApplyProposalCall': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'readiness': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ApplyProposalResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'application': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'status': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ApproveApplicationContentEdit': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'target': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'AuditPolicyUnitEdit': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'policy': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'rationale': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'AuthoredDecisionProvenance': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'id': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'subject': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'origin': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'rationale': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'evidence': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'assumptions': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'limits': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'alternatives': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'reconsideration': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'supersedes': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'AuthoredRoutingFact': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'id': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'semantic_revision': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'type': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'nullable': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'values': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'aliases': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'meaning': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'prompt': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'AuthoredRoutingRule': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'id': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'target': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'when': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'condition': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'AuthoringTargetHandle': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'id': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'schema_version': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'AuthorizationId': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'AuthorizationRecord': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'reference': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'issuer_semantic_revision': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'principal': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'action': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'subject_kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'subject_id': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'authorization_evidence': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'revocation_authority': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'revocation_authority_semantic_revision': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'revocation_evidence': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'AuthorizationReference': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'id': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'issuer': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'capability': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'authority_digest': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'CandidateApplicationNextOperation': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'operation': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'revision': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'request': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'CandidateApplicationPolicy': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'id': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'role': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'level': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'CandidateApplicationReadResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'purpose': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'policy': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'content': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'scope': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'requires': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'specializes': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'related': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'next_operations': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'revision': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'CandidateApplicationRejectedResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'purpose': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'code': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'outcome': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'message': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'next_operations': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'revision': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'CandidateApplicationRelatedResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'purpose': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'target': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'relationships': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'next_operations': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'revision': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'CandidateApplicationRelationship': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'source': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'target': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'relation': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'groups': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'direction': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'CandidateApplicationRouteResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'purpose': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'status': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'reading_plan': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'unresolved_questions': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'next_operations': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'revision': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'CanonicalId': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'CanonicalModuleDeclaration': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'id': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'role': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'level': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'applies_when': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'does_not_apply_when': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'requires': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'specializes': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'verification': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ChangeDescriptor': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'accepted_ids': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'proposed_ids': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'scope': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'accepted_module': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'proposed_module': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ChangePolicySemantics': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'accepted_semantic_revision': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'proposed_semantic_revision': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'intent': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ChangedPolicyUnit': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'policy': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'change_kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'classification': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'accepted_representation_digest': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'proposed_representation_digest': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'accepted_structural_digest': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'proposed_structural_digest': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'accepted_semantic_revision': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'proposed_semantic_revision': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'semantic_state': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'scope': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ChildId': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'CompactReadResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'policy': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'content': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'requires': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'specializes': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'next_operations': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'summary': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'routing': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'coverage': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'detail': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'application_exposure': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'provenance': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'CompleteResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'handle': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'status': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'context': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'changes': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'changed_units': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'coverage_certificates': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'fact_observations': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'dispositions': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'reading_plan': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'completion': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'summary': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'CompletionProof': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'required_coverage_subjects': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'certificate_subjects': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'reached_consumer_obligations': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'disposition_obligations': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'required_fact_requirements': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'observed_fact_requirements': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'non_consumer_obligations_resolved': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'applicability_resolved': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'authorization_valid': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'evidence_valid': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ConsumerDispositionSubmission': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'obligation': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'result': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'rationale': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'evidence': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'fingerprint': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ConsumerReviewContract': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'id': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'version': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'permitted_dispositions': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'evidence_contract': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'authorization_capability': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'semantics': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ConsumerReviewObligationReadingReason': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'obligation': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ContainsExpression': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'operator': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'fact': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'value': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'CoverageAttestation': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'requirement': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'conclusion': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'evidence': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'explicit_exclusions': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'rationale': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'auditor_provenance': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'schema_version': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'authorization': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'CoverageAttestationClaim': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'requirement': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'conclusion': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'evidence': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'explicit_exclusions': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'rationale': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'auditor_provenance': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'CoverageAttestationSubmission': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'claim': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'CoverageAuditAuthority': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'issuer': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'principal': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'authorization_id': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'CoverageCertificate': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'handle': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'requirement': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'subject': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'owner': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'semantic_revision': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'horizon_digest': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'relationship_digest': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'evidence_digests': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'fact_schema_digest': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'CoverageRequirement': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'handle': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'subject': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'owner': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'semantic_revision': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'relationship_kinds': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'horizon': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'required_evidence_contract': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'CreateProposalCall': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'base_snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'change_set': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'CreateProposalResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'proposal': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'revision': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'CreateSnapshotCall': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'CreateSnapshotResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'CreateStandardEdit': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'standard': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'requires': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'specializes': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'policy_units': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'DecisionDependency': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'class': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'identity': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'digest': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'DecisionFingerprint': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'decision_kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'decision_contract': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'schema_version': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'dependencies': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'DecisionProvenanceRecord': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'id': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'subject': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'origin': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'rationale': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'evidence': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'assumptions': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'limits': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'alternatives': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'reconsideration': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'supersedes': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'subject_binding': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'retired': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'DeleteSnapshotCall': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'DeleteSnapshotResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'purge_deadline': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'Digest': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'DispositionRecord': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'obligation': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'result': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'rationale': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'evidence': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'authorization': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'fingerprint': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'DomainContractReference': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'id': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'version': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'EdgeId': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'EqualsExpression': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'operator': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'fact': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'value': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'EvidenceCheckRetirement': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'suite': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'check': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'EvidenceConsumerRegistration': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'path': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'artifact_kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'source_policies': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'relation': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'evidence_owner': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'rationale': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'EvidenceMaintenancePlan': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'prune_stale_certificates': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'retire_suites': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'retire_checks': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'retire_inputs': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'suite_descriptions': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'replacement_evidence_owner': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'replacement_evidence_rationale': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'relationship_updates': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'consumer_registrations': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'unregister_policy_subjects': {'title': None, 'description': 'Remove selected review-subject registrations and their source relationships while preserving normative Markdown.', 'has_default': False, 'default': None}}}, 'EvidenceReference': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'id': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'digest': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'provider_contract': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'provider_contract_version': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'EvidenceRelationshipUpdate': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'source_policy': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'consumer': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'relation': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'evidence_owner': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'rationale': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'EvidenceSuiteDescription': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'suite': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'description': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ExistsExpression': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'operator': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'fact': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'FactObservation': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'handle': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'requirement': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'value': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'evidence': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'authorization': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'provider': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'FactRequirement': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'handle': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'fact': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'fact_semantic_revision': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'fact_contract_digest': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'context': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'value_contract': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'answer_contract': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'evidence_contract': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'authorization_capability': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'FactRequirementId': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'FactRequirementWork': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'requirement': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'prompt': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'dependent_programs': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'FactSet': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'FactValue': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'FactValueContract': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'type': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'states': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'nullable': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'values': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'FindProposalsCall': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'after': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'limit': {'title': None, 'description': None, 'has_default': True, 'default': 50}}}, 'FindProposalsResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'proposals': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'continuation': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'FindSnapshotsCall': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'lifecycle': {'title': None, 'description': None, 'has_default': True, 'default': 'active'}, 'after': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'limit': {'title': None, 'description': None, 'has_default': True, 'default': 50}}}, 'FindSnapshotsResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'snapshots': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'continuation': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'FocusedQueryNextOperation': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'operation': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'request_kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'target': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'GeneralSelectionReason': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'source': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'fact': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'edge': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'question': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ImpactDispositionSubmission': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'obligation': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'result': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'rationale': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'evidence': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'fingerprint': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ImpactTraceId': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'ImpactTraceReference': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'id': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'graph': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'applicability': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'InExpression': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'operator': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'fact': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'values': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'InspectCall': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'handle': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'InspectNextOperation': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'operation': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'request_kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'handle': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'InspectableHandle': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'InspectionResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'MaintainEvidenceCall': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'expected_revision': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'evidence': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'plan': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'apply': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'MaintainEvidenceResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'applied': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'changed_files': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'removed_files': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'verification': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ModuleRelationshipKey': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'relation': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'source': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'target': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'MovePolicyUnitEdit': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'policy': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'standard': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'after_policy': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'semantics': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'NavigationIndexEntry': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'id': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'entrypoint': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'destinations': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'content': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'NavigationIndexesResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'authority': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'indexes': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'next_operations': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'NavigationRetarget': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'entrypoint': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'standard': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'NewPolicyUnit': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'id': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'heading_chain': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'semantic_revision': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'intent': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'aliases': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'predecessors': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'successors': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'NextOperation': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'NonEmptyString': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'NotExpression': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'operator': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'expression': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'Obligation': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'handle': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'target': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'scope': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'reasons': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'state': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'applicability': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'permitted_submissions': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'review_contract': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'fingerprint': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ObligationId': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'OperationalReadResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'authority': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'target': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'canonical_id': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'role': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'content': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'application_exposure': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'next_operations': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'PendingResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'handle': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'status': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'context': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'changes': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'changed_units': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'obligations': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'fact_requirements': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'reading_plan': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'next_operations': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'summary': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'PolicyCoverageStatus': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'subject': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'requirement_id': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'status': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'authority': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'PolicyImpactSelectionReason': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'source': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'edge': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'relation': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'evidence_owner': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'traces': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'PolicyInspectionResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'policy': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'declaration': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'representation_digest': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'structural_digest': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'provenance': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'PolicyRelationship': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'source_policy': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'consumer': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'relation': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'applicability': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'source_scope': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'consumer_scope': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'evidence_owner': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'rationale': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'PolicyRelationshipInspection': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'relationship_kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'applicability': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'source_scope': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'consumer_scope': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'propagation': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'evidence_owner': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'rationale': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'PolicyRelationshipKey': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'source_policy': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'consumer': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'relation': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'PolicyScopeUpdate': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'policy': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'heading_path': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'semantics': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'PolicySemanticIntent': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'PolicySummary': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'handle': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'authority': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'scope': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'PolicyUnitDeclaration': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'id': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'module': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'heading_path': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'semantic_revision': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'lifecycle': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'aliases': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'predecessors': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'successors': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'PolicyUnitMapping': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'state': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'reason': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'policy_units': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'PrepareCall': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'request': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'PreservePolicySemantics': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'semantic_revision': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'intent': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'PreviewApplicationCall': {'title': None, 'description': 'Authoring-only inspection of an exact draft through application qualification and filtering; this observation neither publishes nor grants ordinary application access.', 'has_default': False, 'default': None, 'properties': {'revision': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'request': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'PreviewApplicationResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'ProposalHandle': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'id': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'schema_version': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ProposalId': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'ProposalPolicySummary': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'id': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'authority': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'scope': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ProposalReadResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'revision': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'policy': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'content': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'requires': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'specializes': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'related': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'next_operations': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'summary': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'routing': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'coverage': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'application_exposure': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'provenance': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ProposalRelatedResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'revision': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'target': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'authoring_target': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'policy_unit_mapping': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'relationships': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'next_operations': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'summary': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ProposalRelationshipSummary': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'source': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'target': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'relation': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'groups': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'direction': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'traversal_eligible': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'applicability': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ProposalRevisionHandle': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'id': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'schema_version': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ProposalRevisionId': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'ProposalRouteResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'revision': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'reading_plan': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'unresolved_questions': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'next_operations': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'summary': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ProposalSummary': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'proposal': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'head_revision': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ProposeCall': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'change_set': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ProvenanceReadResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'authority': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'record': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'state': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'next_operations': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ProvenanceRecord': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'path': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ProvideFactSubmission': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'requirement': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'value': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'evidence': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ProviderReference': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'id': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'contract': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'contract_version': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'input_digest': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'PutDecisionProvenanceEdit': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'record': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'PutPolicyRelationshipEdit': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'relationship': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'PutRoutingFactEdit': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'fact': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'rationale': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'PutRoutingRuleEdit': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'rule': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'rationale': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'QuarantinedSnapshotSummary': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'lifecycle': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'source_revision': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'created_at': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'purge_deadline': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'QueryCall': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'request': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'QueryNextOperation': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'operation': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'request_kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'target': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'QueryProposalCall': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'revision': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'request': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'QueryProposalNextOperation': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'operation': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'request_kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'target': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'revision': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'QueryProposalResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'QueryRequest': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'QueryResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'Question': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'id': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'prompt': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'state': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'permitted_answers': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ReadCall': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'target': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'include_routing': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'include_coverage': {'title': None, 'description': 'Include current repository attestation status for registered policy units in this read scope.', 'has_default': False, 'default': None}, 'snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'detail': {'title': None, 'description': 'Compact preserves exact policy and essential authority; full includes all relationship rows.', 'has_default': False, 'default': None}}}, 'ReadCoverage': {'title': None, 'description': 'Repository attestation status bound to this snapshot or proposal. Empty subjects means no registered policy units in scope, not complete coverage. Analysis-local attestations are not repository certificates.', 'has_default': False, 'default': None, 'properties': {'subjects': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ReadManyCall': {'title': None, 'description': 'Read 1–32 selected items from one explicit snapshot, preserving order. The complete JSON result is limited to 2 MiB; any failed item rejects the entire request.', 'has_default': False, 'default': None, 'properties': {'snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'items': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ReadManyItem': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'target': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'include_routing': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'include_coverage': {'title': None, 'description': 'Include current repository attestation status for registered policy units in this read scope.', 'has_default': False, 'default': None}, 'detail': {'title': None, 'description': 'Compact preserves exact policy and essential authority; full includes all relationship rows.', 'has_default': False, 'default': None}}}, 'ReadManyResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'items': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ReadRequest': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'target': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'include_routing': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'include_coverage': {'title': None, 'description': 'Include current repository attestation status for registered policy units in this read scope.', 'has_default': False, 'default': None}}}, 'ReadResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'policy': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'content': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'requires': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'specializes': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'related': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'next_operations': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'summary': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'routing': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'coverage': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'application_exposure': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'provenance': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ReadinessHandle': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'id': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'schema_version': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ReadinessId': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'ReadingPlanEntry': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'target': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'scope': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'authority': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'reasons': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'state': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ReadingPlanReason': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'RecoverApplicationCall': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'readiness': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'RecoverApplicationResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'application': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'status': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'RecoverCall': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'context': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'RegisterConsumerEdit': {'title': None, 'description': 'Register an existing tracked consumer within this proposal. The Engine captures original-revision bytes; use separate policy relationships to declare consumers and review obligations.', 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'consumer': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'path': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'artifact_kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'authority': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'RegisterPolicyUnitEdit': {'title': None, 'description': 'Register an explicitly selected policy scope in an existing standard. The Engine owns declaration placement and validates the final candidate.', 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'standard': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'policy_unit': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'RejectedResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'code': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'outcome': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'target': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'message': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'details': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'next_operations': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'RelatedCall': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'target': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'groups': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'direction': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'transitive': {'title': None, 'description': None, 'has_default': True, 'default': False}, 'snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'RelatedRequest': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'target': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'groups': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'direction': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'transitive': {'title': None, 'description': None, 'has_default': True, 'default': False}}}, 'RelatedResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'target': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'authoring_target': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'policy_unit_mapping': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'relationships': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'next_operations': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'summary': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'RelationshipConsumer': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'RelationshipDisposition': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'relationship': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'disposition': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'replacement_consumer': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'rationale': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'evidence': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'RelationshipInspectionResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'relationship': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'policy_semantics': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'provenance': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'RelationshipKey': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'RelationshipSummary': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'handle': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'source': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'target': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'relation': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'groups': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'direction': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'traversal_eligible': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'applicability': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'RemovePolicyRelationshipEdit': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'relationship': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'RemoveRoutingFactEdit': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'fact': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'rationale': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'RemoveRoutingRuleEdit': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'rule': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'rationale': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ReplaceStandardRelationshipsEdit': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'standard': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'requires': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'specializes': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'rationale': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'RepositoryPath': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'RequiresReadingReason': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'edge': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'source': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ResolveCall': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'analysis': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'submission': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ResolveNextOperation': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'operation': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'request_kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'target': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'work': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'analysis': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ResolveWorkflowCall': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'context': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'submission': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ResumeCall': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'context': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'RetireDecisionProvenanceEdit': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'id': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'RetirePolicyUnitEdit': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'policy': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'retired_semantic_revision': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'successors': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'relationship_dispositions': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'evidence': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'RetireStandardEdit': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'standard': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'successors': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'relationship_dispositions': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'evidence': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ReviewCall': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'context': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'decisions': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ReviewDecision': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'owner': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'decision': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'rationale': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'evidence': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ReviewProposalCall': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'analysis': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'decisions': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'prior_readiness': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ReviewProposalResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'readiness': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'revision': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'status': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ReviewScope': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'ReviseCall': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'context': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'change_set': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ReviseOperationalArtifactEdit': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'target': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'title': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'body': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'RevisePolicyUnitEdit': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'policy': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'title': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'body': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'semantics': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ReviseProposalCall': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'expected_revision': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'change_set': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ReviseProposalResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'proposal': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'revision': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ReviseStandardEdit': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'standard': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'scope_updates': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'RewriteNavigationIndexEdit': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'entrypoint': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'destinations': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'rationale': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'retargets': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'RouteCall': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'facts': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'RouteRequest': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'facts': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'RouteResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'reading_plan': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'unresolved_questions': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'next_operations': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'summary': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'RoutingBaseReadingReason': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'projection': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'RoutingConfiguration': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'facts': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'rules': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'RoutingFactsCall': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'RoutingFactsResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'facts': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'RoutingQuestion': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'id': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'prompt': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'state': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'fact': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'RoutingRuleExplanation': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'id': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'target': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'when': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'state': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'RoutingRuleReadingReason': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'rule': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'facts': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ScalarValue': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'SelectionReason': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'SemanticProposal': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'policy': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'accepted_semantic_revision': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'proposed_semantic_revision': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'intent': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'structural_digest': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'SnapshotChildHandle': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'child_kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'child_id': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'schema_version': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'SnapshotHandle': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'id': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'schema_version': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'SnapshotId': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'SnapshotInspectionResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'SnapshotSummary': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'SpecializesReadingReason': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'edge': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'source': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'StandardContent': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'id': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'title': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'role': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'level': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'applies_when': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'does_not_apply_when': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'verification': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'body': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'StandardEdit': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'StandardsChangePurpose': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'summary': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'rationale': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'evidence': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'StandardsChangeSet': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'purpose': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'edits': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'StructuredScope': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'heading_path': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'Submission': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'Timestamp': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'UndeleteSnapshotCall': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'UndeleteSnapshotResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'VerificationFailure': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'code': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'message': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'suite': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'check': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'VerificationReport': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'passed': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'exit_code': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'suites': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'checks': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'failures': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'VerifyProposalCall': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'revision': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'readiness': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'VerifyProposalResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'revision': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'verification': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'readiness': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'VerifyRepositoryCall': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'refresh_verification_inputs': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'VerifyRepositoryResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'refreshed_verification_inputs': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'verification': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'WholeArtifactScope': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'WithdrawApplicationContentEdit': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'target': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'WorkflowContext': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'WorkflowContinuation': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'operation': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'context': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'required_inputs': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'WorkflowOutcome': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'WorkflowResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'context': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'proposal': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'revision': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'status': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'next_operations': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'outcome': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'WorkflowStatusCall': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'context': {'title': None, 'description': None, 'has_default': False, 'default': None}}}}) @dataclass(frozen=True, slots=True) class ActiveSnapshotSummary: @@ -523,7 +523,7 @@ class ApplicationPolicy: }) id: CanonicalId handle: SnapshotChildHandle - role: Literal['core', 'router', 'topic', 'workflow', 'profile', 'reference', 'prompt', 'template'] + role: Literal['core', 'router', 'topic', 'workflow', 'profile', 'reference', 'prompt', 'template', 'documentation'] level: Literal['MUST', 'SHOULD', 'PROFILE', 'REFERENCE'] def __post_init__(self) -> None: @@ -1295,6 +1295,228 @@ def from_value(cls, value: object) -> AuthorizationReference: def as_contract(self) -> dict[str, object]: return model_as_contract(self) +@dataclass(frozen=True, slots=True) +class CandidateApplicationNextOperation: + '' + __definition__: ClassVar[str] = 'CandidateApplicationNextOperation' + __contract_fields__: ClassVar = MappingProxyType({ + 'operation': 'operation', + 'revision': 'revision', + 'request': 'request', + }) + operation: Literal['preview_application'] + revision: ProposalRevisionHandle + request: ApplicationQueryRequest + + def __post_init__(self) -> None: + _RUNTIME.normalize_model(self) + + @classmethod + def from_value(cls, value: object) -> CandidateApplicationNextOperation: + selected = _RUNTIME.decode(cls.__definition__, value) + if not isinstance(selected, cls): + raise TypeError('decoded value has the wrong generated type') + return selected + + def as_contract(self) -> dict[str, object]: + return model_as_contract(self) + +@dataclass(frozen=True, slots=True) +class CandidateApplicationPolicy: + '' + __definition__: ClassVar[str] = 'CandidateApplicationPolicy' + __contract_fields__: ClassVar = MappingProxyType({ + 'id': 'id', + 'role': 'role', + 'level': 'level', + }) + id: CanonicalId + role: Literal['core', 'router', 'topic', 'workflow', 'profile', 'reference', 'prompt', 'template', 'documentation'] + level: Literal['MUST', 'SHOULD', 'PROFILE', 'REFERENCE'] + + def __post_init__(self) -> None: + _RUNTIME.normalize_model(self) + + @classmethod + def from_value(cls, value: object) -> CandidateApplicationPolicy: + selected = _RUNTIME.decode(cls.__definition__, value) + if not isinstance(selected, cls): + raise TypeError('decoded value has the wrong generated type') + return selected + + def as_contract(self) -> dict[str, object]: + return model_as_contract(self) + +@dataclass(frozen=True, slots=True) +class CandidateApplicationReadResult: + '' + __definition__: ClassVar[str] = 'CandidateApplicationReadResult' + __contract_fields__: ClassVar = MappingProxyType({ + 'kind': 'kind', + 'purpose': 'purpose', + 'policy': 'policy', + 'content': 'content', + 'scope': 'scope', + 'requires': 'requires', + 'specializes': 'specializes', + 'related': 'related', + 'next_operations': 'next_operations', + 'revision': 'revision', + }) + kind: Literal['candidate-application-read-result'] + purpose: Literal['application'] + policy: CandidateApplicationPolicy + content: str + scope: ReviewScope + requires: tuple[CanonicalId, ...] + specializes: tuple[CanonicalId, ...] + next_operations: tuple[CandidateApplicationNextOperation, ...] + revision: ProposalRevisionHandle + related: tuple[CandidateApplicationRelationship, ...] | MissingValue = MISSING + + def __post_init__(self) -> None: + _RUNTIME.normalize_model(self) + + @classmethod + def from_value(cls, value: object) -> CandidateApplicationReadResult: + selected = _RUNTIME.decode(cls.__definition__, value) + if not isinstance(selected, cls): + raise TypeError('decoded value has the wrong generated type') + return selected + + def as_contract(self) -> dict[str, object]: + return model_as_contract(self) + +@dataclass(frozen=True, slots=True) +class CandidateApplicationRejectedResult: + '' + __definition__: ClassVar[str] = 'CandidateApplicationRejectedResult' + __contract_fields__: ClassVar = MappingProxyType({ + 'kind': 'kind', + 'purpose': 'purpose', + 'code': 'code', + 'outcome': 'outcome', + 'message': 'message', + 'next_operations': 'next_operations', + 'revision': 'revision', + }) + kind: Literal['candidate-application-rejected-result'] + purpose: Literal['application'] + code: Literal['APPLICATION.CONTENT_UNAVAILABLE', 'APPLICATION.INPUT_INVALID', 'APPLICATION.OPERATION_UNAVAILABLE', 'APPLICATION.INTERNAL_UNAVAILABLE', 'APPLICATION.UNSUPPORTED_CAPTURE', 'APPLICATION.RESULT_LIMIT'] + outcome: Literal['invalid', 'unsupported', 'unavailable'] + message: str + next_operations: tuple[CandidateApplicationNextOperation, ...] + revision: ProposalRevisionHandle + + def __post_init__(self) -> None: + _RUNTIME.normalize_model(self) + + @classmethod + def from_value(cls, value: object) -> CandidateApplicationRejectedResult: + selected = _RUNTIME.decode(cls.__definition__, value) + if not isinstance(selected, cls): + raise TypeError('decoded value has the wrong generated type') + return selected + + def as_contract(self) -> dict[str, object]: + return model_as_contract(self) + +@dataclass(frozen=True, slots=True) +class CandidateApplicationRelatedResult: + '' + __definition__: ClassVar[str] = 'CandidateApplicationRelatedResult' + __contract_fields__: ClassVar = MappingProxyType({ + 'kind': 'kind', + 'purpose': 'purpose', + 'target': 'target', + 'relationships': 'relationships', + 'next_operations': 'next_operations', + 'revision': 'revision', + }) + kind: Literal['candidate-application-related-result'] + purpose: Literal['application'] + target: CanonicalId + relationships: tuple[CandidateApplicationRelationship, ...] + next_operations: tuple[CandidateApplicationNextOperation, ...] + revision: ProposalRevisionHandle + + def __post_init__(self) -> None: + _RUNTIME.normalize_model(self) + + @classmethod + def from_value(cls, value: object) -> CandidateApplicationRelatedResult: + selected = _RUNTIME.decode(cls.__definition__, value) + if not isinstance(selected, cls): + raise TypeError('decoded value has the wrong generated type') + return selected + + def as_contract(self) -> dict[str, object]: + return model_as_contract(self) + +@dataclass(frozen=True, slots=True) +class CandidateApplicationRelationship: + '' + __definition__: ClassVar[str] = 'CandidateApplicationRelationship' + __contract_fields__: ClassVar = MappingProxyType({ + 'source': 'source', + 'target': 'target', + 'relation': 'relation', + 'groups': 'groups', + 'direction': 'direction', + }) + source: CanonicalId + target: CanonicalId + relation: str + groups: tuple[CanonicalId, ...] + direction: Literal['incoming', 'outgoing'] + + def __post_init__(self) -> None: + _RUNTIME.normalize_model(self) + + @classmethod + def from_value(cls, value: object) -> CandidateApplicationRelationship: + selected = _RUNTIME.decode(cls.__definition__, value) + if not isinstance(selected, cls): + raise TypeError('decoded value has the wrong generated type') + return selected + + def as_contract(self) -> dict[str, object]: + return model_as_contract(self) + +@dataclass(frozen=True, slots=True) +class CandidateApplicationRouteResult: + '' + __definition__: ClassVar[str] = 'CandidateApplicationRouteResult' + __contract_fields__: ClassVar = MappingProxyType({ + 'kind': 'kind', + 'purpose': 'purpose', + 'status': 'status', + 'reading_plan': 'reading_plan', + 'unresolved_questions': 'unresolved_questions', + 'next_operations': 'next_operations', + 'revision': 'revision', + }) + kind: Literal['candidate-application-route-result'] + purpose: Literal['application'] + status: Literal['complete', 'needs-facts'] + reading_plan: tuple[ApplicationReadingEntry, ...] + unresolved_questions: tuple[ApplicationQuestion, ...] + next_operations: tuple[CandidateApplicationNextOperation, ...] + revision: ProposalRevisionHandle + + def __post_init__(self) -> None: + _RUNTIME.normalize_model(self) + + @classmethod + def from_value(cls, value: object) -> CandidateApplicationRouteResult: + selected = _RUNTIME.decode(cls.__definition__, value) + if not isinstance(selected, cls): + raise TypeError('decoded value has the wrong generated type') + return selected + + def as_contract(self) -> dict[str, object]: + return model_as_contract(self) + @dataclass(frozen=True, slots=True) class CanonicalModuleDeclaration: '' @@ -3177,7 +3399,7 @@ class OperationalReadResult: authority: SnapshotHandle | ProposalRevisionHandle target: AuthoringTargetHandle canonical_id: CanonicalId - role: Literal['prompt', 'template'] + role: Literal['prompt', 'template', 'documentation'] content: str application_exposure: ApplicationExposureState next_operations: tuple[NextOperation, ...] @@ -3591,6 +3813,30 @@ def from_value(cls, value: object) -> PreservePolicySemantics: def as_contract(self) -> dict[str, object]: return model_as_contract(self) +@dataclass(frozen=True, slots=True) +class PreviewApplicationCall: + 'Authoring-only inspection of an exact draft through application qualification and filtering; this observation neither publishes nor grants ordinary application access.' + __definition__: ClassVar[str] = 'PreviewApplicationCall' + __contract_fields__: ClassVar = MappingProxyType({ + 'revision': 'revision', + 'request': 'request', + }) + revision: ProposalRevisionHandle + request: ApplicationQueryRequest + + def __post_init__(self) -> None: + _RUNTIME.normalize_model(self) + + @classmethod + def from_value(cls, value: object) -> PreviewApplicationCall: + selected = _RUNTIME.decode(cls.__definition__, value) + if not isinstance(selected, cls): + raise TypeError('decoded value has the wrong generated type') + return selected + + def as_contract(self) -> dict[str, object]: + return model_as_contract(self) + @dataclass(frozen=True, slots=True) class ProposalHandle: '' @@ -4571,6 +4817,36 @@ def from_value(cls, value: object) -> RecoverCall: def as_contract(self) -> dict[str, object]: return model_as_contract(self) +@dataclass(frozen=True, slots=True) +class RegisterConsumerEdit: + 'Register an existing tracked consumer within this proposal. The Engine captures original-revision bytes; use separate policy relationships to declare consumers and review obligations.' + __definition__: ClassVar[str] = 'RegisterConsumerEdit' + __contract_fields__: ClassVar = MappingProxyType({ + 'kind': 'kind', + 'consumer': 'consumer', + 'path': 'path', + 'artifact_kind': 'artifact_kind', + 'authority': 'authority', + }) + kind: Literal['register-consumer'] + consumer: CanonicalId + path: NonEmptyString + artifact_kind: Literal['fixture', 'documentation', 'implementation-artifact', 'prompt', 'template'] + authority: Literal['evidence', 'projection'] + + def __post_init__(self) -> None: + _RUNTIME.normalize_model(self) + + @classmethod + def from_value(cls, value: object) -> RegisterConsumerEdit: + selected = _RUNTIME.decode(cls.__definition__, value) + if not isinstance(selected, cls): + raise TypeError('decoded value has the wrong generated type') + return selected + + def as_contract(self) -> dict[str, object]: + return model_as_contract(self) + @dataclass(frozen=True, slots=True) class RegisterPolicyUnitEdit: 'Register an explicitly selected policy scope in an existing standard. The Engine owns declaration placement and validates the final candidate.' @@ -5282,7 +5558,7 @@ class ReviseOperationalArtifactEdit: 'body': 'body', }) kind: Literal['revise-operational-artifact'] - target: AuthoringTargetHandle + target: CanonicalId | AuthoringTargetHandle title: NonEmptyString body: str @@ -6303,6 +6579,7 @@ def as_contract(self) -> dict[str, object]: NonEmptyString: TypeAlias = str ObligationId: TypeAlias = str PolicySemanticIntent: TypeAlias = PreservePolicySemantics | ChangePolicySemantics +PreviewApplicationResult: TypeAlias = CandidateApplicationReadResult | CandidateApplicationRelatedResult | CandidateApplicationRouteResult | CandidateApplicationRejectedResult ProposalId: TypeAlias = str ProposalRevisionId: TypeAlias = str QueryProposalResult: TypeAlias = ProposalRouteResult | ProposalReadResult | ProposalRelatedResult | NavigationIndexesResult | ProvenanceReadResult | OperationalReadResult @@ -6318,7 +6595,7 @@ def as_contract(self) -> dict[str, object]: SelectionReason: TypeAlias = GeneralSelectionReason | PolicyImpactSelectionReason SnapshotId: TypeAlias = str SnapshotSummary: TypeAlias = ActiveSnapshotSummary | QuarantinedSnapshotSummary -StandardEdit: TypeAlias = CreateStandardEdit | RegisterPolicyUnitEdit | ReviseStandardEdit | RevisePolicyUnitEdit | MovePolicyUnitEdit | RetirePolicyUnitEdit | RetireStandardEdit | ReplaceStandardRelationshipsEdit | PutPolicyRelationshipEdit | RemovePolicyRelationshipEdit | PutRoutingRuleEdit | RemoveRoutingRuleEdit | PutRoutingFactEdit | RemoveRoutingFactEdit | AuditPolicyUnitEdit | RewriteNavigationIndexEdit | PutDecisionProvenanceEdit | RetireDecisionProvenanceEdit | ApproveApplicationContentEdit | WithdrawApplicationContentEdit | ReviseOperationalArtifactEdit +StandardEdit: TypeAlias = CreateStandardEdit | RegisterPolicyUnitEdit | ReviseStandardEdit | RevisePolicyUnitEdit | MovePolicyUnitEdit | RetirePolicyUnitEdit | RetireStandardEdit | ReplaceStandardRelationshipsEdit | PutPolicyRelationshipEdit | RemovePolicyRelationshipEdit | PutRoutingRuleEdit | RemoveRoutingRuleEdit | PutRoutingFactEdit | RemoveRoutingFactEdit | AuditPolicyUnitEdit | RewriteNavigationIndexEdit | PutDecisionProvenanceEdit | RetireDecisionProvenanceEdit | ApproveApplicationContentEdit | WithdrawApplicationContentEdit | ReviseOperationalArtifactEdit | RegisterConsumerEdit Submission: TypeAlias = ProvideFactSubmission | ConsumerDispositionSubmission | ImpactDispositionSubmission | CoverageAttestationSubmission Timestamp: TypeAlias = int | float WorkflowContext: TypeAlias = ProposalRevisionHandle | AnalysisHandle | ReadinessHandle @@ -6370,6 +6647,13 @@ def as_contract(self) -> dict[str, object]: 'AuthoringTargetHandle': AuthoringTargetHandle, 'AuthorizationRecord': AuthorizationRecord, 'AuthorizationReference': AuthorizationReference, + 'CandidateApplicationNextOperation': CandidateApplicationNextOperation, + 'CandidateApplicationPolicy': CandidateApplicationPolicy, + 'CandidateApplicationReadResult': CandidateApplicationReadResult, + 'CandidateApplicationRejectedResult': CandidateApplicationRejectedResult, + 'CandidateApplicationRelatedResult': CandidateApplicationRelatedResult, + 'CandidateApplicationRelationship': CandidateApplicationRelationship, + 'CandidateApplicationRouteResult': CandidateApplicationRouteResult, 'CanonicalModuleDeclaration': CanonicalModuleDeclaration, 'ChangeDescriptor': ChangeDescriptor, 'ChangePolicySemantics': ChangePolicySemantics, @@ -6446,6 +6730,7 @@ def as_contract(self) -> dict[str, object]: 'PolicyUnitMapping': PolicyUnitMapping, 'PrepareCall': PrepareCall, 'PreservePolicySemantics': PreservePolicySemantics, + 'PreviewApplicationCall': PreviewApplicationCall, 'ProposalHandle': ProposalHandle, 'ProposalPolicySummary': ProposalPolicySummary, 'ProposalReadResult': ProposalReadResult, @@ -6481,6 +6766,7 @@ def as_contract(self) -> dict[str, object]: 'RecoverApplicationCall': RecoverApplicationCall, 'RecoverApplicationResult': RecoverApplicationResult, 'RecoverCall': RecoverCall, + 'RegisterConsumerEdit': RegisterConsumerEdit, 'RegisterPolicyUnitEdit': RegisterPolicyUnitEdit, 'RejectedResult': RejectedResult, 'RelatedCall': RelatedCall, @@ -6604,6 +6890,13 @@ def decode_contract(definition: str, value: object) -> object: 'AuthorizationId', 'AuthorizationRecord', 'AuthorizationReference', + 'CandidateApplicationNextOperation', + 'CandidateApplicationPolicy', + 'CandidateApplicationReadResult', + 'CandidateApplicationRejectedResult', + 'CandidateApplicationRelatedResult', + 'CandidateApplicationRelationship', + 'CandidateApplicationRouteResult', 'CanonicalId', 'CanonicalModuleDeclaration', 'ChangeDescriptor', @@ -6694,6 +6987,8 @@ def decode_contract(definition: str, value: object) -> object: 'PolicyUnitMapping', 'PrepareCall', 'PreservePolicySemantics', + 'PreviewApplicationCall', + 'PreviewApplicationResult', 'ProposalHandle', 'ProposalId', 'ProposalPolicySummary', @@ -6736,6 +7031,7 @@ def decode_contract(definition: str, value: object) -> object: 'RecoverApplicationCall', 'RecoverApplicationResult', 'RecoverCall', + 'RegisterConsumerEdit', 'RegisterPolicyUnitEdit', 'RejectedResult', 'RelatedCall', diff --git a/tools/standards_engine/standards_engine/consumer_authoring.py b/tools/standards_engine/standards_engine/consumer_authoring.py new file mode 100644 index 00000000..e74b2782 --- /dev/null +++ b/tools/standards_engine/standards_engine/consumer_authoring.py @@ -0,0 +1,163 @@ +"""Explicit consumer registration and proposal-owned immutable source inputs. + +Requests select an existing repository file. Engine preparation binds that file +before admission; the private binding is retained in the ordinary logical edit +so replay and publication never consult the current working tree. +""" +from __future__ import annotations + +import base64 +import binascii +import tomllib +from collections.abc import Callable, Mapping +from typing import TYPE_CHECKING + +from tools.repository_git.repository_git import GitRepositoryError, RepositoryPath +from tools.standards_metadata.standards_metadata import ( + FrozenContentSource, + load_canonical_standards_corpus, +) +from tools.standards_policy_impact.standards_policy_impact import DEFAULT_REGISTRY + +if TYPE_CHECKING: + from .logical_authoring import LogicalProgram, StandardsChangeSet, StructuredEdit + + +GUIDANCE_KINDS = frozenset({"documentation", "prompt", "template"}) +CONSUMER_KINDS = GUIDANCE_KINDS | {"fixture", "implementation-artifact"} + + +def _source(value: object) -> tuple[str, bytes]: + from .logical_authoring import _exact, _invalid, _mapping, _text + + raw = _mapping(value, "captured consumer source") + _exact(raw, {"snapshot", "content"}, "captured consumer source") + snapshot = _text(raw["snapshot"], "captured source snapshot") + encoded = raw["content"] + if type(encoded) is not str: + raise _invalid("AUTHORING.INVALID_CONSUMER_SOURCE", "Captured content uses canonical base64.") + try: + content = base64.b64decode(encoded, validate=True) + except (ValueError, binascii.Error) as error: + raise _invalid("AUTHORING.INVALID_CONSUMER_SOURCE", "Captured content uses canonical base64.") from error + if base64.b64encode(content).decode("ascii") != encoded: + raise _invalid("AUTHORING.INVALID_CONSUMER_SOURCE", "Captured content uses canonical base64.") + return snapshot, content + + +def parse_registration(raw: Mapping[str, object]) -> StructuredEdit: + from .logical_authoring import _canonical_id, _exact, _invalid, _structured, _text + + fields = {"kind", "consumer", "path", "artifact_kind", "authority"} + # Only persisted, Engine-prepared edits have source. Public schemas omit it. + if "source" in raw: + fields.add("source") + _source(raw["source"]) + _exact(raw, fields, "register-consumer edit") + identity = _canonical_id(raw["consumer"], "consumer ID") + path = _text(raw["path"], "consumer repository path") + try: + selected = str(RepositoryPath.parse(path)) + except GitRepositoryError as error: + raise _invalid("AUTHORING.INVALID_CONSUMER_PATH", "Select a canonical repository-relative file.") from error + if selected != path: + raise _invalid("AUTHORING.INVALID_CONSUMER_PATH", "Select a canonical repository-relative file.") + kind = raw["artifact_kind"] + if type(kind) is not str or kind not in CONSUMER_KINDS: + raise _invalid("AUTHORING.INVALID_CONSUMER_KIND", "Select a supported consumer artifact kind.") + if type(raw["authority"]) is not str or raw["authority"] not in {"evidence", "projection"}: + raise _invalid("AUTHORING.INVALID_CONSUMER_AUTHORITY", "Declare evidence or projection authority.") + if kind in GUIDANCE_KINDS and not path.lower().endswith(".md"): + raise _invalid("AUTHORING.INVALID_GUIDANCE_PATH", "Registered guidance selects an existing Markdown file.") + return _structured(raw, target=identity, facet="consumer-registration") + + +def bind_sources( + change_set: StandardsChangeSet, + snapshot: str, + repository_paths: tuple[str, ...], + read_file: Callable[[str], bytes], +) -> StandardsChangeSet: + """Bind selections through the caller-owned exact-revision read session.""" + from .logical_authoring import StandardsChangeSet, _invalid + + members = frozenset(repository_paths) + edits = [] + for edit in change_set.edits: + raw = edit.as_contract() + if raw["kind"] == "register-consumer": + if "source" in raw: + raise _invalid("AUTHORING.CONSUMER_SOURCE_OWNED", "The Engine supplies captured source material.") + path = str(raw["path"]) + if path not in members: + raise _invalid("AUTHORING.CONSUMER_UNAVAILABLE", "Select a file in the proposal's original repository revision.") + content = read_file(path) + if type(content) is not bytes: + raise _invalid("AUTHORING.INVALID_CONSUMER_SOURCE", "A verified source read returns exact bytes.") + raw = {**raw, "source": {"snapshot": snapshot, "content": base64.b64encode(content).decode("ascii")}} + edits.append(raw) + return StandardsChangeSet.from_mapping({"purpose": change_set.purpose.as_contract(), "edits": edits}) + + +def captured_sources( + program: LogicalProgram, + snapshot: str | None, + original_files: Mapping[str, bytes], + repository_paths: tuple[str, ...], +) -> tuple[tuple[str, bytes], ...]: + """Recover only explicitly bound original inputs, including on cold replay.""" + from .logical_authoring import _invalid + + members = frozenset(repository_paths) + captured: dict[str, bytes] = {} + for change_set in program.change_sets: + for edit in change_set.edits: + raw = edit.as_contract() + if raw["kind"] != "register-consumer": + continue + if "source" not in raw: + raise _invalid("AUTHORING.CONSUMER_SOURCE_REQUIRED", "Consumer registration requires Engine-prepared source material.") + bound_snapshot, content = _source(raw["source"]) + path = str(raw["path"]) + if snapshot is None or bound_snapshot != snapshot or path not in members: + raise _invalid("AUTHORING.CONSUMER_SOURCE_MISMATCH", "Captured material must bind this proposal's original snapshot and repository membership.") + previous = captured.get(path, original_files.get(path)) + if previous is not None and previous != content: + raise _invalid("AUTHORING.CONSUMER_SOURCE_MISMATCH", "One original repository path has one captured content value.") + if raw["artifact_kind"] in GUIDANCE_KINDS: + try: + content.decode("utf-8") + except UnicodeDecodeError as error: + raise _invalid("AUTHORING.INVALID_GUIDANCE_CONTENT", "Registered Markdown guidance is UTF-8 text.") from error + captured[path] = content + return tuple(sorted(captured.items())) + + +def register_consumer(files: dict[str, bytes], edit: Mapping[str, object]) -> None: + """Declare one consumer; policy links and certification have other owners.""" + from .logical_authoring import _invalid, _toml_inline + + identity, path = str(edit["consumer"]), str(edit["path"]) + corpus = load_canonical_standards_corpus(FrozenContentSource(files)) + if corpus.resolve_module(identity) is not None or corpus.resolve_policy_unit(identity) is not None: + raise _invalid("AUTHORING.CONSUMER_EXISTS", "Consumer and canonical policy identities are distinct.") + if path in corpus.module_corpus.members: + raise _invalid("AUTHORING.CONSUMER_IS_STANDARD", "Canonical modules retain their normative content owner.") + registry = tomllib.loads(files[DEFAULT_REGISTRY].decode("utf-8")) + catalog_path = registry["node_catalog"] + catalog = tomllib.loads(files[catalog_path].decode("utf-8")) + nodes = catalog["nodes"] + for node in nodes: + if identity == node["id"] or identity in node.get("aliases", ()): + raise _invalid("AUTHORING.CONSUMER_EXISTS", "Select the existing registered consumer identity.") + if path == node["metadata"]["repository_path"]: + raise _invalid("AUTHORING.CONSUMER_PATH_EXISTS", "One existing file uses its declared consumer identity.") + if path not in files: + raise _invalid("AUTHORING.CONSUMER_SOURCE_REQUIRED", "Register a captured original consumer file.") + nodes.append({"id": identity, "metadata": { + "repository_path": path, "artifact_kind": edit["artifact_kind"], "authority": edit["authority"], + }}) + # Reuse the existing TOML representation, preserving all unrelated records. + files[catalog_path] = ("\n".join( + f"{key} = {_toml_inline(value)}" for key, value in catalog.items() + ) + "\n").encode("utf-8") diff --git a/tools/standards_engine/standards_engine/context_projection.py b/tools/standards_engine/standards_engine/context_projection.py index 395f0acd..b652969c 100644 --- a/tools/standards_engine/standards_engine/context_projection.py +++ b/tools/standards_engine/standards_engine/context_projection.py @@ -72,9 +72,12 @@ class _UnqualifiedContent(Exception): class ApplicationView: """Build application values from the qualified portion of one snapshot.""" - def __init__(self, compiled: CompiledSnapshot, snapshot: c.SnapshotHandle): + def __init__(self, compiled: CompiledSnapshot, + authority: c.SnapshotHandle | c.ProposalRevisionHandle): self.compiled = compiled - self.snapshot = snapshot.as_contract() + self.authority = authority.as_contract() + self.candidate = isinstance(authority, c.ProposalRevisionHandle) + self.snapshot = None if self.candidate else self.authority self.eligible = frozenset( identity for identity, material in compiled.materials.items() if compiled.supporting.exposure_state(identity, material.binding) == "current" @@ -121,17 +124,34 @@ def _child(self, kind: str, identity: str) -> dict: "child_kind": kind, "child_id": identity, "schema_version": 5} def _next_read(self, identity: str) -> dict: + if self.candidate: + return {"operation": "preview_application", "revision": self.authority, + "request": {"kind": "read", "target": identity}} return {"operation": "read", "target": identity, "snapshot": self.snapshot} def _result(self, kind: str, **fields) -> dict: - return {"kind": kind, "purpose": "application", "snapshot": self.snapshot, **fields} + anchor = {"revision": self.authority} if self.candidate else {"snapshot": self.snapshot} + return {"kind": "candidate-" + kind if self.candidate else kind, + "purpose": "application", **anchor, **fields} + + def _decode(self, value: dict): + types = { + "application-read-result": c.ApplicationReadResult, + "application-related-result": c.ApplicationRelatedResult, + "application-route-result": c.ApplicationRouteResult, + "candidate-application-read-result": c.CandidateApplicationReadResult, + "candidate-application-related-result": c.CandidateApplicationRelatedResult, + "candidate-application-route-result": c.CandidateApplicationRouteResult, + } + return types[value["kind"]].from_value(value) def read(self, target: str, detail: str = "compact"): material, unit = self._require(target) identity = unit.id if unit is not None else material.id value = self._result( "application-read-result", - policy={"id": identity, "handle": self._child("policy", identity), + policy={"id": identity, + **({} if self.candidate else {"handle": self._child("policy", identity)}), "role": material.role, "level": material.level}, content=unit.content if unit is not None else material.content, scope={"kind": "structured", "heading_path": list(unit.heading_path)} if unit else {"kind": "whole-artifact"}, @@ -140,7 +160,7 @@ def read(self, target: str, detail: str = "compact"): ) if detail == "full": value["related"] = self.relationships(identity, None, Direction.BOTH, False) - return c.ApplicationReadResult.from_value(value) + return self._decode(value) def _scope_targets(self, target: str) -> tuple[str, ...]: module = self.compiled.corpus.resolve_module(target) @@ -164,7 +184,7 @@ def relationships(self, target: str, groups, direction: Direction, transitive: b pairs = ((view.edge, view.direction) for view in views) for edge, way in pairs: key = f"{way.value}:{edge.id}" - selected[key] = {"handle": self._child("relationship", key), + selected[key] = {**({} if self.candidate else {"handle": self._child("relationship", key)}), "source": edge.source, "target": edge.target, "relation": edge.relation, "groups": list(edge.groups), "direction": way.value} return [selected[key] for key in sorted(selected)] @@ -174,7 +194,7 @@ def related(self, target: str, groups: tuple[str, ...], direction: str, transiti identity = unit.id if unit else material.id relationships = self.relationships(identity, groups, Direction.parse(direction), transitive) neighbors = sorted({entry[key] for entry in relationships for key in ("source", "target")} - set(self._scope_targets(identity))) - return c.ApplicationRelatedResult.from_value(self._result( + return self._decode(self._result( "application-related-result", target=identity, relationships=relationships, next_operations=[self._next_read(item) for item in neighbors], )) @@ -191,7 +211,7 @@ def inspect(self, handle): target = edge.target if way == "incoming" else edge.source relationships = [entry for entry in self.relationships(target, tuple(edge.groups), Direction.parse(way), False) if entry["handle"]["child_id"] == handle.child_id] - return c.ApplicationRelatedResult.from_value(self._result( + return self._decode(self._result( "application-related-result", target=target, relationships=relationships, next_operations=[self._next_read(edge.source), self._next_read(edge.target)], )) @@ -215,13 +235,34 @@ def route(self, engine, call): reading.append({"target": entry.target, "scope": entry.scope.as_contract(), "authority": entry.authority, "state": "selected"}) facts = {fact["id"]: fact for fact in fact_definitions(self.compiled.router)} - return c.ApplicationRouteResult.from_value(self._result( + return self._decode(self._result( "application-route-result", status="needs-facts" if unresolved else "complete", reading_plan=reading, unresolved_questions=[{"fact": facts[key]} for key in sorted(unresolved)], next_operations=[self._next_read(entry["target"]) for entry in reading], )) +def preview_application(engine: StandardsEngine, compiled: CompiledSnapshot, + call: c.PreviewApplicationCall): + """Use application eligibility and field selection at an exact draft revision.""" + view = ApplicationView(compiled, call.revision) + request = call.request.as_contract() + try: + if request["kind"] == "read": + return view.read(request["target"], request.get("detail", "compact")) + if request["kind"] == "related": + return view.related(request["target"], tuple(request["groups"]), + request["direction"], request["transitive"]) + return view.route(engine, call.request) + except (_UnqualifiedContent, GraphError): + result = application_rejection().as_contract() + return c.CandidateApplicationRejectedResult.from_value({ + **result, "kind": "candidate-application-rejected-result", + "revision": call.revision.as_contract(), + "message": "Inspect the candidate's exposure and prerequisite states through authoring reads, then preview its qualified application content.", + }) + + def application_dispatch(engine: StandardsEngine, operation: str, call): call_type = APPLICATION_CALLS.get(operation) if call_type is None: diff --git a/tools/standards_engine/standards_engine/engine.py b/tools/standards_engine/standards_engine/engine.py index f79948ab..962be656 100644 --- a/tools/standards_engine/standards_engine/engine.py +++ b/tools/standards_engine/standards_engine/engine.py @@ -168,6 +168,8 @@ PolicyInspectionResult, QueryCall, QueryProposalCall, + PreviewApplicationCall, + PreviewApplicationResult, QueryProposalResult, QueryResult, RecoverApplicationCall, @@ -741,6 +743,7 @@ def verify_proposal( projection = self._proposal_projection(revision) base = self._snapshots.load_content(revision.base_snapshot) base_files = {str(item.path): item.content for item in base.files} + base_files.update(projection.captured_consumer_files) proposed_files = dict(projection.source.files) base_paths = set(revision.base_repository_paths) proposed_paths = set(projection.repository_paths) @@ -858,7 +861,10 @@ def _create_proposal( try: summary, revision = self._authoring.create_proposal( self._snapshot_id(call.base_snapshot), - StandardsChangeSet.from_mapping(call.change_set.as_contract()), + self._prepare_consumer_sources( + StandardsChangeSet.from_mapping(call.change_set.as_contract()), + self._snapshot_id(call.base_snapshot), materials, + ), preparation=materials, ) return CreateProposalResult.from_value( @@ -871,6 +877,37 @@ def _create_proposal( except self._domain_errors() as error: return self._domain_rejection(error) + def _prepare_consumer_sources( + self, change_set: StandardsChangeSet, snapshot: SnapshotId, + materials: ProposalMaterials, + ) -> StandardsChangeSet: + """Retain original consumer inputs before admitting a logical revision.""" + if not any(edit.as_contract()["kind"] == "register-consumer" for edit in change_set.edits): + return change_set + from .consumer_authoring import bind_sources + + paths = materials.repository_paths(snapshot) + summary = self._snapshots.snapshot(snapshot) + with self._repository.read_session(RepositoryRevision(summary.source_revision)) as session: + return bind_sources( + change_set, str(snapshot), paths, + lambda path: session.read_file(RepositoryPath.parse(path)), + ) + + @public_operation + def preview_application( + self, call: PreviewApplicationCall, + ) -> PreviewApplicationResult | RejectedResult: + from .context_projection import preview_application + + try: + with ProposalMaterials(self) as materials: + revision = self._authoring.read_revision(call.revision.id) + projection = materials.projection(revision) + return preview_application(self, projection.compiled, call) + except self._domain_errors() as error: + return self._domain_rejection(error) + @public_operation def find_proposals( self, call: FindProposalsCall @@ -906,7 +943,11 @@ def _revise_proposal( try: summary, revision = self._authoring.revise_proposal( call.expected_revision.id, - StandardsChangeSet.from_mapping(call.change_set.as_contract()), + self._prepare_consumer_sources( + StandardsChangeSet.from_mapping(call.change_set.as_contract()), + self._authoring.read_revision(call.expected_revision.id).base_snapshot, + materials, + ), preparation=materials, ) return ReviseProposalResult.from_value( @@ -1291,6 +1332,7 @@ def apply_proposal( projection = self._proposal_projection(revision) base_capture = self._snapshots.load_content(revision.base_snapshot) base_files = {str(item.path): item.content for item in base_capture.files} + base_files.update(projection.captured_consumer_files) proposed_files = dict(projection.source.files) base_paths = set(revision.base_repository_paths) proposed_paths = set(projection.repository_paths) diff --git a/tools/standards_engine/standards_engine/logical_authoring.py b/tools/standards_engine/standards_engine/logical_authoring.py index ea45fae2..65b117ca 100644 --- a/tools/standards_engine/standards_engine/logical_authoring.py +++ b/tools/standards_engine/standards_engine/logical_authoring.py @@ -369,6 +369,9 @@ def _edit(value: object) -> LogicalEdit: from .supporting_authoring import SUPPORT_EDIT_KINDS, parse_edit if kind in SUPPORT_EDIT_KINDS: return parse_edit(raw) + if kind == "register-consumer": + from .consumer_authoring import parse_registration + return parse_registration(raw) if kind == "revise-policy-unit": return RevisePolicyUnit.from_mapping(raw) if kind == "replace-standard-relationships": @@ -829,7 +832,7 @@ def _contains_null(value: object) -> bool: def _relationship_consumer(value: object) -> object: if type(value) is str: - return _semantic_id(value, "relationship consumer") + return _canonical_id(value, "relationship consumer") raw = _mapping(value, "relationship consumer handle") _exact( raw, @@ -916,6 +919,7 @@ class LogicalProjection: _continuation: ProjectionContinuation | None = field( default=None, repr=False, compare=False, ) + captured_consumer_files: tuple[tuple[str, bytes], ...] = () class LogicalAuthoringCompiler: @@ -972,7 +976,11 @@ def compile( "logical compilation requires exact frozen content and program values", ) selected_repository_paths = _repository_paths(base_repository_paths) - base_file_paths = frozenset(dict(base.files)) + from .consumer_authoring import captured_sources + consumer_files = captured_sources( + program, base_snapshot, dict(base.files), selected_repository_paths, + ) + base_file_paths = frozenset(dict(base.files)) | frozenset(dict(consumer_files)) def compile_current(current: dict[str, bytes]) -> Any: _refresh_suite_input_projection( @@ -1021,6 +1029,9 @@ def compile_current(current: dict[str, bytes]) -> Any: # Copy only the file table: every value is an immutable byte string. # Neither a failed suffix nor a sibling successor can mutate its prefix. files = dict(selected_source.files) + for path, content in consumer_files: + # A prefix may already contain an explicitly revised guidance file. + files.setdefault(path, content) for change_set in program.change_sets[prefix_length:]: before = dict(files) from .supporting_authoring import SUPPORT_EDIT_KINDS, begin_edits, finish_edits @@ -1081,6 +1092,7 @@ def compile_current(current: dict[str, bytes]) -> Any: repository_paths, ProjectionContinuation(inputs, source.files, repository_paths) if inputs is not None else None, + captured_consumer_files=consumer_files, ) def _apply_edit( @@ -1122,6 +1134,10 @@ def _apply_edit( "remove-routing-fact", }: _edit_routing(files, [raw]) + elif kind == "register-consumer": + from .consumer_authoring import register_consumer + + register_consumer(files, raw) elif kind == "create-standard": self._create_standard(files, raw) elif kind == "revise-standard": @@ -1807,6 +1823,7 @@ def _projection_order(edit: LogicalEdit) -> tuple[int, str]: "revise-policy-unit": 20, "move-policy-unit": 30, "register-policy-unit": 35, + "register-consumer": 36, "replace-standard-relationships": 40, "put-policy-relationship": 40, "remove-policy-relationship": 40, @@ -2293,11 +2310,8 @@ def _remove_compiled_relationship(files: dict[str, bytes], semantics: Any) -> No def _resolve_consumer(value: object, compiled: Any, base_snapshot: str | None) -> str: if type(value) is str: - if value in compiled.policy_impact.artifacts: - raise _invalid( - "AUTHORING.TARGET_HANDLE_REQUIRED", - "non-standard relationship consumers require a Snapshot-bound authoring target handle", - ) + # The containing proposal/snapshot already binds the candidate catalog. + # Canonical IDs also address consumers first declared in this candidate. return value handle = _mapping(value, "authoring target handle") snapshot = _mapping(handle["snapshot"], "authoring target snapshot") diff --git a/tools/standards_engine/standards_engine/mcp.py b/tools/standards_engine/standards_engine/mcp.py index 90df4007..85910a5d 100644 --- a/tools/standards_engine/standards_engine/mcp.py +++ b/tools/standards_engine/standards_engine/mcp.py @@ -32,6 +32,7 @@ "find_proposals", "query", "query_proposal", + "preview_application", "inspect", } ) @@ -44,6 +45,7 @@ "routing_facts", "inspect", "query_proposal", + "preview_application", "propose", "revise", "analyze", @@ -86,14 +88,15 @@ "create_proposal": "Propose an atomic standards change with explicit domain intent and evidence against a snapshot.", "find_proposals": "Find durable proposals and their current revision handles.", "revise_proposal": "Append an atomic change to the exact expected proposal revision; stale revisions are rejected.", - "query_proposal": "Read, route, or traverse standards within an exact immutable proposal revision.", + "query_proposal": "Read, route, or traverse authoring content within an exact immutable proposal revision. Use preview_application to inspect its qualified application view.", + "preview_application": "Inspect an exact unpublished revision through the ordinary application qualification and filtering rules. Supply one read, route, or related request. Results and continuations stay bound to the draft; this operation neither publishes content nor approves review or exposure.", "analyze_proposal": "Analyze an exact proposal revision and return unresolved consequences or complete analysis.", "review_proposal": "Accept complete current proposal analysis with explicit evidence-backed review decisions; return content-bound readiness. Requires user authorization for review.", "verify_proposal": "Verify the exact proposal candidate. Coverage audits require readiness. Verification does not supply review decisions or publish.", "apply_proposal": "Verify and publish the exact accepted readiness to the local canonical ref. Requires user authorization for application. On recovery-required use recover_application with the same readiness; never retry apply. Does not push a remote.", "recover_application": "Observe the durable application selected by readiness after recovery-required. Does not retry or publish; preserve the same readiness handle.", "verify_repository": "Verify the working tree. Refreshing generated verification inputs is a mutation; inspect verification.passed.", - "maintain_evidence": "Preview or apply explicit evidence catalog maintenance with exact review evidence. Does not change normative standards or issue attestations.", + "maintain_evidence": "Maintain the accepted repository evidence catalog at an exact revision. For draft-only consumers use register-consumer in propose/revise with separate policy relationships. This operation does not edit a proposal or certify coverage.", } @@ -298,7 +301,7 @@ def _request(self, method: str, params: dict) -> dict: "protocolVersion": PROTOCOL_VERSION, "capabilities": {"tools": {"listChanged": False}}, "serverInfo": {"name": "standards-engine", "version": "0.2.0"}, - "instructions": ( + "instructions": f"Installed interface {self._interface.interface.interface_schema_version}; purpose {self.purpose.value}. " + ( "Use route and read to obtain applicable guidance. Reuse returned snapshots for consistent observations." if self.purpose is Purpose.APPLICATION else "Use explicit routing facts and preserve opaque handles. Follow typed Engine outcomes and next_operations. Standards mutations belong to the Engine. Recovery-required continues through recover with the same context, never an apply retry." @@ -359,7 +362,7 @@ def _request(self, method: str, params: dict) -> dict: return { "structuredContent": value, "content": [{"type": "text", "text": json.dumps(value)}], - "isError": value.get("kind") in {"rejected-result", "application-rejected-result"} + "isError": value.get("kind") in {"rejected-result", "application-rejected-result", "candidate-application-rejected-result"} or value.get("status") == "rejected", } diff --git a/tools/standards_engine/standards_engine/supporting.py b/tools/standards_engine/standards_engine/supporting.py index c30e020e..444074da 100644 --- a/tools/standards_engine/standards_engine/supporting.py +++ b/tools/standards_engine/standards_engine/supporting.py @@ -11,6 +11,8 @@ ) from tools.standards_policy_impact.standards_policy_impact import CompiledPolicyImpactSet, thaw +from .consumer_authoring import GUIDANCE_KINDS + if TYPE_CHECKING: from .engine import CompiledSnapshot @@ -56,7 +58,7 @@ def build_materials(source: ContentSource, corpus: CanonicalStandardsCorpus, text, content_digest(record), module.requires, module.specializes, ) for artifact in impact.artifacts.values(): - if artifact.artifact_kind not in {"prompt", "template"}: + if artifact.artifact_kind not in GUIDANCE_KINDS: continue if artifact.id in materials: raise material_error("Operational aids and standards have distinct identities.") @@ -146,7 +148,7 @@ def review_authorities(compiled: CompiledSnapshot): f"application-exposure:{entry.target}", content_digest(entry.as_contract()), content_digest({"declaration": entry.as_contract(), "material": material.binding}))) for material in compiled.materials.values(): - if material.role in {"prompt", "template"}: + if material.role in GUIDANCE_KINDS: result.append(SupportingContentAuthority( f"operational-aid:{material.id}", content_digest(material.content), material.binding)) return tuple(sorted(result, key=lambda item: item.id)) @@ -159,7 +161,7 @@ def read_supporting(compiled: CompiledSnapshot, projection, target: str): return {"kind": "provenance-read-result", "authority": projection.authority.as_contract(), "record": record.as_contract(), "state": record_state(compiled, record), "next_operations": []} selected = resolve_material(compiled, target) - if selected is None or selected[0].role not in {"prompt", "template"}: + if selected is None or selected[0].role not in GUIDANCE_KINDS: return None material = selected[0] return {"kind": "operational-read-result", "authority": projection.authority.as_contract(), diff --git a/tools/standards_engine/standards_engine/supporting_authoring.py b/tools/standards_engine/standards_engine/supporting_authoring.py index 2552fa0d..6d10f969 100644 --- a/tools/standards_engine/standards_engine/supporting_authoring.py +++ b/tools/standards_engine/standards_engine/supporting_authoring.py @@ -9,6 +9,7 @@ FrozenContentSource, load_supporting_content, ) from .supporting import subject_binding +from .consumer_authoring import GUIDANCE_KINDS SUPPORT_EDIT_KINDS = frozenset({"put-provenance", "retire-provenance", "approve-application-content", "withdraw-application-content", @@ -53,13 +54,11 @@ def parse_edit(raw: Mapping[str, object]): return _structured(raw, target=target if isinstance(target, str) else target["id"], facet="application-exposure") _exact(raw, {"kind", "target", "title", "body"}, kind) target = _relationship_consumer(raw["target"]) - if isinstance(target, str): - raise _invalid("AUTHORING.TARGET_HANDLE_REQUIRED", "Operational aids use a returned authoring target.") title = _text(raw["title"], "title") if "\n" in title or "\r" in title: raise _invalid("AUTHORING.INVALID_TITLE", "Operational titles occupy one line.") _text(raw["body"], "body") - return _structured(raw, target=target["id"], facet="operational-aid") + return _structured(raw, target=target if isinstance(target, str) else target["id"], facet="operational-aid") def _write(files, records, entries): @@ -101,13 +100,16 @@ def finish_edits(files, edits, base, snapshot, compile_current): from .logical_authoring import _resolve_consumer, _invalid, _unsupported if not edits: return + current = compile_current(files) for edit in edits: if edit["kind"] != "revise-operational-artifact": continue - target = _resolve_consumer(edit["target"], base, snapshot) - artifact = base.policy_impact.artifacts.get(target) - if artifact is None or artifact.artifact_kind not in {"prompt", "template"}: - raise _unsupported("AUTHORING.OPERATIONAL_TARGET_REQUIRED", "Select a registered prompt or template.") + target = _resolve_consumer(edit["target"], current, snapshot) + artifact = current.policy_impact.artifacts.get(target) + if artifact is None or artifact.artifact_kind not in GUIDANCE_KINDS: + raise _unsupported("AUTHORING.OPERATIONAL_TARGET_REQUIRED", "Select registered Markdown guidance.") + if not artifact.repository_path.lower().endswith(".md"): + raise _unsupported("AUTHORING.OPERATIONAL_TARGET_REQUIRED", "Guidance revision owns Markdown content.") # Registration owns the path. Requests supply neither paths nor raw files. files[artifact.repository_path] = f"# {edit['title']}\n\n{edit['body'].rstrip()}\n".encode("utf-8") current = compile_current(files) @@ -119,7 +121,7 @@ def finish_edits(files, edits, base, snapshot, compile_current): record = DecisionProvenance.from_mapping(raw) records[record.id] = record elif edit["kind"] == "approve-application-content": - target = _resolve_consumer(edit["target"], base, snapshot) + target = _resolve_consumer(edit["target"], current, snapshot) material = current.materials.get(target) if material is None: raise _invalid("AUTHORING.EXPOSURE_TARGET_REQUIRED", "Qualify a complete module or registered operational aid.") diff --git a/tools/standards_engine/standards_engine/tools.py b/tools/standards_engine/standards_engine/tools.py index 92a11082..69be4095 100644 --- a/tools/standards_engine/standards_engine/tools.py +++ b/tools/standards_engine/standards_engine/tools.py @@ -216,6 +216,14 @@ def revise_proposal(self, arguments: object) -> dict[str, object]: return call return self._result("revise_proposal", self._engine.revise_proposal(call)) + def preview_application(self, arguments: object) -> dict[str, object]: + call = self._call_or_rejection( + "preview_application", arguments, generated_contract.PreviewApplicationCall, + ) + if isinstance(call, dict): + return call + return self._result("preview_application", self._engine.preview_application(call)) + def query_proposal(self, arguments: object) -> dict[str, object]: call = self._call_or_rejection("query_proposal", arguments, QueryProposalCall) if isinstance(call, dict): diff --git a/tools/standards_engine/tests/test_analysis.py b/tools/standards_engine/tests/test_analysis.py index 9d4a3f63..a7e6ffb0 100644 --- a/tools/standards_engine/tests/test_analysis.py +++ b/tools/standards_engine/tests/test_analysis.py @@ -1294,6 +1294,7 @@ def test_review_composition_publishes_readiness_for_complete_analysis(self) -> N return_value=mock.Mock( source=mock.Mock(files=tuple(projected_files.items())), repository_paths=projection.repository_paths, + captured_consumer_files=projection.captured_consumer_files, ), ), mock.patch.object( diff --git a/tools/standards_engine/tests/test_consumer_publication.py b/tools/standards_engine/tests/test_consumer_publication.py new file mode 100644 index 00000000..b43f98b7 --- /dev/null +++ b/tools/standards_engine/tests/test_consumer_publication.py @@ -0,0 +1,151 @@ +"""Proposal consumer publication through real MCP processes and Git/SQLite. + +Every tool call reconnects a cold local stdio process. This tests the actual +wire boundary without requiring an optional SDK or the user's installed store. +""" +from __future__ import annotations + +import json +import os +from pathlib import Path +import subprocess +import sys +import tempfile +import unittest + +from tools.standards_engine.tests.test_agent_workflow import ROOT, decisions, evidence, prepare_repository +from tools.standards_engine.tests import test_proposal_consumers as fixtures +from tools.standards_engine.tests.test_proposal_consumers import registration + + +class ConsumerPublicationTest(unittest.TestCase): + def setUp(self): + self.temp = tempfile.TemporaryDirectory(prefix='consumer-publication-') + self.addCleanup(self.temp.cleanup) + self.root = Path(self.temp.name) / 'repository' + prepare_repository(self.root) + self.calls = [] + + def rpc(self, method, params, purpose='authoring'): + messages=[ + {'jsonrpc':'2.0','id':1,'method':'initialize','params':{ + 'protocolVersion':'2025-11-25','capabilities':{}, + 'clientInfo':{'name':'consumer-publication-test','version':'1'}}}, + {'jsonrpc':'2.0','method':'notifications/initialized'}, + {'jsonrpc':'2.0','id':2,'method':method,'params':params}, + ] + process=subprocess.run( + [sys.executable,'-P','-m','tools.standards_engine.standards_engine.mcp', + '--repo-root',str(self.root),'--purpose',purpose,'--advanced'], + input=''.join(json.dumps(m)+'\n' for m in messages),text=True,capture_output=True, + env={**os.environ,'PYTHONPATH':str(ROOT)},timeout=180, + ) + self.assertEqual(process.returncode,0,process.stderr) + self.assertEqual(process.stderr,'') + responses={row['id']:row for row in map(json.loads,process.stdout.splitlines())} + self.assertIn('interface 34;',responses[1]['result']['instructions']) + return responses[2] + + def call(self,name,arguments,purpose='authoring',error=False): + self.calls.append(name) + response=self.rpc('tools/call',{'name':name,'arguments':arguments},purpose) + self.assertNotIn('error',response,response) + result=response['result'] + self.assertEqual(result['isError'],error,result) + self.assertEqual(json.loads(result['content'][0]['text']),result['structuredContent']) + return result['structuredContent'] + + def change(self,edits): + return {'purpose':{'summary':'Qualify proposal consumer publication.', + 'rationale':'This isolated repository owns the synthetic review evidence.', + 'evidence':[evidence(self.root)]},'edits':edits} + + def complete(self,workflow): + seen=set() + while workflow.get('status')=='needs-action': + identity=json.dumps(workflow['context'],sort_keys=True) + self.assertNotIn(identity,seen);seen.add(identity) + outcome=workflow['outcome'] + self.assertFalse(outcome.get('fact_requirements'),outcome) + operations=[n for n in outcome['next_operations'] if n['operation']=='resolve'] + self.assertTrue(operations,outcome) + selected=next((n for n in operations if n['request_kind']=='consumer-disposition'),operations[0]) + kind=selected['request_kind'] + if kind=='coverage-attestation': + submission={'kind':kind,'claim':{ + 'requirement':selected['work'],'conclusion':'complete', + 'evidence':[evidence(self.root)],'explicit_exclusions':[], + 'rationale':'This fixture explicitly owns the selected synthetic consumer horizon.', + 'auditor_provenance':'Isolated MCP test; not a standards-content audit.', + }} + else: + self.assertIn(kind,{'consumer-disposition','impact-disposition'}) + obligation=next(o for o in outcome['obligations'] if o['handle']==selected['work']) + submission={'kind':kind,'obligation':selected['work'], + 'result':'reviewed-no-change' if kind=='consumer-disposition' else 'confirmed', + 'fingerprint':obligation['fingerprint'],'evidence':[evidence(self.root)], + 'rationale':'The isolated fixture confirms this exact declared consumer/owner change.'} + workflow=self.call('resolve_workflow',{'context':workflow['context'],'submission':submission}) + self.assertEqual(workflow.get('status'),'complete',workflow) + return workflow + + def test_same_candidate_registration_preview_review_publication_and_cold_readback(self): + F=fixtures.ConsumerCompilerTests + catalog=self.rpc('tools/list',{})['result']['tools'] + self.assertIn('preview_application',{t['name'] for t in catalog}) + self.assertIn('register-consumer',json.dumps(next(t for t in catalog if t['name']=='propose')['inputSchema'])) + self.assertNotIn('preview_application',{t['name'] for t in self.rpc('tools/list',{},'application')['result']['tools']}) + before=subprocess.check_output(['git','rev-parse','main'],cwd=self.root) + original={p:(self.root/p).read_bytes() for p in (F.fixture_path,F.second_path,F.doc_path)} + edits=F().initial_edits() + # A published reference shares positive wording; hidden rationale stays editorial. + (self.root/F.fixture_path).write_bytes(b'UNPUBLISHED_BEFORE_CAPTURE_DRIFT\n') + workflow=self.call('propose',{'change_set':self.change(edits)}) + (self.root/F.fixture_path).write_bytes(original[F.fixture_path]) + self.assertIn(workflow.get('status'),{'needs-action','complete'},workflow) + revision=workflow['revision'] + self.assertEqual(subprocess.check_output(['git','rev-parse','main'],cwd=self.root),before) + for path,content in original.items():self.assertEqual((self.root/path).read_bytes(),content) + author=self.call('query_proposal',{'revision':revision,'request':{'kind':'read','target':F.document}}) + self.assertEqual(author['role'],'documentation');self.assertIn('Apply the owned rule.',author['content']) + preview=self.call('preview_application',{'revision':revision,'request':{'kind':'read','target':F.owner,'detail':'full'}}) + self.assertEqual(preview['kind'],'candidate-application-read-result') + self.assertEqual(preview['revision'],revision) + self.assertNotIn('snapshot',preview);self.assertNotIn('handle',preview['policy']) + self.assertNotIn('AUTHORING_PRIVATE_8159',json.dumps(preview)) + hidden=self.call('preview_application',{'revision':revision,'request':{'kind':'read','target':F.document}},error=True) + self.assertEqual(hidden['code'],'APPLICATION.CONTENT_UNAVAILABLE') + denied=self.rpc('tools/call',{'name':'preview_application','arguments':{'revision':revision,'request':{'kind':'read','target':F.owner}}},'application') + self.assertIn('error',denied) + # A fresh process reconstructs the draft after unrelated working-tree drift. + (self.root/F.fixture_path).write_bytes(b'LOCAL_UNPUBLISHED_INPUT_DRIFT\n') + rebuilt=self.call('preview_application',{'revision':revision,'request':{'kind':'read','target':F.owner,'detail':'full'}}) + self.assertEqual(rebuilt,preview) + (self.root/F.fixture_path).write_bytes(original[F.fixture_path]) + bad=self.call('revise',{'context':workflow['context'],'change_set':self.change([ + registration('fixture.duplicate-consumer-path',F.fixture_path)])},error=True) + status=self.call('workflow_status',{'context':workflow['context']}) + self.assertEqual(status['revision'],revision) + self.assertEqual(subprocess.check_output(['git','rev-parse','main'],cwd=self.root),before) + complete=self.complete(status) + ready=self.call('review',{'context':complete['context'],'decisions':decisions(self.root)}) + self.assertEqual(ready['status'],'ready',ready) + verified=self.call('verify_proposal',{'kind':'verify-proposal','revision':revision,'readiness':ready['context']}) + self.assertTrue(verified['verification']['passed'],verified) + published=self.call('apply',{'context':ready['context']}) + self.assertEqual(published['status'],'applied',published) + exposed=self.call('read',{'target':F.owner,'detail':'full'},purpose='application') + self.assertEqual(exposed['content'],preview['content']) + self.assertEqual(exposed['scope'],preview['scope']) + self.assertEqual(exposed['requires'],preview['requires']) + for path in (F.fixture_path,F.second_path): + self.assertEqual(subprocess.check_output(['git','show','main:'+path],cwd=self.root),original[path]) + self.assertIn(b'Apply the owned rule.',subprocess.check_output(['git','show','main:'+F.doc_path],cwd=self.root)) + self.call('read',{'target':'provenance.consumer-test'},purpose='application',error=True) + self.call('read',{'target':F.document},purpose='application',error=True) + self.assertEqual(self.call('preview_application',{'revision':revision,'request':{'kind':'read','target':F.owner,'detail':'full'}}),preview) + self.assertNotEqual(subprocess.check_output(['git','rev-parse','main'],cwd=self.root),before) + + +if __name__=='__main__': + unittest.main() diff --git a/tools/standards_engine/tests/test_proposal_consumers.py b/tools/standards_engine/tests/test_proposal_consumers.py new file mode 100644 index 00000000..f01c6261 --- /dev/null +++ b/tools/standards_engine/tests/test_proposal_consumers.py @@ -0,0 +1,281 @@ +"""Proposal-local registration, captured input and candidate-view regressions.""" +from __future__ import annotations + +from pathlib import Path +import unittest + +from tools.standards_engine.standards_engine.logical_authoring import StandardsChangeSet +from tools.standards_engine.standards_engine.mcp import tool_catalog + +ROOT = Path(__file__).resolve().parents[3] +EVIDENCE = {"id": "evidence:consumer-test", "digest": "sha256:" + "1" * 64, + "provider_contract": "standards-evidence", "provider_contract_version": "1"} + + +def change(edits): + return StandardsChangeSet.from_mapping({"purpose": { + "summary": "Register selected consumer material.", + "rationale": "The isolated fixture proves proposal-local consumer discovery.", + "evidence": [EVIDENCE]}, "edits": edits}) + + +def registration(identity="fixture.consumer-test", path="tools/tests/consumer.py", kind="fixture"): + return {"kind": "register-consumer", "consumer": identity, "path": path, + "artifact_kind": kind, "authority": "evidence" if kind == "fixture" else "projection"} + + +class ConsumerInterfaceTests(unittest.TestCase): + def test_registration_edit_is_admitted(self): + result = change([registration()]) + self.assertEqual(result.edits[0].as_contract()["kind"], "register-consumer") + + def test_authoring_catalog_exposes_candidate_preview(self): + authoring = {item["name"] for item in tool_catalog(ROOT, purpose="authoring")} + self.assertIn("preview_application", authoring) + application = {item["name"] for item in tool_catalog(ROOT, purpose="application")} + self.assertNotIn("preview_application", application) + + +class ConsumerInputTests(unittest.TestCase): + def test_public_schema_excludes_private_capture_and_accepts_documentation(self): + from tools.standards_contracts.standards_contracts import ContractError + from tools.standards_engine.standards_engine import _generated_contract as c + public = registration('documentation.authoring', '.agents/skills/example/references/authoring.md', 'documentation') + self.assertEqual(c.RegisterConsumerEdit.from_value(public).as_contract(), public) + with self.assertRaises(ContractError): + c.RegisterConsumerEdit.from_value({**public, 'source': {'snapshot': 'private', 'content': ''}}) + + def test_invalid_paths_types_and_disguised_code_are_rejected(self): + from tools.standards_engine.standards_engine.authoring import AuthoringError + for fields in ({'path': '../outside'}, {'path': '/absolute'}, {'path': 'tools//file.py'}, + {'path': 'tools/./file.py'}, {'artifact_kind': []}, {'authority': []}, + {'artifact_kind': 'documentation', 'path': 'tools/file.py'}): + with self.subTest(fields=fields), self.assertRaises(AuthoringError): + change([{**registration(), **fields}]) + + def test_binding_is_owned_and_requires_original_membership(self): + from tools.standards_engine.standards_engine.consumer_authoring import bind_sources + from tools.standards_engine.standards_engine.authoring import AuthoringError + from unittest.mock import Mock + reader = Mock(return_value=b'original\x00binary') + path = 'tools/tests/consumer.py' + bound = bind_sources(change([registration()]), 'snapshot:test', (path,), reader) + reader.assert_called_once_with(path) + with self.assertRaises(AuthoringError): + bind_sources(bound, 'snapshot:test', (path,), reader) + with self.assertRaises(AuthoringError): + bind_sources(change([registration()]), 'snapshot:test', (), reader) + reader.assert_called_once_with(path) + + def test_capture_is_snapshot_bound_and_conflicting_bytes_are_rejected(self): + from tools.standards_engine.standards_engine.consumer_authoring import bind_sources, captured_sources + from tools.standards_engine.standards_engine.logical_authoring import LogicalProgram + from tools.standards_engine.standards_engine.authoring import AuthoringError + path = 'tools/tests/consumer.py' + bound = bind_sources(change([registration()]), 'snapshot:test', (path,), lambda _: b'original') + self.assertEqual(captured_sources(LogicalProgram([bound]), 'snapshot:test', {}, (path,)), ((path,b'original'),)) + for snapshot, originals, members in [('different',{},(path,)), ('snapshot:test',{path:b'changed'},(path,)), ('snapshot:test',{},())]: + with self.subTest(snapshot=snapshot, originals=originals), self.assertRaises(AuthoringError): + captured_sources(LogicalProgram([bound]),snapshot, originals,members) + + +class ConsumerCompilerTests(unittest.TestCase): + """Real metadata, graph, coverage and logical replay over captured authority.""" + snapshot = 'snapshot:consumer-fixture' + fixture_path = 'tools/standards_engine/tests/test_navigation.py' + second_path = 'tools/standards_analysis/tests/test_routing.py' + doc_path = '.agents/skills/standards-engine/references/authoring.md' + policy = 'topic.consumer-fixture.owned' + owner = 'topic.consumer-fixture' + document = 'documentation.consumer-fixture' + + @classmethod + def setUpClass(cls): + from tools.standards_engine.tests.test_logical_authoring import LogicalAuthoringTests + LogicalAuthoringTests.setUpClass() + cls.base = LogicalAuthoringTests.base + cls.compiled = LogicalAuthoringTests.compiled + cls.paths = LogicalAuthoringTests.repository_paths + for path in (cls.fixture_path, cls.second_path, cls.doc_path): + assert path in cls.paths and path not in dict(cls.base.files), path + + def bound(self, edits): + from tools.standards_engine.standards_engine.consumer_authoring import bind_sources + return bind_sources(change(edits), self.snapshot, self.paths, lambda path: (ROOT/path).read_bytes()) + + def project(self, changes, predecessor=None): + from tools.standards_engine.standards_engine.logical_authoring import LogicalAuthoringCompiler, LogicalProgram + from tools.standards_engine.standards_engine.engine import StandardsEngine + return LogicalAuthoringCompiler(StandardsEngine._compile).compile( + self.base, LogicalProgram(changes), base_snapshot=self.snapshot, + base_repository_paths=self.paths, compiled_base=self.compiled, predecessor=predecessor, + ) + + @classmethod + def owner_edit(cls): + from tools.standards_engine.tests.test_logical_authoring import LogicalAuthoringTests + from tools.standards_engine.tests.test_policy_registration import unit + edit = LogicalAuthoringTests.new_standard_edit() + edit['standard'].update(id=cls.owner,title='Consumer Fixture',body='## Owned Scope\n\nObserve the owned outcome.\n') + edit['policy_units']=[unit(cls.policy,'Owned Scope')] + edit['requires']=[] + return edit + + @classmethod + def relation(cls, consumer, kind): + return {'kind':'put-policy-relationship','relationship':{ + 'source_policy':cls.policy,'consumer':consumer,'relation':kind, + 'applicability':{'operator':'always'},'source_scope':None,'consumer_scope':None, + 'evidence_owner':'review:consumer','rationale':'The selected fixture consumes this rule.'}} + + def initial_edits(self): + return [self.owner_edit(), + registration('fixture.first', self.fixture_path), + registration('fixture.second', self.second_path), + registration(self.document, self.doc_path, 'documentation'), + self.relation('fixture.first','fixture-projection'), + self.relation('fixture.second','fixture-projection'), + self.relation(self.document,'documentation-projection'), + {'kind':'revise-operational-artifact','target':self.document, + 'title':'Correct Consumer Guidance','body':'Apply the owned rule.\n'}, + {'kind':'put-provenance','record':{'id':'provenance.consumer-test','subject':self.policy, + 'origin':'current-justification','rationale':'AUTHORING_PRIVATE_8159','evidence':[]}}, + {'kind':'approve-application-content','target':self.owner}] + + def test_draft_policy_consumers_documentation_and_provenance_compile_together(self): + result=self.project([self.bound(self.initial_edits())]) + self.assertEqual(result.compiled.corpus.resolve_policy_unit(self.policy).module,self.owner) + self.assertEqual(len([s for s in result.compiled.policy_impact.semantics.values() if s.source==self.policy]),3) + self.assertEqual(result.compiled.materials[self.document].role,'documentation') + self.assertEqual(result.source.read_bytes(self.doc_path),b'# Correct Consumer Guidance\n\nApply the owned rule.\n') + self.assertEqual(result.source.read_bytes(self.fixture_path),(ROOT/self.fixture_path).read_bytes()) + self.assertEqual(result.compiled.supporting.exposure_state(self.document,result.compiled.materials[self.document].binding),'unreviewed') + self.assertNotIn(self.policy,result.compiled.repository_coverage.covered_subjects) + self.assertEqual(set(result.repository_paths)-set(self.paths), + set(dict(result.source.files))-set(dict(self.base.files))-{self.fixture_path,self.second_path,self.doc_path}) + self.assertNotIn(self.doc_path,dict(self.base.files)) + + def test_cold_and_incremental_replay_preserve_bound_source_and_candidate(self): + first=self.bound(self.initial_edits()) + previous=self.project([first]);before=dict(previous.source.files) + second=change([{'kind':'approve-application-content','target':self.document}]) + warm=self.project([first,second],predecessor=previous) + cold=self.project([first,second]) + self.assertEqual(warm.source.files,cold.source.files) + self.assertEqual(warm.captured_consumer_files,cold.captured_consumer_files) + self.assertEqual(warm.analysis_policy_ids,cold.analysis_policy_ids) + self.assertEqual(dict(previous.source.files),before) + # Published original input is retained independently of the edited file. + self.assertEqual(dict(cold.captured_consumer_files)[self.doc_path],(ROOT/self.doc_path).read_bytes()) + self.assertNotEqual(dict(cold.captured_consumer_files)[self.doc_path],cold.source.read_bytes(self.doc_path)) + + def test_failed_successor_and_duplicate_file_leave_prefix_unchanged(self): + from tools.standards_engine.standards_engine.authoring import AuthoringError + first=self.bound(self.initial_edits());previous=self.project([first]);before=dict(previous.source.files) + bad=self.bound([registration('fixture.duplicate-path',self.fixture_path)]) + with self.assertRaises(AuthoringError) as error: + self.project([first,bad],predecessor=previous) + self.assertEqual(error.exception.failure.code,'AUTHORING.CONSUMER_PATH_EXISTS') + self.assertEqual(dict(previous.source.files),before) + + def test_registers_consumers_after_policy_was_created_in_an_earlier_draft(self): + first=change([self.owner_edit()]) + previous=self.project([first]) + second=self.bound([registration('fixture.later',self.fixture_path), + self.relation('fixture.later','fixture-projection')]) + warm=self.project([first,second],predecessor=previous) + cold=self.project([first,second]) + self.assertEqual(warm.source.files,cold.source.files) + self.assertNotIn('fixture.later',previous.compiled.policy_impact.artifacts) + self.assertIn('fixture.later',warm.compiled.policy_impact.artifacts) + self.assertEqual(warm.compiled.corpus.resolve_policy_unit(self.policy), + previous.compiled.corpus.resolve_policy_unit(self.policy)) + + def test_existing_canonical_identity_and_artifact_alias_are_not_rebound(self): + from tools.standards_engine.standards_engine.authoring import AuthoringError + for identity in ['core',next(iter(self.compiled.policy_impact.artifacts))]: + with self.subTest(identity=identity),self.assertRaises(AuthoringError): + self.project([self.bound([registration(identity,self.fixture_path)])]) + + def test_candidate_view_uses_same_qualification_without_published_handles(self): + from tools.standards_engine.standards_engine.context_projection import ApplicationView, preview_application + from tools.standards_engine.standards_engine import _generated_contract as c + result=self.project([self.bound(self.initial_edits())]) + revision=c.ProposalRevisionHandle.from_value({'kind':'proposal-revision-handle', + 'id':'proposal-revision:sha256:'+'1'*64,'schema_version':1}) + snapshot=c.SnapshotHandle.from_value({'kind':'snapshot-handle','id':'snapshot:v1:00000000-0000-4000-8000-000000000001','schema_version':5}) + value=ApplicationView(result.compiled,revision).read(self.owner,'full').as_contract() + normal=ApplicationView(result.compiled,snapshot).read(self.owner,'full').as_contract() + self.assertEqual(value['content'],normal['content']) + self.assertEqual(value['requires'],normal['requires']) + self.assertEqual(value['kind'],'candidate-application-read-result') + self.assertNotIn('snapshot',value);self.assertNotIn('handle',value['policy']) + import json + self.assertNotIn('AUTHORING_PRIVATE_8159',json.dumps(value)) + self.assertNotIn('fixture.first',json.dumps(value)) + for target in [self.document,'provenance.consumer-test','fixture.first']: + call=c.PreviewApplicationCall.from_value({'revision':revision.as_contract(),'request':{'kind':'read','target':target}}) + denied=preview_application(None,result.compiled,call).as_contract() + self.assertEqual(denied['kind'],'candidate-application-rejected-result') + self.assertEqual(denied['revision'],revision.as_contract()) + + +class CandidateProjectionTests(unittest.TestCase): + @classmethod + def setUpClass(cls): + from tools.standards_engine.tests import test_purpose_projection as fixture + from tools.standards_engine.standards_engine import _generated_contract as c + fixture.PurposeProjectionTest.setUpClass() + cls.fixture=fixture + cls.state=fixture.PurposeProjectionTest + cls.revision=c.ProposalRevisionHandle.from_value({ + 'kind':'proposal-revision-handle','id':'proposal-revision:sha256:'+'2'*64,'schema_version':1}) + + @classmethod + def tearDownClass(cls): + cls.state.tearDownClass() + + def preview(self,request,compiled=None): + from tools.standards_engine.standards_engine.context_projection import preview_application + from tools.standards_engine.standards_engine import _generated_contract as c + return preview_application(self.state.engine,compiled or self.state.compiled, + c.PreviewApplicationCall.from_value({'revision':self.revision.as_contract(),'request':request})).as_contract() + + def test_route_questions_and_selected_content_share_application_semantics(self): + import json + candidate=self.preview({'kind':'route','facts':{}}) + published=self.state.facade.route({'snapshot':self.state.snapshot,'facts':{}}) + for field in ('status','reading_plan','unresolved_questions'): + self.assertEqual(candidate[field],published[field]) + self.assertEqual(candidate['kind'],'candidate-application-route-result') + self.assertNotIn(self.fixture.PRIVATE,json.dumps(candidate)) + self.assertTrue(candidate['next_operations']) + for operation in candidate['next_operations']: + self.assertEqual(operation['operation'],'preview_application') + self.assertEqual(operation['revision'],self.revision.as_contract()) + self.assertEqual(self.preview(operation['request'])['kind'],'candidate-application-read-result') + + def test_related_result_uses_revision_bound_continuations(self): + request={'kind':'related','target':'router','groups':['standards-requires'], + 'direction':'outgoing','transitive':False} + candidate=self.preview(request) + published=self.state.facade.related({'snapshot':self.state.snapshot,**{k:v for k,v in request.items() if k!='kind'}}) + self.assertEqual(candidate['relationships'],[ + {k:v for k,v in relation.items() if k!='handle'} for relation in published['relationships']]) + self.assertEqual(candidate['kind'],'candidate-application-related-result') + self.assertTrue(candidate['next_operations']) + self.assertTrue(all(op['operation']=='preview_application' for op in candidate['next_operations'])) + + def test_stale_exposure_is_rejected_without_partial_candidate_content(self): + files=dict(self.state.files) + files['CORE-STANDARDS.md']+=b'\nUNAPPROVED_NEW_MATERIAL\n' + compiled=self.fixture.compile_files(files) + for request in ({'kind':'read','target':'core'}, {'kind':'route','facts':{}}): + result=self.preview(request,compiled) + self.assertEqual(result['code'],'APPLICATION.CONTENT_UNAVAILABLE') + self.assertEqual(result['revision'],self.revision.as_contract()) + self.assertNotIn('content',result) + + +if __name__ == '__main__': + unittest.main() From 2c406a8cbe0cecad6b4d83e1f431e74bb8618f16 Mon Sep 17 00:00:00 2001 From: MrScripty Date: Thu, 24 Sep 2026 20:01:49 -0700 Subject: [PATCH 24/26] docs(engine): record proposal preview qualification --- .../execution-ledger.md | 6 ++++++ docs/plans/proposal-consumers-and-preview/issues.md | 2 +- docs/plans/proposal-consumers-and-preview/plan.md | 12 ++++++------ .../reports/verification.md | 10 +++++++++- 4 files changed, 22 insertions(+), 8 deletions(-) diff --git a/docs/plans/proposal-consumers-and-preview/execution-ledger.md b/docs/plans/proposal-consumers-and-preview/execution-ledger.md index 82aeb169..e7c10a44 100644 --- a/docs/plans/proposal-consumers-and-preview/execution-ledger.md +++ b/docs/plans/proposal-consumers-and-preview/execution-ledger.md @@ -35,3 +35,9 @@ pinned-runtime qualification or installed-user-proposal success is claimed. The code slice is implemented. The overall plan remains Verifying for the external installation/proposal handoff. Catalog hot reload and general workflow response compaction retain separate dispositions. + +## September 24, 2026 — Complete-checkout integration and supported runtime + +Applied the archive patch to the complete local implementation branch and committed candidate `3a86d078` as MrScripty. The temporary-store Engine refresh reproduced the packaged verification-input manifest and passed 73 suites and 121 structural checks. Canonical contract projection freshness passed. + +With Python 3.12.3 and the repository's locked contract dependencies, the 28 new focused tests and one cold-process MCP publication test passed. The metadata (43), policy-impact (10), contracts (52), analysis (114) and verifier (168) suites passed. The full Engine suite then passed all 311 tests against the committed candidate. This clean supported-runtime run supersedes the original package's mixed broad-run evidence for code qualification. The installed server and preserved proposal were not accessed; C7 remains pending. diff --git a/docs/plans/proposal-consumers-and-preview/issues.md b/docs/plans/proposal-consumers-and-preview/issues.md index 1e39db60..e44f82ea 100644 --- a/docs/plans/proposal-consumers-and-preview/issues.md +++ b/docs/plans/proposal-consumers-and-preview/issues.md @@ -7,4 +7,4 @@ | CP-3 | implemented; locally verified | Application projection | Candidate preview is missing; provide an authoring read with application semantics and candidate identity. | | CP-4 | separately scoped | Transport/client lifecycle | Loaded catalogs survive source updates. Document process replacement and exact interface discovery; no hot-reload protocol added here. | | CP-5 | separately scoped | Workflow output | User reports truncation of repeated large workflow results. Add focused preview requests; general workflow pagination/compaction requires its own response contract. | -| CP-6 | environment limit | Qualification | Local Python/rpds differ from pinned supported target; report actual results and preserve target qualification as a distinct claim. | +| CP-6 | resolved for local code qualification | Qualification | The original package runtime differed from the pinned target. The complete local checkout used Python 3.12.3 and locked contract dependencies; affected suites, cold-process publication and structural checks passed. Installed-user-proposal qualification remains separate. | diff --git a/docs/plans/proposal-consumers-and-preview/plan.md b/docs/plans/proposal-consumers-and-preview/plan.md index 2dc957b4..32bcbd56 100644 --- a/docs/plans/proposal-consumers-and-preview/plan.md +++ b/docs/plans/proposal-consumers-and-preview/plan.md @@ -1,9 +1,9 @@ # Proposal-Scoped Consumer Registration And Application Preview **Plan status:** `Verifying` -**Acceptance status:** local code evidence recorded; supported installation and user-proposal qualification pending -**Current phase:** Source implementation and local verification complete; installed qualification and handoff remain. -**Next slice:** Qualify interface 34 in the supported installed environment and resume the preserved proposal through the returned Engine workflow. +**Acceptance status:** supported local code evidence recorded; installed-user-proposal qualification pending +**Current phase:** Source implementation and supported local verification complete; installed qualification and handoff remain. +**Next slice:** Replace the installed Engine process, confirm interface 34, and resume the preserved proposal through the returned Engine workflow. **Canonical plan:** `docs/plans/proposal-consumers-and-preview/plan.md`; operation: `verify`. **Source baseline:** `9091bc72ac146b47d613b1836fbd8a89bd46f9ba`. **Composed-design review:** `applicable`; admission below. @@ -93,7 +93,7 @@ An additional changed file requires a concrete consumer obligation, not an unrel ### M2 — Public workflow qualification and handoff -**Status:** `Verifying`; local public workflow, package and checkpoint observations passed as recorded, while supported-environment and user-store observations remain external. Verify the exact new catalog and public workflow in disposable Git/SQLite stores: register policy and three consumers, add relationships/provenance, read authoring documentation, preview qualified candidate, review/apply, then compare published application content. Exercise cold replay without rereading source files. Run affected package suites, structural checkpoint and generated freshness; record interpreter/dependency scope precisely. +**Status:** `Verifying`; supported local public workflow, package and checkpoint observations passed as recorded, while installed-user-store observation remains external. Verify the exact new catalog and public workflow in disposable Git/SQLite stores: register policy and three consumers, add relationships/provenance, read authoring documentation, preview qualified candidate, review/apply, then compare published application content. Exercise cold replay without rereading source files. Run affected package suites, structural checkpoint and generated freshness; record interpreter/dependency scope precisely. Package complete changed files, patch, checksums and installation guidance. The user's actual reviewed draft remains a separate installed acceptance observation. No success claim about it is inferred from test fixtures. @@ -106,14 +106,14 @@ Package complete changed files, patch, checksums and installation guidance. The | C3: Registered Markdown documentation under normal or hidden directories is editable without exposing source-code writes. | integration | deterministic actual metadata/compiler | automated | passed locally | | C4: Candidate previews use application checks and exact revision identity; ordinary application clients remain excluded from drafts. | contract/system | actual local MCP process | automated | passed locally | | C5: A coordinated disposable proposal passes analysis/review/verification/application and readback. | user-workflow | complete local Git/SQLite/transport | automated | passed locally | -| C6: Generated contracts, affected tests, structural checks and package reproduction pass with environment limits recorded. | contract/release-artifact | recorded local environment | automated | passed locally | +| C6: Generated contracts, affected tests, structural checks and package reproduction pass with environment limits recorded. | contract/release-artifact | supported local Python 3.12.3 environment | automated | passed; full Engine suite 311/311 | | C7: The installed current Engine resumes the user's preserved proposal and clears the reported gap. | user-workflow | user's installation and store | manual | pending: external | ## Repair, Blockers And Replan Triggers Repair test failures inside the admitted owners without restarting planning. Replan only if a required change alters input authority, retained-state meaning, application disclosure, code-write scope or atomic publication. A test that does not reach the changed behavior supplies no evidence for that behavior. -The local interpreter is Python 3.13.5 with rpds-py 2026.5.1, outside the repository's pinned Python 3.11/3.12 and rpds-py 2026.6.3 qualification. Keep execution evidence useful but distinguish it from pinned deployment acceptance. The actual user store and independent model reviewer are unavailable here. +The original package runtime was Python 3.13.5 with rpds-py 2026.5.1, outside the repository's pinned Python 3.11/3.12 and rpds-py 2026.6.3 qualification. The local integration used Python 3.12.3 and the locked contract dependencies; see [verification](reports/verification.md). The actual user store and independent model reviewer were not accessed. ## Handoff diff --git a/docs/plans/proposal-consumers-and-preview/reports/verification.md b/docs/plans/proposal-consumers-and-preview/reports/verification.md index f31e27b0..35c53636 100644 --- a/docs/plans/proposal-consumers-and-preview/reports/verification.md +++ b/docs/plans/proposal-consumers-and-preview/reports/verification.md @@ -67,6 +67,14 @@ A frozen capture created with the actual baseline interface-33 compiler contains ## Environment and limits +### Complete-checkout qualification + +The delivered patch applied cleanly to the local implementation branch and was committed as `3a86d078`. A Python 3.12.3 environment with the repository's locked contract dependencies passed the 28 new registration/preview/MCP tests, the cold-process publication test (one test in 69.447 seconds), metadata (43), policy impact (10), contracts (52), analysis (114), and verifier (168) suites. The complete Engine suite passed all **311 tests in 501.610 seconds** against the committed candidate. Canonical contract projection freshness passed. Regenerating verification inputs through a temporary Engine store produced the packaged manifest and passed 73 suites and 121 structural checks. + +The user's actual installed server and preserved proposal were not accessed. Supported local code qualification therefore does not establish the separate installed-user-proposal claim. + +### Original package environment + Local runtime was Python **3.13.5**, outside the repository's declared Python 3.11/3.12 qualification. Installed jsonschema 4.26.0, referencing 0.37.0, attrs 26.1.0, jsonschema-specifications 2025.9.1 and typing-extensions 4.16.0 match the named lock versions. Local rpds-py is **2026.5.1** rather than locked **2026.6.3**. Test outcomes establish their local observed behavior; they do not substitute for the supported pinned-environment check. The baseline read path, metadata, graph, schema, actual compiler, full/incremental replay, real MCP, SQLite and Git publication mechanisms were exercised. The report does not claim an independent external model review, a CI run of this patch, or a successful resume/publication of the user's actual preserved proposal. @@ -83,4 +91,4 @@ Known separately scoped issues are automatic catalog replacement and large repea ## Handoff -See `APPLY.md` in the delivery package for base checks, integration, generators, exact focused tests, supported-environment qualification, MCP restart and example logical registrations. The code is ready for that qualification. The plan remains `Verifying` while external deployment/user-proposal claims are pending. +See `APPLY.md` in the delivery package for base checks, integration, generators, MCP restart and example logical registrations. The local supported-environment checks are recorded above. The plan remains `Verifying` while external deployment/user-proposal claims are pending. From 5e7c04a89505b9eb8027620c8eb82f2f376b7f12 Mon Sep 17 00:00:00 2001 From: MrScripty Date: Thu, 24 Sep 2026 23:09:50 -0700 Subject: [PATCH 25/26] fix(engine): complete admitted publication recovery --- .../execution-ledger.md | 35 ++ .../admitted-publication-recovery/issues.md | 10 + .../admitted-publication-recovery/plan.md | 99 +++++ .../verification.md | 163 ++++++++ .../generated/suite-inputs.json | 30 +- tools/repository_git/README.md | 10 + .../repository_git/repository_git/__init__.py | 3 +- tools/repository_git/repository_git/errors.py | 18 + .../repository_git/repository.py | 55 ++- tools/repository_git/tests/test_repository.py | 85 +++++ tools/standards_engine/PURPOSE-SEPARATION.md | 61 ++- tools/standards_engine/README.md | 11 + tools/standards_engine/contracts/README.md | 20 +- .../contracts/a1-contract.schema.json | 36 +- .../contracts/a1-interface.toml | 2 +- .../contracts/examples/a1-examples.json | 2 +- .../contracts/generated/agent-tools.json | 30 +- .../standards_engine/_generated_contract.py | 18 +- .../standards_engine/agent_workflow.py | 37 +- .../standards_engine/engine.py | 356 ++++++++++++------ tools/standards_engine/tests/test_analysis.py | 7 +- .../tests/test_consumer_publication.py | 50 ++- .../tests/test_publication_recovery.py | 262 +++++++++++++ 23 files changed, 1207 insertions(+), 193 deletions(-) create mode 100644 docs/plans/admitted-publication-recovery/execution-ledger.md create mode 100644 docs/plans/admitted-publication-recovery/issues.md create mode 100644 docs/plans/admitted-publication-recovery/plan.md create mode 100644 docs/plans/admitted-publication-recovery/verification.md create mode 100644 tools/standards_engine/tests/test_publication_recovery.py diff --git a/docs/plans/admitted-publication-recovery/execution-ledger.md b/docs/plans/admitted-publication-recovery/execution-ledger.md new file mode 100644 index 00000000..d9d5fedf --- /dev/null +++ b/docs/plans/admitted-publication-recovery/execution-ledger.md @@ -0,0 +1,35 @@ +# Execution Ledger + +## Baseline and admission + +The current branch was obtained as a GitHub Actions bundle at `2c406a8cbe0cecad6b4d83e1f431e74bb8618f16`; archive SHA-256 `0ed9c84aa7f00b5342aa534fd40e229d55bf913c52fa1e722688bcbcd48444d4`. Work is on an isolated local feature branch. Source confirms observation-only recovery at the unchanged target and loss of Git's diagnostic at Engine publication. No live proposal, readiness or host permissions were inspected or changed. The plan defines explicit completion and exact-candidate preservation before implementation. + + +## 2026-09-24 — Implementation and local qualification + +Implemented interface-35 explicit recovery completion, shared exact candidate +construction/publication, current authorization and review checks, and bounded +Git command observations. Readiness, proposal, application and store formats +remain unchanged. The default recovery operation remains observational. + +Focused recovery tests passed 14 cases. Repository Git passed 32 tests with one +root-only permission skip, and that case passed separately under an unprivileged +UID. The actual cold-MCP path passed failed apply, observation, same-application +completion, retry reconciliation and application readback with a real coverage +receipt and complete verifier. A distinct interface-34 admission was completed +by interface 35 without moving its expected main or replacing readiness/store. +An explicit changed-evidence transition remained blocked, preserving its target +and application. The final affected Engine subset passed 55 tests. + +Metadata (43), policy impact (10), contracts (52, one existing interpreter skip), +analysis (114) and verifier (168) runs succeeded. Generated freshness and the +complete structural checkpoint were run separately. The report records initial +collection/version/fixture failures and their actual corrected evidence rather +than counting them as successful tests. + +Local tests used Python 3.13.5 / rpds-py 2026.5.1, not the supported locked target. +No user store, real proposal or accepted branch was touched. Source acceptance +is not publication acceptance on the user's restricted host. R6 and the overall +plan remain verifying until the operator-qualified installation and live result +are established. Final packaging evidence is retained in verification.md and the +ZIP's checks directory. diff --git a/docs/plans/admitted-publication-recovery/issues.md b/docs/plans/admitted-publication-recovery/issues.md new file mode 100644 index 00000000..807b19e1 --- /dev/null +++ b/docs/plans/admitted-publication-recovery/issues.md @@ -0,0 +1,10 @@ +# Issues + +| ID | Severity | Owner | Finding | Disposition | +| --- | --- | --- | --- | --- | +| APR-1 | high | Engine publication | An admitted application at its unchanged target has no completion action. | Implemented; focused and cold-MCP exact-identity recovery passed. | +| APR-2 | medium | Git / Engine diagnostics | Git stderr exists internally but is omitted from the publication result; update-ref failure also discards it. | Implemented; real lock/permission tests and fixed-phrase disclosure tests passed. | +| APR-3 | high | Deployment operator | Reported read-only .git restriction is plausible but not confirmed here. | Operator supplies authorized writable host; no restriction bypass or manual ref repair. | +| APR-4 | medium | MCP lifecycle | Existing session catalogs remain stale after code replacement. | Document process restart/reconnect; automatic hot reload remains separately scoped. | +| APR-5 | medium | Workflow delivery | Repeated large responses and serial decisions are costly. | Preserve existing decision/evidence semantics; batching and result pagination require a separate measured change. | +| APR-6 | high when applicable | Review evidence owner | An installation can alter a file cited as live review evidence. | Cross-edition drift correctly blocks completion; preserve unchanged evidence or obtain its supported review disposition. Never bypass the digest check. | diff --git a/docs/plans/admitted-publication-recovery/plan.md b/docs/plans/admitted-publication-recovery/plan.md new file mode 100644 index 00000000..9a46b8a4 --- /dev/null +++ b/docs/plans/admitted-publication-recovery/plan.md @@ -0,0 +1,99 @@ +# Admitted Publication Recovery + +**Plan status:** `Verifying` +**Acceptance status:** `pending` +**Current phase:** Source implementation and local qualification complete; supported operator-host qualification remains pending. +**Next slice:** Install current code and schemas without advancing the admitted target; verify the supported locked host, then use the original readiness to observe and explicitly complete the preserved application. +**Canonical plan:** `docs/plans/admitted-publication-recovery/plan.md`; operation: `verify` the installed handoff. +**Source baseline:** `MrScripty/Coding-Standards@2c406a8cbe0cecad6b4d83e1f431e74bb8618f16`. +**Composed-design review:** `applicable`; recorded below. +**Execution ledger:** [execution-ledger.md](execution-ledger.md). +**Issues:** [issues.md](issues.md). +**Report:** [verification.md](verification.md). + +## Objective And Scope + +An authorized author can finish an already-admitted application after its Git publication failed while the canonical target remains at the admitted expected revision. Preserve the readiness, proposal revision, selected application, exact candidate, review evidence, and existing store. Give the author bounded diagnostic observations sufficient to distinguish permission, read-only filesystem, lock, and other Git failures without returning arbitrary stderr content. + +This code repair leaves standards, actual policy declarations, application exposure, and the user's proposal database unchanged. It does not publish the user's draft or alter the host sandbox. The reported readiness is external; only disposable repositories and stores are used here. + +## Authority And Routed Standards + +Apply Core and Router with Implementation, Planning, Verification, Development Proportionality, Documentation, and Commit; Library, Persistence, IPC and Generated Contract profiles; Contracts, Resilience, Diagnostics, Security, Architecture/replay and verification-oracle guidance. The prospective positive-guidance guide supplies the agreed generic, affirmative, proportional code/content separation. Examples and incident-specific identities stay in tests or maintenance records. + +Preserve generic Git operations in Repository Git, immutable intent and outcome records in Authoring, integration and authorization in Engine, workflow projection in Agent Workflow, and wire shape in the canonical contract. Use existing established mechanisms and one complete behavior slice. No compatibility branch, database migration, retry daemon, new receipt store or graph change is required. + +## Binding Decisions + +### Explicit recovery action + +Add `action: observe | complete-publication` to focused `recover` and native `recover_application`. Omission selects `observe` because safe read/receipt reconciliation remains a useful operation in its own right. The host's authoring purpose and current capability checks remain authoritative. + +`observe` retains existing behavior: a selected durable applied outcome is returned; observing the exact admitted candidate can persist the applied outcome; observing the expected base or a third revision leaves recovery required. Observation issues no Git writes. + +`complete-publication` may write only after observing the expected base. It requires current recovery and application authorization, current proposal/readiness consistency, reconstruction from the original frozen proposal and reviewed evidence, equality of reconstructed commit identity with the admitted candidate, fresh complete verification, active-candidate validation, and renewed admission/authorization checks at the publication boundary. Publication uses the existing expected-old Git compare-and-swap. A third revision stays untouched; an already-visible candidate is reconciled rather than republished. + +An unchanged target is not evidence that publication never happened. Explicit completion authorizes re-establishing the same candidate at that exact expected target, including an unknown prior history. This contract does not promise historical exactly-once side effects or infer intent from elapsed time. Each request makes at most one publication attempt. + +### Shared construction and publication + +Extract the existing pure candidate-file preparation and complete-verification handling sufficiently to reuse them for apply and completion. Reconstruct deterministically even when the failed fetch imported no candidate object. Retain existing coverage receipt generation and current evidence validation. Compare the resulting candidate with the persisted admitted OID; changed reconstruction is a blocked recovery, not a new application or an implicit substitution. + +Keep one selected application. Finish its outcome through existing Authoring storage. If outcome persistence fails after Git succeeds, the next observe reconciles the same candidate. If another completion wins the compare-and-swap, observation of the same candidate can finish the same outcome. Competing different revisions remain protected. + +### Diagnostics + +Repository Git owns command identity, exit status and an allowlisted observation derived from stderr. Retain full command error data only inside the existing private exception boundary. Engine authoring outputs include bounded operation/code/exit-status/reason and recognized fixed stderr phrases, not arbitrary filenames, URLs, credentials or hook output. Unknown text is explicitly unclassified. A recognized phrase is evidence of Git's error, not proof of the broader host configuration. + +Application-purpose interfaces continue to reject publication and recovery before accessing authoring data. The error from an old process cannot be reconstructed retrospectively; a fresh failure supplies new diagnostics. No automatic permission probe, escalation or host modification is part of this fix. + +### Compatibility And Operator Cutover + +Bump only the public interface edition to 35 and regenerate its models/tool catalog. Existing snapshots, readiness, applications, store formats and semantic identities retain their formats. Replace actual current code consumers coherently; no old-code fallback is added. + +The installed implementation can be updated independently from its accepted content branch. Keep the real target at the admitted expected revision; advancing it merely to install this repair would create a legitimate divergence. Use a Git-writable, operator-authorized host for the same repository/store. Restart the server and reconnect; interface discovery does not upgrade a running process. Preserve the exact readiness handle and use supported workflow status/recover operations. No manual ref update or database repair is authorized by this plan. + +## Exact Write Set + +- `tools/repository_git/repository_git/{__init__,errors,repository}.py`: structured bounded command observations and preservation across expected-target failures. +- `tools/repository_git/tests/test_repository.py`: real lock failure, diagnostics, unchanged target and later success. +- `tools/standards_engine/standards_engine/{engine,agent_workflow}.py`: shared candidate/verification/publication behavior and explicit recovery completion. +- `tools/standards_engine/contracts/{a1-contract.schema.json,a1-interface.toml,examples/a1-examples.json}` and their owning generated outputs: action and bounded diagnostic results; interface 35. +- A new `tools/standards_engine/tests/test_publication_recovery.py` and directly affected existing workflow/transport/version assertions. +- `tools/repository_git/README.md`, `tools/standards_engine/{README.md,PURPOSE-SEPARATION.md,contracts/README.md}`: current technical behavior and operator handoff. Real standards and the pending authoring skill content stay unchanged. +- The generated suite-input manifest via its owning generator, this plan directory, and package integration instructions outside the repository. + +## Milestone R1 — Complete Admitted Recovery + +**Status:** `Verifying`. +**Goal:** A failed publication is completed through public recovery without re-admission or substitution. +**Write set:** The exact owners listed above. +**Gate:** Focused failure/authorization tests, Repository Git tests, real compiler and durable-store recovery, generated freshness, and real MCP failure/observe/completion/readback pass. Baseline and unavailable-environment evidence are reported separately. + +## Acceptance Claims + +| ID | Claim | Evidence kind | Environment | Mode | Status | +| --- | --- | --- | --- | --- | --- | +| R1 | Observation preserves unresolved admission and performs no Git write; explicit completion uses the same candidate/application. | integration | representative local Git/SQLite | automated | passed | +| R2 | Divergence, stale readiness, missing authority, candidate mismatch, failed verification and failed writes retain the intent without replacing content or issuing false success. | focused + integration | deterministic fault cases with real owners | automated | passed | +| R3 | Publication uses expected-target CAS, preserves diagnostic meaning, bounds disclosure, and reconciles lost success or outcome persistence. | integration | real Git plus targeted failure injection | automated | passed | +| R4 | Actual MCP schema, focused workflow, process replacement and application readback agree with native behavior. | system | real local processes/Git/SQLite | automated | passed | +| R5 | Existing affected suites, generated artifacts and complete structural checkpoint remain coherent; normative/source data outside scope are preserved. | contract + review | complete checkout | automated | passed | +| R6 | The operator's supported locked environment and preserved live application can use the installed repaired server. | user-workflow | required-real operator host | either | pending | + +Source delivery can finish with R6 explicitly pending. It cannot claim the user's publication succeeded. Available Python/dependency versions are recorded before testing. Failures that prevent a test reaching the affected behavior provide no evidence for that claim; repair or report them rather than compare failure counts. + +## Composed-Design Admission + +1. **Independent concerns:** Git owns bounded commands and CAS; Authoring owns immutable admission/outcome; Engine owns current permission and integration; workflow owns continuation; schema owns representation. +2. **State, identity, value, time, policy and mechanism:** Readiness and application identities remain durable; current target is a live observation; historical authority is not current permission; time cannot prove completion. +3. **Caller and composition knowledge:** Callers retain a readiness and choose an explicit action. They supply no candidate bytes, Git paths, expected target overrides or replacement application. +4. **Representative change paths:** A diagnostic update changes its producer and typed projection; candidate construction is shared by first application and recovery; store and graph semantics stay independent. +5. **Stable interfaces and hidden knowledge:** The existing Git adapter still validates issued active candidates. Engine performs all orchestration through declared owners; generated contracts remain derived. +6. **Independent evolution and failure:** A failed write leaves the selected application; a failed outcome receipt is reconciled by observation; denied authorization preserves intent without granting writes. +7. **Deletion results:** Removing explicit completion leaves the current dead end; omitting exact candidate comparison permits substituted publication; omitting fresh permission permits stale authority. A new database, retry worker, per-attempt durable journal or broad diagnostic platform contributes no necessary value here. +8. **Necessary complexity:** One explicit action plus reuse of existing construction and CAS supplies the deciding capability. No repository-specific rule, fixed test-count target or unrelated process redesign drives it. + +## Blockers And Replan Triggers + +The user's Git-writable host and actual store are unavailable here. The downloaded source is complete; local Python may differ from supported 3.11/3.12. Replan only if exact candidate replay cannot reconstruct the admitted identity, existing records cannot preserve required authority, or the selected completion promise needs additional persistent state. Keep catalog hot reload and 84-decision response overhead as separate findings. diff --git a/docs/plans/admitted-publication-recovery/verification.md b/docs/plans/admitted-publication-recovery/verification.md new file mode 100644 index 00000000..f854ff46 --- /dev/null +++ b/docs/plans/admitted-publication-recovery/verification.md @@ -0,0 +1,163 @@ +# Admitted-publication recovery: implementation and verification + +**Source implementation:** complete. **Plan acceptance:** `Verifying`; the actual +operator host and preserved live application remain external. This report records +local source, Git, compiler, store and MCP evidence, not publication of the user's +standards or an independent external review. + +## Baseline and unchanged authority + +The complete source was recovered from the successful GitHub Actions artifact +for `MrScripty/Coding-Standards@2c406a8cbe0cecad6b4d83e1f431e74bb8618f16`. +Artifact SHA-256: +`0ed9c84aa7f00b5342aa534fd40e229d55bf913c52fa1e722688bcbcd48444d4`. +Its Git bundle reproduced the exact repository history. Development and all +publication/recovery experiments used owned local clones and temporary stores. + +No external readiness, proposal, ref or database was accessed. The supplied +readiness ID is retained only as operator handoff information. The patch changes +runtime code, generated contracts, tests, technical documentation and its plan; +canonical standards, real registrations, reasoning/exposure declarations and +pending authoring skill content remain untouched. Package preservation checks +compare these paths against the exact source baseline. + +## Implemented behavior + +Interface 35 adds optional `action: observe | complete-publication` to focused +`recover` and native `recover_application`. Observation remains the default and +issues no Git writes. It may record a missing applied outcome when the exact +candidate is visible. + +Explicit completion reuses the selected admitted application. It checks current +recovery and application authority, current proposal/readiness consistency and +review evidence, reconstructs through the same candidate/coverage-receipt owner +as ordinary apply, requires exact equality with the admitted commit, runs the +complete verifier, rechecks selection/head/permissions, validates the active +candidate, and performs one existing expected-old Git compare-and-swap. Failed +requirements preserve the selected application. A third target is not replaced. + +An already-visible candidate or existing applied outcome is reconciled without +republishing. Failed outcome persistence after Git success remains recoverable. +A concurrent completion that establishes the same candidate is reconciled. A +candidate absent from the original repository after a failed import can be +reconstructed; recovery does not depend on leftover temporary clone files. + +An unchanged target does not establish that publication never occurred. The new +action is an explicit authorization to re-establish the same candidate at the +expected base, not a historical exactly-once claim. No application selection, +readiness, proposal, analysis, snapshot or store format changed. No migration, +reset, permission override, lock removal, automatic retry or alternate old-code +implementation was introduced. + +Repository Git now retains bounded command observations alongside its private +exception. Authoring diagnostics return command, exit status and a fixed matched +stderr phrase/classification. Arbitrary stderr, paths, URLs, credentials and +hook output do not enter the MCP result. Unrecognized messages stay unclassified. +Earlier stderr that was already discarded is not recreated. + +## Environment + +- Python 3.13.5; Linux x86-64; Git 2.47.3. +- jsonschema 4.26.0, referencing 0.37.0, attrs 26.1.0, + jsonschema-specifications 2025.9.1, rpds-py 2026.5.1. +- The repository supports Python 3.11/3.12 and locks rpds-py 2026.6.3. +- Normal test execution was UID 0. The actual permission-denial test was also + executed separately as unprivileged `nobody` against its own temporary repo. +- The optional MCP Python SDK was not installed. The system test used real + JSON-RPC over stdin/stdout with a fresh actual MCP process for every call, + checking text/structured result agreement and installed interface discovery. + +These observations are complete for the named local environment. They do not +claim the supported locked deployment, the user's actual client, or the user's +likely sandbox error has been reproduced exactly. + +## Evidence + +| Check | Actual observation | +| --- | --- | +| Original Repository Git suite | 28 passed. | +| New regression before implementation | Explicit completion was unsupported in both generated request shapes; the real lock-failed application remained uncertain. Two test methods reproduced the missing contract and capability. | +| Focused recovery contract/lifecycle suite | 14 passed. Real Git/SQLite/proposal/candidate owners; the complete verifier is substituted for focused fault selection, so these are not standalone system acceptance. | +| Repository Git final suite | 32 run successfully; one root-only permission skip, separately executed and passed under an unprivileged UID. | +| Actual permission-denial case | 1 passed; a test-owned read-only ref directory rejected publication, retained main, reported permission denial, and allowed the same candidate after the test owner restored its own permissions. | +| Real cold-MCP recovery/publication | 1 passed, 103.340 seconds. Includes actual coverage attestation/receipt, full verification, failed lock write, observation, same-application completion, retry reconciliation and application readback. | +| Interface 34 admission → interface 35 completion | 1 passed, 106.006 seconds. Original main/readiness/application retained; current code/schema installed separately from accepted content; unchanged evidence revalidated; original candidate published through recovery. | +| Changed-evidence cross-edition case | 1 passed, 67.775 seconds; changed evidence blocks, the original application and target remain unchanged. | +| Existing affected Engine integration/workflow/generated/MCP tests | 55 passed, 216.403 seconds, with a fixed test baseline. | +| Metadata | 43 passed. | +| Policy impact | 10 passed. | +| Contracts | 52 run successfully, with one existing interpreter-dependent skip. | +| Analysis domain | 114 passed. | +| Verifier package | 168 passed. Intentional stale-manifest fixture messages appear in its output; the suite result is successful. | +| Complete structural checkpoint | 73 suites / 121 checks passed; final packaging rerun recorded in the ZIP. | +| Generated API projection | Fresh after owner-generated regeneration. | +| Syntax, scoped diff, preservation, patch round trip and ZIP integrity | Passed; final package records and exact hashes are supplied with the ZIP. | + +The full Engine package was not rerun indiscriminately. The selected affected +Engine tests, new lifecycle cases and real MCP/edition-transition workflows +establish the named scope. The structural checkpoint does not replace these +functional observations or certify prose quality. + +## Material corrections found during implementation + +The first generated result attempted nested diagnostic objects where the owning +contract permits scalar detail fields; it was corrected to bounded scalar keys. +The workflow continuation contract also needed the new `action` input. Repeated +focused recovery initially rejected an already-applied readiness; it now returns +the existing applied outcome while repeat ordinary apply remains unavailable. + +An initial system-test placement after the module's main guard prevented +collection. The method was moved into the test class, and the actual cold-MCP +workflow then executed and passed. An early structural run found the examples +file still declaring interface 34; its source declaration was corrected and +all generated inputs refreshed. + +One initial 55-test affected-Engine run failed because this task advanced its +own temporary testing `main` while the class retained a snapshot of the previous +revision. The resulting target-stale rejection was correct. Final qualification +kept the baseline stable and reran the affected cases, rather than changing the +production readiness guard or counting the earlier run as green. + +The first cross-edition probe used Engine README as all review evidence, then +changed that file during installation. Recovery correctly returned +`ANALYSIS.EVIDENCE_DIGEST_MISMATCH`, preserving the application and target. A +stable-evidence qualification succeeded; a separate explicit drift-rejection +probe tests the negative case. The repair preserves current evidence validation +instead of treating old acceptance as permission to ignore changed evidence. + +## Review and operating limits + +Source and generated differences were reviewed locally for ownership, data +preservation, action admission, failure semantics, disclosure and scope. No +independent external review was performed in this task; no such review is +claimed. The eight-part design admission remains in the plan. + +The facade loads schemas from its configured repository root. Code and schema +installation must remain coherent while the real accepted ref stays at the +admitted expected target. A separate Python module path alone does not select +new schemas. A new process on a read-only host remains read-only. + +The repair supplies a supported completion operation; it does not grant access +to a protected `.git` directory. An authorized writable host, unchanged/current +review evidence and the original stored application remain required. Confirm +the installed edition and permissions through the supported operations before +attempting the user's recovery. The action makes at most one publication attempt +per explicit request, and does not push a remote branch. + +Catalog hot replacement, decision batching and general output pagination remain +separate product findings. Their omission does not prevent using the new +recovery action for the already-resolved application. + +## Source basis + +The baseline implementation is identified above. Relevant owners are +`tools/repository_git`, `standards_engine/engine.py`, `agent_workflow.py`, and the +canonical Engine contract. Git's expected-old update and reflog failure behavior +are documented in the official manual: +https://git-scm.com/docs/git-update-ref/2.46.0 . The implementation continues to +use that existing adapter rather than constructing a separate transaction +protocol. + +See package `APPLY.md`, `manifest.json`, `checks/` and `qualification/` for the +integrator procedure, exact changed files, logs and the retained cross-edition +probe. Source implementation and user-host acceptance are separate claims. diff --git a/evaluation/standards-effectiveness/generated/suite-inputs.json b/evaluation/standards-effectiveness/generated/suite-inputs.json index 15d3d422..cf6e0e0c 100644 --- a/evaluation/standards-effectiveness/generated/suite-inputs.json +++ b/evaluation/standards-effectiveness/generated/suite-inputs.json @@ -6355,7 +6355,7 @@ ] }, { - "digest": "sha256:cb435df2b2c852168aa9750165e062bb9d48f27318e9af8628fbca23df1a25ac", + "digest": "sha256:18e319b80913da723351b6135aa0e24da3df461803fd8d40a530eef343e40c11", "path": "tools/repository_git/repository_git/__init__.py", "state": "present", "uses": [ @@ -6384,7 +6384,7 @@ ] }, { - "digest": "sha256:ea71c0789c6406d87f2a0ed126a3390701ed9939d40bd8226208953566f2c5a0", + "digest": "sha256:690edf0e048ef3c63ee422aca2fdf1381cda6029e593adf5b96477b4d83e62fa", "path": "tools/repository_git/repository_git/errors.py", "state": "present", "uses": [ @@ -6418,7 +6418,7 @@ ] }, { - "digest": "sha256:66ef50088989f4c896287ef7f15920d1f68aa3e82e02af16b3e9cb29c88a3ecb", + "digest": "sha256:7581d06ea4d98c8d687a446c7f6357bd26ee1f5778317331d08b0d7caceac360", "path": "tools/repository_git/repository_git/repository.py", "state": "present", "uses": [ @@ -6435,7 +6435,7 @@ ] }, { - "digest": "sha256:a383ddf24493c9467ee6aaabddc986d7dde271c320a24c2f39b90347dd77f17f", + "digest": "sha256:d93709cd96174542afefa646c8aa80cb01476eaec3c3a2e489f250f361a9bbcf", "path": "tools/repository_git/tests/test_repository.py", "state": "present", "uses": [ @@ -6881,7 +6881,7 @@ ] }, { - "digest": "sha256:d353a60df761481e751378095e49115bbff1dbcb77b1c1c010ade03e1ceb9766", + "digest": "sha256:25548101ec94fdce3cd092ac986c9c33d4c3476d713ed1a4afdbbca9e6711c66", "path": "tools/standards_engine/README.md", "state": "present", "uses": [ @@ -6893,7 +6893,7 @@ ] }, { - "digest": "sha256:c4e8b174d6a79acecd6b6cf2d3de2fae58debc65484b6344ebb27c8b0f543f2d", + "digest": "sha256:9b99ff22d8379e3aa79f99ea7f955aa829918a4b152d87c6bca2c5828a2a7af5", "path": "tools/standards_engine/contracts/README.md", "state": "present", "uses": [ @@ -6905,7 +6905,7 @@ ] }, { - "digest": "sha256:809673a2c45bdef3aac60a8e081e58097d40b23269bd6de2cdc0cc49e28cba10", + "digest": "sha256:e43691cacb94499f598439f22479f18bb329f6cef9157a16af9a0ff7ec02c19c", "path": "tools/standards_engine/contracts/a1-contract.schema.json", "state": "present", "uses": [ @@ -6922,7 +6922,7 @@ ] }, { - "digest": "sha256:81f4aee998927ffaa5e2459e31151f1b24aa44f8d2aefcaaa4e31ad1df427325", + "digest": "sha256:158d2f1d76e723b6201b1a83fb6cbf0e31bfbaac434da14e0c469b337444705f", "path": "tools/standards_engine/contracts/a1-interface.toml", "state": "present", "uses": [ @@ -6939,7 +6939,7 @@ ] }, { - "digest": "sha256:bb416515ace1980388cef5190b4c30426a34343c1429501f0475aef69c8fb759", + "digest": "sha256:d6a91a37a73ca0a9436ea15dd991cae23954c078cfe8d00e4977dcc44eae4a0a", "path": "tools/standards_engine/contracts/examples/a1-examples.json", "state": "present", "uses": [ @@ -6956,7 +6956,7 @@ ] }, { - "digest": "sha256:a682ae63d52d18d8241cdc0eebe9caf15a5ce1bd545e185fc042041482453d2f", + "digest": "sha256:fdfb1befb3bbac2edcbad52c1424ec4b8a02ade55376c19d5721c44838329ae5", "path": "tools/standards_engine/contracts/generated/agent-tools.json", "state": "present", "uses": [ @@ -7019,7 +7019,7 @@ ] }, { - "digest": "sha256:86b36bfa48703150efcd654cef980a1e0ec807c3252981237463474b7cd940fc", + "digest": "sha256:d948153b15e811845254a86edfdf1aae955663e5e53939b32154ef48e1af0e0f", "path": "tools/standards_engine/standards_engine/_generated_contract.py", "state": "present", "uses": [ @@ -7053,7 +7053,7 @@ ] }, { - "digest": "sha256:c133d520bc82c951e6f9be3ee6e6b7ca2ecdc7cde4c38b8c4ee1a42533a494d9", + "digest": "sha256:db34f9d2a3f38a02dac7d55c725ef68fe7190cc03ce1ae28f158b297bd19a252", "path": "tools/standards_engine/standards_engine/agent_workflow.py", "state": "present", "uses": [ @@ -7113,7 +7113,7 @@ ] }, { - "digest": "sha256:109f1155deb9965da288feb69c18e092a0c7aea7503cb7918420208b56221b29", + "digest": "sha256:2f59850a14c2794b3d71144732d55a6b614a8f1f90268395c963f877ec6d45d1", "path": "tools/standards_engine/standards_engine/engine.py", "state": "present", "uses": [ @@ -7265,7 +7265,7 @@ ] }, { - "digest": "sha256:577633b5b7bb05765e0c71ac9a548e74ab60c2d243289ff1740902344c6b2db3", + "digest": "sha256:cfaf3c2f9219e0c6fa896a00b9a1ef44bea4c0325f73693363858082b255e298", "path": "tools/standards_engine/tests/test_analysis.py", "state": "present", "uses": [ @@ -13338,7 +13338,7 @@ "path": "evaluation/standards-effectiveness/suite-registry.toml" }, "repository_index": { - "digest": "sha256:dfdae593a993829e46f621e2ad87d8f58ea8b22a7392a6d9f361ef791ad0e180", + "digest": "sha256:6a6b7d30e18880f355dab60a3f8a4775b8aa1a0090c151446c982817392a71ce", "uses": [ { "check": "python-package-contract", diff --git a/tools/repository_git/README.md b/tools/repository_git/README.md index 5d757590..4b3162ad 100644 --- a/tools/repository_git/README.md +++ b/tools/repository_git/README.md @@ -73,3 +73,13 @@ The write-capable re-evaluation is recorded in the [A2 decision](../../docs/decisions/standards-engine-a2.md#repository-git-dependency-re-evaluation). Re-evaluate again before materially extending the selected local publication contract. + + +Command failures retain their raw bounded stderr in the private exception and +provide a `GitCommandObservation` for disclosure-safe callers. This observation +contains a fixed operation identity, exit code and recognized fixed phrase; an +unrecognized stderr is explicitly unclassified. It does not infer host permissions +or implement retry policy. Expected-target publication retains this observation +when update-ref fails and the branch remains unchanged. Callers own explicit +recovery intent and durable application identity; the adapter continues to accept +only active candidates issued by its own materialization scope. diff --git a/tools/repository_git/repository_git/__init__.py b/tools/repository_git/repository_git/__init__.py index 10542788..932692bb 100644 --- a/tools/repository_git/repository_git/__init__.py +++ b/tools/repository_git/repository_git/__init__.py @@ -1,4 +1,4 @@ -from .errors import FailureKind, GitRepositoryError, GitRepositoryFailure +from .errors import FailureKind, GitCommandObservation, GitRepositoryError, GitRepositoryFailure from .model import ( CandidateCommitMessage, CandidateFile, @@ -31,6 +31,7 @@ "CapturedFile", "FailureKind", "GitCommandResult", + "GitCommandObservation", "GitRepository", "RevisionReadSession", "GitRepositoryError", diff --git a/tools/repository_git/repository_git/errors.py b/tools/repository_git/repository_git/errors.py index c6fdc4d7..170af24a 100644 --- a/tools/repository_git/repository_git/errors.py +++ b/tools/repository_git/repository_git/errors.py @@ -6,11 +6,28 @@ FailureKind = Literal["invalid", "unavailable", "unsupported"] +@dataclass(frozen=True, slots=True) +class GitCommandObservation: + operation: str + exit_code: int + reason: str + stderr_excerpt: str + + def as_contract(self) -> dict[str, object]: + return { + "operation": self.operation, + "exit_code": self.exit_code, + "reason": self.reason, + "stderr_excerpt": self.stderr_excerpt, + } + + @dataclass(frozen=True, slots=True) class GitRepositoryFailure: kind: FailureKind code: str message: str + command: GitCommandObservation | None = None class GitRepositoryError(RuntimeError): @@ -33,6 +50,7 @@ def unsupported(code: str, message: str) -> GitRepositoryError: __all__ = ( "FailureKind", + "GitCommandObservation", "GitRepositoryError", "GitRepositoryFailure", ) diff --git a/tools/repository_git/repository_git/repository.py b/tools/repository_git/repository_git/repository.py index 7a3fc2ec..27b7c4c5 100644 --- a/tools/repository_git/repository_git/repository.py +++ b/tools/repository_git/repository_git/repository.py @@ -16,7 +16,10 @@ from pathlib import Path from typing import Iterable, Iterator, Literal, Sequence -from .errors import GitRepositoryError, invalid, unavailable, unsupported +from .errors import ( + GitCommandObservation, GitRepositoryError, GitRepositoryFailure, + invalid, unavailable, unsupported, +) from .batch import VerifiedBatchReader, object_size, verified_body from .model import ( CandidateCommitMessage, @@ -106,14 +109,38 @@ def git_output( max_output_bytes=max_output_bytes, ) if result.returncode != 0: - detail = result.stderr.decode("utf-8", "replace").strip() - raise unavailable( - "REPOSITORY_GIT.COMMAND_UNAVAILABLE", - f"Git exited with {result.returncode}: {detail}", - ) + raise _failed_command(arguments, result) return result.stdout +def _failed_command(arguments: Sequence[str], result: GitCommandResult) -> GitRepositoryError: + """Retain raw output privately and project only fixed observed phrases.""" + stderr = result.stderr.decode("utf-8", "replace").strip() + operation = arguments[0] if arguments and arguments[0] in { + "fetch", "update-ref", "rev-parse", "clone", "commit-tree", "hash-object", + "read-tree", "write-tree", "update-index", "checkout", "cat-file", + } else "git-command" + reason, excerpt = "unclassified", "" + # These are diagnostic observations, not permission decisions. Their fixed + # excerpts reveal neither paths nor arbitrary hook/configuration output. + for phrase, classification in ( + ("Permission denied", "permission-denied"), + ("insufficient permission", "permission-denied"), + ("Read-only file system", "read-only-filesystem"), + ("Operation not permitted", "operation-not-permitted"), + ("File exists", "path-exists"), + ("unable to auto-detect email address", "identity-unavailable"), + ): + if phrase in stderr: + reason, excerpt = classification, phrase + break + return GitRepositoryError(GitRepositoryFailure( + "unavailable", "REPOSITORY_GIT.COMMAND_UNAVAILABLE", + f"Git exited with {result.returncode}: {stderr}", + GitCommandObservation(operation, result.returncode, reason, excerpt), + )) + + def indexed_paths(root: Path) -> tuple[str, ...]: return tuple( sorted( @@ -493,6 +520,9 @@ def publish_candidate( branch, expected, candidate.revision, + rejected_command=_failed_command( + ("update-ref", target, candidate.revision.oid, expected.oid), updated + ), ) def validate_candidate(self, candidate: MaterializedCandidate) -> None: @@ -515,6 +545,7 @@ def _resolve_uncertain_publication( candidate: RepositoryRevision, *, prior_error: GitRepositoryError | None = None, + rejected_command: GitRepositoryError | None = None, ) -> Literal["updated", "stale"]: try: observed = self.branch_revision(branch) @@ -532,10 +563,12 @@ def _resolve_uncertain_publication( ) from prior_error if observed != expected: return "stale" - raise unavailable( - "REPOSITORY_GIT.PUBLICATION_UNAVAILABLE", + failure = GitRepositoryFailure( + "unavailable", "REPOSITORY_GIT.PUBLICATION_UNAVAILABLE", "Git rejected the expected-target update while the target remained unchanged", + None if rejected_command is None else rejected_command.failure.command, ) + raise GitRepositoryError(failure) from rejected_command def _copy_verification_refs(self, candidate_root: Path) -> None: output = git_output( @@ -1050,11 +1083,7 @@ def _git_output_with_environment( environment=environment, ) if result.returncode != 0: - detail = result.stderr.decode("utf-8", "replace").strip() - raise unavailable( - "REPOSITORY_GIT.COMMAND_UNAVAILABLE", - f"Git exited with {result.returncode}: {detail}", - ) + raise _failed_command(arguments, result) return result.stdout diff --git a/tools/repository_git/tests/test_repository.py b/tools/repository_git/tests/test_repository.py index 0680dc56..f4ff0636 100644 --- a/tools/repository_git/tests/test_repository.py +++ b/tools/repository_git/tests/test_repository.py @@ -594,6 +594,91 @@ def interrupt_after_update( ) self.assertEqual(repository.branch_revision("main"), competing) + def test_rejected_update_preserves_command_observation_and_can_complete(self) -> None: + with tempfile.TemporaryDirectory(dir="/tmp") as temporary: + root = Path(temporary) + self._initialize(root) + (root / "value.txt").write_bytes(b"accepted\n") + self._commit(root, "initial") + self._git(root, "branch", "-M", "main") + repository = GitRepository(root) + expected = repository.branch_revision("main") + file = CandidateFile(RepositoryPath.parse("value.txt"), b"proposed\n", False) + with repository.materialize_candidate(expected, (file,), commit=_COMMIT) as candidate: + lock = root / ".git/refs/heads/main.lock" + lock.write_bytes(b"test-owned lock\n") + with self.assertRaises(GitRepositoryError) as failure: + repository.publish_candidate(candidate, expected) + self.assertEqual(repository.branch_revision("main"), expected) + observation = failure.exception.failure.command.as_contract() + self.assertEqual(observation, { + "operation": "update-ref", "exit_code": 128, + "reason": "path-exists", "stderr_excerpt": "File exists", + }) + self.assertNotIn(str(root), str(observation)) + lock.unlink() + self.assertEqual(repository.publish_candidate(candidate, expected), "updated") + self.assertEqual(repository.branch_revision("main"), candidate.revision) + + def test_command_diagnostics_retain_only_fixed_observed_phrases(self) -> None: + from tools.repository_git.repository_git import GitCommandResult + cases = ( + (b"Permission denied", "permission-denied", "Permission denied"), + (b"insufficient permission", "permission-denied", "insufficient permission"), + (b"Read-only file system", "read-only-filesystem", "Read-only file system"), + (b"Operation not permitted", "operation-not-permitted", "Operation not permitted"), + (b"File exists", "path-exists", "File exists"), + (b"unable to auto-detect email address", "identity-unavailable", "unable to auto-detect email address"), + (b"unknown hook output", "unclassified", ""), + ) + for body, reason, excerpt in cases: + with self.subTest(reason=reason): + raw = b"PRIVATE_CREDENTIAL_3861 /private/path https://secret.invalid/ " + body + with (mock.patch.object(repository_module, "git_command", return_value=GitCommandResult(128, b"", raw)), + self.assertRaises(GitRepositoryError) as failure): + git_output(Path("/tmp"), ("fetch", "local")) + observation = failure.exception.failure.command.as_contract() + self.assertEqual(observation["operation"], "fetch") + self.assertEqual(observation["reason"], reason) + self.assertEqual(observation["stderr_excerpt"], excerpt) + self.assertNotIn("PRIVATE_CREDENTIAL", str(observation)) + self.assertNotIn("/private/path", str(observation)) + self.assertIn("PRIVATE_CREDENTIAL", failure.exception.failure.message) + + def test_diagnostic_for_missing_subcommand_is_bounded(self) -> None: + from tools.repository_git.repository_git import GitCommandResult + with (mock.patch.object(repository_module, "git_command", + return_value=GitCommandResult(1, b"", b"usage output")), + self.assertRaises(GitRepositoryError) as failure): + git_output(Path("/tmp"), ()) + self.assertEqual(failure.exception.failure.command.operation, "git-command") + self.assertEqual(failure.exception.failure.command.stderr_excerpt, "") + + @unittest.skipIf(os.name != "posix" or getattr(os, "geteuid", lambda: 0)() == 0, + "POSIX unprivileged permissions are required") + def test_real_readonly_ref_directory_reports_permission_denied(self) -> None: + with tempfile.TemporaryDirectory(dir="/tmp") as temporary: + root = Path(temporary) + self._initialize(root) + (root / "value.txt").write_bytes(b"accepted\n") + self._commit(root, "initial") + self._git(root, "branch", "-M", "main") + repository = GitRepository(root) + expected = repository.branch_revision("main") + file = CandidateFile(RepositoryPath.parse("value.txt"), b"proposed\n", False) + with repository.materialize_candidate(expected, (file,), commit=_COMMIT) as candidate: + refs = root / ".git/refs/heads" + mode = refs.stat().st_mode + refs.chmod(0o555) + try: + with self.assertRaises(GitRepositoryError) as failure: + repository.publish_candidate(candidate, expected) + self.assertEqual(failure.exception.failure.command.reason, "permission-denied") + self.assertEqual(repository.branch_revision("main"), expected) + finally: + refs.chmod(mode) + self.assertEqual(repository.publish_candidate(candidate, expected), "updated") + def test_path_and_object_failures_are_typed(self) -> None: for raw in ("", "/absolute", "../outside", "a//b", ".git/config"): with self.subTest(raw=raw), self.assertRaises(GitRepositoryError) as raised: diff --git a/tools/standards_engine/PURPOSE-SEPARATION.md b/tools/standards_engine/PURPOSE-SEPARATION.md index 6590780e..44d08d0a 100644 --- a/tools/standards_engine/PURPOSE-SEPARATION.md +++ b/tools/standards_engine/PURPOSE-SEPARATION.md @@ -325,7 +325,7 @@ those same bytes. The Engine does not rewrite semantic versions after review. ## Versions and coordinated cutover -Current Engine package/transport implementation: 0.2.0. Engine interface: 34. +Current Engine package/transport implementation: 0.2.0. Engine interface: 35. Analysis request: 6; result/state and Analysis handles: 7. The semantic-revision interpretation change belongs to Analysis 7. Unchanged Snapshot, proposal, readiness, application and generic identity/storage contracts keep their @@ -333,12 +333,14 @@ existing independent versions. Updating one implementation does not couple all version domains. Before replacing an installed Engine, inspect active proposals, readiness and -recovery-required work through its current authoring interface. Complete an -existing recovery obligation with its owning version, or retain its exact store -with an explicit operator disposition. Keep retained store bytes and Git history. -Then install the new code and reconnect clients with purpose-selected launch -configuration. An explicitly chosen fresh store may capture the accepted source; -store selection does not convert old proposal records into new-format state. +recovery-required work through its current authoring interface. A replacement +supporting the same retained record formats can resume them through its documented +recovery path; interface 35 preserves those formats. When a retained format is +unsupported, complete its recovery with the owning implementation or preserve its +exact store under an explicit operator disposition. Keep store bytes and Git +history. Install current code/schemas and reconnect with purpose-selected launch +configuration. A fresh store does not carry an admitted application and is not a +recovery procedure. Store selection never converts old proposal records. For pre-merge qualification, use a disposable clone whose local `main` identifies the exact candidate. Avoid retargeting the user's real accepted branch merely to @@ -392,5 +394,48 @@ sessions retain their published-only operation set. `maintain_evidence` remains accepted-repository maintenance, not draft mutation. Use logical registration for draft-only scopes. After installing this change, restart the actual MCP server and reconnect the client; initialization reports -interface 34 and the configured purpose. Existing workflow-response verbosity +the current interface edition and configured purpose. Existing workflow-response verbosity and hot catalog replacement are not changed by this capability. + + +## Admitted publication recovery (interface 35) + +Use `recover` with the original readiness context after an interrupted or failed +publication. Its default `observe` action reads the exact selected application; +it may record a durable applied outcome when the target is already the candidate, +but it performs no Git write. The native equivalent is `recover_application`. + +When the target is still the expected revision, an authorized operator can select +`action: "complete-publication"`. This action reconstructs from the original +captured proposal and reviewed coverage, requires the exact already-admitted +commit ID, reruns complete verification, checks current readiness and both recovery +and application permission, and makes one expected-target publication attempt. +It keeps the existing application selection. Changed candidate content, stale +readiness, inaccessible evidence, denied authority and a competing target stay +explicitly unresolved. A target already at the candidate is reconciled without +another write. A failed outcome write after Git success is completed by the next +observation. Focused and native repeated recovery return the applied result. + +An unchanged target does not establish that no prior publication occurred. +Explicit completion authorizes re-establishing the candidate at that target; it +is not a historical exactly-once claim. The Engine never removes a lock, changes +permissions, resets the store, forces the branch, or substitutes a newer draft. + +The implementation process needs a Git-writable authorized host for the same +repository and store. Install Engine source without moving the real accepted ref +merely for installation: an admitted application is still bound to its original +expected target. Restart the server process and reconnect before reading the +interface-35 recovery schema. Install the current code and interface schemas +together in the implementation checkout, while leaving its accepted `main` at +the admitted expected revision. The facade loads interface schemas from +`--repo-root`; selecting a different Python module path alone does not update +those schemas. Store selection must remain unchanged if the installed host used +a nondefault store. Handoff data is the exact readiness/context, not a fabricated +handle assembled from a truncated identifier. + +Authoring failure details carry the Git operation, exit code and recognized +fixed stderr phrase when available. Raw stderr can contain sensitive paths or +hook output and stays in the private Git exception, not the MCP response. Earlier +uncaptured stderr cannot be recovered retrospectively. Obtain a new bounded +observation from the supported operation on the correct host. Ordinary application +interfaces still cannot call either recovery operation or read its diagnostics. diff --git a/tools/standards_engine/README.md b/tools/standards_engine/README.md index 93f207e5..81fe0ae1 100644 --- a/tools/standards_engine/README.md +++ b/tools/standards_engine/README.md @@ -169,3 +169,14 @@ the locked Engine Python; it requires `codex` on PATH and `standards-engine` configured for this checkout. It checks inline authoring fields and follows focused route/read continuations with exact snapshot reuse in an ephemeral client thread. It does not modify standards or apply proposals. + + +### Completing admitted publication + +The interface-35 recovery contract distinguishes observation from explicit +completion. Carry the original readiness into `recover`. Select `observe` for +receipt reconciliation, or `complete-publication` on an authorized Git-writable +host to verify and re-establish the exact admitted candidate. Current permissions, +proposal head, candidate identity and expected-target CAS remain required. The +existing application and store are preserved. See [the recovery contract](PURPOSE-SEPARATION.md#admitted-publication-recovery-interface-35) +and [implementation evidence](../../docs/plans/admitted-publication-recovery/verification.md). diff --git a/tools/standards_engine/contracts/README.md b/tools/standards_engine/contracts/README.md index 714ea8c3..aa7f2928 100644 --- a/tools/standards_engine/contracts/README.md +++ b/tools/standards_engine/contracts/README.md @@ -1,6 +1,24 @@ # Standards Engine Contracts -## Current contract: interface 34 +## Current contract: interface 35 + + +Interface 35 adds an explicit `action` to `recover` and `recover_application`. +Omission or `observe` reconciles an existing applied candidate without Git +writes. `complete-publication` is a deliberate request to re-establish the same +admitted candidate at its exact expected target. It requires current recovery +and application permission, a current reviewed proposal, exact reconstruction, +and complete verification before the existing Git compare-and-swap. It never +creates a replacement application or changes the candidate selected by readiness. +A repeated recovery of an already-applied readiness returns that same outcome. + +Recovery-required results may include scalar `details`: `cause_code`, +`cause_outcome`, and `git_operation`, `git_exit_code`, `git_reason`, and +`git_stderr_excerpt` for a failed command. The excerpt is a recognized fixed +phrase, not arbitrary stderr or a path. Unrecognized output is `unclassified`. +A permission-denied observation identifies Git's error, not its host-level cause. +`APPLICATION.RECOVERY_BLOCKED` preserves an admission whose current completion +prerequisite failed. The original readiness/application/store formats are unchanged. Required host purpose selects application or authoring operation variants. The canonical interface declares each variant's exact input/result roots, and the diff --git a/tools/standards_engine/contracts/a1-contract.schema.json b/tools/standards_engine/contracts/a1-contract.schema.json index a3e794f9..e2ff9238 100644 --- a/tools/standards_engine/contracts/a1-contract.schema.json +++ b/tools/standards_engine/contracts/a1-contract.schema.json @@ -3308,9 +3308,17 @@ }, "readiness": { "$ref": "#/$defs/ReadinessHandle" + }, + "action": { + "enum": [ + "observe", + "complete-publication" + ], + "description": "Omit or select observe to reconcile only. Explicit complete-publication revalidates and attempts the same admitted candidate against its original expected target; it requires current publication authorization." } }, - "additionalProperties": false + "additionalProperties": false, + "description": "Recover an admitted application. Observation performs no Git writes. Explicit completion reconstructs and verifies the exact admitted candidate before one compare-and-swap attempt." }, "RecoverApplicationResult": { "type": "object", @@ -3358,7 +3366,8 @@ "APPLICATION.OBSERVATION_UNAVAILABLE", "APPLICATION.OUTCOME_PERSISTENCE_UNAVAILABLE", "APPLICATION.RECOVERY_TARGET_UNCERTAIN", - "APPLICATION.RECOVERY_TARGET_DIVERGED" + "APPLICATION.RECOVERY_TARGET_DIVERGED", + "APPLICATION.RECOVERY_BLOCKED" ] }, "outcome": { @@ -3366,6 +3375,12 @@ }, "message": { "$ref": "#/$defs/NonEmptyString" + }, + "details": { + "type": "object", + "additionalProperties": { + "$ref": "#/$defs/ScalarValue" + } } }, "additionalProperties": false @@ -6286,11 +6301,19 @@ "properties": { "context": { "$ref": "#/$defs/WorkflowContext" + }, + "action": { + "enum": [ + "observe", + "complete-publication" + ], + "description": "Omit or select observe to reconcile only. Explicit complete-publication revalidates and attempts the same admitted candidate against its original expected target; it requires current publication authorization." } }, "required": [ "context" - ] + ], + "description": "Recover an admitted application. Observation performs no Git writes. Explicit completion reconstructs and verifies the exact admitted candidate before one compare-and-swap attempt." }, "WorkflowStatusCall": { "type": "object", @@ -6342,7 +6365,8 @@ "enum": [ "change_set", "submission", - "decisions" + "decisions", + "action" ] } } @@ -7449,7 +7473,7 @@ "snapshot", "items" ], - "description": "Read 1\u201332 selected items from one explicit snapshot, preserving order. The complete JSON result is limited to 2 MiB; any failed item rejects the entire request.", + "description": "Read 1–32 selected items from one explicit snapshot, preserving order. The complete JSON result is limited to 2 MiB; any failed item rejects the entire request.", "properties": { "snapshot": { "$ref": "#/$defs/SnapshotHandle" @@ -7531,7 +7555,7 @@ "snapshot", "items" ], - "description": "Read 1\u201332 selected items from one explicit snapshot, preserving order. The complete JSON result is limited to 2 MiB; any failed item rejects the entire request.", + "description": "Read 1–32 selected items from one explicit snapshot, preserving order. The complete JSON result is limited to 2 MiB; any failed item rejects the entire request.", "properties": { "snapshot": { "$ref": "#/$defs/SnapshotHandle" diff --git a/tools/standards_engine/contracts/a1-interface.toml b/tools/standards_engine/contracts/a1-interface.toml index a22cd151..21a889de 100644 --- a/tools/standards_engine/contracts/a1-interface.toml +++ b/tools/standards_engine/contracts/a1-interface.toml @@ -1,5 +1,5 @@ schema_version = 1 -interface_schema_version = 34 +interface_schema_version = 35 request_contract_version = 6 result_projection_version = 7 diff --git a/tools/standards_engine/contracts/examples/a1-examples.json b/tools/standards_engine/contracts/examples/a1-examples.json index 651f21cb..6e18257d 100644 --- a/tools/standards_engine/contracts/examples/a1-examples.json +++ b/tools/standards_engine/contracts/examples/a1-examples.json @@ -1,6 +1,6 @@ { "schema_version": 2, - "interface_schema_version": 34, + "interface_schema_version": 35, "examples": [ { "name": "create-snapshot", diff --git a/tools/standards_engine/contracts/generated/agent-tools.json b/tools/standards_engine/contracts/generated/agent-tools.json index 453d6361..702b43f0 100644 --- a/tools/standards_engine/contracts/generated/agent-tools.json +++ b/tools/standards_engine/contracts/generated/agent-tools.json @@ -874,9 +874,16 @@ "APPLICATION.OBSERVATION_UNAVAILABLE", "APPLICATION.OUTCOME_PERSISTENCE_UNAVAILABLE", "APPLICATION.RECOVERY_TARGET_UNCERTAIN", - "APPLICATION.RECOVERY_TARGET_DIVERGED" + "APPLICATION.RECOVERY_TARGET_DIVERGED", + "APPLICATION.RECOVERY_BLOCKED" ] }, + "details": { + "additionalProperties": { + "$ref": "#/$defs/ScalarValue" + }, + "type": "object" + }, "kind": { "const": "application-recovery-required-result" }, @@ -5759,7 +5766,15 @@ }, "RecoverApplicationCall": { "additionalProperties": false, + "description": "Recover an admitted application. Observation performs no Git writes. Explicit completion reconstructs and verifies the exact admitted candidate before one compare-and-swap attempt.", "properties": { + "action": { + "description": "Omit or select observe to reconcile only. Explicit complete-publication revalidates and attempts the same admitted candidate against its original expected target; it requires current publication authorization.", + "enum": [ + "observe", + "complete-publication" + ] + }, "kind": { "const": "recover-application" }, @@ -5795,7 +5810,15 @@ }, "RecoverCall": { "additionalProperties": false, + "description": "Recover an admitted application. Observation performs no Git writes. Explicit completion reconstructs and verifies the exact admitted candidate before one compare-and-swap attempt.", "properties": { + "action": { + "description": "Omit or select observe to reconcile only. Explicit complete-publication revalidates and attempts the same admitted candidate against its original expected target; it requires current publication authorization.", + "enum": [ + "observe", + "complete-publication" + ] + }, "context": { "$ref": "#/$defs/WorkflowContext" } @@ -7599,7 +7622,8 @@ "enum": [ "change_set", "submission", - "decisions" + "decisions", + "action" ] }, "type": "array", @@ -7705,7 +7729,7 @@ "type": "object" } }, - "interface_schema_version": 34, + "interface_schema_version": 35, "operations": [ { "capability": "standards.snapshot.create", diff --git a/tools/standards_engine/standards_engine/_generated_contract.py b/tools/standards_engine/standards_engine/_generated_contract.py index c312a23c..e9e7f30d 100644 --- a/tools/standards_engine/standards_engine/_generated_contract.py +++ b/tools/standards_engine/standards_engine/_generated_contract.py @@ -14,8 +14,8 @@ model_as_contract, ) -_SCHEMA = json.loads('{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"https://coding-standards.local/contracts/standards-engine/a2-v34","title":"Standards Engine A2 contract","description":"Canonical typed contract for snapshot lifecycle, controlled authoring, navigation, inspection, and immutable standards-change analysis.","oneOf":[{"$ref":"#/$defs/AgentRouteResult"},{"$ref":"#/$defs/AnalyzeCall"},{"$ref":"#/$defs/AnalyzeProposalCall"},{"$ref":"#/$defs/ApplicationInspectCall"},{"$ref":"#/$defs/ApplicationQueryCall"},{"$ref":"#/$defs/ApplicationReadCall"},{"$ref":"#/$defs/ApplicationReadManyCall"},{"$ref":"#/$defs/ApplicationReadManyResult"},{"$ref":"#/$defs/ApplicationReadResult"},{"$ref":"#/$defs/ApplicationRecoveryRequiredResult"},{"$ref":"#/$defs/ApplicationRejectedResult"},{"$ref":"#/$defs/ApplicationRelatedResult"},{"$ref":"#/$defs/ApplicationRouteResult"},{"$ref":"#/$defs/ApplicationRoutingFactsResult"},{"$ref":"#/$defs/ApplyCall"},{"$ref":"#/$defs/ApplyProposalCall"},{"$ref":"#/$defs/ApplyProposalResult"},{"$ref":"#/$defs/CompactReadResult"},{"$ref":"#/$defs/CompleteResult"},{"$ref":"#/$defs/CreateProposalCall"},{"$ref":"#/$defs/CreateProposalResult"},{"$ref":"#/$defs/CreateSnapshotCall"},{"$ref":"#/$defs/CreateSnapshotResult"},{"$ref":"#/$defs/DeleteSnapshotCall"},{"$ref":"#/$defs/DeleteSnapshotResult"},{"$ref":"#/$defs/FindProposalsCall"},{"$ref":"#/$defs/FindProposalsResult"},{"$ref":"#/$defs/FindSnapshotsCall"},{"$ref":"#/$defs/FindSnapshotsResult"},{"$ref":"#/$defs/InspectCall"},{"$ref":"#/$defs/InspectionResult"},{"$ref":"#/$defs/MaintainEvidenceCall"},{"$ref":"#/$defs/MaintainEvidenceResult"},{"$ref":"#/$defs/NavigationIndexesResult"},{"$ref":"#/$defs/OperationalReadResult"},{"$ref":"#/$defs/PendingResult"},{"$ref":"#/$defs/PrepareCall"},{"$ref":"#/$defs/PreviewApplicationCall"},{"$ref":"#/$defs/PreviewApplicationResult"},{"$ref":"#/$defs/ProposeCall"},{"$ref":"#/$defs/ProvenanceReadResult"},{"$ref":"#/$defs/QueryCall"},{"$ref":"#/$defs/QueryProposalCall"},{"$ref":"#/$defs/QueryProposalResult"},{"$ref":"#/$defs/QueryResult"},{"$ref":"#/$defs/ReadCall"},{"$ref":"#/$defs/ReadManyCall"},{"$ref":"#/$defs/ReadManyResult"},{"$ref":"#/$defs/ReadResult"},{"$ref":"#/$defs/RecoverApplicationCall"},{"$ref":"#/$defs/RecoverApplicationResult"},{"$ref":"#/$defs/RecoverCall"},{"$ref":"#/$defs/RejectedResult"},{"$ref":"#/$defs/RelatedCall"},{"$ref":"#/$defs/RelatedResult"},{"$ref":"#/$defs/ResolveCall"},{"$ref":"#/$defs/ResolveWorkflowCall"},{"$ref":"#/$defs/ResumeCall"},{"$ref":"#/$defs/ReviewCall"},{"$ref":"#/$defs/ReviewProposalCall"},{"$ref":"#/$defs/ReviewProposalResult"},{"$ref":"#/$defs/ReviseCall"},{"$ref":"#/$defs/ReviseProposalCall"},{"$ref":"#/$defs/ReviseProposalResult"},{"$ref":"#/$defs/RouteCall"},{"$ref":"#/$defs/RoutingFactsCall"},{"$ref":"#/$defs/RoutingFactsResult"},{"$ref":"#/$defs/UndeleteSnapshotCall"},{"$ref":"#/$defs/UndeleteSnapshotResult"},{"$ref":"#/$defs/VerifyProposalCall"},{"$ref":"#/$defs/VerifyProposalResult"},{"$ref":"#/$defs/VerifyRepositoryCall"},{"$ref":"#/$defs/VerifyRepositoryResult"},{"$ref":"#/$defs/WorkflowResult"},{"$ref":"#/$defs/WorkflowStatusCall"}],"$defs":{"NonEmptyString":{"type":"string","minLength":1},"CanonicalId":{"type":"string","pattern":"^[A-Za-z0-9][A-Za-z0-9._:/-]*$"},"EdgeId":{"type":"string","minLength":1},"Digest":{"type":"string","pattern":"^sha256:[0-9a-f]{64}$"},"ObligationId":{"type":"string","pattern":"^obligation:sha256:[0-9a-f]{64}$"},"ImpactTraceId":{"type":"string","pattern":"^impact-trace:sha256:[0-9a-f]{64}$"},"FactRequirementId":{"type":"string","pattern":"^fact-requirement:sha256:[0-9a-f]{64}$"},"ScalarValue":{"oneOf":[{"type":"boolean"},{"type":"integer"},{"type":"string"},{"type":"null"}]},"FactValue":{"oneOf":[{"type":"object","required":["type","state","value"],"properties":{"type":{"const":"boolean"},"state":{"const":"known"},"value":{"type":"boolean"}},"additionalProperties":false},{"type":"object","required":["type","state","value"],"properties":{"type":{"enum":["boolean","enum","string","string-set","enum-set","canonical-id"]},"state":{"const":"known"},"value":{"type":"null"}},"additionalProperties":false},{"type":"object","required":["type","state","value"],"properties":{"type":{"enum":["enum","string","canonical-id"]},"state":{"const":"known"},"value":{"type":"string"}},"additionalProperties":false},{"type":"object","required":["type","state","value"],"properties":{"type":{"enum":["string-set","enum-set"]},"state":{"const":"known"},"value":{"type":"array","items":{"type":"string"},"uniqueItems":true}},"additionalProperties":false},{"type":"object","required":["type","state"],"properties":{"type":{"enum":["boolean","enum","string","string-set","enum-set","canonical-id"]},"state":{"enum":["known-absent","unknown"]}},"additionalProperties":false}]},"FactSet":{"type":"object","additionalProperties":{"$ref":"#/$defs/FactValue"}},"StructuredScope":{"type":"object","required":["kind","heading_path"],"properties":{"kind":{"const":"structured"},"heading_path":{"type":"array","minItems":1,"items":{"$ref":"#/$defs/NonEmptyString"}}},"additionalProperties":false},"WholeArtifactScope":{"type":"object","required":["kind"],"properties":{"kind":{"const":"whole-artifact"}},"additionalProperties":false},"ReviewScope":{"oneOf":[{"$ref":"#/$defs/StructuredScope"},{"$ref":"#/$defs/WholeArtifactScope"}]},"AllExpression":{"type":"object","required":["operator","expressions"],"properties":{"operator":{"const":"all"},"expressions":{"type":"array","minItems":1,"items":{"$ref":"#/$defs/ApplicabilityExpression"}}},"additionalProperties":false},"AnyExpression":{"type":"object","required":["operator","expressions"],"properties":{"operator":{"const":"any"},"expressions":{"type":"array","minItems":1,"items":{"$ref":"#/$defs/ApplicabilityExpression"}}},"additionalProperties":false},"NotExpression":{"type":"object","required":["operator","expression"],"properties":{"operator":{"const":"not"},"expression":{"$ref":"#/$defs/ApplicabilityExpression"}},"additionalProperties":false},"EqualsExpression":{"type":"object","required":["operator","fact","value"],"properties":{"operator":{"const":"equals"},"fact":{"$ref":"#/$defs/CanonicalId"},"value":{"$ref":"#/$defs/ScalarValue"}},"additionalProperties":false},"InExpression":{"type":"object","required":["operator","fact","values"],"properties":{"operator":{"const":"in"},"fact":{"$ref":"#/$defs/CanonicalId"},"values":{"type":"array","minItems":1,"uniqueItems":true,"items":{"$ref":"#/$defs/ScalarValue"}}},"additionalProperties":false},"ContainsExpression":{"type":"object","required":["operator","fact","value"],"properties":{"operator":{"const":"contains"},"fact":{"$ref":"#/$defs/CanonicalId"},"value":{"$ref":"#/$defs/ScalarValue"}},"additionalProperties":false},"ExistsExpression":{"type":"object","required":["operator","fact"],"properties":{"operator":{"const":"exists"},"fact":{"$ref":"#/$defs/CanonicalId"}},"additionalProperties":false},"AlwaysExpression":{"type":"object","required":["operator"],"properties":{"operator":{"const":"always"}},"additionalProperties":false},"ApplicabilityExpression":{"oneOf":[{"$ref":"#/$defs/AlwaysExpression"},{"$ref":"#/$defs/AllExpression"},{"$ref":"#/$defs/AnyExpression"},{"$ref":"#/$defs/NotExpression"},{"$ref":"#/$defs/EqualsExpression"},{"$ref":"#/$defs/InExpression"},{"$ref":"#/$defs/ContainsExpression"},{"$ref":"#/$defs/ExistsExpression"}]},"GeneralSelectionReason":{"type":"object","required":["kind"],"properties":{"kind":{"enum":["routing-fact","requires","specializes","changed-policy","question","audit-coverage","unmapped-normative-change","structured-scope-analysis-unsupported","navigation-index-change","supporting-content-change"]},"source":{"$ref":"#/$defs/CanonicalId"},"fact":{"$ref":"#/$defs/CanonicalId"},"edge":{"$ref":"#/$defs/EdgeId"},"question":{"$ref":"#/$defs/CanonicalId"}},"additionalProperties":false},"PolicyImpactSelectionReason":{"type":"object","required":["kind","source","edge","relation","evidence_owner","traces"],"properties":{"kind":{"const":"policy-impact-edge"},"source":{"$ref":"#/$defs/CanonicalId"},"edge":{"$ref":"#/$defs/EdgeId"},"relation":{"$ref":"#/$defs/CanonicalId"},"evidence_owner":{"$ref":"#/$defs/CanonicalId"},"traces":{"type":"array","minItems":1,"uniqueItems":true,"items":{"$ref":"#/$defs/ImpactTraceReference"}}},"additionalProperties":false},"SelectionReason":{"oneOf":[{"$ref":"#/$defs/GeneralSelectionReason"},{"$ref":"#/$defs/PolicyImpactSelectionReason"}]},"ImpactTraceReference":{"type":"object","required":["id","graph","applicability"],"properties":{"id":{"$ref":"#/$defs/ImpactTraceId"},"graph":{"enum":["accepted","proposed"]},"applicability":{"enum":["true","false","unknown"]}},"additionalProperties":false},"ConsumerReviewObligationReadingReason":{"type":"object","required":["kind","obligation"],"properties":{"kind":{"const":"consumer-review-obligation"},"obligation":{"$ref":"#/$defs/ObligationId"}},"additionalProperties":false},"RoutingBaseReadingReason":{"type":"object","required":["kind","projection"],"properties":{"kind":{"const":"routing-base"},"projection":{"$ref":"#/$defs/CanonicalId"}},"additionalProperties":false},"RoutingRuleReadingReason":{"type":"object","required":["kind","rule","facts"],"properties":{"kind":{"const":"routing-rule"},"rule":{"$ref":"#/$defs/CanonicalId"},"facts":{"type":"array","uniqueItems":true,"items":{"$ref":"#/$defs/CanonicalId"}}},"additionalProperties":false},"RequiresReadingReason":{"type":"object","required":["kind","edge","source"],"properties":{"kind":{"const":"requires"},"edge":{"$ref":"#/$defs/EdgeId"},"source":{"$ref":"#/$defs/CanonicalId"}},"additionalProperties":false},"SpecializesReadingReason":{"type":"object","required":["kind","edge","source"],"properties":{"kind":{"const":"specializes"},"edge":{"$ref":"#/$defs/EdgeId"},"source":{"$ref":"#/$defs/CanonicalId"}},"additionalProperties":false},"ReadingPlanReason":{"oneOf":[{"$ref":"#/$defs/ConsumerReviewObligationReadingReason"},{"$ref":"#/$defs/RoutingBaseReadingReason"},{"$ref":"#/$defs/RoutingRuleReadingReason"},{"$ref":"#/$defs/RequiresReadingReason"},{"$ref":"#/$defs/SpecializesReadingReason"}]},"ReadingPlanEntry":{"type":"object","required":["target","scope","authority","reasons","state"],"properties":{"target":{"$ref":"#/$defs/CanonicalId"},"scope":{"$ref":"#/$defs/ReviewScope"},"authority":{"enum":["normative","projection","contextual","evidence"]},"reasons":{"type":"array","minItems":1,"uniqueItems":true,"items":{"$ref":"#/$defs/ReadingPlanReason"}},"state":{"enum":["selected","conditional","unresolved"]}},"additionalProperties":false},"RouteRequest":{"type":"object","required":["kind","facts"],"properties":{"kind":{"const":"route"},"facts":{"$ref":"#/$defs/FactSet"}},"additionalProperties":false},"ReadRequest":{"type":"object","required":["kind","target"],"properties":{"kind":{"const":"read"},"target":{"$ref":"#/$defs/CanonicalId"},"include_routing":{"type":"boolean"},"include_coverage":{"type":"boolean","description":"Include current repository attestation status for registered policy units in this read scope."}},"additionalProperties":false},"RelatedRequest":{"type":"object","required":["kind","target","groups","direction","transitive"],"properties":{"kind":{"const":"related"},"target":{"$ref":"#/$defs/CanonicalId"},"groups":{"type":"array","minItems":1,"uniqueItems":true,"items":{"$ref":"#/$defs/CanonicalId"}},"direction":{"enum":["incoming","outgoing","both"]},"transitive":{"type":"boolean","default":false}},"additionalProperties":false},"QueryRequest":{"oneOf":[{"$ref":"#/$defs/RouteRequest"},{"$ref":"#/$defs/ReadRequest"},{"$ref":"#/$defs/RelatedRequest"}]},"PolicyUnitDeclaration":{"type":"object","required":["kind","id","module","heading_path","semantic_revision","lifecycle"],"properties":{"kind":{"const":"policy-unit"},"id":{"$ref":"#/$defs/CanonicalId"},"module":{"$ref":"#/$defs/CanonicalId"},"heading_path":{"type":"array","minItems":1,"items":{"$ref":"#/$defs/NonEmptyString"}},"semantic_revision":{"type":"integer","minimum":1},"lifecycle":{"const":"active"},"aliases":{"type":"array","uniqueItems":true,"items":{"$ref":"#/$defs/CanonicalId"}},"predecessors":{"type":"array","uniqueItems":true,"items":{"$ref":"#/$defs/CanonicalId"}},"successors":{"type":"array","uniqueItems":true,"items":{"$ref":"#/$defs/CanonicalId"}}},"additionalProperties":false},"CanonicalModuleDeclaration":{"type":"object","required":["kind","id","role","level","applies_when","does_not_apply_when","requires","specializes","verification"],"properties":{"kind":{"const":"canonical-module"},"id":{"$ref":"#/$defs/CanonicalId"},"role":{"enum":["core","router","workflow","profile","topic","reference"]},"level":{"enum":["MUST","SHOULD","PROFILE","REFERENCE"]},"applies_when":{"$ref":"#/$defs/NonEmptyString"},"does_not_apply_when":{"$ref":"#/$defs/NonEmptyString"},"requires":{"type":"array","uniqueItems":true,"items":{"$ref":"#/$defs/CanonicalId"}},"specializes":{"type":"array","uniqueItems":true,"items":{"$ref":"#/$defs/CanonicalId"}},"verification":{"$ref":"#/$defs/NonEmptyString"}},"additionalProperties":false},"PolicyRelationshipInspection":{"type":"object","required":["relationship_kind","applicability","source_scope","consumer_scope","propagation","evidence_owner","rationale"],"properties":{"relationship_kind":{"enum":["normative-consumer","router-projection","prompt-projection","template-projection","reference-projection","fixture-projection","enforcement-suite-projection","documentation-projection","implementation-projection"]},"applicability":{"$ref":"#/$defs/ApplicabilityExpression"},"source_scope":{"oneOf":[{"$ref":"#/$defs/ReviewScope"},{"type":"null"}]},"consumer_scope":{"oneOf":[{"$ref":"#/$defs/ReviewScope"},{"type":"null"}]},"propagation":{"const":"source-to-consumer"},"evidence_owner":{"$ref":"#/$defs/CanonicalId"},"rationale":{"$ref":"#/$defs/NonEmptyString"}},"additionalProperties":false},"SemanticProposal":{"type":"object","required":["policy","accepted_semantic_revision","proposed_semantic_revision","intent","structural_digest"],"properties":{"policy":{"$ref":"#/$defs/CanonicalId"},"accepted_semantic_revision":{"oneOf":[{"type":"integer","minimum":1},{"type":"null"}]},"proposed_semantic_revision":{"type":"integer","minimum":1},"intent":{"$ref":"#/$defs/NonEmptyString"},"structural_digest":{"$ref":"#/$defs/Digest"}},"additionalProperties":false},"ChangeDescriptor":{"type":"object","required":["kind","accepted_ids","proposed_ids","scope"],"properties":{"kind":{"enum":["module","modification","addition","removal","move","split","merge","navigation-index","supporting-content"]},"accepted_ids":{"type":"array","uniqueItems":true,"items":{"$ref":"#/$defs/CanonicalId"}},"proposed_ids":{"type":"array","uniqueItems":true,"items":{"$ref":"#/$defs/CanonicalId"}},"scope":{"$ref":"#/$defs/ReviewScope"},"accepted_module":{"$ref":"#/$defs/CanonicalId"},"proposed_module":{"$ref":"#/$defs/CanonicalId"}},"additionalProperties":false},"ChangedPolicyUnit":{"type":"object","required":["policy","change_kind","classification","accepted_representation_digest","proposed_representation_digest","accepted_structural_digest","proposed_structural_digest","accepted_semantic_revision","proposed_semantic_revision","semantic_state","scope"],"properties":{"policy":{"$ref":"#/$defs/CanonicalId"},"change_kind":{"enum":["modification","addition","removal","move","split-predecessor","split-successor","merge-predecessor","merge-successor"]},"classification":{"enum":["unchanged","representation-only-candidate","possibly-semantically-changed","semantically-changed","unresolved"]},"accepted_representation_digest":{"oneOf":[{"$ref":"#/$defs/Digest"},{"type":"null"}]},"proposed_representation_digest":{"oneOf":[{"$ref":"#/$defs/Digest"},{"type":"null"}]},"accepted_structural_digest":{"oneOf":[{"$ref":"#/$defs/Digest"},{"type":"null"}]},"proposed_structural_digest":{"oneOf":[{"$ref":"#/$defs/Digest"},{"type":"null"}]},"accepted_semantic_revision":{"oneOf":[{"type":"integer","minimum":1},{"type":"null"}]},"proposed_semantic_revision":{"oneOf":[{"type":"integer","minimum":1},{"type":"null"}]},"semantic_state":{"enum":["accepted-unchanged","proposed","removed","unresolved"]},"scope":{"$ref":"#/$defs/ReviewScope"}},"additionalProperties":false},"Question":{"type":"object","required":["id","kind","prompt","state","permitted_answers"],"properties":{"id":{"$ref":"#/$defs/CanonicalId"},"kind":{"enum":["applicability-fact","normative-classification","identity-resolution","scope-resolution"]},"prompt":{"$ref":"#/$defs/NonEmptyString"},"state":{"enum":["required","answered","blocked"]},"permitted_answers":{"type":"array","minItems":1,"uniqueItems":true,"items":{"$ref":"#/$defs/NonEmptyString"}}},"additionalProperties":false},"ConsumerReviewContract":{"type":"object","required":["kind","id","version","permitted_dispositions","evidence_contract","authorization_capability","semantics"],"properties":{"kind":{"const":"consumer-review-contract"},"id":{"$ref":"#/$defs/CanonicalId"},"version":{"type":"integer","minimum":1},"permitted_dispositions":{"type":"array","minItems":1,"uniqueItems":true,"items":{"enum":["updated","reviewed-no-change","not-applicable","blocked"]}},"evidence_contract":{"$ref":"#/$defs/CanonicalId"},"authorization_capability":{"$ref":"#/$defs/CanonicalId"},"semantics":{"$ref":"#/$defs/NonEmptyString"}},"additionalProperties":false},"DecisionDependency":{"type":"object","required":["class","identity","digest"],"properties":{"class":{"enum":["policy-unit","semantic-revision","structure","representation","module-locator","applicability-fact","relationship","audit","exception","evidence","provider-contract","applicability-contract","analysis-contract"]},"identity":{"$ref":"#/$defs/NonEmptyString"},"digest":{"$ref":"#/$defs/Digest"}},"additionalProperties":false},"DecisionFingerprint":{"type":"object","required":["decision_kind","decision_contract","schema_version","dependencies"],"properties":{"decision_kind":{"$ref":"#/$defs/CanonicalId"},"decision_contract":{"$ref":"#/$defs/CanonicalId"},"schema_version":{"const":1},"dependencies":{"type":"array","minItems":1,"items":{"$ref":"#/$defs/DecisionDependency"}}},"additionalProperties":false},"FactValueContract":{"type":"object","required":["type","states","nullable"],"properties":{"type":{"enum":["boolean","enum","string","string-set","enum-set","canonical-id"]},"states":{"const":["known","known-absent"]},"nullable":{"type":"boolean"},"values":{"type":"array","minItems":1,"uniqueItems":true,"items":{"type":"string"}}},"additionalProperties":false},"EvidenceReference":{"type":"object","required":["id","digest","provider_contract","provider_contract_version"],"properties":{"id":{"$ref":"#/$defs/CanonicalId"},"digest":{"$ref":"#/$defs/Digest"},"provider_contract":{"$ref":"#/$defs/CanonicalId"},"provider_contract_version":{"$ref":"#/$defs/NonEmptyString"}},"additionalProperties":false},"CompletionProof":{"type":"object","required":["required_coverage_subjects","certificate_subjects","reached_consumer_obligations","disposition_obligations","required_fact_requirements","observed_fact_requirements","non_consumer_obligations_resolved","applicability_resolved","authorization_valid","evidence_valid"],"properties":{"required_coverage_subjects":{"type":"array","uniqueItems":true,"items":{"$ref":"#/$defs/CanonicalId"}},"certificate_subjects":{"type":"array","uniqueItems":true,"items":{"$ref":"#/$defs/CanonicalId"}},"reached_consumer_obligations":{"type":"array","uniqueItems":true,"items":{"$ref":"#/$defs/ObligationId"}},"disposition_obligations":{"type":"array","uniqueItems":true,"items":{"$ref":"#/$defs/ObligationId"}},"required_fact_requirements":{"type":"array","uniqueItems":true,"items":{"$ref":"#/$defs/FactRequirementId"}},"observed_fact_requirements":{"type":"array","uniqueItems":true,"items":{"$ref":"#/$defs/FactRequirementId"}},"non_consumer_obligations_resolved":{"const":true},"applicability_resolved":{"const":true},"authorization_valid":{"const":true},"evidence_valid":{"const":true}},"additionalProperties":false},"Timestamp":{"type":"integer","minimum":0},"SnapshotId":{"type":"string","pattern":"^snapshot:v1:[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"},"AnalysisId":{"type":"string","pattern":"^analysis:sha256:[0-9a-f]{64}$"},"ProposalId":{"type":"string","pattern":"^proposal:v1:[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"},"ProposalRevisionId":{"type":"string","pattern":"^proposal-revision:sha256:[0-9a-f]{64}$"},"ReadinessId":{"type":"string","pattern":"^readiness:sha256:[0-9a-f]{64}$"},"ApplicationId":{"type":"string","pattern":"^application:sha256:[0-9a-f]{64}$"},"ChildId":{"type":"string","pattern":"^sha256:[0-9a-f]{64}$"},"AuthorizationId":{"type":"string","pattern":"^authorization:sha256:[0-9a-f]{64}$"},"SnapshotHandle":{"type":"object","required":["kind","id","schema_version"],"properties":{"kind":{"const":"snapshot-handle"},"id":{"$ref":"#/$defs/SnapshotId"},"schema_version":{"const":5}},"additionalProperties":false},"AnalysisHandle":{"type":"object","required":["kind","id","schema_version"],"properties":{"kind":{"const":"analysis-handle"},"id":{"$ref":"#/$defs/AnalysisId"},"schema_version":{"const":7}},"additionalProperties":false},"ProposalHandle":{"type":"object","required":["kind","id","schema_version"],"properties":{"kind":{"const":"proposal-handle"},"id":{"$ref":"#/$defs/ProposalId"},"schema_version":{"const":1}},"additionalProperties":false},"ProposalRevisionHandle":{"type":"object","required":["kind","id","schema_version"],"properties":{"kind":{"const":"proposal-revision-handle"},"id":{"$ref":"#/$defs/ProposalRevisionId"},"schema_version":{"const":1}},"additionalProperties":false},"ReadinessHandle":{"type":"object","required":["kind","id","schema_version"],"properties":{"kind":{"const":"readiness-handle"},"id":{"$ref":"#/$defs/ReadinessId"},"schema_version":{"const":1}},"additionalProperties":false},"ApplicationHandle":{"type":"object","required":["kind","id","schema_version"],"properties":{"kind":{"const":"application-handle"},"id":{"$ref":"#/$defs/ApplicationId"},"schema_version":{"const":1}},"additionalProperties":false},"SnapshotChildHandle":{"type":"object","required":["kind","snapshot","child_kind","child_id","schema_version"],"properties":{"kind":{"const":"snapshot-child-handle"},"snapshot":{"$ref":"#/$defs/SnapshotHandle"},"child_kind":{"enum":["policy","relationship"]},"child_id":{"$ref":"#/$defs/NonEmptyString"},"schema_version":{"const":5}},"additionalProperties":false},"AnalysisChildHandle":{"type":"object","required":["kind","analysis","child_kind","child_id","schema_version"],"properties":{"kind":{"const":"analysis-child-handle"},"analysis":{"$ref":"#/$defs/AnalysisHandle"},"child_kind":{"enum":["context","fact-requirement","fact-observation","obligation","coverage-requirement","coverage-certificate"]},"child_id":{"$ref":"#/$defs/ChildId"},"schema_version":{"const":7}},"additionalProperties":false},"AnalysisMaterialHandle":{"oneOf":[{"$ref":"#/$defs/SnapshotHandle"},{"$ref":"#/$defs/ProposalRevisionHandle"}]},"InspectableHandle":{"oneOf":[{"$ref":"#/$defs/SnapshotHandle"},{"$ref":"#/$defs/AnalysisHandle"},{"$ref":"#/$defs/SnapshotChildHandle"},{"$ref":"#/$defs/AnalysisChildHandle"}]},"ActiveSnapshotSummary":{"type":"object","required":["snapshot","lifecycle","source_revision","created_at"],"properties":{"snapshot":{"$ref":"#/$defs/SnapshotHandle"},"lifecycle":{"const":"active"},"source_revision":{"$ref":"#/$defs/NonEmptyString"},"created_at":{"$ref":"#/$defs/Timestamp"}},"additionalProperties":false},"QuarantinedSnapshotSummary":{"type":"object","required":["snapshot","lifecycle","source_revision","created_at","purge_deadline"],"properties":{"snapshot":{"$ref":"#/$defs/SnapshotHandle"},"lifecycle":{"const":"quarantined"},"source_revision":{"$ref":"#/$defs/NonEmptyString"},"created_at":{"$ref":"#/$defs/Timestamp"},"purge_deadline":{"$ref":"#/$defs/Timestamp"}},"additionalProperties":false},"SnapshotSummary":{"oneOf":[{"$ref":"#/$defs/ActiveSnapshotSummary"},{"$ref":"#/$defs/QuarantinedSnapshotSummary"}]},"CreateSnapshotCall":{"type":"object","required":["kind"],"properties":{"kind":{"const":"create-snapshot"}},"additionalProperties":false},"CreateSnapshotResult":{"type":"object","required":["kind","snapshot"],"properties":{"kind":{"const":"create-snapshot-result"},"snapshot":{"$ref":"#/$defs/ActiveSnapshotSummary"}},"additionalProperties":false},"FindSnapshotsCall":{"type":"object","required":["kind"],"properties":{"kind":{"const":"find-snapshots"},"lifecycle":{"enum":["active","quarantined"],"default":"active"},"after":{"$ref":"#/$defs/SnapshotHandle"},"limit":{"type":"integer","minimum":1,"default":50}},"additionalProperties":false},"FindSnapshotsResult":{"type":"object","required":["kind","snapshots"],"properties":{"kind":{"const":"find-snapshots-result"},"snapshots":{"type":"array","items":{"$ref":"#/$defs/SnapshotSummary"}},"continuation":{"$ref":"#/$defs/SnapshotHandle"}},"additionalProperties":false},"StandardsChangePurpose":{"type":"object","required":["summary","rationale","evidence"],"properties":{"summary":{"$ref":"#/$defs/NonEmptyString"},"rationale":{"$ref":"#/$defs/NonEmptyString"},"evidence":{"type":"array","minItems":1,"uniqueItems":true,"items":{"$ref":"#/$defs/EvidenceReference"}}},"additionalProperties":false},"StandardContent":{"type":"object","required":["id","title","role","level","applies_when","does_not_apply_when","verification","body"],"properties":{"id":{"$ref":"#/$defs/CanonicalId"},"title":{"$ref":"#/$defs/NonEmptyString"},"role":{"enum":["core","router","workflow","profile","topic","reference"]},"level":{"enum":["MUST","SHOULD","PROFILE","REFERENCE"]},"applies_when":{"$ref":"#/$defs/NonEmptyString"},"does_not_apply_when":{"$ref":"#/$defs/NonEmptyString"},"verification":{"$ref":"#/$defs/NonEmptyString"},"body":{"$ref":"#/$defs/NonEmptyString"}},"additionalProperties":false},"NewPolicyUnit":{"type":"object","required":["id","heading_chain","semantic_revision","intent","aliases","predecessors","successors"],"properties":{"id":{"$ref":"#/$defs/CanonicalId"},"heading_chain":{"type":"array","minItems":1,"items":{"$ref":"#/$defs/NonEmptyString"}},"semantic_revision":{"const":1},"intent":{"$ref":"#/$defs/NonEmptyString"},"aliases":{"type":"array","uniqueItems":true,"items":{"$ref":"#/$defs/CanonicalId"}},"predecessors":{"type":"array","uniqueItems":true,"items":{"$ref":"#/$defs/CanonicalId"}},"successors":{"type":"array","uniqueItems":true,"items":{"$ref":"#/$defs/CanonicalId"}}},"additionalProperties":false},"PreservePolicySemantics":{"type":"object","required":["kind","semantic_revision","intent"],"properties":{"kind":{"const":"preserve"},"semantic_revision":{"type":"integer","minimum":1},"intent":{"$ref":"#/$defs/NonEmptyString"}},"additionalProperties":false},"ChangePolicySemantics":{"type":"object","required":["kind","accepted_semantic_revision","proposed_semantic_revision","intent"],"properties":{"kind":{"const":"change"},"accepted_semantic_revision":{"type":"integer","minimum":1},"proposed_semantic_revision":{"type":"integer","minimum":1},"intent":{"$ref":"#/$defs/NonEmptyString"}},"additionalProperties":false},"PolicySemanticIntent":{"oneOf":[{"$ref":"#/$defs/PreservePolicySemantics"},{"$ref":"#/$defs/ChangePolicySemantics"}]},"CreateStandardEdit":{"type":"object","required":["kind","standard","requires","specializes","policy_units"],"properties":{"kind":{"const":"create-standard"},"standard":{"$ref":"#/$defs/StandardContent"},"requires":{"type":"array","uniqueItems":true,"items":{"$ref":"#/$defs/CanonicalId"}},"specializes":{"type":"array","uniqueItems":true,"items":{"$ref":"#/$defs/CanonicalId"}},"policy_units":{"type":"array","uniqueItems":true,"items":{"$ref":"#/$defs/NewPolicyUnit"}}},"additionalProperties":false},"RegisterPolicyUnitEdit":{"type":"object","description":"Register an explicitly selected policy scope in an existing standard. The Engine owns declaration placement and validates the final candidate.","required":["kind","standard","policy_unit"],"properties":{"kind":{"const":"register-policy-unit"},"standard":{"$ref":"#/$defs/CanonicalId"},"policy_unit":{"$ref":"#/$defs/NewPolicyUnit"}},"additionalProperties":false},"ReviseStandardEdit":{"type":"object","required":["kind","standard"],"properties":{"kind":{"const":"revise-standard"},"standard":{"$ref":"#/$defs/StandardContent"},"scope_updates":{"type":"array","items":{"$ref":"#/$defs/PolicyScopeUpdate"}}},"additionalProperties":false},"RevisePolicyUnitEdit":{"type":"object","required":["kind","policy","title","body","semantics"],"properties":{"kind":{"const":"revise-policy-unit"},"policy":{"$ref":"#/$defs/CanonicalId"},"title":{"$ref":"#/$defs/NonEmptyString"},"body":{"$ref":"#/$defs/NonEmptyString"},"semantics":{"$ref":"#/$defs/PolicySemanticIntent"}},"additionalProperties":false},"MovePolicyUnitEdit":{"type":"object","required":["kind","policy","standard","semantics"],"properties":{"kind":{"const":"move-policy-unit"},"policy":{"$ref":"#/$defs/CanonicalId"},"standard":{"$ref":"#/$defs/CanonicalId"},"after_policy":{"$ref":"#/$defs/CanonicalId"},"semantics":{"$ref":"#/$defs/PolicySemanticIntent"}},"additionalProperties":false},"RetirePolicyUnitEdit":{"type":"object","required":["kind","policy","retired_semantic_revision","successors","relationship_dispositions","evidence"],"properties":{"kind":{"const":"retire-policy-unit"},"policy":{"$ref":"#/$defs/CanonicalId"},"retired_semantic_revision":{"type":"integer","minimum":1},"successors":{"type":"array","uniqueItems":true,"items":{"$ref":"#/$defs/CanonicalId"}},"relationship_dispositions":{"type":"array","uniqueItems":true,"items":{"$ref":"#/$defs/RelationshipDisposition"}},"evidence":{"type":"array","minItems":1,"uniqueItems":true,"items":{"$ref":"#/$defs/EvidenceReference"}}},"additionalProperties":false},"RetireStandardEdit":{"type":"object","required":["kind","standard","successors","relationship_dispositions","evidence"],"properties":{"kind":{"const":"retire-standard"},"standard":{"$ref":"#/$defs/CanonicalId"},"successors":{"type":"array","uniqueItems":true,"items":{"$ref":"#/$defs/CanonicalId"}},"relationship_dispositions":{"type":"array","uniqueItems":true,"items":{"$ref":"#/$defs/RelationshipDisposition"}},"evidence":{"type":"array","minItems":1,"uniqueItems":true,"items":{"$ref":"#/$defs/EvidenceReference"}}},"additionalProperties":false},"ReplaceStandardRelationshipsEdit":{"type":"object","required":["kind","standard","requires","specializes","rationale"],"properties":{"kind":{"const":"replace-standard-relationships"},"standard":{"$ref":"#/$defs/CanonicalId"},"requires":{"type":"array","uniqueItems":true,"items":{"$ref":"#/$defs/CanonicalId"}},"specializes":{"type":"array","uniqueItems":true,"items":{"$ref":"#/$defs/CanonicalId"}},"rationale":{"$ref":"#/$defs/NonEmptyString"}},"additionalProperties":false},"AuthoringTargetHandle":{"type":"object","required":["kind","snapshot","id","schema_version"],"properties":{"kind":{"const":"authoring-target-handle"},"snapshot":{"$ref":"#/$defs/SnapshotHandle"},"id":{"$ref":"#/$defs/ChildId"},"schema_version":{"const":5}},"additionalProperties":false},"RelationshipConsumer":{"oneOf":[{"$ref":"#/$defs/CanonicalId"},{"$ref":"#/$defs/AuthoringTargetHandle"}]},"PolicyRelationship":{"type":"object","required":["source_policy","consumer","relation","applicability","source_scope","consumer_scope","evidence_owner","rationale"],"properties":{"source_policy":{"$ref":"#/$defs/CanonicalId"},"consumer":{"$ref":"#/$defs/RelationshipConsumer"},"relation":{"enum":["normative-consumer","router-projection","prompt-projection","template-projection","reference-projection","fixture-projection","enforcement-suite-projection","documentation-projection","implementation-projection"]},"applicability":{"$ref":"#/$defs/ApplicabilityExpression"},"source_scope":{"oneOf":[{"$ref":"#/$defs/ReviewScope"},{"type":"null"}]},"consumer_scope":{"oneOf":[{"$ref":"#/$defs/ReviewScope"},{"type":"null"}]},"evidence_owner":{"$ref":"#/$defs/CanonicalId"},"rationale":{"$ref":"#/$defs/NonEmptyString"}},"additionalProperties":false},"PutPolicyRelationshipEdit":{"type":"object","required":["kind","relationship"],"properties":{"kind":{"const":"put-policy-relationship"},"relationship":{"$ref":"#/$defs/PolicyRelationship"}},"additionalProperties":false},"RemovePolicyRelationshipEdit":{"type":"object","required":["kind","relationship"],"properties":{"kind":{"const":"remove-policy-relationship"},"relationship":{"$ref":"#/$defs/PolicyRelationship"}},"additionalProperties":false},"ModuleRelationshipKey":{"type":"object","required":["kind","relation","source","target"],"properties":{"kind":{"const":"module-relationship"},"relation":{"enum":["requires","specializes"]},"source":{"$ref":"#/$defs/CanonicalId"},"target":{"$ref":"#/$defs/CanonicalId"}},"additionalProperties":false},"PolicyRelationshipKey":{"type":"object","required":["kind","source_policy","consumer","relation"],"properties":{"kind":{"const":"policy-relationship"},"source_policy":{"$ref":"#/$defs/CanonicalId"},"consumer":{"$ref":"#/$defs/RelationshipConsumer"},"relation":{"$ref":"#/$defs/CanonicalId"}},"additionalProperties":false},"RelationshipKey":{"oneOf":[{"$ref":"#/$defs/ModuleRelationshipKey"},{"$ref":"#/$defs/PolicyRelationshipKey"}]},"RelationshipDisposition":{"type":"object","required":["relationship","disposition","rationale","evidence"],"properties":{"relationship":{"$ref":"#/$defs/RelationshipKey"},"disposition":{"enum":["remove","retarget"]},"replacement_consumer":{"$ref":"#/$defs/RelationshipConsumer"},"rationale":{"$ref":"#/$defs/NonEmptyString"},"evidence":{"type":"array","minItems":1,"uniqueItems":true,"items":{"$ref":"#/$defs/EvidenceReference"}}},"additionalProperties":false},"StandardEdit":{"oneOf":[{"$ref":"#/$defs/CreateStandardEdit"},{"$ref":"#/$defs/RegisterPolicyUnitEdit"},{"$ref":"#/$defs/ReviseStandardEdit"},{"$ref":"#/$defs/RevisePolicyUnitEdit"},{"$ref":"#/$defs/MovePolicyUnitEdit"},{"$ref":"#/$defs/RetirePolicyUnitEdit"},{"$ref":"#/$defs/RetireStandardEdit"},{"$ref":"#/$defs/ReplaceStandardRelationshipsEdit"},{"$ref":"#/$defs/PutPolicyRelationshipEdit"},{"$ref":"#/$defs/RemovePolicyRelationshipEdit"},{"$ref":"#/$defs/PutRoutingRuleEdit"},{"$ref":"#/$defs/RemoveRoutingRuleEdit"},{"$ref":"#/$defs/PutRoutingFactEdit"},{"$ref":"#/$defs/RemoveRoutingFactEdit"},{"$ref":"#/$defs/AuditPolicyUnitEdit"},{"$ref":"#/$defs/RewriteNavigationIndexEdit"},{"$ref":"#/$defs/PutDecisionProvenanceEdit"},{"$ref":"#/$defs/RetireDecisionProvenanceEdit"},{"$ref":"#/$defs/ApproveApplicationContentEdit"},{"$ref":"#/$defs/WithdrawApplicationContentEdit"},{"$ref":"#/$defs/ReviseOperationalArtifactEdit"},{"$ref":"#/$defs/RegisterConsumerEdit"}]},"StandardsChangeSet":{"type":"object","required":["purpose","edits"],"properties":{"purpose":{"$ref":"#/$defs/StandardsChangePurpose"},"edits":{"type":"array","minItems":1,"uniqueItems":true,"items":{"$ref":"#/$defs/StandardEdit"}}},"additionalProperties":false},"ProposalSummary":{"type":"object","required":["proposal","head_revision"],"properties":{"proposal":{"$ref":"#/$defs/ProposalHandle"},"head_revision":{"$ref":"#/$defs/ProposalRevisionHandle"}},"additionalProperties":false},"CreateProposalCall":{"type":"object","required":["kind","base_snapshot","change_set"],"properties":{"kind":{"const":"create-proposal"},"base_snapshot":{"$ref":"#/$defs/SnapshotHandle"},"change_set":{"$ref":"#/$defs/StandardsChangeSet"}},"additionalProperties":false},"CreateProposalResult":{"type":"object","required":["kind","proposal","revision"],"properties":{"kind":{"const":"create-proposal-result"},"proposal":{"$ref":"#/$defs/ProposalHandle"},"revision":{"$ref":"#/$defs/ProposalRevisionHandle"}},"additionalProperties":false},"FindProposalsCall":{"type":"object","required":["kind"],"properties":{"kind":{"const":"find-proposals"},"after":{"$ref":"#/$defs/ProposalHandle"},"limit":{"type":"integer","minimum":1,"default":50}},"additionalProperties":false},"FindProposalsResult":{"type":"object","required":["kind","proposals"],"properties":{"kind":{"const":"find-proposals-result"},"proposals":{"type":"array","items":{"$ref":"#/$defs/ProposalSummary"}},"continuation":{"$ref":"#/$defs/ProposalHandle"}},"additionalProperties":false},"ReviseProposalCall":{"type":"object","required":["kind","expected_revision","change_set"],"properties":{"kind":{"const":"revise-proposal"},"expected_revision":{"$ref":"#/$defs/ProposalRevisionHandle"},"change_set":{"$ref":"#/$defs/StandardsChangeSet"}},"additionalProperties":false},"ReviseProposalResult":{"type":"object","required":["kind","proposal","revision"],"properties":{"kind":{"const":"revise-proposal-result"},"proposal":{"$ref":"#/$defs/ProposalHandle"},"revision":{"$ref":"#/$defs/ProposalRevisionHandle"}},"additionalProperties":false},"DeleteSnapshotCall":{"type":"object","required":["kind","snapshot"],"properties":{"kind":{"const":"delete-snapshot"},"snapshot":{"$ref":"#/$defs/SnapshotHandle"}},"additionalProperties":false},"DeleteSnapshotResult":{"type":"object","required":["kind","snapshot","purge_deadline"],"properties":{"kind":{"const":"delete-snapshot-result"},"snapshot":{"$ref":"#/$defs/SnapshotHandle"},"purge_deadline":{"$ref":"#/$defs/Timestamp"}},"additionalProperties":false},"UndeleteSnapshotCall":{"type":"object","required":["kind","snapshot"],"properties":{"kind":{"const":"undelete-snapshot"},"snapshot":{"$ref":"#/$defs/SnapshotHandle"}},"additionalProperties":false},"UndeleteSnapshotResult":{"type":"object","required":["kind","snapshot"],"properties":{"kind":{"const":"undelete-snapshot-result"},"snapshot":{"$ref":"#/$defs/ActiveSnapshotSummary"}},"additionalProperties":false},"QueryNextOperation":{"type":"object","required":["operation","request_kind","snapshot"],"properties":{"operation":{"const":"query"},"request_kind":{"enum":["route","read","related"]},"target":{"$ref":"#/$defs/CanonicalId"},"snapshot":{"$ref":"#/$defs/SnapshotHandle"}},"additionalProperties":false},"QueryProposalNextOperation":{"type":"object","required":["operation","request_kind","revision"],"properties":{"operation":{"const":"query_proposal"},"request_kind":{"enum":["route","read","related"]},"target":{"$ref":"#/$defs/CanonicalId"},"revision":{"$ref":"#/$defs/ProposalRevisionHandle"}},"additionalProperties":false},"ResolveNextOperation":{"type":"object","required":["operation","request_kind","analysis"],"properties":{"operation":{"const":"resolve"},"request_kind":{"enum":["provide-fact","consumer-disposition","impact-disposition","coverage-attestation"]},"target":{"$ref":"#/$defs/CanonicalId"},"work":{"$ref":"#/$defs/AnalysisChildHandle"},"analysis":{"$ref":"#/$defs/AnalysisHandle"}},"additionalProperties":false},"InspectNextOperation":{"type":"object","required":["operation","request_kind","handle"],"properties":{"operation":{"const":"inspect"},"request_kind":{"const":"inspect"},"handle":{"$ref":"#/$defs/InspectableHandle"}},"additionalProperties":false},"NextOperation":{"oneOf":[{"$ref":"#/$defs/QueryNextOperation"},{"$ref":"#/$defs/ResolveNextOperation"},{"$ref":"#/$defs/InspectNextOperation"},{"$ref":"#/$defs/FocusedQueryNextOperation"}]},"QueryCall":{"type":"object","required":["snapshot","request"],"properties":{"snapshot":{"$ref":"#/$defs/SnapshotHandle"},"request":{"$ref":"#/$defs/QueryRequest"}},"additionalProperties":false},"QueryProposalCall":{"type":"object","required":["revision","request"],"properties":{"revision":{"$ref":"#/$defs/ProposalRevisionHandle"},"request":{"$ref":"#/$defs/QueryRequest"}},"additionalProperties":false},"AnalyzeProposalCall":{"type":"object","required":["revision"],"properties":{"revision":{"$ref":"#/$defs/ProposalRevisionHandle"}},"additionalProperties":false},"ReviewDecision":{"type":"object","required":["owner","decision","rationale","evidence"],"properties":{"owner":{"enum":["consumer","impact","audit"]},"decision":{"const":"accept"},"rationale":{"$ref":"#/$defs/NonEmptyString"},"evidence":{"type":"array","minItems":1,"uniqueItems":true,"items":{"$ref":"#/$defs/EvidenceReference"}}},"additionalProperties":false},"ReviewProposalCall":{"type":"object","required":["kind","analysis","decisions"],"properties":{"kind":{"const":"review-proposal"},"analysis":{"$ref":"#/$defs/AnalysisHandle"},"decisions":{"type":"array","minItems":3,"maxItems":3,"uniqueItems":true,"items":{"$ref":"#/$defs/ReviewDecision"}},"prior_readiness":{"$ref":"#/$defs/ReadinessHandle"}},"additionalProperties":false},"ReviewProposalResult":{"type":"object","required":["kind","readiness","revision","status"],"properties":{"kind":{"const":"review-proposal-result"},"readiness":{"$ref":"#/$defs/ReadinessHandle"},"revision":{"$ref":"#/$defs/ProposalRevisionHandle"},"status":{"const":"ready"}},"additionalProperties":false},"ApplyProposalCall":{"type":"object","required":["kind","readiness"],"properties":{"kind":{"const":"apply-proposal"},"readiness":{"$ref":"#/$defs/ReadinessHandle"}},"additionalProperties":false},"ApplyProposalResult":{"type":"object","required":["kind","application","status"],"properties":{"kind":{"const":"apply-proposal-result"},"application":{"$ref":"#/$defs/ApplicationHandle"},"status":{"const":"applied"}},"additionalProperties":false},"RecoverApplicationCall":{"type":"object","required":["kind","readiness"],"properties":{"kind":{"const":"recover-application"},"readiness":{"$ref":"#/$defs/ReadinessHandle"}},"additionalProperties":false},"RecoverApplicationResult":{"type":"object","required":["kind","application","status"],"properties":{"kind":{"const":"recover-application-result"},"application":{"$ref":"#/$defs/ApplicationHandle"},"status":{"const":"applied"}},"additionalProperties":false},"ApplicationRecoveryRequiredResult":{"type":"object","required":["kind","application","status","code","outcome","message"],"properties":{"kind":{"const":"application-recovery-required-result"},"application":{"$ref":"#/$defs/ApplicationHandle"},"status":{"const":"recovery-required"},"code":{"enum":["APPLICATION.PUBLICATION_UNAVAILABLE","APPLICATION.OBSERVATION_UNAVAILABLE","APPLICATION.OUTCOME_PERSISTENCE_UNAVAILABLE","APPLICATION.RECOVERY_TARGET_UNCERTAIN","APPLICATION.RECOVERY_TARGET_DIVERGED"]},"outcome":{"const":"unavailable"},"message":{"$ref":"#/$defs/NonEmptyString"}},"additionalProperties":false},"PolicySummary":{"type":"object","required":["handle","authority","scope"],"properties":{"handle":{"$ref":"#/$defs/SnapshotChildHandle"},"authority":{"enum":["normative","projection","contextual","evidence"]},"scope":{"$ref":"#/$defs/ReviewScope"}},"additionalProperties":false},"RelationshipSummary":{"type":"object","required":["handle","source","target","relation","groups","direction","traversal_eligible","applicability"],"properties":{"handle":{"$ref":"#/$defs/SnapshotChildHandle"},"source":{"$ref":"#/$defs/CanonicalId"},"target":{"$ref":"#/$defs/CanonicalId"},"relation":{"$ref":"#/$defs/CanonicalId"},"groups":{"type":"array","items":{"$ref":"#/$defs/CanonicalId"},"minItems":1,"uniqueItems":true},"direction":{"enum":["incoming","outgoing"]},"traversal_eligible":{"type":"boolean"},"applicability":{"enum":["true","false","unknown","not-declared"]}},"additionalProperties":false},"ProposalPolicySummary":{"type":"object","required":["id","authority","scope"],"properties":{"id":{"$ref":"#/$defs/CanonicalId"},"authority":{"enum":["normative","projection","contextual","evidence"]},"scope":{"$ref":"#/$defs/ReviewScope"}},"additionalProperties":false},"ProposalRelationshipSummary":{"type":"object","required":["source","target","relation","groups","direction","traversal_eligible","applicability"],"properties":{"source":{"$ref":"#/$defs/CanonicalId"},"target":{"$ref":"#/$defs/CanonicalId"},"relation":{"$ref":"#/$defs/CanonicalId"},"groups":{"type":"array","items":{"$ref":"#/$defs/CanonicalId"},"minItems":1,"uniqueItems":true},"direction":{"enum":["incoming","outgoing"]},"traversal_eligible":{"type":"boolean"},"applicability":{"enum":["true","false","unknown","not-declared"]}},"additionalProperties":false},"RouteResult":{"type":"object","required":["kind","snapshot","reading_plan","unresolved_questions","next_operations"],"properties":{"kind":{"const":"route-result"},"snapshot":{"$ref":"#/$defs/SnapshotHandle"},"reading_plan":{"type":"array","items":{"$ref":"#/$defs/ReadingPlanEntry"}},"unresolved_questions":{"type":"array","items":{"$ref":"#/$defs/Question"}},"next_operations":{"type":"array","items":{"$ref":"#/$defs/NextOperation"}},"summary":{"type":"string"}},"additionalProperties":false},"ReadResult":{"type":"object","required":["kind","snapshot","policy","content","requires","specializes","related","next_operations"],"properties":{"kind":{"const":"read-result"},"snapshot":{"$ref":"#/$defs/SnapshotHandle"},"policy":{"$ref":"#/$defs/PolicySummary"},"content":{"type":"string"},"requires":{"type":"array","items":{"$ref":"#/$defs/CanonicalId"},"uniqueItems":true},"specializes":{"type":"array","items":{"$ref":"#/$defs/CanonicalId"},"uniqueItems":true},"related":{"type":"array","items":{"$ref":"#/$defs/RelationshipSummary"}},"next_operations":{"type":"array","items":{"$ref":"#/$defs/NextOperation"}},"summary":{"type":"string"},"routing":{"$ref":"#/$defs/RoutingConfiguration"},"coverage":{"$ref":"#/$defs/ReadCoverage"},"application_exposure":{"$ref":"#/$defs/ApplicationExposureState"},"provenance":{"type":"array","items":{"$ref":"#/$defs/CanonicalId"}}},"additionalProperties":false},"PolicyUnitMapping":{"type":"object","required":["state","policy_units"],"properties":{"state":{"enum":["exact-policy-unit","policy-units-present","incomplete"]},"reason":{"const":"no-policy-units"},"policy_units":{"type":"array","items":{"$ref":"#/$defs/CanonicalId"},"uniqueItems":true}},"additionalProperties":false},"RelatedResult":{"type":"object","required":["kind","snapshot","target","policy_unit_mapping","relationships","next_operations"],"properties":{"kind":{"const":"related-result"},"snapshot":{"$ref":"#/$defs/SnapshotHandle"},"target":{"$ref":"#/$defs/CanonicalId"},"authoring_target":{"$ref":"#/$defs/AuthoringTargetHandle"},"policy_unit_mapping":{"$ref":"#/$defs/PolicyUnitMapping"},"relationships":{"type":"array","items":{"$ref":"#/$defs/RelationshipSummary"}},"next_operations":{"type":"array","items":{"$ref":"#/$defs/NextOperation"}},"summary":{"type":"string"}},"additionalProperties":false},"QueryResult":{"oneOf":[{"$ref":"#/$defs/RouteResult"},{"$ref":"#/$defs/ReadResult"},{"$ref":"#/$defs/RelatedResult"},{"$ref":"#/$defs/NavigationIndexesResult"},{"$ref":"#/$defs/ProvenanceReadResult"},{"$ref":"#/$defs/OperationalReadResult"}]},"ProposalRouteResult":{"type":"object","required":["kind","revision","reading_plan","unresolved_questions","next_operations"],"properties":{"kind":{"const":"proposal-route-result"},"revision":{"$ref":"#/$defs/ProposalRevisionHandle"},"reading_plan":{"type":"array","items":{"$ref":"#/$defs/ReadingPlanEntry"}},"unresolved_questions":{"type":"array","items":{"$ref":"#/$defs/Question"}},"next_operations":{"type":"array","items":{"$ref":"#/$defs/QueryProposalNextOperation"}},"summary":{"type":"string"}},"additionalProperties":false},"ProposalReadResult":{"type":"object","required":["kind","revision","policy","content","requires","specializes","related","next_operations"],"properties":{"kind":{"const":"proposal-read-result"},"revision":{"$ref":"#/$defs/ProposalRevisionHandle"},"policy":{"$ref":"#/$defs/ProposalPolicySummary"},"content":{"type":"string"},"requires":{"type":"array","items":{"$ref":"#/$defs/CanonicalId"},"uniqueItems":true},"specializes":{"type":"array","items":{"$ref":"#/$defs/CanonicalId"},"uniqueItems":true},"related":{"type":"array","items":{"$ref":"#/$defs/ProposalRelationshipSummary"}},"next_operations":{"type":"array","items":{"$ref":"#/$defs/QueryProposalNextOperation"}},"summary":{"type":"string"},"routing":{"$ref":"#/$defs/RoutingConfiguration"},"coverage":{"$ref":"#/$defs/ReadCoverage"},"application_exposure":{"$ref":"#/$defs/ApplicationExposureState"},"provenance":{"type":"array","items":{"$ref":"#/$defs/CanonicalId"}}},"additionalProperties":false},"ProposalRelatedResult":{"type":"object","required":["kind","revision","target","policy_unit_mapping","relationships","next_operations"],"properties":{"kind":{"const":"proposal-related-result"},"revision":{"$ref":"#/$defs/ProposalRevisionHandle"},"target":{"$ref":"#/$defs/CanonicalId"},"authoring_target":{"$ref":"#/$defs/AuthoringTargetHandle"},"policy_unit_mapping":{"$ref":"#/$defs/PolicyUnitMapping"},"relationships":{"type":"array","items":{"$ref":"#/$defs/ProposalRelationshipSummary"}},"next_operations":{"type":"array","items":{"$ref":"#/$defs/QueryProposalNextOperation"}},"summary":{"type":"string"}},"additionalProperties":false},"QueryProposalResult":{"oneOf":[{"$ref":"#/$defs/ProposalRouteResult"},{"$ref":"#/$defs/ProposalReadResult"},{"$ref":"#/$defs/ProposalRelatedResult"},{"$ref":"#/$defs/NavigationIndexesResult"},{"$ref":"#/$defs/ProvenanceReadResult"},{"$ref":"#/$defs/OperationalReadResult"}]},"AnalysisRequest":{"type":"object","required":["kind","base_snapshot","proposed_snapshot","changes","semantic_proposals","contract_version"],"properties":{"kind":{"const":"analysis-request"},"base_snapshot":{"$ref":"#/$defs/SnapshotHandle"},"proposed_snapshot":{"$ref":"#/$defs/SnapshotHandle"},"changes":{"type":"array","items":{"$ref":"#/$defs/ChangeDescriptor"},"minItems":1},"semantic_proposals":{"type":"array","items":{"$ref":"#/$defs/SemanticProposal"},"uniqueItems":true},"prior_analysis":{"$ref":"#/$defs/AnalysisHandle"},"contract_version":{"const":6}},"additionalProperties":false},"PrepareCall":{"type":"object","required":["request"],"properties":{"request":{"$ref":"#/$defs/AnalysisRequest"}},"additionalProperties":false},"AnalysisContext":{"type":"object","required":["kind","handle","subjects","changes","semantic_proposals"],"properties":{"kind":{"const":"analysis-context"},"handle":{"$ref":"#/$defs/AnalysisChildHandle"},"subjects":{"type":"array","items":{"$ref":"#/$defs/ChangedPolicyUnit"},"uniqueItems":true},"changes":{"type":"array","items":{"$ref":"#/$defs/ChangeDescriptor"},"minItems":1,"uniqueItems":true},"semantic_proposals":{"type":"array","items":{"$ref":"#/$defs/SemanticProposal"},"uniqueItems":true}},"additionalProperties":false},"AuthorizationReference":{"type":"object","required":["id","issuer","capability","authority_digest"],"properties":{"id":{"$ref":"#/$defs/AuthorizationId"},"issuer":{"$ref":"#/$defs/CanonicalId"},"capability":{"$ref":"#/$defs/CanonicalId"},"authority_digest":{"$ref":"#/$defs/Digest"}},"additionalProperties":false},"ProviderReference":{"type":"object","required":["id","contract","contract_version","input_digest"],"properties":{"id":{"$ref":"#/$defs/CanonicalId"},"contract":{"$ref":"#/$defs/CanonicalId"},"contract_version":{"$ref":"#/$defs/NonEmptyString"},"input_digest":{"$ref":"#/$defs/Digest"}},"additionalProperties":false},"AuthorizationRecord":{"type":"object","required":["reference","issuer_semantic_revision","principal","action","subject_kind","subject_id","authorization_evidence","revocation_authority","revocation_authority_semantic_revision","revocation_evidence"],"properties":{"reference":{"$ref":"#/$defs/AuthorizationReference"},"issuer_semantic_revision":{"type":"integer","minimum":1},"principal":{"$ref":"#/$defs/CanonicalId"},"action":{"$ref":"#/$defs/CanonicalId"},"subject_kind":{"$ref":"#/$defs/CanonicalId"},"subject_id":{"$ref":"#/$defs/NonEmptyString"},"authorization_evidence":{"type":"array","items":{"$ref":"#/$defs/EvidenceReference"},"minItems":1,"uniqueItems":true},"revocation_authority":{"$ref":"#/$defs/CanonicalId"},"revocation_authority_semantic_revision":{"type":"integer","minimum":1},"revocation_evidence":{"type":"array","items":{"$ref":"#/$defs/EvidenceReference"},"minItems":1,"uniqueItems":true}},"additionalProperties":false},"DomainContractReference":{"type":"object","required":["id","version"],"properties":{"id":{"$ref":"#/$defs/CanonicalId"},"version":{"$ref":"#/$defs/NonEmptyString"}},"additionalProperties":false},"AnalysisExecutionContractView":{"type":"object","required":["authorization_authority_digest","providers"],"properties":{"authorization_authority_digest":{"oneOf":[{"$ref":"#/$defs/Digest"},{"type":"null"}]},"providers":{"type":"array","items":{"$ref":"#/$defs/ProviderReference"},"uniqueItems":true}},"additionalProperties":false},"FactRequirement":{"type":"object","required":["kind","handle","fact","fact_semantic_revision","fact_contract_digest","context","value_contract","answer_contract","evidence_contract","authorization_capability"],"properties":{"kind":{"const":"fact-requirement"},"handle":{"$ref":"#/$defs/AnalysisChildHandle"},"fact":{"$ref":"#/$defs/CanonicalId"},"fact_semantic_revision":{"type":"integer","minimum":1},"fact_contract_digest":{"$ref":"#/$defs/Digest"},"context":{"$ref":"#/$defs/AnalysisChildHandle"},"value_contract":{"$ref":"#/$defs/FactValueContract"},"answer_contract":{"$ref":"#/$defs/CanonicalId"},"evidence_contract":{"$ref":"#/$defs/CanonicalId"},"authorization_capability":{"$ref":"#/$defs/CanonicalId"}},"additionalProperties":false},"FactRequirementWork":{"type":"object","required":["requirement","prompt","dependent_programs"],"properties":{"requirement":{"$ref":"#/$defs/FactRequirement"},"prompt":{"$ref":"#/$defs/NonEmptyString"},"dependent_programs":{"type":"array","items":{"$ref":"#/$defs/NonEmptyString"},"minItems":1,"uniqueItems":true}},"additionalProperties":false},"FactObservation":{"type":"object","required":["kind","handle","requirement","value","evidence","authorization"],"properties":{"kind":{"const":"fact-observation"},"handle":{"$ref":"#/$defs/AnalysisChildHandle"},"requirement":{"$ref":"#/$defs/AnalysisChildHandle"},"value":{"$ref":"#/$defs/FactValue"},"evidence":{"type":"array","items":{"$ref":"#/$defs/EvidenceReference"},"minItems":1,"uniqueItems":true},"authorization":{"$ref":"#/$defs/AuthorizationReference"},"provider":{"$ref":"#/$defs/ProviderReference"}},"additionalProperties":false},"Obligation":{"type":"object","required":["handle","kind","target","scope","reasons","state","permitted_submissions","fingerprint"],"properties":{"handle":{"$ref":"#/$defs/AnalysisChildHandle"},"kind":{"enum":["consumer-review","impact-review","lifecycle-impact-review","audit-coverage","unmapped-normative-change"]},"target":{"$ref":"#/$defs/CanonicalId"},"scope":{"$ref":"#/$defs/ReviewScope"},"reasons":{"type":"array","items":{"$ref":"#/$defs/SelectionReason"},"minItems":1,"uniqueItems":true},"state":{"enum":["required","resolved","blocked"]},"applicability":{"enum":["true","false","unknown","not-declared"]},"permitted_submissions":{"type":"array","items":{"enum":["consumer-disposition","impact-disposition","coverage-attestation"]},"minItems":1,"uniqueItems":true},"review_contract":{"$ref":"#/$defs/ConsumerReviewContract"},"fingerprint":{"$ref":"#/$defs/DecisionFingerprint"}},"additionalProperties":false},"ProvideFactSubmission":{"type":"object","required":["kind","requirement","value","evidence"],"properties":{"kind":{"const":"provide-fact"},"requirement":{"$ref":"#/$defs/AnalysisChildHandle"},"value":{"$ref":"#/$defs/FactValue"},"evidence":{"type":"array","items":{"$ref":"#/$defs/EvidenceReference"},"minItems":1,"uniqueItems":true}},"additionalProperties":false},"ConsumerDispositionSubmission":{"type":"object","required":["kind","obligation","result","rationale","evidence","fingerprint"],"properties":{"kind":{"const":"consumer-disposition"},"obligation":{"$ref":"#/$defs/AnalysisChildHandle"},"result":{"enum":["updated","reviewed-no-change","not-applicable","blocked"]},"rationale":{"$ref":"#/$defs/NonEmptyString"},"evidence":{"type":"array","items":{"$ref":"#/$defs/EvidenceReference"},"minItems":1},"fingerprint":{"$ref":"#/$defs/DecisionFingerprint"}},"additionalProperties":false},"ImpactDispositionSubmission":{"type":"object","required":["kind","obligation","result","rationale","evidence","fingerprint"],"properties":{"kind":{"const":"impact-disposition"},"obligation":{"$ref":"#/$defs/AnalysisChildHandle"},"result":{"enum":["confirmed","resolved-no-impact","requires-change","blocked"]},"rationale":{"$ref":"#/$defs/NonEmptyString"},"evidence":{"type":"array","items":{"$ref":"#/$defs/EvidenceReference"},"minItems":1},"fingerprint":{"$ref":"#/$defs/DecisionFingerprint"}},"additionalProperties":false},"CoverageAttestationClaim":{"type":"object","required":["requirement","conclusion","evidence","explicit_exclusions","rationale","auditor_provenance"],"properties":{"requirement":{"$ref":"#/$defs/AnalysisChildHandle"},"conclusion":{"const":"complete"},"evidence":{"type":"array","items":{"$ref":"#/$defs/EvidenceReference"},"minItems":1,"uniqueItems":true},"explicit_exclusions":{"type":"array","items":{"$ref":"#/$defs/EvidenceReference"},"uniqueItems":true},"rationale":{"$ref":"#/$defs/NonEmptyString"},"auditor_provenance":{"$ref":"#/$defs/NonEmptyString"}},"additionalProperties":false},"CoverageAttestationSubmission":{"type":"object","required":["kind","claim"],"properties":{"kind":{"const":"coverage-attestation"},"claim":{"$ref":"#/$defs/CoverageAttestationClaim"}},"additionalProperties":false},"Submission":{"oneOf":[{"$ref":"#/$defs/ProvideFactSubmission"},{"$ref":"#/$defs/ConsumerDispositionSubmission"},{"$ref":"#/$defs/ImpactDispositionSubmission"},{"$ref":"#/$defs/CoverageAttestationSubmission"}]},"ResolveCall":{"type":"object","required":["analysis","submission"],"properties":{"analysis":{"$ref":"#/$defs/AnalysisHandle"},"submission":{"$ref":"#/$defs/Submission"}},"additionalProperties":false},"CoverageRequirement":{"type":"object","required":["kind","handle","subject","owner","semantic_revision","relationship_kinds","horizon","required_evidence_contract"],"properties":{"kind":{"const":"coverage-requirement"},"handle":{"$ref":"#/$defs/AnalysisChildHandle"},"subject":{"$ref":"#/$defs/CanonicalId"},"owner":{"$ref":"#/$defs/CanonicalId"},"semantic_revision":{"type":"integer","minimum":1},"relationship_kinds":{"type":"array","items":{"$ref":"#/$defs/CanonicalId"},"uniqueItems":true},"horizon":{"$ref":"#/$defs/CanonicalId"},"required_evidence_contract":{"$ref":"#/$defs/CanonicalId"}},"additionalProperties":false},"CoverageAttestation":{"type":"object","required":["kind","requirement","conclusion","evidence","explicit_exclusions","rationale","auditor_provenance","schema_version","authorization"],"properties":{"kind":{"const":"coverage-attestation"},"requirement":{"$ref":"#/$defs/AnalysisChildHandle"},"conclusion":{"const":"complete"},"evidence":{"type":"array","items":{"$ref":"#/$defs/EvidenceReference"},"minItems":1},"explicit_exclusions":{"type":"array","items":{"$ref":"#/$defs/EvidenceReference"}},"rationale":{"$ref":"#/$defs/NonEmptyString"},"auditor_provenance":{"$ref":"#/$defs/NonEmptyString"},"schema_version":{"const":4},"authorization":{"$ref":"#/$defs/AuthorizationReference"}},"additionalProperties":false},"CoverageCertificate":{"type":"object","required":["kind","handle","requirement","subject","owner","semantic_revision","horizon_digest","relationship_digest","evidence_digests","fact_schema_digest"],"properties":{"kind":{"const":"coverage-certificate"},"handle":{"$ref":"#/$defs/AnalysisChildHandle"},"requirement":{"$ref":"#/$defs/AnalysisChildHandle"},"subject":{"$ref":"#/$defs/CanonicalId"},"owner":{"$ref":"#/$defs/CanonicalId"},"semantic_revision":{"type":"integer","minimum":1},"horizon_digest":{"$ref":"#/$defs/Digest"},"relationship_digest":{"$ref":"#/$defs/Digest"},"evidence_digests":{"type":"array","items":{"$ref":"#/$defs/Digest"},"uniqueItems":true},"fact_schema_digest":{"$ref":"#/$defs/Digest"}},"additionalProperties":false},"DispositionRecord":{"type":"object","required":["obligation","kind","result","rationale","evidence","authorization","fingerprint"],"properties":{"obligation":{"$ref":"#/$defs/AnalysisChildHandle"},"kind":{"enum":["consumer-disposition","impact-disposition"]},"result":{"$ref":"#/$defs/NonEmptyString"},"rationale":{"$ref":"#/$defs/NonEmptyString"},"evidence":{"type":"array","items":{"$ref":"#/$defs/EvidenceReference"}},"authorization":{"$ref":"#/$defs/AuthorizationReference"},"fingerprint":{"$ref":"#/$defs/DecisionFingerprint"}},"additionalProperties":false},"AnalysisState":{"type":"object","required":["kind","handle","base_snapshot","proposed_reference","changes","semantic_proposals","fact_observations","dispositions","coverage_attestations","authorization_records","domain_contracts","execution_contracts","contract_version"],"properties":{"kind":{"const":"analysis-state"},"handle":{"$ref":"#/$defs/AnalysisHandle"},"base_snapshot":{"$ref":"#/$defs/SnapshotHandle"},"proposed_reference":{"$ref":"#/$defs/AnalysisMaterialHandle"},"changes":{"type":"array","items":{"$ref":"#/$defs/ChangeDescriptor"},"minItems":1,"uniqueItems":true},"semantic_proposals":{"type":"array","items":{"$ref":"#/$defs/SemanticProposal"},"uniqueItems":true},"fact_observations":{"type":"array","items":{"$ref":"#/$defs/FactObservation"},"uniqueItems":true},"dispositions":{"type":"array","items":{"$ref":"#/$defs/DispositionRecord"},"uniqueItems":true},"coverage_attestations":{"type":"array","items":{"$ref":"#/$defs/CoverageAttestation"},"uniqueItems":true},"authorization_records":{"type":"array","items":{"$ref":"#/$defs/AuthorizationRecord"},"uniqueItems":true},"domain_contracts":{"type":"array","items":{"$ref":"#/$defs/DomainContractReference"},"minItems":1,"uniqueItems":true},"execution_contracts":{"$ref":"#/$defs/AnalysisExecutionContractView"},"contract_version":{"const":7}},"additionalProperties":false},"PendingResult":{"type":"object","required":["kind","handle","status","context","changes","changed_units","obligations","fact_requirements","reading_plan","next_operations"],"properties":{"kind":{"const":"pending-result"},"handle":{"$ref":"#/$defs/AnalysisHandle"},"status":{"const":"needs-action"},"context":{"$ref":"#/$defs/AnalysisContext"},"changes":{"type":"array","items":{"$ref":"#/$defs/ChangeDescriptor"}},"changed_units":{"type":"array","items":{"$ref":"#/$defs/ChangedPolicyUnit"}},"obligations":{"type":"array","items":{"$ref":"#/$defs/Obligation"}},"fact_requirements":{"type":"array","items":{"$ref":"#/$defs/FactRequirementWork"}},"reading_plan":{"type":"array","items":{"$ref":"#/$defs/ReadingPlanEntry"}},"next_operations":{"type":"array","items":{"$ref":"#/$defs/NextOperation"}},"summary":{"type":"string"}},"additionalProperties":false},"CompleteResult":{"type":"object","required":["kind","handle","status","context","changes","changed_units","coverage_certificates","fact_observations","dispositions","reading_plan","completion"],"properties":{"kind":{"const":"complete-result"},"handle":{"$ref":"#/$defs/AnalysisHandle"},"status":{"const":"complete"},"context":{"$ref":"#/$defs/AnalysisContext"},"changes":{"type":"array","items":{"$ref":"#/$defs/ChangeDescriptor"}},"changed_units":{"type":"array","items":{"$ref":"#/$defs/ChangedPolicyUnit"}},"coverage_certificates":{"type":"array","items":{"$ref":"#/$defs/CoverageCertificate"},"uniqueItems":true},"fact_observations":{"type":"array","items":{"$ref":"#/$defs/FactObservation"},"uniqueItems":true},"dispositions":{"type":"array","items":{"$ref":"#/$defs/DispositionRecord"}},"reading_plan":{"type":"array","items":{"$ref":"#/$defs/ReadingPlanEntry"}},"completion":{"$ref":"#/$defs/CompletionProof"},"summary":{"type":"string"}},"additionalProperties":false},"RepositoryPath":{"type":"array","items":{"$ref":"#/$defs/NonEmptyString"},"minItems":1},"ProvenanceRecord":{"type":"object","required":["snapshot","path"],"properties":{"snapshot":{"$ref":"#/$defs/SnapshotHandle"},"path":{"$ref":"#/$defs/RepositoryPath"}},"additionalProperties":false},"SnapshotInspectionResult":{"type":"object","required":["kind","snapshot"],"properties":{"kind":{"const":"snapshot-inspection-result"},"snapshot":{"$ref":"#/$defs/SnapshotSummary"}},"additionalProperties":false},"PolicyInspectionResult":{"type":"object","required":["kind","policy","declaration","representation_digest","structural_digest","provenance"],"properties":{"kind":{"const":"policy-inspection-result"},"policy":{"$ref":"#/$defs/SnapshotChildHandle"},"declaration":{"oneOf":[{"$ref":"#/$defs/CanonicalModuleDeclaration"},{"$ref":"#/$defs/PolicyUnitDeclaration"}]},"representation_digest":{"$ref":"#/$defs/Digest"},"structural_digest":{"$ref":"#/$defs/Digest"},"provenance":{"$ref":"#/$defs/ProvenanceRecord"}},"additionalProperties":false},"RelationshipInspectionResult":{"type":"object","required":["kind","relationship","policy_semantics","provenance"],"properties":{"kind":{"const":"relationship-inspection-result"},"relationship":{"$ref":"#/$defs/RelationshipSummary"},"policy_semantics":{"oneOf":[{"$ref":"#/$defs/PolicyRelationshipInspection"},{"type":"null"}]},"provenance":{"$ref":"#/$defs/ProvenanceRecord"}},"additionalProperties":false},"AnalysisInspectionResult":{"type":"object","required":["kind","state"],"properties":{"kind":{"const":"analysis-inspection-result"},"state":{"$ref":"#/$defs/AnalysisState"}},"additionalProperties":false},"AnalysisChildArtifact":{"oneOf":[{"$ref":"#/$defs/AnalysisContext"},{"$ref":"#/$defs/FactRequirement"},{"$ref":"#/$defs/FactObservation"},{"$ref":"#/$defs/Obligation"},{"$ref":"#/$defs/CoverageRequirement"},{"$ref":"#/$defs/CoverageCertificate"}]},"AnalysisChildInspectionResult":{"type":"object","required":["kind","handle","artifact"],"properties":{"kind":{"const":"analysis-child-inspection-result"},"handle":{"$ref":"#/$defs/AnalysisChildHandle"},"artifact":{"$ref":"#/$defs/AnalysisChildArtifact"}},"additionalProperties":false},"InspectionResult":{"oneOf":[{"$ref":"#/$defs/SnapshotInspectionResult"},{"$ref":"#/$defs/PolicyInspectionResult"},{"$ref":"#/$defs/RelationshipInspectionResult"},{"$ref":"#/$defs/AnalysisInspectionResult"},{"$ref":"#/$defs/AnalysisChildInspectionResult"}]},"InspectCall":{"type":"object","required":["handle"],"properties":{"handle":{"$ref":"#/$defs/InspectableHandle"}},"additionalProperties":false},"RejectedResult":{"type":"object","required":["kind","code","outcome","message","details","next_operations"],"properties":{"kind":{"const":"rejected-result"},"code":{"$ref":"#/$defs/CanonicalId"},"outcome":{"enum":["invalid","unavailable","unsupported","unauthorized"]},"target":{"$ref":"#/$defs/NonEmptyString"},"message":{"$ref":"#/$defs/NonEmptyString"},"details":{"type":"object","additionalProperties":{"$ref":"#/$defs/ScalarValue"}},"next_operations":{"type":"array","items":{"$ref":"#/$defs/NextOperation"}}},"additionalProperties":false},"AuthoredRoutingRule":{"type":"object","required":["id","target","when","condition"],"properties":{"id":{"$ref":"#/$defs/CanonicalId"},"target":{"$ref":"#/$defs/CanonicalId"},"when":{"$ref":"#/$defs/ApplicabilityExpression"},"condition":{"$ref":"#/$defs/NonEmptyString"}},"additionalProperties":false},"AuthoredRoutingFact":{"type":"object","required":["id","semantic_revision","type","nullable","values","aliases","meaning","prompt"],"properties":{"id":{"$ref":"#/$defs/CanonicalId"},"semantic_revision":{"type":"integer","minimum":1},"type":{"enum":["boolean","enum","string","string-set","enum-set","canonical-id"]},"nullable":{"type":"boolean"},"values":{"type":"array","items":{"type":"string"},"uniqueItems":true},"aliases":{"type":"array","items":{"$ref":"#/$defs/CanonicalId"},"uniqueItems":true},"meaning":{"$ref":"#/$defs/NonEmptyString"},"prompt":{"$ref":"#/$defs/NonEmptyString"}},"additionalProperties":false},"PutRoutingRuleEdit":{"type":"object","required":["kind","rule","rationale"],"properties":{"kind":{"const":"put-routing-rule"},"rule":{"$ref":"#/$defs/AuthoredRoutingRule"},"rationale":{"$ref":"#/$defs/NonEmptyString"}},"additionalProperties":false},"RemoveRoutingRuleEdit":{"type":"object","required":["kind","rule","rationale"],"properties":{"kind":{"const":"remove-routing-rule"},"rule":{"$ref":"#/$defs/CanonicalId"},"rationale":{"$ref":"#/$defs/NonEmptyString"}},"additionalProperties":false},"PutRoutingFactEdit":{"type":"object","required":["kind","fact","rationale"],"properties":{"kind":{"const":"put-routing-fact"},"fact":{"$ref":"#/$defs/AuthoredRoutingFact"},"rationale":{"$ref":"#/$defs/NonEmptyString"}},"additionalProperties":false},"RemoveRoutingFactEdit":{"type":"object","required":["kind","fact","rationale"],"properties":{"kind":{"const":"remove-routing-fact"},"fact":{"$ref":"#/$defs/CanonicalId"},"rationale":{"$ref":"#/$defs/NonEmptyString"}},"additionalProperties":false},"VerificationFailure":{"type":"object","additionalProperties":false,"required":["code","message","suite","check"],"properties":{"code":{"$ref":"#/$defs/NonEmptyString"},"message":{"$ref":"#/$defs/NonEmptyString"},"suite":{"type":["string","null"]},"check":{"type":["string","null"]}}},"VerificationReport":{"type":"object","additionalProperties":false,"required":["passed","exit_code","suites","checks","failures"],"properties":{"passed":{"type":"boolean"},"exit_code":{"enum":[0,1,2,3,4]},"suites":{"type":"integer","minimum":0},"checks":{"type":"integer","minimum":0},"failures":{"type":"array","items":{"$ref":"#/$defs/VerificationFailure"}}}},"VerifyRepositoryCall":{"type":"object","additionalProperties":false,"required":["kind","refresh_verification_inputs"],"properties":{"kind":{"const":"verify-repository"},"refresh_verification_inputs":{"type":"boolean"}}},"VerifyRepositoryResult":{"type":"object","additionalProperties":false,"required":["kind","refreshed_verification_inputs","verification"],"properties":{"kind":{"const":"verify-repository-result"},"refreshed_verification_inputs":{"type":"boolean"},"verification":{"$ref":"#/$defs/VerificationReport"}}},"VerifyProposalCall":{"type":"object","additionalProperties":false,"required":["kind","revision"],"properties":{"kind":{"const":"verify-proposal"},"revision":{"$ref":"#/$defs/ProposalRevisionHandle"},"readiness":{"$ref":"#/$defs/ReadinessHandle"}}},"VerifyProposalResult":{"type":"object","additionalProperties":false,"required":["kind","revision","verification"],"properties":{"kind":{"const":"verify-proposal-result"},"revision":{"$ref":"#/$defs/ProposalRevisionHandle"},"verification":{"$ref":"#/$defs/VerificationReport"},"readiness":{"$ref":"#/$defs/ReadinessHandle"}}},"RoutingConfiguration":{"type":"object","additionalProperties":false,"required":["facts","rules"],"properties":{"facts":{"type":"array","items":{"$ref":"#/$defs/AuthoredRoutingFact"}},"rules":{"type":"array","items":{"$ref":"#/$defs/AuthoredRoutingRule"}}}},"PolicyCoverageStatus":{"type":"object","required":["subject","requirement_id","status"],"properties":{"subject":{"$ref":"#/$defs/CanonicalId"},"requirement_id":{"$ref":"#/$defs/Digest"},"status":{"enum":["current-attestation","review-required"]},"authority":{"$ref":"#/$defs/CoverageAuditAuthority"}},"additionalProperties":false},"ReadCoverage":{"type":"object","description":"Repository attestation status bound to this snapshot or proposal. Empty subjects means no registered policy units in scope, not complete coverage. Analysis-local attestations are not repository certificates.","required":["subjects"],"properties":{"subjects":{"type":"array","items":{"$ref":"#/$defs/PolicyCoverageStatus"}}},"additionalProperties":false},"AuditPolicyUnitEdit":{"type":"object","required":["kind","policy","rationale"],"properties":{"kind":{"const":"audit-policy-unit"},"policy":{"$ref":"#/$defs/CanonicalId"},"rationale":{"$ref":"#/$defs/NonEmptyString"}},"additionalProperties":false},"CoverageAuditAuthority":{"type":"object","required":["issuer","principal","authorization_id"],"properties":{"issuer":{"$ref":"#/$defs/NonEmptyString"},"principal":{"$ref":"#/$defs/NonEmptyString"},"authorization_id":{"$ref":"#/$defs/NonEmptyString"}},"additionalProperties":false},"EvidenceCheckRetirement":{"type":"object","additionalProperties":false,"required":["suite","check"],"properties":{"suite":{"type":"string","minLength":1},"check":{"type":"string","minLength":1}}},"EvidenceSuiteDescription":{"type":"object","additionalProperties":false,"required":["suite","description"],"properties":{"suite":{"type":"string","minLength":1},"description":{"type":"string","minLength":1}}},"EvidenceRelationshipUpdate":{"type":"object","additionalProperties":false,"required":["source_policy","consumer","relation","evidence_owner","rationale"],"properties":{"source_policy":{"type":"string","minLength":1},"consumer":{"type":"string","minLength":1},"relation":{"type":"string","minLength":1},"evidence_owner":{"type":"string","minLength":1},"rationale":{"type":"string","minLength":1}}},"EvidenceConsumerRegistration":{"type":"object","additionalProperties":false,"required":["path","artifact_kind","source_policies","relation","evidence_owner","rationale"],"properties":{"path":{"type":"string","minLength":1},"artifact_kind":{"type":"string","enum":["implementation-artifact","fixture"]},"source_policies":{"type":"array","items":{"type":"string","minLength":1},"minItems":1,"uniqueItems":true},"relation":{"type":"string","enum":["implementation-projection","fixture-projection"]},"evidence_owner":{"type":"string","minLength":1},"rationale":{"type":"string","minLength":1}}},"EvidenceMaintenancePlan":{"type":"object","additionalProperties":false,"required":["prune_stale_certificates","retire_suites","retire_checks","retire_inputs","suite_descriptions","replacement_evidence_owner","replacement_evidence_rationale","relationship_updates","consumer_registrations"],"properties":{"prune_stale_certificates":{"type":"boolean"},"retire_suites":{"type":"array","items":{"type":"string","minLength":1},"uniqueItems":true},"retire_checks":{"type":"array","items":{"$ref":"#/$defs/EvidenceCheckRetirement"}},"retire_inputs":{"type":"array","items":{"type":"string","minLength":1},"uniqueItems":true},"suite_descriptions":{"type":"array","items":{"$ref":"#/$defs/EvidenceSuiteDescription"}},"replacement_evidence_owner":{"type":"string","minLength":1},"replacement_evidence_rationale":{"type":"string","minLength":1},"relationship_updates":{"type":"array","items":{"$ref":"#/$defs/EvidenceRelationshipUpdate"}},"consumer_registrations":{"type":"array","items":{"$ref":"#/$defs/EvidenceConsumerRegistration"}},"unregister_policy_subjects":{"type":"array","items":{"type":"string","minLength":1},"uniqueItems":true,"description":"Remove selected review-subject registrations and their source relationships while preserving normative Markdown."}}},"MaintainEvidenceCall":{"type":"object","additionalProperties":false,"required":["kind","expected_revision","evidence","plan","apply"],"properties":{"kind":{"const":"maintain-evidence"},"expected_revision":{"type":"string","minLength":1},"evidence":{"type":"array","items":{"$ref":"#/$defs/EvidenceReference"},"minItems":1},"plan":{"$ref":"#/$defs/EvidenceMaintenancePlan"},"apply":{"type":"boolean"}}},"MaintainEvidenceResult":{"type":"object","additionalProperties":false,"required":["kind","applied","changed_files","removed_files","verification"],"properties":{"kind":{"const":"maintain-evidence-result"},"applied":{"type":"boolean"},"changed_files":{"type":"array","items":{"type":"string","minLength":1}},"removed_files":{"type":"array","items":{"type":"string","minLength":1}},"verification":{"$ref":"#/$defs/VerificationReport"}}},"RouteCall":{"type":"object","required":["facts"],"properties":{"facts":{"$ref":"#/$defs/FactSet"},"snapshot":{"$ref":"#/$defs/SnapshotHandle"}},"additionalProperties":false},"ReadCall":{"type":"object","required":["target"],"properties":{"target":{"$ref":"#/$defs/CanonicalId"},"include_routing":{"type":"boolean"},"include_coverage":{"type":"boolean","description":"Include current repository attestation status for registered policy units in this read scope."},"snapshot":{"$ref":"#/$defs/SnapshotHandle"},"detail":{"enum":["compact","full"],"description":"Compact preserves exact policy and essential authority; full includes all relationship rows."}},"additionalProperties":false},"RelatedCall":{"type":"object","required":["target","groups","direction","transitive"],"properties":{"target":{"$ref":"#/$defs/CanonicalId"},"groups":{"type":"array","minItems":1,"uniqueItems":true,"items":{"$ref":"#/$defs/CanonicalId"}},"direction":{"enum":["incoming","outgoing","both"]},"transitive":{"type":"boolean","default":false},"snapshot":{"$ref":"#/$defs/SnapshotHandle"}},"additionalProperties":false},"CompactReadResult":{"type":"object","required":["kind","snapshot","policy","content","requires","specializes","next_operations","detail"],"properties":{"kind":{"const":"compact-read-result"},"snapshot":{"$ref":"#/$defs/SnapshotHandle"},"policy":{"$ref":"#/$defs/PolicySummary"},"content":{"type":"string"},"requires":{"type":"array","items":{"$ref":"#/$defs/CanonicalId"},"uniqueItems":true},"specializes":{"type":"array","items":{"$ref":"#/$defs/CanonicalId"},"uniqueItems":true},"next_operations":{"type":"array","items":{"$ref":"#/$defs/NextOperation"}},"summary":{"type":"string"},"routing":{"$ref":"#/$defs/RoutingConfiguration"},"coverage":{"$ref":"#/$defs/ReadCoverage"},"detail":{"const":"compact"},"application_exposure":{"$ref":"#/$defs/ApplicationExposureState"},"provenance":{"type":"array","items":{"$ref":"#/$defs/CanonicalId"}}},"additionalProperties":false},"RoutingFactsCall":{"type":"object","additionalProperties":false,"required":[],"properties":{"snapshot":{"$ref":"#/$defs/SnapshotHandle"}}},"RoutingFactsResult":{"type":"object","additionalProperties":false,"required":["kind","snapshot","facts"],"properties":{"kind":{"const":"routing-facts-result"},"snapshot":{"$ref":"#/$defs/SnapshotHandle"},"facts":{"type":"array","items":{"$ref":"#/$defs/AuthoredRoutingFact"}}}},"RoutingQuestion":{"type":"object","additionalProperties":false,"required":["id","kind","prompt","state","fact"],"properties":{"id":{"$ref":"#/$defs/CanonicalId"},"kind":{"const":"applicability-fact"},"prompt":{"$ref":"#/$defs/NonEmptyString"},"state":{"const":"required"},"fact":{"$ref":"#/$defs/AuthoredRoutingFact"}}},"RoutingRuleExplanation":{"type":"object","additionalProperties":false,"required":["id","target","when","state"],"properties":{"id":{"$ref":"#/$defs/CanonicalId"},"target":{"$ref":"#/$defs/CanonicalId"},"when":{"$ref":"#/$defs/ApplicabilityExpression"},"state":{"enum":["selected","unresolved"]}}},"AgentRouteResult":{"type":"object","required":["kind","snapshot","reading_plan","unresolved_questions","next_operations","facts","rules"],"properties":{"kind":{"const":"agent-route-result"},"snapshot":{"$ref":"#/$defs/SnapshotHandle"},"reading_plan":{"type":"array","items":{"$ref":"#/$defs/ReadingPlanEntry"}},"unresolved_questions":{"type":"array","items":{"$ref":"#/$defs/RoutingQuestion"}},"next_operations":{"type":"array","items":{"$ref":"#/$defs/NextOperation"}},"summary":{"type":"string"},"facts":{"$ref":"#/$defs/FactSet"},"rules":{"type":"array","items":{"$ref":"#/$defs/RoutingRuleExplanation"}}},"additionalProperties":false},"WorkflowContext":{"oneOf":[{"$ref":"#/$defs/ProposalRevisionHandle"},{"$ref":"#/$defs/AnalysisHandle"},{"$ref":"#/$defs/ReadinessHandle"}]},"ProposeCall":{"type":"object","additionalProperties":false,"properties":{"snapshot":{"$ref":"#/$defs/SnapshotHandle"},"change_set":{"$ref":"#/$defs/StandardsChangeSet"}},"required":["change_set"]},"ReviseCall":{"type":"object","additionalProperties":false,"properties":{"context":{"$ref":"#/$defs/WorkflowContext"},"change_set":{"$ref":"#/$defs/StandardsChangeSet"}},"required":["context","change_set"]},"AnalyzeCall":{"type":"object","additionalProperties":false,"properties":{"context":{"$ref":"#/$defs/WorkflowContext"}},"required":["context"]},"ResolveWorkflowCall":{"type":"object","additionalProperties":false,"properties":{"context":{"$ref":"#/$defs/WorkflowContext"},"submission":{"$ref":"#/$defs/Submission"}},"required":["context","submission"]},"ReviewCall":{"type":"object","additionalProperties":false,"properties":{"context":{"$ref":"#/$defs/WorkflowContext"},"decisions":{"type":"array","minItems":3,"maxItems":3,"uniqueItems":true,"items":{"$ref":"#/$defs/ReviewDecision"}}},"required":["context","decisions"]},"ApplyCall":{"type":"object","additionalProperties":false,"properties":{"context":{"$ref":"#/$defs/WorkflowContext"}},"required":["context"]},"RecoverCall":{"type":"object","additionalProperties":false,"properties":{"context":{"$ref":"#/$defs/WorkflowContext"}},"required":["context"]},"WorkflowStatusCall":{"type":"object","additionalProperties":false,"properties":{"context":{"$ref":"#/$defs/WorkflowContext"}},"required":["context"]},"ResumeCall":{"type":"object","additionalProperties":false,"properties":{"context":{"$ref":"#/$defs/WorkflowContext"}},"required":["context"]},"WorkflowContinuation":{"type":"object","additionalProperties":false,"properties":{"operation":{"enum":["revise","analyze","resolve_workflow","review","apply","recover","workflow_status","resume"]},"context":{"$ref":"#/$defs/WorkflowContext"},"required_inputs":{"type":"array","uniqueItems":true,"items":{"enum":["change_set","submission","decisions"]}}},"required":["operation","context","required_inputs"]},"WorkflowOutcome":{"oneOf":[{"$ref":"#/$defs/CreateProposalResult"},{"$ref":"#/$defs/ReviseProposalResult"},{"$ref":"#/$defs/PendingResult"},{"$ref":"#/$defs/CompleteResult"},{"$ref":"#/$defs/ReviewProposalResult"},{"$ref":"#/$defs/ApplyProposalResult"},{"$ref":"#/$defs/ApplicationRecoveryRequiredResult"},{"$ref":"#/$defs/RecoverApplicationResult"},{"$ref":"#/$defs/RejectedResult"}]},"WorkflowResult":{"type":"object","additionalProperties":false,"properties":{"kind":{"const":"workflow-result"},"context":{"$ref":"#/$defs/WorkflowContext"},"proposal":{"$ref":"#/$defs/ProposalHandle"},"revision":{"$ref":"#/$defs/ProposalRevisionHandle"},"status":{"enum":["draft","needs-action","complete","requires-change","ready","recovery-required","applied","rejected","stale"]},"next_operations":{"type":"array","items":{"$ref":"#/$defs/WorkflowContinuation"}},"outcome":{"$ref":"#/$defs/WorkflowOutcome"}},"required":["kind","context","proposal","revision","status","next_operations"]},"FocusedQueryNextOperation":{"type":"object","required":["operation","request_kind","snapshot"],"properties":{"operation":{"enum":["route","read","related"]},"request_kind":{"enum":["route","read","related"]},"target":{"$ref":"#/$defs/CanonicalId"},"snapshot":{"$ref":"#/$defs/SnapshotHandle"}},"additionalProperties":false},"RewriteNavigationIndexEdit":{"type":"object","required":["kind","entrypoint","destinations","rationale"],"properties":{"kind":{"const":"rewrite-navigation-index"},"entrypoint":{"$ref":"#/$defs/AuthoringTargetHandle"},"destinations":{"type":"array","items":{"$ref":"#/$defs/CanonicalId"},"minItems":1,"uniqueItems":true},"rationale":{"$ref":"#/$defs/NonEmptyString"},"retargets":{"type":"array","items":{"$ref":"#/$defs/NavigationRetarget"},"uniqueItems":true}},"additionalProperties":false},"NavigationIndexEntry":{"type":"object","required":["id","entrypoint","destinations"],"properties":{"id":{"$ref":"#/$defs/CanonicalId"},"entrypoint":{"$ref":"#/$defs/AuthoringTargetHandle"},"destinations":{"type":"array","items":{"$ref":"#/$defs/CanonicalId"},"uniqueItems":true},"content":{"$ref":"#/$defs/NonEmptyString"}},"additionalProperties":false},"NavigationIndexesResult":{"type":"object","required":["kind","authority","indexes","next_operations"],"properties":{"kind":{"const":"navigation-indexes-result"},"authority":{"oneOf":[{"$ref":"#/$defs/SnapshotHandle"},{"$ref":"#/$defs/ProposalRevisionHandle"}]},"indexes":{"type":"array","items":{"$ref":"#/$defs/NavigationIndexEntry"},"minItems":1},"next_operations":{"type":"array","items":{"$ref":"#/$defs/NextOperation"},"maxItems":0}},"additionalProperties":false},"NavigationRetarget":{"type":"object","required":["entrypoint","standard"],"properties":{"entrypoint":{"$ref":"#/$defs/AuthoringTargetHandle"},"standard":{"$ref":"#/$defs/CanonicalId"}},"additionalProperties":false},"ApplicationNextOperation":{"type":"object","additionalProperties":false,"required":["operation","snapshot"],"properties":{"operation":{"enum":["read","related","routing_facts","route","query","inspect"]},"snapshot":{"$ref":"#/$defs/SnapshotHandle"},"target":{"$ref":"#/$defs/CanonicalId"},"handle":{"$ref":"#/$defs/SnapshotChildHandle"}}},"ApplicationRejectedResult":{"type":"object","additionalProperties":false,"required":["kind","purpose","code","outcome","message","next_operations"],"properties":{"kind":{"const":"application-rejected-result"},"purpose":{"const":"application"},"code":{"enum":["APPLICATION.CONTENT_UNAVAILABLE","APPLICATION.INPUT_INVALID","APPLICATION.OPERATION_UNAVAILABLE","APPLICATION.INTERNAL_UNAVAILABLE","APPLICATION.UNSUPPORTED_CAPTURE","APPLICATION.RESULT_LIMIT"]},"outcome":{"enum":["invalid","unsupported","unavailable"]},"message":{"type":"string"},"next_operations":{"type":"array","items":{"$ref":"#/$defs/ApplicationNextOperation"}}}},"ApplicationPolicy":{"type":"object","additionalProperties":false,"required":["id","handle","role","level"],"properties":{"id":{"$ref":"#/$defs/CanonicalId"},"handle":{"$ref":"#/$defs/SnapshotChildHandle"},"role":{"enum":["core","router","topic","workflow","profile","reference","prompt","template","documentation"]},"level":{"enum":["MUST","SHOULD","PROFILE","REFERENCE"]}}},"ApplicationRelationship":{"type":"object","additionalProperties":false,"required":["handle","source","target","relation","groups","direction"],"properties":{"handle":{"$ref":"#/$defs/SnapshotChildHandle"},"source":{"$ref":"#/$defs/CanonicalId"},"target":{"$ref":"#/$defs/CanonicalId"},"relation":{"type":"string"},"groups":{"type":"array","items":{"$ref":"#/$defs/CanonicalId"}},"direction":{"enum":["incoming","outgoing"]}}},"ApplicationReadResult":{"type":"object","additionalProperties":false,"required":["kind","purpose","snapshot","policy","content","scope","requires","specializes","next_operations"],"properties":{"kind":{"const":"application-read-result"},"purpose":{"const":"application"},"snapshot":{"$ref":"#/$defs/SnapshotHandle"},"policy":{"$ref":"#/$defs/ApplicationPolicy"},"content":{"type":"string"},"scope":{"$ref":"#/$defs/ReviewScope"},"requires":{"type":"array","items":{"$ref":"#/$defs/CanonicalId"}},"specializes":{"type":"array","items":{"$ref":"#/$defs/CanonicalId"}},"related":{"type":"array","items":{"$ref":"#/$defs/ApplicationRelationship"}},"next_operations":{"type":"array","items":{"$ref":"#/$defs/ApplicationNextOperation"}}}},"ApplicationRelatedResult":{"type":"object","additionalProperties":false,"required":["kind","purpose","snapshot","target","relationships","next_operations"],"properties":{"kind":{"const":"application-related-result"},"purpose":{"const":"application"},"snapshot":{"$ref":"#/$defs/SnapshotHandle"},"target":{"$ref":"#/$defs/CanonicalId"},"relationships":{"type":"array","items":{"$ref":"#/$defs/ApplicationRelationship"}},"next_operations":{"type":"array","items":{"$ref":"#/$defs/ApplicationNextOperation"}}}},"ApplicationReadingEntry":{"type":"object","additionalProperties":false,"required":["target","scope","authority","state"],"properties":{"target":{"$ref":"#/$defs/CanonicalId"},"scope":{"$ref":"#/$defs/ReviewScope"},"authority":{"enum":["normative","contextual"]},"state":{"const":"selected"}}},"ApplicationQuestion":{"type":"object","additionalProperties":false,"required":["fact"],"properties":{"fact":{"$ref":"#/$defs/AuthoredRoutingFact"}}},"ApplicationRouteResult":{"type":"object","additionalProperties":false,"required":["kind","purpose","snapshot","status","reading_plan","unresolved_questions","next_operations"],"properties":{"kind":{"const":"application-route-result"},"purpose":{"const":"application"},"snapshot":{"$ref":"#/$defs/SnapshotHandle"},"status":{"enum":["complete","needs-facts"]},"reading_plan":{"type":"array","items":{"$ref":"#/$defs/ApplicationReadingEntry"}},"unresolved_questions":{"type":"array","items":{"$ref":"#/$defs/ApplicationQuestion"}},"next_operations":{"type":"array","items":{"$ref":"#/$defs/ApplicationNextOperation"}}}},"ApplicationRoutingFactsResult":{"type":"object","additionalProperties":false,"required":["kind","purpose","snapshot","facts","next_operations"],"properties":{"kind":{"const":"application-routing-facts-result"},"purpose":{"const":"application"},"snapshot":{"$ref":"#/$defs/SnapshotHandle"},"facts":{"type":"array","items":{"$ref":"#/$defs/AuthoredRoutingFact"}},"next_operations":{"type":"array","items":{"$ref":"#/$defs/ApplicationNextOperation"}}}},"ApplicationReadCall":{"type":"object","additionalProperties":false,"required":["target"],"properties":{"target":{"$ref":"#/$defs/CanonicalId"},"snapshot":{"$ref":"#/$defs/SnapshotHandle"},"detail":{"enum":["compact","full"]}}},"ApplicationReadRequest":{"type":"object","additionalProperties":false,"required":["kind","target"],"properties":{"kind":{"const":"read"},"target":{"$ref":"#/$defs/CanonicalId"},"detail":{"enum":["compact","full"]}}},"ApplicationQueryRequest":{"oneOf":[{"$ref":"#/$defs/RouteRequest"},{"$ref":"#/$defs/ApplicationReadRequest"},{"$ref":"#/$defs/RelatedRequest"}]},"ApplicationQueryCall":{"type":"object","additionalProperties":false,"required":["snapshot","request"],"properties":{"snapshot":{"$ref":"#/$defs/SnapshotHandle"},"request":{"$ref":"#/$defs/ApplicationQueryRequest"}}},"ApplicationInspectCall":{"type":"object","additionalProperties":false,"required":["handle"],"properties":{"handle":{"$ref":"#/$defs/SnapshotChildHandle"}}},"AuthoredDecisionProvenance":{"type":"object","additionalProperties":false,"required":["id","subject","origin","rationale","evidence"],"properties":{"id":{"$ref":"#/$defs/CanonicalId"},"subject":{"$ref":"#/$defs/CanonicalId"},"origin":{"enum":["documented-original","reconstructed-history","current-justification","unrecorded"]},"rationale":{"type":"string"},"evidence":{"type":"array","items":{"$ref":"#/$defs/EvidenceReference"}},"assumptions":{"type":"array","items":{"type":"string"}},"limits":{"type":"array","items":{"type":"string"}},"alternatives":{"type":"array","items":{"type":"string"}},"reconsideration":{"type":"array","items":{"type":"string"}},"supersedes":{"type":"array","items":{"type":"string"}}}},"DecisionProvenanceRecord":{"type":"object","additionalProperties":false,"required":["id","subject","origin","rationale","evidence","assumptions","limits","alternatives","reconsideration","supersedes","subject_binding","retired"],"properties":{"id":{"$ref":"#/$defs/CanonicalId"},"subject":{"$ref":"#/$defs/CanonicalId"},"origin":{"enum":["documented-original","reconstructed-history","current-justification","unrecorded"]},"rationale":{"type":"string"},"evidence":{"type":"array","items":{"$ref":"#/$defs/EvidenceReference"}},"assumptions":{"type":"array","items":{"type":"string"}},"limits":{"type":"array","items":{"type":"string"}},"alternatives":{"type":"array","items":{"type":"string"}},"reconsideration":{"type":"array","items":{"type":"string"}},"supersedes":{"type":"array","items":{"type":"string"}},"subject_binding":{"$ref":"#/$defs/Digest"},"retired":{"type":"boolean"}}},"ApplicationExposureState":{"enum":["unreviewed","current","needs-review"]},"ProvenanceReadResult":{"type":"object","additionalProperties":false,"required":["kind","authority","record","state","next_operations"],"properties":{"kind":{"const":"provenance-read-result"},"authority":{"oneOf":[{"$ref":"#/$defs/SnapshotHandle"},{"$ref":"#/$defs/ProposalRevisionHandle"}]},"record":{"$ref":"#/$defs/DecisionProvenanceRecord"},"state":{"enum":["current","needs-review","retired"]},"next_operations":{"type":"array","items":{"$ref":"#/$defs/NextOperation"}}}},"OperationalReadResult":{"type":"object","additionalProperties":false,"required":["kind","authority","target","canonical_id","role","content","application_exposure","next_operations"],"properties":{"kind":{"const":"operational-read-result"},"authority":{"oneOf":[{"$ref":"#/$defs/SnapshotHandle"},{"$ref":"#/$defs/ProposalRevisionHandle"}]},"target":{"$ref":"#/$defs/AuthoringTargetHandle"},"canonical_id":{"$ref":"#/$defs/CanonicalId"},"role":{"enum":["prompt","template","documentation"]},"content":{"type":"string"},"application_exposure":{"$ref":"#/$defs/ApplicationExposureState"},"next_operations":{"type":"array","items":{"$ref":"#/$defs/NextOperation"}}}},"PutDecisionProvenanceEdit":{"type":"object","additionalProperties":false,"required":["kind","record"],"properties":{"kind":{"const":"put-provenance"},"record":{"$ref":"#/$defs/AuthoredDecisionProvenance"}}},"RetireDecisionProvenanceEdit":{"type":"object","additionalProperties":false,"required":["kind","id"],"properties":{"kind":{"const":"retire-provenance"},"id":{"$ref":"#/$defs/CanonicalId"}}},"ApproveApplicationContentEdit":{"type":"object","additionalProperties":false,"required":["kind","target"],"properties":{"kind":{"const":"approve-application-content"},"target":{"oneOf":[{"$ref":"#/$defs/CanonicalId"},{"$ref":"#/$defs/AuthoringTargetHandle"}]}}},"WithdrawApplicationContentEdit":{"type":"object","additionalProperties":false,"required":["kind","target"],"properties":{"kind":{"const":"withdraw-application-content"},"target":{"oneOf":[{"$ref":"#/$defs/CanonicalId"},{"$ref":"#/$defs/AuthoringTargetHandle"}]}}},"ReviseOperationalArtifactEdit":{"type":"object","additionalProperties":false,"required":["kind","target","title","body"],"properties":{"kind":{"const":"revise-operational-artifact"},"target":{"oneOf":[{"$ref":"#/$defs/CanonicalId"},{"$ref":"#/$defs/AuthoringTargetHandle"}]},"title":{"$ref":"#/$defs/NonEmptyString"},"body":{"type":"string"}}},"PolicyScopeUpdate":{"type":"object","additionalProperties":false,"required":["policy","heading_path","semantics"],"properties":{"policy":{"$ref":"#/$defs/CanonicalId"},"heading_path":{"type":"array","minItems":1,"items":{"$ref":"#/$defs/NonEmptyString"}},"semantics":{"$ref":"#/$defs/PolicySemanticIntent"}}},"ReadManyItem":{"type":"object","required":["target"],"properties":{"target":{"$ref":"#/$defs/CanonicalId"},"include_routing":{"type":"boolean"},"include_coverage":{"type":"boolean","description":"Include current repository attestation status for registered policy units in this read scope."},"detail":{"enum":["compact","full"],"description":"Compact preserves exact policy and essential authority; full includes all relationship rows."}},"additionalProperties":false},"ReadManyCall":{"type":"object","additionalProperties":false,"required":["snapshot","items"],"description":"Read 1–32 selected items from one explicit snapshot, preserving order. The complete JSON result is limited to 2 MiB; any failed item rejects the entire request.","properties":{"snapshot":{"$ref":"#/$defs/SnapshotHandle"},"items":{"type":"array","minItems":1,"maxItems":32,"uniqueItems":true,"items":{"$ref":"#/$defs/ReadManyItem"}}}},"ReadManyResult":{"type":"object","additionalProperties":false,"required":["kind","snapshot","items"],"properties":{"kind":{"const":"read-many-result"},"snapshot":{"$ref":"#/$defs/SnapshotHandle"},"items":{"type":"array","minItems":1,"maxItems":32,"items":{"oneOf":[{"$ref":"#/$defs/CompactReadResult"},{"$ref":"#/$defs/ReadResult"},{"$ref":"#/$defs/NavigationIndexesResult"},{"$ref":"#/$defs/ProvenanceReadResult"},{"$ref":"#/$defs/OperationalReadResult"}]}}}},"ApplicationReadManyItem":{"type":"object","additionalProperties":false,"required":["target"],"properties":{"target":{"$ref":"#/$defs/CanonicalId"},"detail":{"enum":["compact","full"]}}},"ApplicationReadManyCall":{"type":"object","additionalProperties":false,"required":["snapshot","items"],"description":"Read 1–32 selected items from one explicit snapshot, preserving order. The complete JSON result is limited to 2 MiB; any failed item rejects the entire request.","properties":{"snapshot":{"$ref":"#/$defs/SnapshotHandle"},"items":{"type":"array","minItems":1,"maxItems":32,"uniqueItems":true,"items":{"$ref":"#/$defs/ApplicationReadManyItem"}}}},"ApplicationReadManyResult":{"type":"object","additionalProperties":false,"required":["kind","snapshot","items","purpose"],"properties":{"kind":{"const":"application-read-many-result"},"snapshot":{"$ref":"#/$defs/SnapshotHandle"},"items":{"type":"array","minItems":1,"maxItems":32,"items":{"oneOf":[{"$ref":"#/$defs/ApplicationReadResult"}]}},"purpose":{"const":"application"}}},"RegisterConsumerEdit":{"type":"object","additionalProperties":false,"required":["kind","consumer","path","artifact_kind","authority"],"properties":{"kind":{"const":"register-consumer"},"consumer":{"$ref":"#/$defs/CanonicalId"},"path":{"$ref":"#/$defs/NonEmptyString"},"artifact_kind":{"enum":["fixture","documentation","implementation-artifact","prompt","template"]},"authority":{"enum":["evidence","projection"]}},"description":"Register an existing tracked consumer within this proposal. The Engine captures original-revision bytes; use separate policy relationships to declare consumers and review obligations."},"PreviewApplicationCall":{"type":"object","additionalProperties":false,"required":["revision","request"],"properties":{"revision":{"$ref":"#/$defs/ProposalRevisionHandle"},"request":{"$ref":"#/$defs/ApplicationQueryRequest"}},"description":"Authoring-only inspection of an exact draft through application qualification and filtering; this observation neither publishes nor grants ordinary application access."},"CandidateApplicationNextOperation":{"type":"object","additionalProperties":false,"required":["operation","revision","request"],"properties":{"operation":{"const":"preview_application"},"revision":{"$ref":"#/$defs/ProposalRevisionHandle"},"request":{"$ref":"#/$defs/ApplicationQueryRequest"}}},"CandidateApplicationPolicy":{"type":"object","additionalProperties":false,"required":["id","role","level"],"properties":{"id":{"$ref":"#/$defs/CanonicalId"},"role":{"enum":["core","router","topic","workflow","profile","reference","prompt","template","documentation"]},"level":{"enum":["MUST","SHOULD","PROFILE","REFERENCE"]}}},"CandidateApplicationRelationship":{"type":"object","additionalProperties":false,"required":["source","target","relation","groups","direction"],"properties":{"source":{"$ref":"#/$defs/CanonicalId"},"target":{"$ref":"#/$defs/CanonicalId"},"relation":{"type":"string"},"groups":{"type":"array","items":{"$ref":"#/$defs/CanonicalId"}},"direction":{"enum":["incoming","outgoing"]}}},"CandidateApplicationReadResult":{"type":"object","additionalProperties":false,"required":["kind","purpose","policy","content","scope","requires","specializes","next_operations","revision"],"properties":{"kind":{"const":"candidate-application-read-result"},"purpose":{"const":"application"},"policy":{"$ref":"#/$defs/CandidateApplicationPolicy"},"content":{"type":"string"},"scope":{"$ref":"#/$defs/ReviewScope"},"requires":{"type":"array","items":{"$ref":"#/$defs/CanonicalId"}},"specializes":{"type":"array","items":{"$ref":"#/$defs/CanonicalId"}},"related":{"type":"array","items":{"$ref":"#/$defs/CandidateApplicationRelationship"}},"next_operations":{"type":"array","items":{"$ref":"#/$defs/CandidateApplicationNextOperation"}},"revision":{"$ref":"#/$defs/ProposalRevisionHandle"}}},"CandidateApplicationRelatedResult":{"type":"object","additionalProperties":false,"required":["kind","purpose","target","relationships","next_operations","revision"],"properties":{"kind":{"const":"candidate-application-related-result"},"purpose":{"const":"application"},"target":{"$ref":"#/$defs/CanonicalId"},"relationships":{"type":"array","items":{"$ref":"#/$defs/CandidateApplicationRelationship"}},"next_operations":{"type":"array","items":{"$ref":"#/$defs/CandidateApplicationNextOperation"}},"revision":{"$ref":"#/$defs/ProposalRevisionHandle"}}},"CandidateApplicationRouteResult":{"type":"object","additionalProperties":false,"required":["kind","purpose","status","reading_plan","unresolved_questions","next_operations","revision"],"properties":{"kind":{"const":"candidate-application-route-result"},"purpose":{"const":"application"},"status":{"enum":["complete","needs-facts"]},"reading_plan":{"type":"array","items":{"$ref":"#/$defs/ApplicationReadingEntry"}},"unresolved_questions":{"type":"array","items":{"$ref":"#/$defs/ApplicationQuestion"}},"next_operations":{"type":"array","items":{"$ref":"#/$defs/CandidateApplicationNextOperation"}},"revision":{"$ref":"#/$defs/ProposalRevisionHandle"}}},"CandidateApplicationRejectedResult":{"type":"object","additionalProperties":false,"required":["kind","purpose","code","outcome","message","next_operations","revision"],"properties":{"kind":{"const":"candidate-application-rejected-result"},"purpose":{"const":"application"},"code":{"enum":["APPLICATION.CONTENT_UNAVAILABLE","APPLICATION.INPUT_INVALID","APPLICATION.OPERATION_UNAVAILABLE","APPLICATION.INTERNAL_UNAVAILABLE","APPLICATION.UNSUPPORTED_CAPTURE","APPLICATION.RESULT_LIMIT"]},"outcome":{"enum":["invalid","unsupported","unavailable"]},"message":{"type":"string"},"next_operations":{"type":"array","items":{"$ref":"#/$defs/CandidateApplicationNextOperation"}},"revision":{"$ref":"#/$defs/ProposalRevisionHandle"}}},"PreviewApplicationResult":{"oneOf":[{"$ref":"#/$defs/CandidateApplicationReadResult"},{"$ref":"#/$defs/CandidateApplicationRelatedResult"},{"$ref":"#/$defs/CandidateApplicationRouteResult"},{"$ref":"#/$defs/CandidateApplicationRejectedResult"}]}}}') -DEFINITION_METADATA = freeze_json({'ActiveSnapshotSummary': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'lifecycle': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'source_revision': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'created_at': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'AgentRouteResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'reading_plan': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'unresolved_questions': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'next_operations': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'summary': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'facts': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'rules': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'AllExpression': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'operator': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'expressions': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'AlwaysExpression': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'operator': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'AnalysisChildArtifact': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'AnalysisChildHandle': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'analysis': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'child_kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'child_id': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'schema_version': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'AnalysisChildInspectionResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'handle': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'artifact': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'AnalysisContext': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'handle': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'subjects': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'changes': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'semantic_proposals': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'AnalysisExecutionContractView': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'authorization_authority_digest': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'providers': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'AnalysisHandle': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'id': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'schema_version': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'AnalysisId': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'AnalysisInspectionResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'state': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'AnalysisMaterialHandle': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'AnalysisRequest': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'base_snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'proposed_snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'changes': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'semantic_proposals': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'prior_analysis': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'contract_version': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'AnalysisState': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'handle': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'base_snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'proposed_reference': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'changes': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'semantic_proposals': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'fact_observations': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'dispositions': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'coverage_attestations': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'authorization_records': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'domain_contracts': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'execution_contracts': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'contract_version': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'AnalyzeCall': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'context': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'AnalyzeProposalCall': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'revision': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'AnyExpression': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'operator': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'expressions': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ApplicabilityExpression': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'ApplicationExposureState': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'ApplicationHandle': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'id': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'schema_version': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ApplicationId': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'ApplicationInspectCall': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'handle': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ApplicationNextOperation': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'operation': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'target': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'handle': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ApplicationPolicy': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'id': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'handle': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'role': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'level': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ApplicationQueryCall': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'request': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ApplicationQueryRequest': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'ApplicationQuestion': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'fact': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ApplicationReadCall': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'target': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'detail': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ApplicationReadManyCall': {'title': None, 'description': 'Read 1–32 selected items from one explicit snapshot, preserving order. The complete JSON result is limited to 2 MiB; any failed item rejects the entire request.', 'has_default': False, 'default': None, 'properties': {'snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'items': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ApplicationReadManyItem': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'target': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'detail': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ApplicationReadManyResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'items': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'purpose': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ApplicationReadRequest': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'target': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'detail': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ApplicationReadResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'purpose': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'policy': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'content': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'scope': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'requires': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'specializes': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'related': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'next_operations': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ApplicationReadingEntry': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'target': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'scope': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'authority': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'state': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ApplicationRecoveryRequiredResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'application': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'status': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'code': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'outcome': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'message': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ApplicationRejectedResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'purpose': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'code': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'outcome': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'message': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'next_operations': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ApplicationRelatedResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'purpose': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'target': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'relationships': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'next_operations': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ApplicationRelationship': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'handle': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'source': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'target': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'relation': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'groups': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'direction': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ApplicationRouteResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'purpose': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'status': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'reading_plan': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'unresolved_questions': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'next_operations': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ApplicationRoutingFactsResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'purpose': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'facts': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'next_operations': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ApplyCall': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'context': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ApplyProposalCall': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'readiness': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ApplyProposalResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'application': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'status': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ApproveApplicationContentEdit': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'target': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'AuditPolicyUnitEdit': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'policy': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'rationale': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'AuthoredDecisionProvenance': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'id': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'subject': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'origin': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'rationale': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'evidence': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'assumptions': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'limits': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'alternatives': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'reconsideration': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'supersedes': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'AuthoredRoutingFact': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'id': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'semantic_revision': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'type': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'nullable': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'values': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'aliases': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'meaning': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'prompt': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'AuthoredRoutingRule': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'id': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'target': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'when': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'condition': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'AuthoringTargetHandle': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'id': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'schema_version': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'AuthorizationId': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'AuthorizationRecord': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'reference': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'issuer_semantic_revision': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'principal': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'action': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'subject_kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'subject_id': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'authorization_evidence': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'revocation_authority': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'revocation_authority_semantic_revision': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'revocation_evidence': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'AuthorizationReference': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'id': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'issuer': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'capability': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'authority_digest': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'CandidateApplicationNextOperation': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'operation': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'revision': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'request': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'CandidateApplicationPolicy': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'id': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'role': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'level': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'CandidateApplicationReadResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'purpose': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'policy': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'content': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'scope': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'requires': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'specializes': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'related': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'next_operations': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'revision': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'CandidateApplicationRejectedResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'purpose': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'code': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'outcome': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'message': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'next_operations': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'revision': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'CandidateApplicationRelatedResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'purpose': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'target': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'relationships': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'next_operations': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'revision': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'CandidateApplicationRelationship': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'source': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'target': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'relation': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'groups': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'direction': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'CandidateApplicationRouteResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'purpose': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'status': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'reading_plan': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'unresolved_questions': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'next_operations': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'revision': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'CanonicalId': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'CanonicalModuleDeclaration': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'id': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'role': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'level': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'applies_when': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'does_not_apply_when': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'requires': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'specializes': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'verification': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ChangeDescriptor': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'accepted_ids': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'proposed_ids': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'scope': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'accepted_module': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'proposed_module': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ChangePolicySemantics': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'accepted_semantic_revision': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'proposed_semantic_revision': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'intent': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ChangedPolicyUnit': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'policy': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'change_kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'classification': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'accepted_representation_digest': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'proposed_representation_digest': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'accepted_structural_digest': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'proposed_structural_digest': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'accepted_semantic_revision': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'proposed_semantic_revision': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'semantic_state': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'scope': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ChildId': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'CompactReadResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'policy': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'content': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'requires': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'specializes': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'next_operations': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'summary': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'routing': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'coverage': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'detail': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'application_exposure': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'provenance': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'CompleteResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'handle': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'status': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'context': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'changes': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'changed_units': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'coverage_certificates': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'fact_observations': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'dispositions': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'reading_plan': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'completion': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'summary': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'CompletionProof': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'required_coverage_subjects': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'certificate_subjects': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'reached_consumer_obligations': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'disposition_obligations': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'required_fact_requirements': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'observed_fact_requirements': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'non_consumer_obligations_resolved': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'applicability_resolved': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'authorization_valid': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'evidence_valid': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ConsumerDispositionSubmission': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'obligation': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'result': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'rationale': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'evidence': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'fingerprint': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ConsumerReviewContract': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'id': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'version': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'permitted_dispositions': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'evidence_contract': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'authorization_capability': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'semantics': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ConsumerReviewObligationReadingReason': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'obligation': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ContainsExpression': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'operator': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'fact': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'value': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'CoverageAttestation': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'requirement': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'conclusion': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'evidence': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'explicit_exclusions': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'rationale': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'auditor_provenance': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'schema_version': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'authorization': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'CoverageAttestationClaim': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'requirement': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'conclusion': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'evidence': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'explicit_exclusions': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'rationale': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'auditor_provenance': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'CoverageAttestationSubmission': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'claim': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'CoverageAuditAuthority': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'issuer': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'principal': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'authorization_id': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'CoverageCertificate': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'handle': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'requirement': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'subject': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'owner': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'semantic_revision': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'horizon_digest': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'relationship_digest': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'evidence_digests': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'fact_schema_digest': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'CoverageRequirement': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'handle': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'subject': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'owner': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'semantic_revision': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'relationship_kinds': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'horizon': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'required_evidence_contract': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'CreateProposalCall': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'base_snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'change_set': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'CreateProposalResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'proposal': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'revision': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'CreateSnapshotCall': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'CreateSnapshotResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'CreateStandardEdit': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'standard': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'requires': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'specializes': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'policy_units': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'DecisionDependency': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'class': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'identity': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'digest': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'DecisionFingerprint': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'decision_kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'decision_contract': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'schema_version': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'dependencies': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'DecisionProvenanceRecord': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'id': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'subject': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'origin': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'rationale': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'evidence': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'assumptions': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'limits': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'alternatives': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'reconsideration': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'supersedes': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'subject_binding': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'retired': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'DeleteSnapshotCall': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'DeleteSnapshotResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'purge_deadline': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'Digest': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'DispositionRecord': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'obligation': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'result': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'rationale': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'evidence': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'authorization': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'fingerprint': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'DomainContractReference': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'id': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'version': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'EdgeId': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'EqualsExpression': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'operator': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'fact': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'value': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'EvidenceCheckRetirement': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'suite': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'check': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'EvidenceConsumerRegistration': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'path': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'artifact_kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'source_policies': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'relation': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'evidence_owner': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'rationale': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'EvidenceMaintenancePlan': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'prune_stale_certificates': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'retire_suites': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'retire_checks': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'retire_inputs': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'suite_descriptions': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'replacement_evidence_owner': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'replacement_evidence_rationale': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'relationship_updates': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'consumer_registrations': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'unregister_policy_subjects': {'title': None, 'description': 'Remove selected review-subject registrations and their source relationships while preserving normative Markdown.', 'has_default': False, 'default': None}}}, 'EvidenceReference': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'id': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'digest': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'provider_contract': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'provider_contract_version': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'EvidenceRelationshipUpdate': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'source_policy': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'consumer': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'relation': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'evidence_owner': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'rationale': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'EvidenceSuiteDescription': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'suite': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'description': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ExistsExpression': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'operator': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'fact': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'FactObservation': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'handle': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'requirement': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'value': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'evidence': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'authorization': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'provider': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'FactRequirement': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'handle': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'fact': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'fact_semantic_revision': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'fact_contract_digest': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'context': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'value_contract': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'answer_contract': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'evidence_contract': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'authorization_capability': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'FactRequirementId': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'FactRequirementWork': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'requirement': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'prompt': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'dependent_programs': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'FactSet': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'FactValue': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'FactValueContract': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'type': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'states': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'nullable': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'values': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'FindProposalsCall': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'after': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'limit': {'title': None, 'description': None, 'has_default': True, 'default': 50}}}, 'FindProposalsResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'proposals': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'continuation': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'FindSnapshotsCall': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'lifecycle': {'title': None, 'description': None, 'has_default': True, 'default': 'active'}, 'after': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'limit': {'title': None, 'description': None, 'has_default': True, 'default': 50}}}, 'FindSnapshotsResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'snapshots': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'continuation': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'FocusedQueryNextOperation': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'operation': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'request_kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'target': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'GeneralSelectionReason': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'source': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'fact': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'edge': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'question': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ImpactDispositionSubmission': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'obligation': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'result': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'rationale': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'evidence': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'fingerprint': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ImpactTraceId': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'ImpactTraceReference': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'id': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'graph': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'applicability': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'InExpression': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'operator': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'fact': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'values': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'InspectCall': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'handle': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'InspectNextOperation': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'operation': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'request_kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'handle': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'InspectableHandle': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'InspectionResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'MaintainEvidenceCall': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'expected_revision': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'evidence': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'plan': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'apply': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'MaintainEvidenceResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'applied': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'changed_files': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'removed_files': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'verification': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ModuleRelationshipKey': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'relation': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'source': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'target': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'MovePolicyUnitEdit': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'policy': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'standard': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'after_policy': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'semantics': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'NavigationIndexEntry': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'id': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'entrypoint': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'destinations': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'content': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'NavigationIndexesResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'authority': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'indexes': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'next_operations': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'NavigationRetarget': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'entrypoint': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'standard': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'NewPolicyUnit': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'id': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'heading_chain': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'semantic_revision': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'intent': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'aliases': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'predecessors': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'successors': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'NextOperation': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'NonEmptyString': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'NotExpression': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'operator': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'expression': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'Obligation': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'handle': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'target': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'scope': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'reasons': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'state': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'applicability': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'permitted_submissions': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'review_contract': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'fingerprint': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ObligationId': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'OperationalReadResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'authority': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'target': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'canonical_id': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'role': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'content': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'application_exposure': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'next_operations': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'PendingResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'handle': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'status': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'context': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'changes': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'changed_units': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'obligations': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'fact_requirements': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'reading_plan': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'next_operations': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'summary': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'PolicyCoverageStatus': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'subject': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'requirement_id': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'status': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'authority': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'PolicyImpactSelectionReason': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'source': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'edge': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'relation': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'evidence_owner': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'traces': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'PolicyInspectionResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'policy': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'declaration': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'representation_digest': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'structural_digest': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'provenance': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'PolicyRelationship': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'source_policy': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'consumer': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'relation': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'applicability': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'source_scope': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'consumer_scope': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'evidence_owner': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'rationale': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'PolicyRelationshipInspection': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'relationship_kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'applicability': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'source_scope': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'consumer_scope': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'propagation': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'evidence_owner': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'rationale': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'PolicyRelationshipKey': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'source_policy': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'consumer': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'relation': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'PolicyScopeUpdate': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'policy': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'heading_path': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'semantics': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'PolicySemanticIntent': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'PolicySummary': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'handle': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'authority': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'scope': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'PolicyUnitDeclaration': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'id': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'module': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'heading_path': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'semantic_revision': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'lifecycle': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'aliases': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'predecessors': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'successors': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'PolicyUnitMapping': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'state': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'reason': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'policy_units': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'PrepareCall': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'request': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'PreservePolicySemantics': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'semantic_revision': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'intent': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'PreviewApplicationCall': {'title': None, 'description': 'Authoring-only inspection of an exact draft through application qualification and filtering; this observation neither publishes nor grants ordinary application access.', 'has_default': False, 'default': None, 'properties': {'revision': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'request': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'PreviewApplicationResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'ProposalHandle': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'id': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'schema_version': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ProposalId': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'ProposalPolicySummary': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'id': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'authority': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'scope': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ProposalReadResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'revision': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'policy': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'content': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'requires': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'specializes': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'related': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'next_operations': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'summary': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'routing': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'coverage': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'application_exposure': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'provenance': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ProposalRelatedResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'revision': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'target': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'authoring_target': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'policy_unit_mapping': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'relationships': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'next_operations': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'summary': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ProposalRelationshipSummary': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'source': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'target': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'relation': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'groups': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'direction': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'traversal_eligible': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'applicability': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ProposalRevisionHandle': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'id': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'schema_version': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ProposalRevisionId': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'ProposalRouteResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'revision': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'reading_plan': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'unresolved_questions': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'next_operations': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'summary': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ProposalSummary': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'proposal': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'head_revision': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ProposeCall': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'change_set': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ProvenanceReadResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'authority': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'record': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'state': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'next_operations': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ProvenanceRecord': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'path': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ProvideFactSubmission': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'requirement': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'value': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'evidence': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ProviderReference': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'id': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'contract': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'contract_version': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'input_digest': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'PutDecisionProvenanceEdit': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'record': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'PutPolicyRelationshipEdit': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'relationship': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'PutRoutingFactEdit': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'fact': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'rationale': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'PutRoutingRuleEdit': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'rule': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'rationale': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'QuarantinedSnapshotSummary': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'lifecycle': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'source_revision': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'created_at': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'purge_deadline': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'QueryCall': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'request': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'QueryNextOperation': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'operation': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'request_kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'target': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'QueryProposalCall': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'revision': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'request': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'QueryProposalNextOperation': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'operation': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'request_kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'target': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'revision': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'QueryProposalResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'QueryRequest': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'QueryResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'Question': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'id': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'prompt': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'state': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'permitted_answers': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ReadCall': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'target': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'include_routing': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'include_coverage': {'title': None, 'description': 'Include current repository attestation status for registered policy units in this read scope.', 'has_default': False, 'default': None}, 'snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'detail': {'title': None, 'description': 'Compact preserves exact policy and essential authority; full includes all relationship rows.', 'has_default': False, 'default': None}}}, 'ReadCoverage': {'title': None, 'description': 'Repository attestation status bound to this snapshot or proposal. Empty subjects means no registered policy units in scope, not complete coverage. Analysis-local attestations are not repository certificates.', 'has_default': False, 'default': None, 'properties': {'subjects': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ReadManyCall': {'title': None, 'description': 'Read 1–32 selected items from one explicit snapshot, preserving order. The complete JSON result is limited to 2 MiB; any failed item rejects the entire request.', 'has_default': False, 'default': None, 'properties': {'snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'items': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ReadManyItem': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'target': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'include_routing': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'include_coverage': {'title': None, 'description': 'Include current repository attestation status for registered policy units in this read scope.', 'has_default': False, 'default': None}, 'detail': {'title': None, 'description': 'Compact preserves exact policy and essential authority; full includes all relationship rows.', 'has_default': False, 'default': None}}}, 'ReadManyResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'items': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ReadRequest': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'target': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'include_routing': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'include_coverage': {'title': None, 'description': 'Include current repository attestation status for registered policy units in this read scope.', 'has_default': False, 'default': None}}}, 'ReadResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'policy': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'content': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'requires': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'specializes': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'related': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'next_operations': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'summary': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'routing': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'coverage': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'application_exposure': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'provenance': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ReadinessHandle': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'id': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'schema_version': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ReadinessId': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'ReadingPlanEntry': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'target': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'scope': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'authority': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'reasons': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'state': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ReadingPlanReason': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'RecoverApplicationCall': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'readiness': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'RecoverApplicationResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'application': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'status': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'RecoverCall': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'context': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'RegisterConsumerEdit': {'title': None, 'description': 'Register an existing tracked consumer within this proposal. The Engine captures original-revision bytes; use separate policy relationships to declare consumers and review obligations.', 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'consumer': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'path': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'artifact_kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'authority': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'RegisterPolicyUnitEdit': {'title': None, 'description': 'Register an explicitly selected policy scope in an existing standard. The Engine owns declaration placement and validates the final candidate.', 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'standard': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'policy_unit': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'RejectedResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'code': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'outcome': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'target': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'message': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'details': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'next_operations': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'RelatedCall': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'target': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'groups': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'direction': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'transitive': {'title': None, 'description': None, 'has_default': True, 'default': False}, 'snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'RelatedRequest': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'target': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'groups': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'direction': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'transitive': {'title': None, 'description': None, 'has_default': True, 'default': False}}}, 'RelatedResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'target': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'authoring_target': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'policy_unit_mapping': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'relationships': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'next_operations': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'summary': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'RelationshipConsumer': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'RelationshipDisposition': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'relationship': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'disposition': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'replacement_consumer': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'rationale': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'evidence': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'RelationshipInspectionResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'relationship': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'policy_semantics': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'provenance': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'RelationshipKey': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'RelationshipSummary': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'handle': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'source': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'target': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'relation': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'groups': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'direction': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'traversal_eligible': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'applicability': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'RemovePolicyRelationshipEdit': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'relationship': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'RemoveRoutingFactEdit': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'fact': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'rationale': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'RemoveRoutingRuleEdit': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'rule': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'rationale': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ReplaceStandardRelationshipsEdit': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'standard': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'requires': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'specializes': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'rationale': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'RepositoryPath': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'RequiresReadingReason': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'edge': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'source': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ResolveCall': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'analysis': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'submission': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ResolveNextOperation': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'operation': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'request_kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'target': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'work': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'analysis': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ResolveWorkflowCall': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'context': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'submission': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ResumeCall': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'context': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'RetireDecisionProvenanceEdit': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'id': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'RetirePolicyUnitEdit': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'policy': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'retired_semantic_revision': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'successors': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'relationship_dispositions': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'evidence': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'RetireStandardEdit': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'standard': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'successors': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'relationship_dispositions': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'evidence': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ReviewCall': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'context': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'decisions': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ReviewDecision': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'owner': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'decision': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'rationale': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'evidence': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ReviewProposalCall': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'analysis': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'decisions': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'prior_readiness': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ReviewProposalResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'readiness': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'revision': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'status': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ReviewScope': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'ReviseCall': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'context': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'change_set': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ReviseOperationalArtifactEdit': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'target': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'title': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'body': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'RevisePolicyUnitEdit': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'policy': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'title': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'body': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'semantics': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ReviseProposalCall': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'expected_revision': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'change_set': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ReviseProposalResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'proposal': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'revision': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ReviseStandardEdit': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'standard': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'scope_updates': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'RewriteNavigationIndexEdit': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'entrypoint': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'destinations': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'rationale': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'retargets': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'RouteCall': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'facts': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'RouteRequest': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'facts': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'RouteResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'reading_plan': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'unresolved_questions': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'next_operations': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'summary': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'RoutingBaseReadingReason': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'projection': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'RoutingConfiguration': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'facts': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'rules': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'RoutingFactsCall': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'RoutingFactsResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'facts': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'RoutingQuestion': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'id': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'prompt': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'state': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'fact': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'RoutingRuleExplanation': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'id': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'target': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'when': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'state': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'RoutingRuleReadingReason': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'rule': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'facts': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ScalarValue': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'SelectionReason': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'SemanticProposal': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'policy': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'accepted_semantic_revision': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'proposed_semantic_revision': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'intent': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'structural_digest': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'SnapshotChildHandle': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'child_kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'child_id': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'schema_version': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'SnapshotHandle': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'id': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'schema_version': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'SnapshotId': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'SnapshotInspectionResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'SnapshotSummary': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'SpecializesReadingReason': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'edge': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'source': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'StandardContent': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'id': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'title': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'role': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'level': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'applies_when': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'does_not_apply_when': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'verification': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'body': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'StandardEdit': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'StandardsChangePurpose': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'summary': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'rationale': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'evidence': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'StandardsChangeSet': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'purpose': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'edits': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'StructuredScope': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'heading_path': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'Submission': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'Timestamp': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'UndeleteSnapshotCall': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'UndeleteSnapshotResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'VerificationFailure': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'code': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'message': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'suite': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'check': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'VerificationReport': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'passed': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'exit_code': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'suites': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'checks': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'failures': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'VerifyProposalCall': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'revision': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'readiness': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'VerifyProposalResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'revision': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'verification': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'readiness': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'VerifyRepositoryCall': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'refresh_verification_inputs': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'VerifyRepositoryResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'refreshed_verification_inputs': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'verification': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'WholeArtifactScope': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'WithdrawApplicationContentEdit': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'target': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'WorkflowContext': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'WorkflowContinuation': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'operation': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'context': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'required_inputs': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'WorkflowOutcome': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'WorkflowResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'context': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'proposal': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'revision': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'status': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'next_operations': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'outcome': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'WorkflowStatusCall': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'context': {'title': None, 'description': None, 'has_default': False, 'default': None}}}}) +_SCHEMA = json.loads('{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"https://coding-standards.local/contracts/standards-engine/a2-v34","title":"Standards Engine A2 contract","description":"Canonical typed contract for snapshot lifecycle, controlled authoring, navigation, inspection, and immutable standards-change analysis.","oneOf":[{"$ref":"#/$defs/AgentRouteResult"},{"$ref":"#/$defs/AnalyzeCall"},{"$ref":"#/$defs/AnalyzeProposalCall"},{"$ref":"#/$defs/ApplicationInspectCall"},{"$ref":"#/$defs/ApplicationQueryCall"},{"$ref":"#/$defs/ApplicationReadCall"},{"$ref":"#/$defs/ApplicationReadManyCall"},{"$ref":"#/$defs/ApplicationReadManyResult"},{"$ref":"#/$defs/ApplicationReadResult"},{"$ref":"#/$defs/ApplicationRecoveryRequiredResult"},{"$ref":"#/$defs/ApplicationRejectedResult"},{"$ref":"#/$defs/ApplicationRelatedResult"},{"$ref":"#/$defs/ApplicationRouteResult"},{"$ref":"#/$defs/ApplicationRoutingFactsResult"},{"$ref":"#/$defs/ApplyCall"},{"$ref":"#/$defs/ApplyProposalCall"},{"$ref":"#/$defs/ApplyProposalResult"},{"$ref":"#/$defs/CompactReadResult"},{"$ref":"#/$defs/CompleteResult"},{"$ref":"#/$defs/CreateProposalCall"},{"$ref":"#/$defs/CreateProposalResult"},{"$ref":"#/$defs/CreateSnapshotCall"},{"$ref":"#/$defs/CreateSnapshotResult"},{"$ref":"#/$defs/DeleteSnapshotCall"},{"$ref":"#/$defs/DeleteSnapshotResult"},{"$ref":"#/$defs/FindProposalsCall"},{"$ref":"#/$defs/FindProposalsResult"},{"$ref":"#/$defs/FindSnapshotsCall"},{"$ref":"#/$defs/FindSnapshotsResult"},{"$ref":"#/$defs/InspectCall"},{"$ref":"#/$defs/InspectionResult"},{"$ref":"#/$defs/MaintainEvidenceCall"},{"$ref":"#/$defs/MaintainEvidenceResult"},{"$ref":"#/$defs/NavigationIndexesResult"},{"$ref":"#/$defs/OperationalReadResult"},{"$ref":"#/$defs/PendingResult"},{"$ref":"#/$defs/PrepareCall"},{"$ref":"#/$defs/PreviewApplicationCall"},{"$ref":"#/$defs/PreviewApplicationResult"},{"$ref":"#/$defs/ProposeCall"},{"$ref":"#/$defs/ProvenanceReadResult"},{"$ref":"#/$defs/QueryCall"},{"$ref":"#/$defs/QueryProposalCall"},{"$ref":"#/$defs/QueryProposalResult"},{"$ref":"#/$defs/QueryResult"},{"$ref":"#/$defs/ReadCall"},{"$ref":"#/$defs/ReadManyCall"},{"$ref":"#/$defs/ReadManyResult"},{"$ref":"#/$defs/ReadResult"},{"$ref":"#/$defs/RecoverApplicationCall"},{"$ref":"#/$defs/RecoverApplicationResult"},{"$ref":"#/$defs/RecoverCall"},{"$ref":"#/$defs/RejectedResult"},{"$ref":"#/$defs/RelatedCall"},{"$ref":"#/$defs/RelatedResult"},{"$ref":"#/$defs/ResolveCall"},{"$ref":"#/$defs/ResolveWorkflowCall"},{"$ref":"#/$defs/ResumeCall"},{"$ref":"#/$defs/ReviewCall"},{"$ref":"#/$defs/ReviewProposalCall"},{"$ref":"#/$defs/ReviewProposalResult"},{"$ref":"#/$defs/ReviseCall"},{"$ref":"#/$defs/ReviseProposalCall"},{"$ref":"#/$defs/ReviseProposalResult"},{"$ref":"#/$defs/RouteCall"},{"$ref":"#/$defs/RoutingFactsCall"},{"$ref":"#/$defs/RoutingFactsResult"},{"$ref":"#/$defs/UndeleteSnapshotCall"},{"$ref":"#/$defs/UndeleteSnapshotResult"},{"$ref":"#/$defs/VerifyProposalCall"},{"$ref":"#/$defs/VerifyProposalResult"},{"$ref":"#/$defs/VerifyRepositoryCall"},{"$ref":"#/$defs/VerifyRepositoryResult"},{"$ref":"#/$defs/WorkflowResult"},{"$ref":"#/$defs/WorkflowStatusCall"}],"$defs":{"NonEmptyString":{"type":"string","minLength":1},"CanonicalId":{"type":"string","pattern":"^[A-Za-z0-9][A-Za-z0-9._:/-]*$"},"EdgeId":{"type":"string","minLength":1},"Digest":{"type":"string","pattern":"^sha256:[0-9a-f]{64}$"},"ObligationId":{"type":"string","pattern":"^obligation:sha256:[0-9a-f]{64}$"},"ImpactTraceId":{"type":"string","pattern":"^impact-trace:sha256:[0-9a-f]{64}$"},"FactRequirementId":{"type":"string","pattern":"^fact-requirement:sha256:[0-9a-f]{64}$"},"ScalarValue":{"oneOf":[{"type":"boolean"},{"type":"integer"},{"type":"string"},{"type":"null"}]},"FactValue":{"oneOf":[{"type":"object","required":["type","state","value"],"properties":{"type":{"const":"boolean"},"state":{"const":"known"},"value":{"type":"boolean"}},"additionalProperties":false},{"type":"object","required":["type","state","value"],"properties":{"type":{"enum":["boolean","enum","string","string-set","enum-set","canonical-id"]},"state":{"const":"known"},"value":{"type":"null"}},"additionalProperties":false},{"type":"object","required":["type","state","value"],"properties":{"type":{"enum":["enum","string","canonical-id"]},"state":{"const":"known"},"value":{"type":"string"}},"additionalProperties":false},{"type":"object","required":["type","state","value"],"properties":{"type":{"enum":["string-set","enum-set"]},"state":{"const":"known"},"value":{"type":"array","items":{"type":"string"},"uniqueItems":true}},"additionalProperties":false},{"type":"object","required":["type","state"],"properties":{"type":{"enum":["boolean","enum","string","string-set","enum-set","canonical-id"]},"state":{"enum":["known-absent","unknown"]}},"additionalProperties":false}]},"FactSet":{"type":"object","additionalProperties":{"$ref":"#/$defs/FactValue"}},"StructuredScope":{"type":"object","required":["kind","heading_path"],"properties":{"kind":{"const":"structured"},"heading_path":{"type":"array","minItems":1,"items":{"$ref":"#/$defs/NonEmptyString"}}},"additionalProperties":false},"WholeArtifactScope":{"type":"object","required":["kind"],"properties":{"kind":{"const":"whole-artifact"}},"additionalProperties":false},"ReviewScope":{"oneOf":[{"$ref":"#/$defs/StructuredScope"},{"$ref":"#/$defs/WholeArtifactScope"}]},"AllExpression":{"type":"object","required":["operator","expressions"],"properties":{"operator":{"const":"all"},"expressions":{"type":"array","minItems":1,"items":{"$ref":"#/$defs/ApplicabilityExpression"}}},"additionalProperties":false},"AnyExpression":{"type":"object","required":["operator","expressions"],"properties":{"operator":{"const":"any"},"expressions":{"type":"array","minItems":1,"items":{"$ref":"#/$defs/ApplicabilityExpression"}}},"additionalProperties":false},"NotExpression":{"type":"object","required":["operator","expression"],"properties":{"operator":{"const":"not"},"expression":{"$ref":"#/$defs/ApplicabilityExpression"}},"additionalProperties":false},"EqualsExpression":{"type":"object","required":["operator","fact","value"],"properties":{"operator":{"const":"equals"},"fact":{"$ref":"#/$defs/CanonicalId"},"value":{"$ref":"#/$defs/ScalarValue"}},"additionalProperties":false},"InExpression":{"type":"object","required":["operator","fact","values"],"properties":{"operator":{"const":"in"},"fact":{"$ref":"#/$defs/CanonicalId"},"values":{"type":"array","minItems":1,"uniqueItems":true,"items":{"$ref":"#/$defs/ScalarValue"}}},"additionalProperties":false},"ContainsExpression":{"type":"object","required":["operator","fact","value"],"properties":{"operator":{"const":"contains"},"fact":{"$ref":"#/$defs/CanonicalId"},"value":{"$ref":"#/$defs/ScalarValue"}},"additionalProperties":false},"ExistsExpression":{"type":"object","required":["operator","fact"],"properties":{"operator":{"const":"exists"},"fact":{"$ref":"#/$defs/CanonicalId"}},"additionalProperties":false},"AlwaysExpression":{"type":"object","required":["operator"],"properties":{"operator":{"const":"always"}},"additionalProperties":false},"ApplicabilityExpression":{"oneOf":[{"$ref":"#/$defs/AlwaysExpression"},{"$ref":"#/$defs/AllExpression"},{"$ref":"#/$defs/AnyExpression"},{"$ref":"#/$defs/NotExpression"},{"$ref":"#/$defs/EqualsExpression"},{"$ref":"#/$defs/InExpression"},{"$ref":"#/$defs/ContainsExpression"},{"$ref":"#/$defs/ExistsExpression"}]},"GeneralSelectionReason":{"type":"object","required":["kind"],"properties":{"kind":{"enum":["routing-fact","requires","specializes","changed-policy","question","audit-coverage","unmapped-normative-change","structured-scope-analysis-unsupported","navigation-index-change","supporting-content-change"]},"source":{"$ref":"#/$defs/CanonicalId"},"fact":{"$ref":"#/$defs/CanonicalId"},"edge":{"$ref":"#/$defs/EdgeId"},"question":{"$ref":"#/$defs/CanonicalId"}},"additionalProperties":false},"PolicyImpactSelectionReason":{"type":"object","required":["kind","source","edge","relation","evidence_owner","traces"],"properties":{"kind":{"const":"policy-impact-edge"},"source":{"$ref":"#/$defs/CanonicalId"},"edge":{"$ref":"#/$defs/EdgeId"},"relation":{"$ref":"#/$defs/CanonicalId"},"evidence_owner":{"$ref":"#/$defs/CanonicalId"},"traces":{"type":"array","minItems":1,"uniqueItems":true,"items":{"$ref":"#/$defs/ImpactTraceReference"}}},"additionalProperties":false},"SelectionReason":{"oneOf":[{"$ref":"#/$defs/GeneralSelectionReason"},{"$ref":"#/$defs/PolicyImpactSelectionReason"}]},"ImpactTraceReference":{"type":"object","required":["id","graph","applicability"],"properties":{"id":{"$ref":"#/$defs/ImpactTraceId"},"graph":{"enum":["accepted","proposed"]},"applicability":{"enum":["true","false","unknown"]}},"additionalProperties":false},"ConsumerReviewObligationReadingReason":{"type":"object","required":["kind","obligation"],"properties":{"kind":{"const":"consumer-review-obligation"},"obligation":{"$ref":"#/$defs/ObligationId"}},"additionalProperties":false},"RoutingBaseReadingReason":{"type":"object","required":["kind","projection"],"properties":{"kind":{"const":"routing-base"},"projection":{"$ref":"#/$defs/CanonicalId"}},"additionalProperties":false},"RoutingRuleReadingReason":{"type":"object","required":["kind","rule","facts"],"properties":{"kind":{"const":"routing-rule"},"rule":{"$ref":"#/$defs/CanonicalId"},"facts":{"type":"array","uniqueItems":true,"items":{"$ref":"#/$defs/CanonicalId"}}},"additionalProperties":false},"RequiresReadingReason":{"type":"object","required":["kind","edge","source"],"properties":{"kind":{"const":"requires"},"edge":{"$ref":"#/$defs/EdgeId"},"source":{"$ref":"#/$defs/CanonicalId"}},"additionalProperties":false},"SpecializesReadingReason":{"type":"object","required":["kind","edge","source"],"properties":{"kind":{"const":"specializes"},"edge":{"$ref":"#/$defs/EdgeId"},"source":{"$ref":"#/$defs/CanonicalId"}},"additionalProperties":false},"ReadingPlanReason":{"oneOf":[{"$ref":"#/$defs/ConsumerReviewObligationReadingReason"},{"$ref":"#/$defs/RoutingBaseReadingReason"},{"$ref":"#/$defs/RoutingRuleReadingReason"},{"$ref":"#/$defs/RequiresReadingReason"},{"$ref":"#/$defs/SpecializesReadingReason"}]},"ReadingPlanEntry":{"type":"object","required":["target","scope","authority","reasons","state"],"properties":{"target":{"$ref":"#/$defs/CanonicalId"},"scope":{"$ref":"#/$defs/ReviewScope"},"authority":{"enum":["normative","projection","contextual","evidence"]},"reasons":{"type":"array","minItems":1,"uniqueItems":true,"items":{"$ref":"#/$defs/ReadingPlanReason"}},"state":{"enum":["selected","conditional","unresolved"]}},"additionalProperties":false},"RouteRequest":{"type":"object","required":["kind","facts"],"properties":{"kind":{"const":"route"},"facts":{"$ref":"#/$defs/FactSet"}},"additionalProperties":false},"ReadRequest":{"type":"object","required":["kind","target"],"properties":{"kind":{"const":"read"},"target":{"$ref":"#/$defs/CanonicalId"},"include_routing":{"type":"boolean"},"include_coverage":{"type":"boolean","description":"Include current repository attestation status for registered policy units in this read scope."}},"additionalProperties":false},"RelatedRequest":{"type":"object","required":["kind","target","groups","direction","transitive"],"properties":{"kind":{"const":"related"},"target":{"$ref":"#/$defs/CanonicalId"},"groups":{"type":"array","minItems":1,"uniqueItems":true,"items":{"$ref":"#/$defs/CanonicalId"}},"direction":{"enum":["incoming","outgoing","both"]},"transitive":{"type":"boolean","default":false}},"additionalProperties":false},"QueryRequest":{"oneOf":[{"$ref":"#/$defs/RouteRequest"},{"$ref":"#/$defs/ReadRequest"},{"$ref":"#/$defs/RelatedRequest"}]},"PolicyUnitDeclaration":{"type":"object","required":["kind","id","module","heading_path","semantic_revision","lifecycle"],"properties":{"kind":{"const":"policy-unit"},"id":{"$ref":"#/$defs/CanonicalId"},"module":{"$ref":"#/$defs/CanonicalId"},"heading_path":{"type":"array","minItems":1,"items":{"$ref":"#/$defs/NonEmptyString"}},"semantic_revision":{"type":"integer","minimum":1},"lifecycle":{"const":"active"},"aliases":{"type":"array","uniqueItems":true,"items":{"$ref":"#/$defs/CanonicalId"}},"predecessors":{"type":"array","uniqueItems":true,"items":{"$ref":"#/$defs/CanonicalId"}},"successors":{"type":"array","uniqueItems":true,"items":{"$ref":"#/$defs/CanonicalId"}}},"additionalProperties":false},"CanonicalModuleDeclaration":{"type":"object","required":["kind","id","role","level","applies_when","does_not_apply_when","requires","specializes","verification"],"properties":{"kind":{"const":"canonical-module"},"id":{"$ref":"#/$defs/CanonicalId"},"role":{"enum":["core","router","workflow","profile","topic","reference"]},"level":{"enum":["MUST","SHOULD","PROFILE","REFERENCE"]},"applies_when":{"$ref":"#/$defs/NonEmptyString"},"does_not_apply_when":{"$ref":"#/$defs/NonEmptyString"},"requires":{"type":"array","uniqueItems":true,"items":{"$ref":"#/$defs/CanonicalId"}},"specializes":{"type":"array","uniqueItems":true,"items":{"$ref":"#/$defs/CanonicalId"}},"verification":{"$ref":"#/$defs/NonEmptyString"}},"additionalProperties":false},"PolicyRelationshipInspection":{"type":"object","required":["relationship_kind","applicability","source_scope","consumer_scope","propagation","evidence_owner","rationale"],"properties":{"relationship_kind":{"enum":["normative-consumer","router-projection","prompt-projection","template-projection","reference-projection","fixture-projection","enforcement-suite-projection","documentation-projection","implementation-projection"]},"applicability":{"$ref":"#/$defs/ApplicabilityExpression"},"source_scope":{"oneOf":[{"$ref":"#/$defs/ReviewScope"},{"type":"null"}]},"consumer_scope":{"oneOf":[{"$ref":"#/$defs/ReviewScope"},{"type":"null"}]},"propagation":{"const":"source-to-consumer"},"evidence_owner":{"$ref":"#/$defs/CanonicalId"},"rationale":{"$ref":"#/$defs/NonEmptyString"}},"additionalProperties":false},"SemanticProposal":{"type":"object","required":["policy","accepted_semantic_revision","proposed_semantic_revision","intent","structural_digest"],"properties":{"policy":{"$ref":"#/$defs/CanonicalId"},"accepted_semantic_revision":{"oneOf":[{"type":"integer","minimum":1},{"type":"null"}]},"proposed_semantic_revision":{"type":"integer","minimum":1},"intent":{"$ref":"#/$defs/NonEmptyString"},"structural_digest":{"$ref":"#/$defs/Digest"}},"additionalProperties":false},"ChangeDescriptor":{"type":"object","required":["kind","accepted_ids","proposed_ids","scope"],"properties":{"kind":{"enum":["module","modification","addition","removal","move","split","merge","navigation-index","supporting-content"]},"accepted_ids":{"type":"array","uniqueItems":true,"items":{"$ref":"#/$defs/CanonicalId"}},"proposed_ids":{"type":"array","uniqueItems":true,"items":{"$ref":"#/$defs/CanonicalId"}},"scope":{"$ref":"#/$defs/ReviewScope"},"accepted_module":{"$ref":"#/$defs/CanonicalId"},"proposed_module":{"$ref":"#/$defs/CanonicalId"}},"additionalProperties":false},"ChangedPolicyUnit":{"type":"object","required":["policy","change_kind","classification","accepted_representation_digest","proposed_representation_digest","accepted_structural_digest","proposed_structural_digest","accepted_semantic_revision","proposed_semantic_revision","semantic_state","scope"],"properties":{"policy":{"$ref":"#/$defs/CanonicalId"},"change_kind":{"enum":["modification","addition","removal","move","split-predecessor","split-successor","merge-predecessor","merge-successor"]},"classification":{"enum":["unchanged","representation-only-candidate","possibly-semantically-changed","semantically-changed","unresolved"]},"accepted_representation_digest":{"oneOf":[{"$ref":"#/$defs/Digest"},{"type":"null"}]},"proposed_representation_digest":{"oneOf":[{"$ref":"#/$defs/Digest"},{"type":"null"}]},"accepted_structural_digest":{"oneOf":[{"$ref":"#/$defs/Digest"},{"type":"null"}]},"proposed_structural_digest":{"oneOf":[{"$ref":"#/$defs/Digest"},{"type":"null"}]},"accepted_semantic_revision":{"oneOf":[{"type":"integer","minimum":1},{"type":"null"}]},"proposed_semantic_revision":{"oneOf":[{"type":"integer","minimum":1},{"type":"null"}]},"semantic_state":{"enum":["accepted-unchanged","proposed","removed","unresolved"]},"scope":{"$ref":"#/$defs/ReviewScope"}},"additionalProperties":false},"Question":{"type":"object","required":["id","kind","prompt","state","permitted_answers"],"properties":{"id":{"$ref":"#/$defs/CanonicalId"},"kind":{"enum":["applicability-fact","normative-classification","identity-resolution","scope-resolution"]},"prompt":{"$ref":"#/$defs/NonEmptyString"},"state":{"enum":["required","answered","blocked"]},"permitted_answers":{"type":"array","minItems":1,"uniqueItems":true,"items":{"$ref":"#/$defs/NonEmptyString"}}},"additionalProperties":false},"ConsumerReviewContract":{"type":"object","required":["kind","id","version","permitted_dispositions","evidence_contract","authorization_capability","semantics"],"properties":{"kind":{"const":"consumer-review-contract"},"id":{"$ref":"#/$defs/CanonicalId"},"version":{"type":"integer","minimum":1},"permitted_dispositions":{"type":"array","minItems":1,"uniqueItems":true,"items":{"enum":["updated","reviewed-no-change","not-applicable","blocked"]}},"evidence_contract":{"$ref":"#/$defs/CanonicalId"},"authorization_capability":{"$ref":"#/$defs/CanonicalId"},"semantics":{"$ref":"#/$defs/NonEmptyString"}},"additionalProperties":false},"DecisionDependency":{"type":"object","required":["class","identity","digest"],"properties":{"class":{"enum":["policy-unit","semantic-revision","structure","representation","module-locator","applicability-fact","relationship","audit","exception","evidence","provider-contract","applicability-contract","analysis-contract"]},"identity":{"$ref":"#/$defs/NonEmptyString"},"digest":{"$ref":"#/$defs/Digest"}},"additionalProperties":false},"DecisionFingerprint":{"type":"object","required":["decision_kind","decision_contract","schema_version","dependencies"],"properties":{"decision_kind":{"$ref":"#/$defs/CanonicalId"},"decision_contract":{"$ref":"#/$defs/CanonicalId"},"schema_version":{"const":1},"dependencies":{"type":"array","minItems":1,"items":{"$ref":"#/$defs/DecisionDependency"}}},"additionalProperties":false},"FactValueContract":{"type":"object","required":["type","states","nullable"],"properties":{"type":{"enum":["boolean","enum","string","string-set","enum-set","canonical-id"]},"states":{"const":["known","known-absent"]},"nullable":{"type":"boolean"},"values":{"type":"array","minItems":1,"uniqueItems":true,"items":{"type":"string"}}},"additionalProperties":false},"EvidenceReference":{"type":"object","required":["id","digest","provider_contract","provider_contract_version"],"properties":{"id":{"$ref":"#/$defs/CanonicalId"},"digest":{"$ref":"#/$defs/Digest"},"provider_contract":{"$ref":"#/$defs/CanonicalId"},"provider_contract_version":{"$ref":"#/$defs/NonEmptyString"}},"additionalProperties":false},"CompletionProof":{"type":"object","required":["required_coverage_subjects","certificate_subjects","reached_consumer_obligations","disposition_obligations","required_fact_requirements","observed_fact_requirements","non_consumer_obligations_resolved","applicability_resolved","authorization_valid","evidence_valid"],"properties":{"required_coverage_subjects":{"type":"array","uniqueItems":true,"items":{"$ref":"#/$defs/CanonicalId"}},"certificate_subjects":{"type":"array","uniqueItems":true,"items":{"$ref":"#/$defs/CanonicalId"}},"reached_consumer_obligations":{"type":"array","uniqueItems":true,"items":{"$ref":"#/$defs/ObligationId"}},"disposition_obligations":{"type":"array","uniqueItems":true,"items":{"$ref":"#/$defs/ObligationId"}},"required_fact_requirements":{"type":"array","uniqueItems":true,"items":{"$ref":"#/$defs/FactRequirementId"}},"observed_fact_requirements":{"type":"array","uniqueItems":true,"items":{"$ref":"#/$defs/FactRequirementId"}},"non_consumer_obligations_resolved":{"const":true},"applicability_resolved":{"const":true},"authorization_valid":{"const":true},"evidence_valid":{"const":true}},"additionalProperties":false},"Timestamp":{"type":"integer","minimum":0},"SnapshotId":{"type":"string","pattern":"^snapshot:v1:[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"},"AnalysisId":{"type":"string","pattern":"^analysis:sha256:[0-9a-f]{64}$"},"ProposalId":{"type":"string","pattern":"^proposal:v1:[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"},"ProposalRevisionId":{"type":"string","pattern":"^proposal-revision:sha256:[0-9a-f]{64}$"},"ReadinessId":{"type":"string","pattern":"^readiness:sha256:[0-9a-f]{64}$"},"ApplicationId":{"type":"string","pattern":"^application:sha256:[0-9a-f]{64}$"},"ChildId":{"type":"string","pattern":"^sha256:[0-9a-f]{64}$"},"AuthorizationId":{"type":"string","pattern":"^authorization:sha256:[0-9a-f]{64}$"},"SnapshotHandle":{"type":"object","required":["kind","id","schema_version"],"properties":{"kind":{"const":"snapshot-handle"},"id":{"$ref":"#/$defs/SnapshotId"},"schema_version":{"const":5}},"additionalProperties":false},"AnalysisHandle":{"type":"object","required":["kind","id","schema_version"],"properties":{"kind":{"const":"analysis-handle"},"id":{"$ref":"#/$defs/AnalysisId"},"schema_version":{"const":7}},"additionalProperties":false},"ProposalHandle":{"type":"object","required":["kind","id","schema_version"],"properties":{"kind":{"const":"proposal-handle"},"id":{"$ref":"#/$defs/ProposalId"},"schema_version":{"const":1}},"additionalProperties":false},"ProposalRevisionHandle":{"type":"object","required":["kind","id","schema_version"],"properties":{"kind":{"const":"proposal-revision-handle"},"id":{"$ref":"#/$defs/ProposalRevisionId"},"schema_version":{"const":1}},"additionalProperties":false},"ReadinessHandle":{"type":"object","required":["kind","id","schema_version"],"properties":{"kind":{"const":"readiness-handle"},"id":{"$ref":"#/$defs/ReadinessId"},"schema_version":{"const":1}},"additionalProperties":false},"ApplicationHandle":{"type":"object","required":["kind","id","schema_version"],"properties":{"kind":{"const":"application-handle"},"id":{"$ref":"#/$defs/ApplicationId"},"schema_version":{"const":1}},"additionalProperties":false},"SnapshotChildHandle":{"type":"object","required":["kind","snapshot","child_kind","child_id","schema_version"],"properties":{"kind":{"const":"snapshot-child-handle"},"snapshot":{"$ref":"#/$defs/SnapshotHandle"},"child_kind":{"enum":["policy","relationship"]},"child_id":{"$ref":"#/$defs/NonEmptyString"},"schema_version":{"const":5}},"additionalProperties":false},"AnalysisChildHandle":{"type":"object","required":["kind","analysis","child_kind","child_id","schema_version"],"properties":{"kind":{"const":"analysis-child-handle"},"analysis":{"$ref":"#/$defs/AnalysisHandle"},"child_kind":{"enum":["context","fact-requirement","fact-observation","obligation","coverage-requirement","coverage-certificate"]},"child_id":{"$ref":"#/$defs/ChildId"},"schema_version":{"const":7}},"additionalProperties":false},"AnalysisMaterialHandle":{"oneOf":[{"$ref":"#/$defs/SnapshotHandle"},{"$ref":"#/$defs/ProposalRevisionHandle"}]},"InspectableHandle":{"oneOf":[{"$ref":"#/$defs/SnapshotHandle"},{"$ref":"#/$defs/AnalysisHandle"},{"$ref":"#/$defs/SnapshotChildHandle"},{"$ref":"#/$defs/AnalysisChildHandle"}]},"ActiveSnapshotSummary":{"type":"object","required":["snapshot","lifecycle","source_revision","created_at"],"properties":{"snapshot":{"$ref":"#/$defs/SnapshotHandle"},"lifecycle":{"const":"active"},"source_revision":{"$ref":"#/$defs/NonEmptyString"},"created_at":{"$ref":"#/$defs/Timestamp"}},"additionalProperties":false},"QuarantinedSnapshotSummary":{"type":"object","required":["snapshot","lifecycle","source_revision","created_at","purge_deadline"],"properties":{"snapshot":{"$ref":"#/$defs/SnapshotHandle"},"lifecycle":{"const":"quarantined"},"source_revision":{"$ref":"#/$defs/NonEmptyString"},"created_at":{"$ref":"#/$defs/Timestamp"},"purge_deadline":{"$ref":"#/$defs/Timestamp"}},"additionalProperties":false},"SnapshotSummary":{"oneOf":[{"$ref":"#/$defs/ActiveSnapshotSummary"},{"$ref":"#/$defs/QuarantinedSnapshotSummary"}]},"CreateSnapshotCall":{"type":"object","required":["kind"],"properties":{"kind":{"const":"create-snapshot"}},"additionalProperties":false},"CreateSnapshotResult":{"type":"object","required":["kind","snapshot"],"properties":{"kind":{"const":"create-snapshot-result"},"snapshot":{"$ref":"#/$defs/ActiveSnapshotSummary"}},"additionalProperties":false},"FindSnapshotsCall":{"type":"object","required":["kind"],"properties":{"kind":{"const":"find-snapshots"},"lifecycle":{"enum":["active","quarantined"],"default":"active"},"after":{"$ref":"#/$defs/SnapshotHandle"},"limit":{"type":"integer","minimum":1,"default":50}},"additionalProperties":false},"FindSnapshotsResult":{"type":"object","required":["kind","snapshots"],"properties":{"kind":{"const":"find-snapshots-result"},"snapshots":{"type":"array","items":{"$ref":"#/$defs/SnapshotSummary"}},"continuation":{"$ref":"#/$defs/SnapshotHandle"}},"additionalProperties":false},"StandardsChangePurpose":{"type":"object","required":["summary","rationale","evidence"],"properties":{"summary":{"$ref":"#/$defs/NonEmptyString"},"rationale":{"$ref":"#/$defs/NonEmptyString"},"evidence":{"type":"array","minItems":1,"uniqueItems":true,"items":{"$ref":"#/$defs/EvidenceReference"}}},"additionalProperties":false},"StandardContent":{"type":"object","required":["id","title","role","level","applies_when","does_not_apply_when","verification","body"],"properties":{"id":{"$ref":"#/$defs/CanonicalId"},"title":{"$ref":"#/$defs/NonEmptyString"},"role":{"enum":["core","router","workflow","profile","topic","reference"]},"level":{"enum":["MUST","SHOULD","PROFILE","REFERENCE"]},"applies_when":{"$ref":"#/$defs/NonEmptyString"},"does_not_apply_when":{"$ref":"#/$defs/NonEmptyString"},"verification":{"$ref":"#/$defs/NonEmptyString"},"body":{"$ref":"#/$defs/NonEmptyString"}},"additionalProperties":false},"NewPolicyUnit":{"type":"object","required":["id","heading_chain","semantic_revision","intent","aliases","predecessors","successors"],"properties":{"id":{"$ref":"#/$defs/CanonicalId"},"heading_chain":{"type":"array","minItems":1,"items":{"$ref":"#/$defs/NonEmptyString"}},"semantic_revision":{"const":1},"intent":{"$ref":"#/$defs/NonEmptyString"},"aliases":{"type":"array","uniqueItems":true,"items":{"$ref":"#/$defs/CanonicalId"}},"predecessors":{"type":"array","uniqueItems":true,"items":{"$ref":"#/$defs/CanonicalId"}},"successors":{"type":"array","uniqueItems":true,"items":{"$ref":"#/$defs/CanonicalId"}}},"additionalProperties":false},"PreservePolicySemantics":{"type":"object","required":["kind","semantic_revision","intent"],"properties":{"kind":{"const":"preserve"},"semantic_revision":{"type":"integer","minimum":1},"intent":{"$ref":"#/$defs/NonEmptyString"}},"additionalProperties":false},"ChangePolicySemantics":{"type":"object","required":["kind","accepted_semantic_revision","proposed_semantic_revision","intent"],"properties":{"kind":{"const":"change"},"accepted_semantic_revision":{"type":"integer","minimum":1},"proposed_semantic_revision":{"type":"integer","minimum":1},"intent":{"$ref":"#/$defs/NonEmptyString"}},"additionalProperties":false},"PolicySemanticIntent":{"oneOf":[{"$ref":"#/$defs/PreservePolicySemantics"},{"$ref":"#/$defs/ChangePolicySemantics"}]},"CreateStandardEdit":{"type":"object","required":["kind","standard","requires","specializes","policy_units"],"properties":{"kind":{"const":"create-standard"},"standard":{"$ref":"#/$defs/StandardContent"},"requires":{"type":"array","uniqueItems":true,"items":{"$ref":"#/$defs/CanonicalId"}},"specializes":{"type":"array","uniqueItems":true,"items":{"$ref":"#/$defs/CanonicalId"}},"policy_units":{"type":"array","uniqueItems":true,"items":{"$ref":"#/$defs/NewPolicyUnit"}}},"additionalProperties":false},"RegisterPolicyUnitEdit":{"type":"object","description":"Register an explicitly selected policy scope in an existing standard. The Engine owns declaration placement and validates the final candidate.","required":["kind","standard","policy_unit"],"properties":{"kind":{"const":"register-policy-unit"},"standard":{"$ref":"#/$defs/CanonicalId"},"policy_unit":{"$ref":"#/$defs/NewPolicyUnit"}},"additionalProperties":false},"ReviseStandardEdit":{"type":"object","required":["kind","standard"],"properties":{"kind":{"const":"revise-standard"},"standard":{"$ref":"#/$defs/StandardContent"},"scope_updates":{"type":"array","items":{"$ref":"#/$defs/PolicyScopeUpdate"}}},"additionalProperties":false},"RevisePolicyUnitEdit":{"type":"object","required":["kind","policy","title","body","semantics"],"properties":{"kind":{"const":"revise-policy-unit"},"policy":{"$ref":"#/$defs/CanonicalId"},"title":{"$ref":"#/$defs/NonEmptyString"},"body":{"$ref":"#/$defs/NonEmptyString"},"semantics":{"$ref":"#/$defs/PolicySemanticIntent"}},"additionalProperties":false},"MovePolicyUnitEdit":{"type":"object","required":["kind","policy","standard","semantics"],"properties":{"kind":{"const":"move-policy-unit"},"policy":{"$ref":"#/$defs/CanonicalId"},"standard":{"$ref":"#/$defs/CanonicalId"},"after_policy":{"$ref":"#/$defs/CanonicalId"},"semantics":{"$ref":"#/$defs/PolicySemanticIntent"}},"additionalProperties":false},"RetirePolicyUnitEdit":{"type":"object","required":["kind","policy","retired_semantic_revision","successors","relationship_dispositions","evidence"],"properties":{"kind":{"const":"retire-policy-unit"},"policy":{"$ref":"#/$defs/CanonicalId"},"retired_semantic_revision":{"type":"integer","minimum":1},"successors":{"type":"array","uniqueItems":true,"items":{"$ref":"#/$defs/CanonicalId"}},"relationship_dispositions":{"type":"array","uniqueItems":true,"items":{"$ref":"#/$defs/RelationshipDisposition"}},"evidence":{"type":"array","minItems":1,"uniqueItems":true,"items":{"$ref":"#/$defs/EvidenceReference"}}},"additionalProperties":false},"RetireStandardEdit":{"type":"object","required":["kind","standard","successors","relationship_dispositions","evidence"],"properties":{"kind":{"const":"retire-standard"},"standard":{"$ref":"#/$defs/CanonicalId"},"successors":{"type":"array","uniqueItems":true,"items":{"$ref":"#/$defs/CanonicalId"}},"relationship_dispositions":{"type":"array","uniqueItems":true,"items":{"$ref":"#/$defs/RelationshipDisposition"}},"evidence":{"type":"array","minItems":1,"uniqueItems":true,"items":{"$ref":"#/$defs/EvidenceReference"}}},"additionalProperties":false},"ReplaceStandardRelationshipsEdit":{"type":"object","required":["kind","standard","requires","specializes","rationale"],"properties":{"kind":{"const":"replace-standard-relationships"},"standard":{"$ref":"#/$defs/CanonicalId"},"requires":{"type":"array","uniqueItems":true,"items":{"$ref":"#/$defs/CanonicalId"}},"specializes":{"type":"array","uniqueItems":true,"items":{"$ref":"#/$defs/CanonicalId"}},"rationale":{"$ref":"#/$defs/NonEmptyString"}},"additionalProperties":false},"AuthoringTargetHandle":{"type":"object","required":["kind","snapshot","id","schema_version"],"properties":{"kind":{"const":"authoring-target-handle"},"snapshot":{"$ref":"#/$defs/SnapshotHandle"},"id":{"$ref":"#/$defs/ChildId"},"schema_version":{"const":5}},"additionalProperties":false},"RelationshipConsumer":{"oneOf":[{"$ref":"#/$defs/CanonicalId"},{"$ref":"#/$defs/AuthoringTargetHandle"}]},"PolicyRelationship":{"type":"object","required":["source_policy","consumer","relation","applicability","source_scope","consumer_scope","evidence_owner","rationale"],"properties":{"source_policy":{"$ref":"#/$defs/CanonicalId"},"consumer":{"$ref":"#/$defs/RelationshipConsumer"},"relation":{"enum":["normative-consumer","router-projection","prompt-projection","template-projection","reference-projection","fixture-projection","enforcement-suite-projection","documentation-projection","implementation-projection"]},"applicability":{"$ref":"#/$defs/ApplicabilityExpression"},"source_scope":{"oneOf":[{"$ref":"#/$defs/ReviewScope"},{"type":"null"}]},"consumer_scope":{"oneOf":[{"$ref":"#/$defs/ReviewScope"},{"type":"null"}]},"evidence_owner":{"$ref":"#/$defs/CanonicalId"},"rationale":{"$ref":"#/$defs/NonEmptyString"}},"additionalProperties":false},"PutPolicyRelationshipEdit":{"type":"object","required":["kind","relationship"],"properties":{"kind":{"const":"put-policy-relationship"},"relationship":{"$ref":"#/$defs/PolicyRelationship"}},"additionalProperties":false},"RemovePolicyRelationshipEdit":{"type":"object","required":["kind","relationship"],"properties":{"kind":{"const":"remove-policy-relationship"},"relationship":{"$ref":"#/$defs/PolicyRelationship"}},"additionalProperties":false},"ModuleRelationshipKey":{"type":"object","required":["kind","relation","source","target"],"properties":{"kind":{"const":"module-relationship"},"relation":{"enum":["requires","specializes"]},"source":{"$ref":"#/$defs/CanonicalId"},"target":{"$ref":"#/$defs/CanonicalId"}},"additionalProperties":false},"PolicyRelationshipKey":{"type":"object","required":["kind","source_policy","consumer","relation"],"properties":{"kind":{"const":"policy-relationship"},"source_policy":{"$ref":"#/$defs/CanonicalId"},"consumer":{"$ref":"#/$defs/RelationshipConsumer"},"relation":{"$ref":"#/$defs/CanonicalId"}},"additionalProperties":false},"RelationshipKey":{"oneOf":[{"$ref":"#/$defs/ModuleRelationshipKey"},{"$ref":"#/$defs/PolicyRelationshipKey"}]},"RelationshipDisposition":{"type":"object","required":["relationship","disposition","rationale","evidence"],"properties":{"relationship":{"$ref":"#/$defs/RelationshipKey"},"disposition":{"enum":["remove","retarget"]},"replacement_consumer":{"$ref":"#/$defs/RelationshipConsumer"},"rationale":{"$ref":"#/$defs/NonEmptyString"},"evidence":{"type":"array","minItems":1,"uniqueItems":true,"items":{"$ref":"#/$defs/EvidenceReference"}}},"additionalProperties":false},"StandardEdit":{"oneOf":[{"$ref":"#/$defs/CreateStandardEdit"},{"$ref":"#/$defs/RegisterPolicyUnitEdit"},{"$ref":"#/$defs/ReviseStandardEdit"},{"$ref":"#/$defs/RevisePolicyUnitEdit"},{"$ref":"#/$defs/MovePolicyUnitEdit"},{"$ref":"#/$defs/RetirePolicyUnitEdit"},{"$ref":"#/$defs/RetireStandardEdit"},{"$ref":"#/$defs/ReplaceStandardRelationshipsEdit"},{"$ref":"#/$defs/PutPolicyRelationshipEdit"},{"$ref":"#/$defs/RemovePolicyRelationshipEdit"},{"$ref":"#/$defs/PutRoutingRuleEdit"},{"$ref":"#/$defs/RemoveRoutingRuleEdit"},{"$ref":"#/$defs/PutRoutingFactEdit"},{"$ref":"#/$defs/RemoveRoutingFactEdit"},{"$ref":"#/$defs/AuditPolicyUnitEdit"},{"$ref":"#/$defs/RewriteNavigationIndexEdit"},{"$ref":"#/$defs/PutDecisionProvenanceEdit"},{"$ref":"#/$defs/RetireDecisionProvenanceEdit"},{"$ref":"#/$defs/ApproveApplicationContentEdit"},{"$ref":"#/$defs/WithdrawApplicationContentEdit"},{"$ref":"#/$defs/ReviseOperationalArtifactEdit"},{"$ref":"#/$defs/RegisterConsumerEdit"}]},"StandardsChangeSet":{"type":"object","required":["purpose","edits"],"properties":{"purpose":{"$ref":"#/$defs/StandardsChangePurpose"},"edits":{"type":"array","minItems":1,"uniqueItems":true,"items":{"$ref":"#/$defs/StandardEdit"}}},"additionalProperties":false},"ProposalSummary":{"type":"object","required":["proposal","head_revision"],"properties":{"proposal":{"$ref":"#/$defs/ProposalHandle"},"head_revision":{"$ref":"#/$defs/ProposalRevisionHandle"}},"additionalProperties":false},"CreateProposalCall":{"type":"object","required":["kind","base_snapshot","change_set"],"properties":{"kind":{"const":"create-proposal"},"base_snapshot":{"$ref":"#/$defs/SnapshotHandle"},"change_set":{"$ref":"#/$defs/StandardsChangeSet"}},"additionalProperties":false},"CreateProposalResult":{"type":"object","required":["kind","proposal","revision"],"properties":{"kind":{"const":"create-proposal-result"},"proposal":{"$ref":"#/$defs/ProposalHandle"},"revision":{"$ref":"#/$defs/ProposalRevisionHandle"}},"additionalProperties":false},"FindProposalsCall":{"type":"object","required":["kind"],"properties":{"kind":{"const":"find-proposals"},"after":{"$ref":"#/$defs/ProposalHandle"},"limit":{"type":"integer","minimum":1,"default":50}},"additionalProperties":false},"FindProposalsResult":{"type":"object","required":["kind","proposals"],"properties":{"kind":{"const":"find-proposals-result"},"proposals":{"type":"array","items":{"$ref":"#/$defs/ProposalSummary"}},"continuation":{"$ref":"#/$defs/ProposalHandle"}},"additionalProperties":false},"ReviseProposalCall":{"type":"object","required":["kind","expected_revision","change_set"],"properties":{"kind":{"const":"revise-proposal"},"expected_revision":{"$ref":"#/$defs/ProposalRevisionHandle"},"change_set":{"$ref":"#/$defs/StandardsChangeSet"}},"additionalProperties":false},"ReviseProposalResult":{"type":"object","required":["kind","proposal","revision"],"properties":{"kind":{"const":"revise-proposal-result"},"proposal":{"$ref":"#/$defs/ProposalHandle"},"revision":{"$ref":"#/$defs/ProposalRevisionHandle"}},"additionalProperties":false},"DeleteSnapshotCall":{"type":"object","required":["kind","snapshot"],"properties":{"kind":{"const":"delete-snapshot"},"snapshot":{"$ref":"#/$defs/SnapshotHandle"}},"additionalProperties":false},"DeleteSnapshotResult":{"type":"object","required":["kind","snapshot","purge_deadline"],"properties":{"kind":{"const":"delete-snapshot-result"},"snapshot":{"$ref":"#/$defs/SnapshotHandle"},"purge_deadline":{"$ref":"#/$defs/Timestamp"}},"additionalProperties":false},"UndeleteSnapshotCall":{"type":"object","required":["kind","snapshot"],"properties":{"kind":{"const":"undelete-snapshot"},"snapshot":{"$ref":"#/$defs/SnapshotHandle"}},"additionalProperties":false},"UndeleteSnapshotResult":{"type":"object","required":["kind","snapshot"],"properties":{"kind":{"const":"undelete-snapshot-result"},"snapshot":{"$ref":"#/$defs/ActiveSnapshotSummary"}},"additionalProperties":false},"QueryNextOperation":{"type":"object","required":["operation","request_kind","snapshot"],"properties":{"operation":{"const":"query"},"request_kind":{"enum":["route","read","related"]},"target":{"$ref":"#/$defs/CanonicalId"},"snapshot":{"$ref":"#/$defs/SnapshotHandle"}},"additionalProperties":false},"QueryProposalNextOperation":{"type":"object","required":["operation","request_kind","revision"],"properties":{"operation":{"const":"query_proposal"},"request_kind":{"enum":["route","read","related"]},"target":{"$ref":"#/$defs/CanonicalId"},"revision":{"$ref":"#/$defs/ProposalRevisionHandle"}},"additionalProperties":false},"ResolveNextOperation":{"type":"object","required":["operation","request_kind","analysis"],"properties":{"operation":{"const":"resolve"},"request_kind":{"enum":["provide-fact","consumer-disposition","impact-disposition","coverage-attestation"]},"target":{"$ref":"#/$defs/CanonicalId"},"work":{"$ref":"#/$defs/AnalysisChildHandle"},"analysis":{"$ref":"#/$defs/AnalysisHandle"}},"additionalProperties":false},"InspectNextOperation":{"type":"object","required":["operation","request_kind","handle"],"properties":{"operation":{"const":"inspect"},"request_kind":{"const":"inspect"},"handle":{"$ref":"#/$defs/InspectableHandle"}},"additionalProperties":false},"NextOperation":{"oneOf":[{"$ref":"#/$defs/QueryNextOperation"},{"$ref":"#/$defs/ResolveNextOperation"},{"$ref":"#/$defs/InspectNextOperation"},{"$ref":"#/$defs/FocusedQueryNextOperation"}]},"QueryCall":{"type":"object","required":["snapshot","request"],"properties":{"snapshot":{"$ref":"#/$defs/SnapshotHandle"},"request":{"$ref":"#/$defs/QueryRequest"}},"additionalProperties":false},"QueryProposalCall":{"type":"object","required":["revision","request"],"properties":{"revision":{"$ref":"#/$defs/ProposalRevisionHandle"},"request":{"$ref":"#/$defs/QueryRequest"}},"additionalProperties":false},"AnalyzeProposalCall":{"type":"object","required":["revision"],"properties":{"revision":{"$ref":"#/$defs/ProposalRevisionHandle"}},"additionalProperties":false},"ReviewDecision":{"type":"object","required":["owner","decision","rationale","evidence"],"properties":{"owner":{"enum":["consumer","impact","audit"]},"decision":{"const":"accept"},"rationale":{"$ref":"#/$defs/NonEmptyString"},"evidence":{"type":"array","minItems":1,"uniqueItems":true,"items":{"$ref":"#/$defs/EvidenceReference"}}},"additionalProperties":false},"ReviewProposalCall":{"type":"object","required":["kind","analysis","decisions"],"properties":{"kind":{"const":"review-proposal"},"analysis":{"$ref":"#/$defs/AnalysisHandle"},"decisions":{"type":"array","minItems":3,"maxItems":3,"uniqueItems":true,"items":{"$ref":"#/$defs/ReviewDecision"}},"prior_readiness":{"$ref":"#/$defs/ReadinessHandle"}},"additionalProperties":false},"ReviewProposalResult":{"type":"object","required":["kind","readiness","revision","status"],"properties":{"kind":{"const":"review-proposal-result"},"readiness":{"$ref":"#/$defs/ReadinessHandle"},"revision":{"$ref":"#/$defs/ProposalRevisionHandle"},"status":{"const":"ready"}},"additionalProperties":false},"ApplyProposalCall":{"type":"object","required":["kind","readiness"],"properties":{"kind":{"const":"apply-proposal"},"readiness":{"$ref":"#/$defs/ReadinessHandle"}},"additionalProperties":false},"ApplyProposalResult":{"type":"object","required":["kind","application","status"],"properties":{"kind":{"const":"apply-proposal-result"},"application":{"$ref":"#/$defs/ApplicationHandle"},"status":{"const":"applied"}},"additionalProperties":false},"RecoverApplicationCall":{"type":"object","required":["kind","readiness"],"properties":{"kind":{"const":"recover-application"},"readiness":{"$ref":"#/$defs/ReadinessHandle"},"action":{"enum":["observe","complete-publication"],"description":"Omit or select observe to reconcile only. Explicit complete-publication revalidates and attempts the same admitted candidate against its original expected target; it requires current publication authorization."}},"additionalProperties":false,"description":"Recover an admitted application. Observation performs no Git writes. Explicit completion reconstructs and verifies the exact admitted candidate before one compare-and-swap attempt."},"RecoverApplicationResult":{"type":"object","required":["kind","application","status"],"properties":{"kind":{"const":"recover-application-result"},"application":{"$ref":"#/$defs/ApplicationHandle"},"status":{"const":"applied"}},"additionalProperties":false},"ApplicationRecoveryRequiredResult":{"type":"object","required":["kind","application","status","code","outcome","message"],"properties":{"kind":{"const":"application-recovery-required-result"},"application":{"$ref":"#/$defs/ApplicationHandle"},"status":{"const":"recovery-required"},"code":{"enum":["APPLICATION.PUBLICATION_UNAVAILABLE","APPLICATION.OBSERVATION_UNAVAILABLE","APPLICATION.OUTCOME_PERSISTENCE_UNAVAILABLE","APPLICATION.RECOVERY_TARGET_UNCERTAIN","APPLICATION.RECOVERY_TARGET_DIVERGED","APPLICATION.RECOVERY_BLOCKED"]},"outcome":{"const":"unavailable"},"message":{"$ref":"#/$defs/NonEmptyString"},"details":{"type":"object","additionalProperties":{"$ref":"#/$defs/ScalarValue"}}},"additionalProperties":false},"PolicySummary":{"type":"object","required":["handle","authority","scope"],"properties":{"handle":{"$ref":"#/$defs/SnapshotChildHandle"},"authority":{"enum":["normative","projection","contextual","evidence"]},"scope":{"$ref":"#/$defs/ReviewScope"}},"additionalProperties":false},"RelationshipSummary":{"type":"object","required":["handle","source","target","relation","groups","direction","traversal_eligible","applicability"],"properties":{"handle":{"$ref":"#/$defs/SnapshotChildHandle"},"source":{"$ref":"#/$defs/CanonicalId"},"target":{"$ref":"#/$defs/CanonicalId"},"relation":{"$ref":"#/$defs/CanonicalId"},"groups":{"type":"array","items":{"$ref":"#/$defs/CanonicalId"},"minItems":1,"uniqueItems":true},"direction":{"enum":["incoming","outgoing"]},"traversal_eligible":{"type":"boolean"},"applicability":{"enum":["true","false","unknown","not-declared"]}},"additionalProperties":false},"ProposalPolicySummary":{"type":"object","required":["id","authority","scope"],"properties":{"id":{"$ref":"#/$defs/CanonicalId"},"authority":{"enum":["normative","projection","contextual","evidence"]},"scope":{"$ref":"#/$defs/ReviewScope"}},"additionalProperties":false},"ProposalRelationshipSummary":{"type":"object","required":["source","target","relation","groups","direction","traversal_eligible","applicability"],"properties":{"source":{"$ref":"#/$defs/CanonicalId"},"target":{"$ref":"#/$defs/CanonicalId"},"relation":{"$ref":"#/$defs/CanonicalId"},"groups":{"type":"array","items":{"$ref":"#/$defs/CanonicalId"},"minItems":1,"uniqueItems":true},"direction":{"enum":["incoming","outgoing"]},"traversal_eligible":{"type":"boolean"},"applicability":{"enum":["true","false","unknown","not-declared"]}},"additionalProperties":false},"RouteResult":{"type":"object","required":["kind","snapshot","reading_plan","unresolved_questions","next_operations"],"properties":{"kind":{"const":"route-result"},"snapshot":{"$ref":"#/$defs/SnapshotHandle"},"reading_plan":{"type":"array","items":{"$ref":"#/$defs/ReadingPlanEntry"}},"unresolved_questions":{"type":"array","items":{"$ref":"#/$defs/Question"}},"next_operations":{"type":"array","items":{"$ref":"#/$defs/NextOperation"}},"summary":{"type":"string"}},"additionalProperties":false},"ReadResult":{"type":"object","required":["kind","snapshot","policy","content","requires","specializes","related","next_operations"],"properties":{"kind":{"const":"read-result"},"snapshot":{"$ref":"#/$defs/SnapshotHandle"},"policy":{"$ref":"#/$defs/PolicySummary"},"content":{"type":"string"},"requires":{"type":"array","items":{"$ref":"#/$defs/CanonicalId"},"uniqueItems":true},"specializes":{"type":"array","items":{"$ref":"#/$defs/CanonicalId"},"uniqueItems":true},"related":{"type":"array","items":{"$ref":"#/$defs/RelationshipSummary"}},"next_operations":{"type":"array","items":{"$ref":"#/$defs/NextOperation"}},"summary":{"type":"string"},"routing":{"$ref":"#/$defs/RoutingConfiguration"},"coverage":{"$ref":"#/$defs/ReadCoverage"},"application_exposure":{"$ref":"#/$defs/ApplicationExposureState"},"provenance":{"type":"array","items":{"$ref":"#/$defs/CanonicalId"}}},"additionalProperties":false},"PolicyUnitMapping":{"type":"object","required":["state","policy_units"],"properties":{"state":{"enum":["exact-policy-unit","policy-units-present","incomplete"]},"reason":{"const":"no-policy-units"},"policy_units":{"type":"array","items":{"$ref":"#/$defs/CanonicalId"},"uniqueItems":true}},"additionalProperties":false},"RelatedResult":{"type":"object","required":["kind","snapshot","target","policy_unit_mapping","relationships","next_operations"],"properties":{"kind":{"const":"related-result"},"snapshot":{"$ref":"#/$defs/SnapshotHandle"},"target":{"$ref":"#/$defs/CanonicalId"},"authoring_target":{"$ref":"#/$defs/AuthoringTargetHandle"},"policy_unit_mapping":{"$ref":"#/$defs/PolicyUnitMapping"},"relationships":{"type":"array","items":{"$ref":"#/$defs/RelationshipSummary"}},"next_operations":{"type":"array","items":{"$ref":"#/$defs/NextOperation"}},"summary":{"type":"string"}},"additionalProperties":false},"QueryResult":{"oneOf":[{"$ref":"#/$defs/RouteResult"},{"$ref":"#/$defs/ReadResult"},{"$ref":"#/$defs/RelatedResult"},{"$ref":"#/$defs/NavigationIndexesResult"},{"$ref":"#/$defs/ProvenanceReadResult"},{"$ref":"#/$defs/OperationalReadResult"}]},"ProposalRouteResult":{"type":"object","required":["kind","revision","reading_plan","unresolved_questions","next_operations"],"properties":{"kind":{"const":"proposal-route-result"},"revision":{"$ref":"#/$defs/ProposalRevisionHandle"},"reading_plan":{"type":"array","items":{"$ref":"#/$defs/ReadingPlanEntry"}},"unresolved_questions":{"type":"array","items":{"$ref":"#/$defs/Question"}},"next_operations":{"type":"array","items":{"$ref":"#/$defs/QueryProposalNextOperation"}},"summary":{"type":"string"}},"additionalProperties":false},"ProposalReadResult":{"type":"object","required":["kind","revision","policy","content","requires","specializes","related","next_operations"],"properties":{"kind":{"const":"proposal-read-result"},"revision":{"$ref":"#/$defs/ProposalRevisionHandle"},"policy":{"$ref":"#/$defs/ProposalPolicySummary"},"content":{"type":"string"},"requires":{"type":"array","items":{"$ref":"#/$defs/CanonicalId"},"uniqueItems":true},"specializes":{"type":"array","items":{"$ref":"#/$defs/CanonicalId"},"uniqueItems":true},"related":{"type":"array","items":{"$ref":"#/$defs/ProposalRelationshipSummary"}},"next_operations":{"type":"array","items":{"$ref":"#/$defs/QueryProposalNextOperation"}},"summary":{"type":"string"},"routing":{"$ref":"#/$defs/RoutingConfiguration"},"coverage":{"$ref":"#/$defs/ReadCoverage"},"application_exposure":{"$ref":"#/$defs/ApplicationExposureState"},"provenance":{"type":"array","items":{"$ref":"#/$defs/CanonicalId"}}},"additionalProperties":false},"ProposalRelatedResult":{"type":"object","required":["kind","revision","target","policy_unit_mapping","relationships","next_operations"],"properties":{"kind":{"const":"proposal-related-result"},"revision":{"$ref":"#/$defs/ProposalRevisionHandle"},"target":{"$ref":"#/$defs/CanonicalId"},"authoring_target":{"$ref":"#/$defs/AuthoringTargetHandle"},"policy_unit_mapping":{"$ref":"#/$defs/PolicyUnitMapping"},"relationships":{"type":"array","items":{"$ref":"#/$defs/ProposalRelationshipSummary"}},"next_operations":{"type":"array","items":{"$ref":"#/$defs/QueryProposalNextOperation"}},"summary":{"type":"string"}},"additionalProperties":false},"QueryProposalResult":{"oneOf":[{"$ref":"#/$defs/ProposalRouteResult"},{"$ref":"#/$defs/ProposalReadResult"},{"$ref":"#/$defs/ProposalRelatedResult"},{"$ref":"#/$defs/NavigationIndexesResult"},{"$ref":"#/$defs/ProvenanceReadResult"},{"$ref":"#/$defs/OperationalReadResult"}]},"AnalysisRequest":{"type":"object","required":["kind","base_snapshot","proposed_snapshot","changes","semantic_proposals","contract_version"],"properties":{"kind":{"const":"analysis-request"},"base_snapshot":{"$ref":"#/$defs/SnapshotHandle"},"proposed_snapshot":{"$ref":"#/$defs/SnapshotHandle"},"changes":{"type":"array","items":{"$ref":"#/$defs/ChangeDescriptor"},"minItems":1},"semantic_proposals":{"type":"array","items":{"$ref":"#/$defs/SemanticProposal"},"uniqueItems":true},"prior_analysis":{"$ref":"#/$defs/AnalysisHandle"},"contract_version":{"const":6}},"additionalProperties":false},"PrepareCall":{"type":"object","required":["request"],"properties":{"request":{"$ref":"#/$defs/AnalysisRequest"}},"additionalProperties":false},"AnalysisContext":{"type":"object","required":["kind","handle","subjects","changes","semantic_proposals"],"properties":{"kind":{"const":"analysis-context"},"handle":{"$ref":"#/$defs/AnalysisChildHandle"},"subjects":{"type":"array","items":{"$ref":"#/$defs/ChangedPolicyUnit"},"uniqueItems":true},"changes":{"type":"array","items":{"$ref":"#/$defs/ChangeDescriptor"},"minItems":1,"uniqueItems":true},"semantic_proposals":{"type":"array","items":{"$ref":"#/$defs/SemanticProposal"},"uniqueItems":true}},"additionalProperties":false},"AuthorizationReference":{"type":"object","required":["id","issuer","capability","authority_digest"],"properties":{"id":{"$ref":"#/$defs/AuthorizationId"},"issuer":{"$ref":"#/$defs/CanonicalId"},"capability":{"$ref":"#/$defs/CanonicalId"},"authority_digest":{"$ref":"#/$defs/Digest"}},"additionalProperties":false},"ProviderReference":{"type":"object","required":["id","contract","contract_version","input_digest"],"properties":{"id":{"$ref":"#/$defs/CanonicalId"},"contract":{"$ref":"#/$defs/CanonicalId"},"contract_version":{"$ref":"#/$defs/NonEmptyString"},"input_digest":{"$ref":"#/$defs/Digest"}},"additionalProperties":false},"AuthorizationRecord":{"type":"object","required":["reference","issuer_semantic_revision","principal","action","subject_kind","subject_id","authorization_evidence","revocation_authority","revocation_authority_semantic_revision","revocation_evidence"],"properties":{"reference":{"$ref":"#/$defs/AuthorizationReference"},"issuer_semantic_revision":{"type":"integer","minimum":1},"principal":{"$ref":"#/$defs/CanonicalId"},"action":{"$ref":"#/$defs/CanonicalId"},"subject_kind":{"$ref":"#/$defs/CanonicalId"},"subject_id":{"$ref":"#/$defs/NonEmptyString"},"authorization_evidence":{"type":"array","items":{"$ref":"#/$defs/EvidenceReference"},"minItems":1,"uniqueItems":true},"revocation_authority":{"$ref":"#/$defs/CanonicalId"},"revocation_authority_semantic_revision":{"type":"integer","minimum":1},"revocation_evidence":{"type":"array","items":{"$ref":"#/$defs/EvidenceReference"},"minItems":1,"uniqueItems":true}},"additionalProperties":false},"DomainContractReference":{"type":"object","required":["id","version"],"properties":{"id":{"$ref":"#/$defs/CanonicalId"},"version":{"$ref":"#/$defs/NonEmptyString"}},"additionalProperties":false},"AnalysisExecutionContractView":{"type":"object","required":["authorization_authority_digest","providers"],"properties":{"authorization_authority_digest":{"oneOf":[{"$ref":"#/$defs/Digest"},{"type":"null"}]},"providers":{"type":"array","items":{"$ref":"#/$defs/ProviderReference"},"uniqueItems":true}},"additionalProperties":false},"FactRequirement":{"type":"object","required":["kind","handle","fact","fact_semantic_revision","fact_contract_digest","context","value_contract","answer_contract","evidence_contract","authorization_capability"],"properties":{"kind":{"const":"fact-requirement"},"handle":{"$ref":"#/$defs/AnalysisChildHandle"},"fact":{"$ref":"#/$defs/CanonicalId"},"fact_semantic_revision":{"type":"integer","minimum":1},"fact_contract_digest":{"$ref":"#/$defs/Digest"},"context":{"$ref":"#/$defs/AnalysisChildHandle"},"value_contract":{"$ref":"#/$defs/FactValueContract"},"answer_contract":{"$ref":"#/$defs/CanonicalId"},"evidence_contract":{"$ref":"#/$defs/CanonicalId"},"authorization_capability":{"$ref":"#/$defs/CanonicalId"}},"additionalProperties":false},"FactRequirementWork":{"type":"object","required":["requirement","prompt","dependent_programs"],"properties":{"requirement":{"$ref":"#/$defs/FactRequirement"},"prompt":{"$ref":"#/$defs/NonEmptyString"},"dependent_programs":{"type":"array","items":{"$ref":"#/$defs/NonEmptyString"},"minItems":1,"uniqueItems":true}},"additionalProperties":false},"FactObservation":{"type":"object","required":["kind","handle","requirement","value","evidence","authorization"],"properties":{"kind":{"const":"fact-observation"},"handle":{"$ref":"#/$defs/AnalysisChildHandle"},"requirement":{"$ref":"#/$defs/AnalysisChildHandle"},"value":{"$ref":"#/$defs/FactValue"},"evidence":{"type":"array","items":{"$ref":"#/$defs/EvidenceReference"},"minItems":1,"uniqueItems":true},"authorization":{"$ref":"#/$defs/AuthorizationReference"},"provider":{"$ref":"#/$defs/ProviderReference"}},"additionalProperties":false},"Obligation":{"type":"object","required":["handle","kind","target","scope","reasons","state","permitted_submissions","fingerprint"],"properties":{"handle":{"$ref":"#/$defs/AnalysisChildHandle"},"kind":{"enum":["consumer-review","impact-review","lifecycle-impact-review","audit-coverage","unmapped-normative-change"]},"target":{"$ref":"#/$defs/CanonicalId"},"scope":{"$ref":"#/$defs/ReviewScope"},"reasons":{"type":"array","items":{"$ref":"#/$defs/SelectionReason"},"minItems":1,"uniqueItems":true},"state":{"enum":["required","resolved","blocked"]},"applicability":{"enum":["true","false","unknown","not-declared"]},"permitted_submissions":{"type":"array","items":{"enum":["consumer-disposition","impact-disposition","coverage-attestation"]},"minItems":1,"uniqueItems":true},"review_contract":{"$ref":"#/$defs/ConsumerReviewContract"},"fingerprint":{"$ref":"#/$defs/DecisionFingerprint"}},"additionalProperties":false},"ProvideFactSubmission":{"type":"object","required":["kind","requirement","value","evidence"],"properties":{"kind":{"const":"provide-fact"},"requirement":{"$ref":"#/$defs/AnalysisChildHandle"},"value":{"$ref":"#/$defs/FactValue"},"evidence":{"type":"array","items":{"$ref":"#/$defs/EvidenceReference"},"minItems":1,"uniqueItems":true}},"additionalProperties":false},"ConsumerDispositionSubmission":{"type":"object","required":["kind","obligation","result","rationale","evidence","fingerprint"],"properties":{"kind":{"const":"consumer-disposition"},"obligation":{"$ref":"#/$defs/AnalysisChildHandle"},"result":{"enum":["updated","reviewed-no-change","not-applicable","blocked"]},"rationale":{"$ref":"#/$defs/NonEmptyString"},"evidence":{"type":"array","items":{"$ref":"#/$defs/EvidenceReference"},"minItems":1},"fingerprint":{"$ref":"#/$defs/DecisionFingerprint"}},"additionalProperties":false},"ImpactDispositionSubmission":{"type":"object","required":["kind","obligation","result","rationale","evidence","fingerprint"],"properties":{"kind":{"const":"impact-disposition"},"obligation":{"$ref":"#/$defs/AnalysisChildHandle"},"result":{"enum":["confirmed","resolved-no-impact","requires-change","blocked"]},"rationale":{"$ref":"#/$defs/NonEmptyString"},"evidence":{"type":"array","items":{"$ref":"#/$defs/EvidenceReference"},"minItems":1},"fingerprint":{"$ref":"#/$defs/DecisionFingerprint"}},"additionalProperties":false},"CoverageAttestationClaim":{"type":"object","required":["requirement","conclusion","evidence","explicit_exclusions","rationale","auditor_provenance"],"properties":{"requirement":{"$ref":"#/$defs/AnalysisChildHandle"},"conclusion":{"const":"complete"},"evidence":{"type":"array","items":{"$ref":"#/$defs/EvidenceReference"},"minItems":1,"uniqueItems":true},"explicit_exclusions":{"type":"array","items":{"$ref":"#/$defs/EvidenceReference"},"uniqueItems":true},"rationale":{"$ref":"#/$defs/NonEmptyString"},"auditor_provenance":{"$ref":"#/$defs/NonEmptyString"}},"additionalProperties":false},"CoverageAttestationSubmission":{"type":"object","required":["kind","claim"],"properties":{"kind":{"const":"coverage-attestation"},"claim":{"$ref":"#/$defs/CoverageAttestationClaim"}},"additionalProperties":false},"Submission":{"oneOf":[{"$ref":"#/$defs/ProvideFactSubmission"},{"$ref":"#/$defs/ConsumerDispositionSubmission"},{"$ref":"#/$defs/ImpactDispositionSubmission"},{"$ref":"#/$defs/CoverageAttestationSubmission"}]},"ResolveCall":{"type":"object","required":["analysis","submission"],"properties":{"analysis":{"$ref":"#/$defs/AnalysisHandle"},"submission":{"$ref":"#/$defs/Submission"}},"additionalProperties":false},"CoverageRequirement":{"type":"object","required":["kind","handle","subject","owner","semantic_revision","relationship_kinds","horizon","required_evidence_contract"],"properties":{"kind":{"const":"coverage-requirement"},"handle":{"$ref":"#/$defs/AnalysisChildHandle"},"subject":{"$ref":"#/$defs/CanonicalId"},"owner":{"$ref":"#/$defs/CanonicalId"},"semantic_revision":{"type":"integer","minimum":1},"relationship_kinds":{"type":"array","items":{"$ref":"#/$defs/CanonicalId"},"uniqueItems":true},"horizon":{"$ref":"#/$defs/CanonicalId"},"required_evidence_contract":{"$ref":"#/$defs/CanonicalId"}},"additionalProperties":false},"CoverageAttestation":{"type":"object","required":["kind","requirement","conclusion","evidence","explicit_exclusions","rationale","auditor_provenance","schema_version","authorization"],"properties":{"kind":{"const":"coverage-attestation"},"requirement":{"$ref":"#/$defs/AnalysisChildHandle"},"conclusion":{"const":"complete"},"evidence":{"type":"array","items":{"$ref":"#/$defs/EvidenceReference"},"minItems":1},"explicit_exclusions":{"type":"array","items":{"$ref":"#/$defs/EvidenceReference"}},"rationale":{"$ref":"#/$defs/NonEmptyString"},"auditor_provenance":{"$ref":"#/$defs/NonEmptyString"},"schema_version":{"const":4},"authorization":{"$ref":"#/$defs/AuthorizationReference"}},"additionalProperties":false},"CoverageCertificate":{"type":"object","required":["kind","handle","requirement","subject","owner","semantic_revision","horizon_digest","relationship_digest","evidence_digests","fact_schema_digest"],"properties":{"kind":{"const":"coverage-certificate"},"handle":{"$ref":"#/$defs/AnalysisChildHandle"},"requirement":{"$ref":"#/$defs/AnalysisChildHandle"},"subject":{"$ref":"#/$defs/CanonicalId"},"owner":{"$ref":"#/$defs/CanonicalId"},"semantic_revision":{"type":"integer","minimum":1},"horizon_digest":{"$ref":"#/$defs/Digest"},"relationship_digest":{"$ref":"#/$defs/Digest"},"evidence_digests":{"type":"array","items":{"$ref":"#/$defs/Digest"},"uniqueItems":true},"fact_schema_digest":{"$ref":"#/$defs/Digest"}},"additionalProperties":false},"DispositionRecord":{"type":"object","required":["obligation","kind","result","rationale","evidence","authorization","fingerprint"],"properties":{"obligation":{"$ref":"#/$defs/AnalysisChildHandle"},"kind":{"enum":["consumer-disposition","impact-disposition"]},"result":{"$ref":"#/$defs/NonEmptyString"},"rationale":{"$ref":"#/$defs/NonEmptyString"},"evidence":{"type":"array","items":{"$ref":"#/$defs/EvidenceReference"}},"authorization":{"$ref":"#/$defs/AuthorizationReference"},"fingerprint":{"$ref":"#/$defs/DecisionFingerprint"}},"additionalProperties":false},"AnalysisState":{"type":"object","required":["kind","handle","base_snapshot","proposed_reference","changes","semantic_proposals","fact_observations","dispositions","coverage_attestations","authorization_records","domain_contracts","execution_contracts","contract_version"],"properties":{"kind":{"const":"analysis-state"},"handle":{"$ref":"#/$defs/AnalysisHandle"},"base_snapshot":{"$ref":"#/$defs/SnapshotHandle"},"proposed_reference":{"$ref":"#/$defs/AnalysisMaterialHandle"},"changes":{"type":"array","items":{"$ref":"#/$defs/ChangeDescriptor"},"minItems":1,"uniqueItems":true},"semantic_proposals":{"type":"array","items":{"$ref":"#/$defs/SemanticProposal"},"uniqueItems":true},"fact_observations":{"type":"array","items":{"$ref":"#/$defs/FactObservation"},"uniqueItems":true},"dispositions":{"type":"array","items":{"$ref":"#/$defs/DispositionRecord"},"uniqueItems":true},"coverage_attestations":{"type":"array","items":{"$ref":"#/$defs/CoverageAttestation"},"uniqueItems":true},"authorization_records":{"type":"array","items":{"$ref":"#/$defs/AuthorizationRecord"},"uniqueItems":true},"domain_contracts":{"type":"array","items":{"$ref":"#/$defs/DomainContractReference"},"minItems":1,"uniqueItems":true},"execution_contracts":{"$ref":"#/$defs/AnalysisExecutionContractView"},"contract_version":{"const":7}},"additionalProperties":false},"PendingResult":{"type":"object","required":["kind","handle","status","context","changes","changed_units","obligations","fact_requirements","reading_plan","next_operations"],"properties":{"kind":{"const":"pending-result"},"handle":{"$ref":"#/$defs/AnalysisHandle"},"status":{"const":"needs-action"},"context":{"$ref":"#/$defs/AnalysisContext"},"changes":{"type":"array","items":{"$ref":"#/$defs/ChangeDescriptor"}},"changed_units":{"type":"array","items":{"$ref":"#/$defs/ChangedPolicyUnit"}},"obligations":{"type":"array","items":{"$ref":"#/$defs/Obligation"}},"fact_requirements":{"type":"array","items":{"$ref":"#/$defs/FactRequirementWork"}},"reading_plan":{"type":"array","items":{"$ref":"#/$defs/ReadingPlanEntry"}},"next_operations":{"type":"array","items":{"$ref":"#/$defs/NextOperation"}},"summary":{"type":"string"}},"additionalProperties":false},"CompleteResult":{"type":"object","required":["kind","handle","status","context","changes","changed_units","coverage_certificates","fact_observations","dispositions","reading_plan","completion"],"properties":{"kind":{"const":"complete-result"},"handle":{"$ref":"#/$defs/AnalysisHandle"},"status":{"const":"complete"},"context":{"$ref":"#/$defs/AnalysisContext"},"changes":{"type":"array","items":{"$ref":"#/$defs/ChangeDescriptor"}},"changed_units":{"type":"array","items":{"$ref":"#/$defs/ChangedPolicyUnit"}},"coverage_certificates":{"type":"array","items":{"$ref":"#/$defs/CoverageCertificate"},"uniqueItems":true},"fact_observations":{"type":"array","items":{"$ref":"#/$defs/FactObservation"},"uniqueItems":true},"dispositions":{"type":"array","items":{"$ref":"#/$defs/DispositionRecord"}},"reading_plan":{"type":"array","items":{"$ref":"#/$defs/ReadingPlanEntry"}},"completion":{"$ref":"#/$defs/CompletionProof"},"summary":{"type":"string"}},"additionalProperties":false},"RepositoryPath":{"type":"array","items":{"$ref":"#/$defs/NonEmptyString"},"minItems":1},"ProvenanceRecord":{"type":"object","required":["snapshot","path"],"properties":{"snapshot":{"$ref":"#/$defs/SnapshotHandle"},"path":{"$ref":"#/$defs/RepositoryPath"}},"additionalProperties":false},"SnapshotInspectionResult":{"type":"object","required":["kind","snapshot"],"properties":{"kind":{"const":"snapshot-inspection-result"},"snapshot":{"$ref":"#/$defs/SnapshotSummary"}},"additionalProperties":false},"PolicyInspectionResult":{"type":"object","required":["kind","policy","declaration","representation_digest","structural_digest","provenance"],"properties":{"kind":{"const":"policy-inspection-result"},"policy":{"$ref":"#/$defs/SnapshotChildHandle"},"declaration":{"oneOf":[{"$ref":"#/$defs/CanonicalModuleDeclaration"},{"$ref":"#/$defs/PolicyUnitDeclaration"}]},"representation_digest":{"$ref":"#/$defs/Digest"},"structural_digest":{"$ref":"#/$defs/Digest"},"provenance":{"$ref":"#/$defs/ProvenanceRecord"}},"additionalProperties":false},"RelationshipInspectionResult":{"type":"object","required":["kind","relationship","policy_semantics","provenance"],"properties":{"kind":{"const":"relationship-inspection-result"},"relationship":{"$ref":"#/$defs/RelationshipSummary"},"policy_semantics":{"oneOf":[{"$ref":"#/$defs/PolicyRelationshipInspection"},{"type":"null"}]},"provenance":{"$ref":"#/$defs/ProvenanceRecord"}},"additionalProperties":false},"AnalysisInspectionResult":{"type":"object","required":["kind","state"],"properties":{"kind":{"const":"analysis-inspection-result"},"state":{"$ref":"#/$defs/AnalysisState"}},"additionalProperties":false},"AnalysisChildArtifact":{"oneOf":[{"$ref":"#/$defs/AnalysisContext"},{"$ref":"#/$defs/FactRequirement"},{"$ref":"#/$defs/FactObservation"},{"$ref":"#/$defs/Obligation"},{"$ref":"#/$defs/CoverageRequirement"},{"$ref":"#/$defs/CoverageCertificate"}]},"AnalysisChildInspectionResult":{"type":"object","required":["kind","handle","artifact"],"properties":{"kind":{"const":"analysis-child-inspection-result"},"handle":{"$ref":"#/$defs/AnalysisChildHandle"},"artifact":{"$ref":"#/$defs/AnalysisChildArtifact"}},"additionalProperties":false},"InspectionResult":{"oneOf":[{"$ref":"#/$defs/SnapshotInspectionResult"},{"$ref":"#/$defs/PolicyInspectionResult"},{"$ref":"#/$defs/RelationshipInspectionResult"},{"$ref":"#/$defs/AnalysisInspectionResult"},{"$ref":"#/$defs/AnalysisChildInspectionResult"}]},"InspectCall":{"type":"object","required":["handle"],"properties":{"handle":{"$ref":"#/$defs/InspectableHandle"}},"additionalProperties":false},"RejectedResult":{"type":"object","required":["kind","code","outcome","message","details","next_operations"],"properties":{"kind":{"const":"rejected-result"},"code":{"$ref":"#/$defs/CanonicalId"},"outcome":{"enum":["invalid","unavailable","unsupported","unauthorized"]},"target":{"$ref":"#/$defs/NonEmptyString"},"message":{"$ref":"#/$defs/NonEmptyString"},"details":{"type":"object","additionalProperties":{"$ref":"#/$defs/ScalarValue"}},"next_operations":{"type":"array","items":{"$ref":"#/$defs/NextOperation"}}},"additionalProperties":false},"AuthoredRoutingRule":{"type":"object","required":["id","target","when","condition"],"properties":{"id":{"$ref":"#/$defs/CanonicalId"},"target":{"$ref":"#/$defs/CanonicalId"},"when":{"$ref":"#/$defs/ApplicabilityExpression"},"condition":{"$ref":"#/$defs/NonEmptyString"}},"additionalProperties":false},"AuthoredRoutingFact":{"type":"object","required":["id","semantic_revision","type","nullable","values","aliases","meaning","prompt"],"properties":{"id":{"$ref":"#/$defs/CanonicalId"},"semantic_revision":{"type":"integer","minimum":1},"type":{"enum":["boolean","enum","string","string-set","enum-set","canonical-id"]},"nullable":{"type":"boolean"},"values":{"type":"array","items":{"type":"string"},"uniqueItems":true},"aliases":{"type":"array","items":{"$ref":"#/$defs/CanonicalId"},"uniqueItems":true},"meaning":{"$ref":"#/$defs/NonEmptyString"},"prompt":{"$ref":"#/$defs/NonEmptyString"}},"additionalProperties":false},"PutRoutingRuleEdit":{"type":"object","required":["kind","rule","rationale"],"properties":{"kind":{"const":"put-routing-rule"},"rule":{"$ref":"#/$defs/AuthoredRoutingRule"},"rationale":{"$ref":"#/$defs/NonEmptyString"}},"additionalProperties":false},"RemoveRoutingRuleEdit":{"type":"object","required":["kind","rule","rationale"],"properties":{"kind":{"const":"remove-routing-rule"},"rule":{"$ref":"#/$defs/CanonicalId"},"rationale":{"$ref":"#/$defs/NonEmptyString"}},"additionalProperties":false},"PutRoutingFactEdit":{"type":"object","required":["kind","fact","rationale"],"properties":{"kind":{"const":"put-routing-fact"},"fact":{"$ref":"#/$defs/AuthoredRoutingFact"},"rationale":{"$ref":"#/$defs/NonEmptyString"}},"additionalProperties":false},"RemoveRoutingFactEdit":{"type":"object","required":["kind","fact","rationale"],"properties":{"kind":{"const":"remove-routing-fact"},"fact":{"$ref":"#/$defs/CanonicalId"},"rationale":{"$ref":"#/$defs/NonEmptyString"}},"additionalProperties":false},"VerificationFailure":{"type":"object","additionalProperties":false,"required":["code","message","suite","check"],"properties":{"code":{"$ref":"#/$defs/NonEmptyString"},"message":{"$ref":"#/$defs/NonEmptyString"},"suite":{"type":["string","null"]},"check":{"type":["string","null"]}}},"VerificationReport":{"type":"object","additionalProperties":false,"required":["passed","exit_code","suites","checks","failures"],"properties":{"passed":{"type":"boolean"},"exit_code":{"enum":[0,1,2,3,4]},"suites":{"type":"integer","minimum":0},"checks":{"type":"integer","minimum":0},"failures":{"type":"array","items":{"$ref":"#/$defs/VerificationFailure"}}}},"VerifyRepositoryCall":{"type":"object","additionalProperties":false,"required":["kind","refresh_verification_inputs"],"properties":{"kind":{"const":"verify-repository"},"refresh_verification_inputs":{"type":"boolean"}}},"VerifyRepositoryResult":{"type":"object","additionalProperties":false,"required":["kind","refreshed_verification_inputs","verification"],"properties":{"kind":{"const":"verify-repository-result"},"refreshed_verification_inputs":{"type":"boolean"},"verification":{"$ref":"#/$defs/VerificationReport"}}},"VerifyProposalCall":{"type":"object","additionalProperties":false,"required":["kind","revision"],"properties":{"kind":{"const":"verify-proposal"},"revision":{"$ref":"#/$defs/ProposalRevisionHandle"},"readiness":{"$ref":"#/$defs/ReadinessHandle"}}},"VerifyProposalResult":{"type":"object","additionalProperties":false,"required":["kind","revision","verification"],"properties":{"kind":{"const":"verify-proposal-result"},"revision":{"$ref":"#/$defs/ProposalRevisionHandle"},"verification":{"$ref":"#/$defs/VerificationReport"},"readiness":{"$ref":"#/$defs/ReadinessHandle"}}},"RoutingConfiguration":{"type":"object","additionalProperties":false,"required":["facts","rules"],"properties":{"facts":{"type":"array","items":{"$ref":"#/$defs/AuthoredRoutingFact"}},"rules":{"type":"array","items":{"$ref":"#/$defs/AuthoredRoutingRule"}}}},"PolicyCoverageStatus":{"type":"object","required":["subject","requirement_id","status"],"properties":{"subject":{"$ref":"#/$defs/CanonicalId"},"requirement_id":{"$ref":"#/$defs/Digest"},"status":{"enum":["current-attestation","review-required"]},"authority":{"$ref":"#/$defs/CoverageAuditAuthority"}},"additionalProperties":false},"ReadCoverage":{"type":"object","description":"Repository attestation status bound to this snapshot or proposal. Empty subjects means no registered policy units in scope, not complete coverage. Analysis-local attestations are not repository certificates.","required":["subjects"],"properties":{"subjects":{"type":"array","items":{"$ref":"#/$defs/PolicyCoverageStatus"}}},"additionalProperties":false},"AuditPolicyUnitEdit":{"type":"object","required":["kind","policy","rationale"],"properties":{"kind":{"const":"audit-policy-unit"},"policy":{"$ref":"#/$defs/CanonicalId"},"rationale":{"$ref":"#/$defs/NonEmptyString"}},"additionalProperties":false},"CoverageAuditAuthority":{"type":"object","required":["issuer","principal","authorization_id"],"properties":{"issuer":{"$ref":"#/$defs/NonEmptyString"},"principal":{"$ref":"#/$defs/NonEmptyString"},"authorization_id":{"$ref":"#/$defs/NonEmptyString"}},"additionalProperties":false},"EvidenceCheckRetirement":{"type":"object","additionalProperties":false,"required":["suite","check"],"properties":{"suite":{"type":"string","minLength":1},"check":{"type":"string","minLength":1}}},"EvidenceSuiteDescription":{"type":"object","additionalProperties":false,"required":["suite","description"],"properties":{"suite":{"type":"string","minLength":1},"description":{"type":"string","minLength":1}}},"EvidenceRelationshipUpdate":{"type":"object","additionalProperties":false,"required":["source_policy","consumer","relation","evidence_owner","rationale"],"properties":{"source_policy":{"type":"string","minLength":1},"consumer":{"type":"string","minLength":1},"relation":{"type":"string","minLength":1},"evidence_owner":{"type":"string","minLength":1},"rationale":{"type":"string","minLength":1}}},"EvidenceConsumerRegistration":{"type":"object","additionalProperties":false,"required":["path","artifact_kind","source_policies","relation","evidence_owner","rationale"],"properties":{"path":{"type":"string","minLength":1},"artifact_kind":{"type":"string","enum":["implementation-artifact","fixture"]},"source_policies":{"type":"array","items":{"type":"string","minLength":1},"minItems":1,"uniqueItems":true},"relation":{"type":"string","enum":["implementation-projection","fixture-projection"]},"evidence_owner":{"type":"string","minLength":1},"rationale":{"type":"string","minLength":1}}},"EvidenceMaintenancePlan":{"type":"object","additionalProperties":false,"required":["prune_stale_certificates","retire_suites","retire_checks","retire_inputs","suite_descriptions","replacement_evidence_owner","replacement_evidence_rationale","relationship_updates","consumer_registrations"],"properties":{"prune_stale_certificates":{"type":"boolean"},"retire_suites":{"type":"array","items":{"type":"string","minLength":1},"uniqueItems":true},"retire_checks":{"type":"array","items":{"$ref":"#/$defs/EvidenceCheckRetirement"}},"retire_inputs":{"type":"array","items":{"type":"string","minLength":1},"uniqueItems":true},"suite_descriptions":{"type":"array","items":{"$ref":"#/$defs/EvidenceSuiteDescription"}},"replacement_evidence_owner":{"type":"string","minLength":1},"replacement_evidence_rationale":{"type":"string","minLength":1},"relationship_updates":{"type":"array","items":{"$ref":"#/$defs/EvidenceRelationshipUpdate"}},"consumer_registrations":{"type":"array","items":{"$ref":"#/$defs/EvidenceConsumerRegistration"}},"unregister_policy_subjects":{"type":"array","items":{"type":"string","minLength":1},"uniqueItems":true,"description":"Remove selected review-subject registrations and their source relationships while preserving normative Markdown."}}},"MaintainEvidenceCall":{"type":"object","additionalProperties":false,"required":["kind","expected_revision","evidence","plan","apply"],"properties":{"kind":{"const":"maintain-evidence"},"expected_revision":{"type":"string","minLength":1},"evidence":{"type":"array","items":{"$ref":"#/$defs/EvidenceReference"},"minItems":1},"plan":{"$ref":"#/$defs/EvidenceMaintenancePlan"},"apply":{"type":"boolean"}}},"MaintainEvidenceResult":{"type":"object","additionalProperties":false,"required":["kind","applied","changed_files","removed_files","verification"],"properties":{"kind":{"const":"maintain-evidence-result"},"applied":{"type":"boolean"},"changed_files":{"type":"array","items":{"type":"string","minLength":1}},"removed_files":{"type":"array","items":{"type":"string","minLength":1}},"verification":{"$ref":"#/$defs/VerificationReport"}}},"RouteCall":{"type":"object","required":["facts"],"properties":{"facts":{"$ref":"#/$defs/FactSet"},"snapshot":{"$ref":"#/$defs/SnapshotHandle"}},"additionalProperties":false},"ReadCall":{"type":"object","required":["target"],"properties":{"target":{"$ref":"#/$defs/CanonicalId"},"include_routing":{"type":"boolean"},"include_coverage":{"type":"boolean","description":"Include current repository attestation status for registered policy units in this read scope."},"snapshot":{"$ref":"#/$defs/SnapshotHandle"},"detail":{"enum":["compact","full"],"description":"Compact preserves exact policy and essential authority; full includes all relationship rows."}},"additionalProperties":false},"RelatedCall":{"type":"object","required":["target","groups","direction","transitive"],"properties":{"target":{"$ref":"#/$defs/CanonicalId"},"groups":{"type":"array","minItems":1,"uniqueItems":true,"items":{"$ref":"#/$defs/CanonicalId"}},"direction":{"enum":["incoming","outgoing","both"]},"transitive":{"type":"boolean","default":false},"snapshot":{"$ref":"#/$defs/SnapshotHandle"}},"additionalProperties":false},"CompactReadResult":{"type":"object","required":["kind","snapshot","policy","content","requires","specializes","next_operations","detail"],"properties":{"kind":{"const":"compact-read-result"},"snapshot":{"$ref":"#/$defs/SnapshotHandle"},"policy":{"$ref":"#/$defs/PolicySummary"},"content":{"type":"string"},"requires":{"type":"array","items":{"$ref":"#/$defs/CanonicalId"},"uniqueItems":true},"specializes":{"type":"array","items":{"$ref":"#/$defs/CanonicalId"},"uniqueItems":true},"next_operations":{"type":"array","items":{"$ref":"#/$defs/NextOperation"}},"summary":{"type":"string"},"routing":{"$ref":"#/$defs/RoutingConfiguration"},"coverage":{"$ref":"#/$defs/ReadCoverage"},"detail":{"const":"compact"},"application_exposure":{"$ref":"#/$defs/ApplicationExposureState"},"provenance":{"type":"array","items":{"$ref":"#/$defs/CanonicalId"}}},"additionalProperties":false},"RoutingFactsCall":{"type":"object","additionalProperties":false,"required":[],"properties":{"snapshot":{"$ref":"#/$defs/SnapshotHandle"}}},"RoutingFactsResult":{"type":"object","additionalProperties":false,"required":["kind","snapshot","facts"],"properties":{"kind":{"const":"routing-facts-result"},"snapshot":{"$ref":"#/$defs/SnapshotHandle"},"facts":{"type":"array","items":{"$ref":"#/$defs/AuthoredRoutingFact"}}}},"RoutingQuestion":{"type":"object","additionalProperties":false,"required":["id","kind","prompt","state","fact"],"properties":{"id":{"$ref":"#/$defs/CanonicalId"},"kind":{"const":"applicability-fact"},"prompt":{"$ref":"#/$defs/NonEmptyString"},"state":{"const":"required"},"fact":{"$ref":"#/$defs/AuthoredRoutingFact"}}},"RoutingRuleExplanation":{"type":"object","additionalProperties":false,"required":["id","target","when","state"],"properties":{"id":{"$ref":"#/$defs/CanonicalId"},"target":{"$ref":"#/$defs/CanonicalId"},"when":{"$ref":"#/$defs/ApplicabilityExpression"},"state":{"enum":["selected","unresolved"]}}},"AgentRouteResult":{"type":"object","required":["kind","snapshot","reading_plan","unresolved_questions","next_operations","facts","rules"],"properties":{"kind":{"const":"agent-route-result"},"snapshot":{"$ref":"#/$defs/SnapshotHandle"},"reading_plan":{"type":"array","items":{"$ref":"#/$defs/ReadingPlanEntry"}},"unresolved_questions":{"type":"array","items":{"$ref":"#/$defs/RoutingQuestion"}},"next_operations":{"type":"array","items":{"$ref":"#/$defs/NextOperation"}},"summary":{"type":"string"},"facts":{"$ref":"#/$defs/FactSet"},"rules":{"type":"array","items":{"$ref":"#/$defs/RoutingRuleExplanation"}}},"additionalProperties":false},"WorkflowContext":{"oneOf":[{"$ref":"#/$defs/ProposalRevisionHandle"},{"$ref":"#/$defs/AnalysisHandle"},{"$ref":"#/$defs/ReadinessHandle"}]},"ProposeCall":{"type":"object","additionalProperties":false,"properties":{"snapshot":{"$ref":"#/$defs/SnapshotHandle"},"change_set":{"$ref":"#/$defs/StandardsChangeSet"}},"required":["change_set"]},"ReviseCall":{"type":"object","additionalProperties":false,"properties":{"context":{"$ref":"#/$defs/WorkflowContext"},"change_set":{"$ref":"#/$defs/StandardsChangeSet"}},"required":["context","change_set"]},"AnalyzeCall":{"type":"object","additionalProperties":false,"properties":{"context":{"$ref":"#/$defs/WorkflowContext"}},"required":["context"]},"ResolveWorkflowCall":{"type":"object","additionalProperties":false,"properties":{"context":{"$ref":"#/$defs/WorkflowContext"},"submission":{"$ref":"#/$defs/Submission"}},"required":["context","submission"]},"ReviewCall":{"type":"object","additionalProperties":false,"properties":{"context":{"$ref":"#/$defs/WorkflowContext"},"decisions":{"type":"array","minItems":3,"maxItems":3,"uniqueItems":true,"items":{"$ref":"#/$defs/ReviewDecision"}}},"required":["context","decisions"]},"ApplyCall":{"type":"object","additionalProperties":false,"properties":{"context":{"$ref":"#/$defs/WorkflowContext"}},"required":["context"]},"RecoverCall":{"type":"object","additionalProperties":false,"properties":{"context":{"$ref":"#/$defs/WorkflowContext"},"action":{"enum":["observe","complete-publication"],"description":"Omit or select observe to reconcile only. Explicit complete-publication revalidates and attempts the same admitted candidate against its original expected target; it requires current publication authorization."}},"required":["context"],"description":"Recover an admitted application. Observation performs no Git writes. Explicit completion reconstructs and verifies the exact admitted candidate before one compare-and-swap attempt."},"WorkflowStatusCall":{"type":"object","additionalProperties":false,"properties":{"context":{"$ref":"#/$defs/WorkflowContext"}},"required":["context"]},"ResumeCall":{"type":"object","additionalProperties":false,"properties":{"context":{"$ref":"#/$defs/WorkflowContext"}},"required":["context"]},"WorkflowContinuation":{"type":"object","additionalProperties":false,"properties":{"operation":{"enum":["revise","analyze","resolve_workflow","review","apply","recover","workflow_status","resume"]},"context":{"$ref":"#/$defs/WorkflowContext"},"required_inputs":{"type":"array","uniqueItems":true,"items":{"enum":["change_set","submission","decisions","action"]}}},"required":["operation","context","required_inputs"]},"WorkflowOutcome":{"oneOf":[{"$ref":"#/$defs/CreateProposalResult"},{"$ref":"#/$defs/ReviseProposalResult"},{"$ref":"#/$defs/PendingResult"},{"$ref":"#/$defs/CompleteResult"},{"$ref":"#/$defs/ReviewProposalResult"},{"$ref":"#/$defs/ApplyProposalResult"},{"$ref":"#/$defs/ApplicationRecoveryRequiredResult"},{"$ref":"#/$defs/RecoverApplicationResult"},{"$ref":"#/$defs/RejectedResult"}]},"WorkflowResult":{"type":"object","additionalProperties":false,"properties":{"kind":{"const":"workflow-result"},"context":{"$ref":"#/$defs/WorkflowContext"},"proposal":{"$ref":"#/$defs/ProposalHandle"},"revision":{"$ref":"#/$defs/ProposalRevisionHandle"},"status":{"enum":["draft","needs-action","complete","requires-change","ready","recovery-required","applied","rejected","stale"]},"next_operations":{"type":"array","items":{"$ref":"#/$defs/WorkflowContinuation"}},"outcome":{"$ref":"#/$defs/WorkflowOutcome"}},"required":["kind","context","proposal","revision","status","next_operations"]},"FocusedQueryNextOperation":{"type":"object","required":["operation","request_kind","snapshot"],"properties":{"operation":{"enum":["route","read","related"]},"request_kind":{"enum":["route","read","related"]},"target":{"$ref":"#/$defs/CanonicalId"},"snapshot":{"$ref":"#/$defs/SnapshotHandle"}},"additionalProperties":false},"RewriteNavigationIndexEdit":{"type":"object","required":["kind","entrypoint","destinations","rationale"],"properties":{"kind":{"const":"rewrite-navigation-index"},"entrypoint":{"$ref":"#/$defs/AuthoringTargetHandle"},"destinations":{"type":"array","items":{"$ref":"#/$defs/CanonicalId"},"minItems":1,"uniqueItems":true},"rationale":{"$ref":"#/$defs/NonEmptyString"},"retargets":{"type":"array","items":{"$ref":"#/$defs/NavigationRetarget"},"uniqueItems":true}},"additionalProperties":false},"NavigationIndexEntry":{"type":"object","required":["id","entrypoint","destinations"],"properties":{"id":{"$ref":"#/$defs/CanonicalId"},"entrypoint":{"$ref":"#/$defs/AuthoringTargetHandle"},"destinations":{"type":"array","items":{"$ref":"#/$defs/CanonicalId"},"uniqueItems":true},"content":{"$ref":"#/$defs/NonEmptyString"}},"additionalProperties":false},"NavigationIndexesResult":{"type":"object","required":["kind","authority","indexes","next_operations"],"properties":{"kind":{"const":"navigation-indexes-result"},"authority":{"oneOf":[{"$ref":"#/$defs/SnapshotHandle"},{"$ref":"#/$defs/ProposalRevisionHandle"}]},"indexes":{"type":"array","items":{"$ref":"#/$defs/NavigationIndexEntry"},"minItems":1},"next_operations":{"type":"array","items":{"$ref":"#/$defs/NextOperation"},"maxItems":0}},"additionalProperties":false},"NavigationRetarget":{"type":"object","required":["entrypoint","standard"],"properties":{"entrypoint":{"$ref":"#/$defs/AuthoringTargetHandle"},"standard":{"$ref":"#/$defs/CanonicalId"}},"additionalProperties":false},"ApplicationNextOperation":{"type":"object","additionalProperties":false,"required":["operation","snapshot"],"properties":{"operation":{"enum":["read","related","routing_facts","route","query","inspect"]},"snapshot":{"$ref":"#/$defs/SnapshotHandle"},"target":{"$ref":"#/$defs/CanonicalId"},"handle":{"$ref":"#/$defs/SnapshotChildHandle"}}},"ApplicationRejectedResult":{"type":"object","additionalProperties":false,"required":["kind","purpose","code","outcome","message","next_operations"],"properties":{"kind":{"const":"application-rejected-result"},"purpose":{"const":"application"},"code":{"enum":["APPLICATION.CONTENT_UNAVAILABLE","APPLICATION.INPUT_INVALID","APPLICATION.OPERATION_UNAVAILABLE","APPLICATION.INTERNAL_UNAVAILABLE","APPLICATION.UNSUPPORTED_CAPTURE","APPLICATION.RESULT_LIMIT"]},"outcome":{"enum":["invalid","unsupported","unavailable"]},"message":{"type":"string"},"next_operations":{"type":"array","items":{"$ref":"#/$defs/ApplicationNextOperation"}}}},"ApplicationPolicy":{"type":"object","additionalProperties":false,"required":["id","handle","role","level"],"properties":{"id":{"$ref":"#/$defs/CanonicalId"},"handle":{"$ref":"#/$defs/SnapshotChildHandle"},"role":{"enum":["core","router","topic","workflow","profile","reference","prompt","template","documentation"]},"level":{"enum":["MUST","SHOULD","PROFILE","REFERENCE"]}}},"ApplicationRelationship":{"type":"object","additionalProperties":false,"required":["handle","source","target","relation","groups","direction"],"properties":{"handle":{"$ref":"#/$defs/SnapshotChildHandle"},"source":{"$ref":"#/$defs/CanonicalId"},"target":{"$ref":"#/$defs/CanonicalId"},"relation":{"type":"string"},"groups":{"type":"array","items":{"$ref":"#/$defs/CanonicalId"}},"direction":{"enum":["incoming","outgoing"]}}},"ApplicationReadResult":{"type":"object","additionalProperties":false,"required":["kind","purpose","snapshot","policy","content","scope","requires","specializes","next_operations"],"properties":{"kind":{"const":"application-read-result"},"purpose":{"const":"application"},"snapshot":{"$ref":"#/$defs/SnapshotHandle"},"policy":{"$ref":"#/$defs/ApplicationPolicy"},"content":{"type":"string"},"scope":{"$ref":"#/$defs/ReviewScope"},"requires":{"type":"array","items":{"$ref":"#/$defs/CanonicalId"}},"specializes":{"type":"array","items":{"$ref":"#/$defs/CanonicalId"}},"related":{"type":"array","items":{"$ref":"#/$defs/ApplicationRelationship"}},"next_operations":{"type":"array","items":{"$ref":"#/$defs/ApplicationNextOperation"}}}},"ApplicationRelatedResult":{"type":"object","additionalProperties":false,"required":["kind","purpose","snapshot","target","relationships","next_operations"],"properties":{"kind":{"const":"application-related-result"},"purpose":{"const":"application"},"snapshot":{"$ref":"#/$defs/SnapshotHandle"},"target":{"$ref":"#/$defs/CanonicalId"},"relationships":{"type":"array","items":{"$ref":"#/$defs/ApplicationRelationship"}},"next_operations":{"type":"array","items":{"$ref":"#/$defs/ApplicationNextOperation"}}}},"ApplicationReadingEntry":{"type":"object","additionalProperties":false,"required":["target","scope","authority","state"],"properties":{"target":{"$ref":"#/$defs/CanonicalId"},"scope":{"$ref":"#/$defs/ReviewScope"},"authority":{"enum":["normative","contextual"]},"state":{"const":"selected"}}},"ApplicationQuestion":{"type":"object","additionalProperties":false,"required":["fact"],"properties":{"fact":{"$ref":"#/$defs/AuthoredRoutingFact"}}},"ApplicationRouteResult":{"type":"object","additionalProperties":false,"required":["kind","purpose","snapshot","status","reading_plan","unresolved_questions","next_operations"],"properties":{"kind":{"const":"application-route-result"},"purpose":{"const":"application"},"snapshot":{"$ref":"#/$defs/SnapshotHandle"},"status":{"enum":["complete","needs-facts"]},"reading_plan":{"type":"array","items":{"$ref":"#/$defs/ApplicationReadingEntry"}},"unresolved_questions":{"type":"array","items":{"$ref":"#/$defs/ApplicationQuestion"}},"next_operations":{"type":"array","items":{"$ref":"#/$defs/ApplicationNextOperation"}}}},"ApplicationRoutingFactsResult":{"type":"object","additionalProperties":false,"required":["kind","purpose","snapshot","facts","next_operations"],"properties":{"kind":{"const":"application-routing-facts-result"},"purpose":{"const":"application"},"snapshot":{"$ref":"#/$defs/SnapshotHandle"},"facts":{"type":"array","items":{"$ref":"#/$defs/AuthoredRoutingFact"}},"next_operations":{"type":"array","items":{"$ref":"#/$defs/ApplicationNextOperation"}}}},"ApplicationReadCall":{"type":"object","additionalProperties":false,"required":["target"],"properties":{"target":{"$ref":"#/$defs/CanonicalId"},"snapshot":{"$ref":"#/$defs/SnapshotHandle"},"detail":{"enum":["compact","full"]}}},"ApplicationReadRequest":{"type":"object","additionalProperties":false,"required":["kind","target"],"properties":{"kind":{"const":"read"},"target":{"$ref":"#/$defs/CanonicalId"},"detail":{"enum":["compact","full"]}}},"ApplicationQueryRequest":{"oneOf":[{"$ref":"#/$defs/RouteRequest"},{"$ref":"#/$defs/ApplicationReadRequest"},{"$ref":"#/$defs/RelatedRequest"}]},"ApplicationQueryCall":{"type":"object","additionalProperties":false,"required":["snapshot","request"],"properties":{"snapshot":{"$ref":"#/$defs/SnapshotHandle"},"request":{"$ref":"#/$defs/ApplicationQueryRequest"}}},"ApplicationInspectCall":{"type":"object","additionalProperties":false,"required":["handle"],"properties":{"handle":{"$ref":"#/$defs/SnapshotChildHandle"}}},"AuthoredDecisionProvenance":{"type":"object","additionalProperties":false,"required":["id","subject","origin","rationale","evidence"],"properties":{"id":{"$ref":"#/$defs/CanonicalId"},"subject":{"$ref":"#/$defs/CanonicalId"},"origin":{"enum":["documented-original","reconstructed-history","current-justification","unrecorded"]},"rationale":{"type":"string"},"evidence":{"type":"array","items":{"$ref":"#/$defs/EvidenceReference"}},"assumptions":{"type":"array","items":{"type":"string"}},"limits":{"type":"array","items":{"type":"string"}},"alternatives":{"type":"array","items":{"type":"string"}},"reconsideration":{"type":"array","items":{"type":"string"}},"supersedes":{"type":"array","items":{"type":"string"}}}},"DecisionProvenanceRecord":{"type":"object","additionalProperties":false,"required":["id","subject","origin","rationale","evidence","assumptions","limits","alternatives","reconsideration","supersedes","subject_binding","retired"],"properties":{"id":{"$ref":"#/$defs/CanonicalId"},"subject":{"$ref":"#/$defs/CanonicalId"},"origin":{"enum":["documented-original","reconstructed-history","current-justification","unrecorded"]},"rationale":{"type":"string"},"evidence":{"type":"array","items":{"$ref":"#/$defs/EvidenceReference"}},"assumptions":{"type":"array","items":{"type":"string"}},"limits":{"type":"array","items":{"type":"string"}},"alternatives":{"type":"array","items":{"type":"string"}},"reconsideration":{"type":"array","items":{"type":"string"}},"supersedes":{"type":"array","items":{"type":"string"}},"subject_binding":{"$ref":"#/$defs/Digest"},"retired":{"type":"boolean"}}},"ApplicationExposureState":{"enum":["unreviewed","current","needs-review"]},"ProvenanceReadResult":{"type":"object","additionalProperties":false,"required":["kind","authority","record","state","next_operations"],"properties":{"kind":{"const":"provenance-read-result"},"authority":{"oneOf":[{"$ref":"#/$defs/SnapshotHandle"},{"$ref":"#/$defs/ProposalRevisionHandle"}]},"record":{"$ref":"#/$defs/DecisionProvenanceRecord"},"state":{"enum":["current","needs-review","retired"]},"next_operations":{"type":"array","items":{"$ref":"#/$defs/NextOperation"}}}},"OperationalReadResult":{"type":"object","additionalProperties":false,"required":["kind","authority","target","canonical_id","role","content","application_exposure","next_operations"],"properties":{"kind":{"const":"operational-read-result"},"authority":{"oneOf":[{"$ref":"#/$defs/SnapshotHandle"},{"$ref":"#/$defs/ProposalRevisionHandle"}]},"target":{"$ref":"#/$defs/AuthoringTargetHandle"},"canonical_id":{"$ref":"#/$defs/CanonicalId"},"role":{"enum":["prompt","template","documentation"]},"content":{"type":"string"},"application_exposure":{"$ref":"#/$defs/ApplicationExposureState"},"next_operations":{"type":"array","items":{"$ref":"#/$defs/NextOperation"}}}},"PutDecisionProvenanceEdit":{"type":"object","additionalProperties":false,"required":["kind","record"],"properties":{"kind":{"const":"put-provenance"},"record":{"$ref":"#/$defs/AuthoredDecisionProvenance"}}},"RetireDecisionProvenanceEdit":{"type":"object","additionalProperties":false,"required":["kind","id"],"properties":{"kind":{"const":"retire-provenance"},"id":{"$ref":"#/$defs/CanonicalId"}}},"ApproveApplicationContentEdit":{"type":"object","additionalProperties":false,"required":["kind","target"],"properties":{"kind":{"const":"approve-application-content"},"target":{"oneOf":[{"$ref":"#/$defs/CanonicalId"},{"$ref":"#/$defs/AuthoringTargetHandle"}]}}},"WithdrawApplicationContentEdit":{"type":"object","additionalProperties":false,"required":["kind","target"],"properties":{"kind":{"const":"withdraw-application-content"},"target":{"oneOf":[{"$ref":"#/$defs/CanonicalId"},{"$ref":"#/$defs/AuthoringTargetHandle"}]}}},"ReviseOperationalArtifactEdit":{"type":"object","additionalProperties":false,"required":["kind","target","title","body"],"properties":{"kind":{"const":"revise-operational-artifact"},"target":{"oneOf":[{"$ref":"#/$defs/CanonicalId"},{"$ref":"#/$defs/AuthoringTargetHandle"}]},"title":{"$ref":"#/$defs/NonEmptyString"},"body":{"type":"string"}}},"PolicyScopeUpdate":{"type":"object","additionalProperties":false,"required":["policy","heading_path","semantics"],"properties":{"policy":{"$ref":"#/$defs/CanonicalId"},"heading_path":{"type":"array","minItems":1,"items":{"$ref":"#/$defs/NonEmptyString"}},"semantics":{"$ref":"#/$defs/PolicySemanticIntent"}}},"ReadManyItem":{"type":"object","required":["target"],"properties":{"target":{"$ref":"#/$defs/CanonicalId"},"include_routing":{"type":"boolean"},"include_coverage":{"type":"boolean","description":"Include current repository attestation status for registered policy units in this read scope."},"detail":{"enum":["compact","full"],"description":"Compact preserves exact policy and essential authority; full includes all relationship rows."}},"additionalProperties":false},"ReadManyCall":{"type":"object","additionalProperties":false,"required":["snapshot","items"],"description":"Read 1–32 selected items from one explicit snapshot, preserving order. The complete JSON result is limited to 2 MiB; any failed item rejects the entire request.","properties":{"snapshot":{"$ref":"#/$defs/SnapshotHandle"},"items":{"type":"array","minItems":1,"maxItems":32,"uniqueItems":true,"items":{"$ref":"#/$defs/ReadManyItem"}}}},"ReadManyResult":{"type":"object","additionalProperties":false,"required":["kind","snapshot","items"],"properties":{"kind":{"const":"read-many-result"},"snapshot":{"$ref":"#/$defs/SnapshotHandle"},"items":{"type":"array","minItems":1,"maxItems":32,"items":{"oneOf":[{"$ref":"#/$defs/CompactReadResult"},{"$ref":"#/$defs/ReadResult"},{"$ref":"#/$defs/NavigationIndexesResult"},{"$ref":"#/$defs/ProvenanceReadResult"},{"$ref":"#/$defs/OperationalReadResult"}]}}}},"ApplicationReadManyItem":{"type":"object","additionalProperties":false,"required":["target"],"properties":{"target":{"$ref":"#/$defs/CanonicalId"},"detail":{"enum":["compact","full"]}}},"ApplicationReadManyCall":{"type":"object","additionalProperties":false,"required":["snapshot","items"],"description":"Read 1–32 selected items from one explicit snapshot, preserving order. The complete JSON result is limited to 2 MiB; any failed item rejects the entire request.","properties":{"snapshot":{"$ref":"#/$defs/SnapshotHandle"},"items":{"type":"array","minItems":1,"maxItems":32,"uniqueItems":true,"items":{"$ref":"#/$defs/ApplicationReadManyItem"}}}},"ApplicationReadManyResult":{"type":"object","additionalProperties":false,"required":["kind","snapshot","items","purpose"],"properties":{"kind":{"const":"application-read-many-result"},"snapshot":{"$ref":"#/$defs/SnapshotHandle"},"items":{"type":"array","minItems":1,"maxItems":32,"items":{"oneOf":[{"$ref":"#/$defs/ApplicationReadResult"}]}},"purpose":{"const":"application"}}},"RegisterConsumerEdit":{"type":"object","additionalProperties":false,"required":["kind","consumer","path","artifact_kind","authority"],"properties":{"kind":{"const":"register-consumer"},"consumer":{"$ref":"#/$defs/CanonicalId"},"path":{"$ref":"#/$defs/NonEmptyString"},"artifact_kind":{"enum":["fixture","documentation","implementation-artifact","prompt","template"]},"authority":{"enum":["evidence","projection"]}},"description":"Register an existing tracked consumer within this proposal. The Engine captures original-revision bytes; use separate policy relationships to declare consumers and review obligations."},"PreviewApplicationCall":{"type":"object","additionalProperties":false,"required":["revision","request"],"properties":{"revision":{"$ref":"#/$defs/ProposalRevisionHandle"},"request":{"$ref":"#/$defs/ApplicationQueryRequest"}},"description":"Authoring-only inspection of an exact draft through application qualification and filtering; this observation neither publishes nor grants ordinary application access."},"CandidateApplicationNextOperation":{"type":"object","additionalProperties":false,"required":["operation","revision","request"],"properties":{"operation":{"const":"preview_application"},"revision":{"$ref":"#/$defs/ProposalRevisionHandle"},"request":{"$ref":"#/$defs/ApplicationQueryRequest"}}},"CandidateApplicationPolicy":{"type":"object","additionalProperties":false,"required":["id","role","level"],"properties":{"id":{"$ref":"#/$defs/CanonicalId"},"role":{"enum":["core","router","topic","workflow","profile","reference","prompt","template","documentation"]},"level":{"enum":["MUST","SHOULD","PROFILE","REFERENCE"]}}},"CandidateApplicationRelationship":{"type":"object","additionalProperties":false,"required":["source","target","relation","groups","direction"],"properties":{"source":{"$ref":"#/$defs/CanonicalId"},"target":{"$ref":"#/$defs/CanonicalId"},"relation":{"type":"string"},"groups":{"type":"array","items":{"$ref":"#/$defs/CanonicalId"}},"direction":{"enum":["incoming","outgoing"]}}},"CandidateApplicationReadResult":{"type":"object","additionalProperties":false,"required":["kind","purpose","policy","content","scope","requires","specializes","next_operations","revision"],"properties":{"kind":{"const":"candidate-application-read-result"},"purpose":{"const":"application"},"policy":{"$ref":"#/$defs/CandidateApplicationPolicy"},"content":{"type":"string"},"scope":{"$ref":"#/$defs/ReviewScope"},"requires":{"type":"array","items":{"$ref":"#/$defs/CanonicalId"}},"specializes":{"type":"array","items":{"$ref":"#/$defs/CanonicalId"}},"related":{"type":"array","items":{"$ref":"#/$defs/CandidateApplicationRelationship"}},"next_operations":{"type":"array","items":{"$ref":"#/$defs/CandidateApplicationNextOperation"}},"revision":{"$ref":"#/$defs/ProposalRevisionHandle"}}},"CandidateApplicationRelatedResult":{"type":"object","additionalProperties":false,"required":["kind","purpose","target","relationships","next_operations","revision"],"properties":{"kind":{"const":"candidate-application-related-result"},"purpose":{"const":"application"},"target":{"$ref":"#/$defs/CanonicalId"},"relationships":{"type":"array","items":{"$ref":"#/$defs/CandidateApplicationRelationship"}},"next_operations":{"type":"array","items":{"$ref":"#/$defs/CandidateApplicationNextOperation"}},"revision":{"$ref":"#/$defs/ProposalRevisionHandle"}}},"CandidateApplicationRouteResult":{"type":"object","additionalProperties":false,"required":["kind","purpose","status","reading_plan","unresolved_questions","next_operations","revision"],"properties":{"kind":{"const":"candidate-application-route-result"},"purpose":{"const":"application"},"status":{"enum":["complete","needs-facts"]},"reading_plan":{"type":"array","items":{"$ref":"#/$defs/ApplicationReadingEntry"}},"unresolved_questions":{"type":"array","items":{"$ref":"#/$defs/ApplicationQuestion"}},"next_operations":{"type":"array","items":{"$ref":"#/$defs/CandidateApplicationNextOperation"}},"revision":{"$ref":"#/$defs/ProposalRevisionHandle"}}},"CandidateApplicationRejectedResult":{"type":"object","additionalProperties":false,"required":["kind","purpose","code","outcome","message","next_operations","revision"],"properties":{"kind":{"const":"candidate-application-rejected-result"},"purpose":{"const":"application"},"code":{"enum":["APPLICATION.CONTENT_UNAVAILABLE","APPLICATION.INPUT_INVALID","APPLICATION.OPERATION_UNAVAILABLE","APPLICATION.INTERNAL_UNAVAILABLE","APPLICATION.UNSUPPORTED_CAPTURE","APPLICATION.RESULT_LIMIT"]},"outcome":{"enum":["invalid","unsupported","unavailable"]},"message":{"type":"string"},"next_operations":{"type":"array","items":{"$ref":"#/$defs/CandidateApplicationNextOperation"}},"revision":{"$ref":"#/$defs/ProposalRevisionHandle"}}},"PreviewApplicationResult":{"oneOf":[{"$ref":"#/$defs/CandidateApplicationReadResult"},{"$ref":"#/$defs/CandidateApplicationRelatedResult"},{"$ref":"#/$defs/CandidateApplicationRouteResult"},{"$ref":"#/$defs/CandidateApplicationRejectedResult"}]}}}') +DEFINITION_METADATA = freeze_json({'ActiveSnapshotSummary': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'lifecycle': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'source_revision': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'created_at': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'AgentRouteResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'reading_plan': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'unresolved_questions': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'next_operations': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'summary': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'facts': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'rules': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'AllExpression': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'operator': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'expressions': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'AlwaysExpression': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'operator': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'AnalysisChildArtifact': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'AnalysisChildHandle': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'analysis': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'child_kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'child_id': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'schema_version': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'AnalysisChildInspectionResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'handle': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'artifact': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'AnalysisContext': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'handle': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'subjects': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'changes': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'semantic_proposals': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'AnalysisExecutionContractView': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'authorization_authority_digest': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'providers': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'AnalysisHandle': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'id': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'schema_version': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'AnalysisId': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'AnalysisInspectionResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'state': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'AnalysisMaterialHandle': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'AnalysisRequest': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'base_snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'proposed_snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'changes': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'semantic_proposals': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'prior_analysis': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'contract_version': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'AnalysisState': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'handle': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'base_snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'proposed_reference': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'changes': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'semantic_proposals': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'fact_observations': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'dispositions': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'coverage_attestations': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'authorization_records': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'domain_contracts': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'execution_contracts': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'contract_version': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'AnalyzeCall': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'context': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'AnalyzeProposalCall': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'revision': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'AnyExpression': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'operator': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'expressions': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ApplicabilityExpression': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'ApplicationExposureState': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'ApplicationHandle': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'id': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'schema_version': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ApplicationId': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'ApplicationInspectCall': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'handle': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ApplicationNextOperation': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'operation': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'target': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'handle': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ApplicationPolicy': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'id': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'handle': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'role': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'level': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ApplicationQueryCall': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'request': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ApplicationQueryRequest': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'ApplicationQuestion': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'fact': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ApplicationReadCall': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'target': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'detail': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ApplicationReadManyCall': {'title': None, 'description': 'Read 1–32 selected items from one explicit snapshot, preserving order. The complete JSON result is limited to 2 MiB; any failed item rejects the entire request.', 'has_default': False, 'default': None, 'properties': {'snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'items': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ApplicationReadManyItem': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'target': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'detail': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ApplicationReadManyResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'items': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'purpose': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ApplicationReadRequest': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'target': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'detail': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ApplicationReadResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'purpose': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'policy': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'content': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'scope': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'requires': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'specializes': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'related': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'next_operations': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ApplicationReadingEntry': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'target': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'scope': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'authority': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'state': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ApplicationRecoveryRequiredResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'application': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'status': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'code': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'outcome': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'message': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'details': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ApplicationRejectedResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'purpose': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'code': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'outcome': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'message': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'next_operations': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ApplicationRelatedResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'purpose': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'target': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'relationships': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'next_operations': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ApplicationRelationship': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'handle': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'source': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'target': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'relation': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'groups': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'direction': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ApplicationRouteResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'purpose': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'status': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'reading_plan': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'unresolved_questions': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'next_operations': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ApplicationRoutingFactsResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'purpose': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'facts': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'next_operations': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ApplyCall': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'context': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ApplyProposalCall': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'readiness': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ApplyProposalResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'application': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'status': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ApproveApplicationContentEdit': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'target': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'AuditPolicyUnitEdit': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'policy': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'rationale': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'AuthoredDecisionProvenance': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'id': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'subject': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'origin': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'rationale': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'evidence': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'assumptions': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'limits': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'alternatives': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'reconsideration': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'supersedes': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'AuthoredRoutingFact': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'id': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'semantic_revision': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'type': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'nullable': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'values': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'aliases': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'meaning': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'prompt': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'AuthoredRoutingRule': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'id': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'target': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'when': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'condition': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'AuthoringTargetHandle': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'id': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'schema_version': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'AuthorizationId': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'AuthorizationRecord': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'reference': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'issuer_semantic_revision': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'principal': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'action': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'subject_kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'subject_id': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'authorization_evidence': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'revocation_authority': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'revocation_authority_semantic_revision': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'revocation_evidence': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'AuthorizationReference': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'id': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'issuer': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'capability': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'authority_digest': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'CandidateApplicationNextOperation': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'operation': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'revision': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'request': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'CandidateApplicationPolicy': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'id': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'role': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'level': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'CandidateApplicationReadResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'purpose': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'policy': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'content': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'scope': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'requires': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'specializes': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'related': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'next_operations': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'revision': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'CandidateApplicationRejectedResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'purpose': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'code': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'outcome': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'message': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'next_operations': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'revision': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'CandidateApplicationRelatedResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'purpose': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'target': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'relationships': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'next_operations': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'revision': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'CandidateApplicationRelationship': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'source': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'target': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'relation': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'groups': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'direction': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'CandidateApplicationRouteResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'purpose': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'status': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'reading_plan': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'unresolved_questions': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'next_operations': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'revision': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'CanonicalId': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'CanonicalModuleDeclaration': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'id': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'role': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'level': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'applies_when': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'does_not_apply_when': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'requires': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'specializes': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'verification': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ChangeDescriptor': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'accepted_ids': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'proposed_ids': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'scope': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'accepted_module': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'proposed_module': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ChangePolicySemantics': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'accepted_semantic_revision': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'proposed_semantic_revision': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'intent': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ChangedPolicyUnit': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'policy': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'change_kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'classification': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'accepted_representation_digest': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'proposed_representation_digest': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'accepted_structural_digest': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'proposed_structural_digest': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'accepted_semantic_revision': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'proposed_semantic_revision': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'semantic_state': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'scope': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ChildId': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'CompactReadResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'policy': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'content': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'requires': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'specializes': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'next_operations': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'summary': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'routing': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'coverage': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'detail': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'application_exposure': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'provenance': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'CompleteResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'handle': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'status': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'context': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'changes': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'changed_units': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'coverage_certificates': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'fact_observations': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'dispositions': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'reading_plan': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'completion': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'summary': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'CompletionProof': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'required_coverage_subjects': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'certificate_subjects': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'reached_consumer_obligations': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'disposition_obligations': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'required_fact_requirements': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'observed_fact_requirements': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'non_consumer_obligations_resolved': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'applicability_resolved': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'authorization_valid': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'evidence_valid': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ConsumerDispositionSubmission': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'obligation': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'result': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'rationale': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'evidence': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'fingerprint': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ConsumerReviewContract': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'id': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'version': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'permitted_dispositions': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'evidence_contract': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'authorization_capability': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'semantics': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ConsumerReviewObligationReadingReason': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'obligation': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ContainsExpression': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'operator': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'fact': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'value': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'CoverageAttestation': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'requirement': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'conclusion': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'evidence': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'explicit_exclusions': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'rationale': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'auditor_provenance': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'schema_version': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'authorization': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'CoverageAttestationClaim': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'requirement': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'conclusion': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'evidence': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'explicit_exclusions': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'rationale': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'auditor_provenance': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'CoverageAttestationSubmission': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'claim': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'CoverageAuditAuthority': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'issuer': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'principal': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'authorization_id': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'CoverageCertificate': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'handle': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'requirement': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'subject': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'owner': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'semantic_revision': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'horizon_digest': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'relationship_digest': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'evidence_digests': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'fact_schema_digest': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'CoverageRequirement': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'handle': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'subject': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'owner': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'semantic_revision': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'relationship_kinds': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'horizon': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'required_evidence_contract': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'CreateProposalCall': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'base_snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'change_set': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'CreateProposalResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'proposal': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'revision': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'CreateSnapshotCall': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'CreateSnapshotResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'CreateStandardEdit': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'standard': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'requires': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'specializes': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'policy_units': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'DecisionDependency': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'class': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'identity': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'digest': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'DecisionFingerprint': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'decision_kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'decision_contract': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'schema_version': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'dependencies': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'DecisionProvenanceRecord': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'id': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'subject': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'origin': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'rationale': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'evidence': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'assumptions': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'limits': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'alternatives': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'reconsideration': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'supersedes': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'subject_binding': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'retired': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'DeleteSnapshotCall': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'DeleteSnapshotResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'purge_deadline': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'Digest': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'DispositionRecord': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'obligation': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'result': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'rationale': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'evidence': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'authorization': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'fingerprint': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'DomainContractReference': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'id': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'version': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'EdgeId': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'EqualsExpression': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'operator': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'fact': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'value': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'EvidenceCheckRetirement': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'suite': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'check': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'EvidenceConsumerRegistration': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'path': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'artifact_kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'source_policies': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'relation': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'evidence_owner': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'rationale': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'EvidenceMaintenancePlan': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'prune_stale_certificates': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'retire_suites': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'retire_checks': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'retire_inputs': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'suite_descriptions': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'replacement_evidence_owner': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'replacement_evidence_rationale': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'relationship_updates': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'consumer_registrations': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'unregister_policy_subjects': {'title': None, 'description': 'Remove selected review-subject registrations and their source relationships while preserving normative Markdown.', 'has_default': False, 'default': None}}}, 'EvidenceReference': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'id': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'digest': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'provider_contract': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'provider_contract_version': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'EvidenceRelationshipUpdate': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'source_policy': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'consumer': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'relation': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'evidence_owner': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'rationale': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'EvidenceSuiteDescription': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'suite': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'description': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ExistsExpression': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'operator': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'fact': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'FactObservation': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'handle': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'requirement': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'value': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'evidence': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'authorization': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'provider': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'FactRequirement': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'handle': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'fact': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'fact_semantic_revision': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'fact_contract_digest': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'context': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'value_contract': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'answer_contract': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'evidence_contract': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'authorization_capability': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'FactRequirementId': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'FactRequirementWork': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'requirement': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'prompt': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'dependent_programs': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'FactSet': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'FactValue': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'FactValueContract': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'type': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'states': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'nullable': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'values': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'FindProposalsCall': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'after': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'limit': {'title': None, 'description': None, 'has_default': True, 'default': 50}}}, 'FindProposalsResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'proposals': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'continuation': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'FindSnapshotsCall': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'lifecycle': {'title': None, 'description': None, 'has_default': True, 'default': 'active'}, 'after': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'limit': {'title': None, 'description': None, 'has_default': True, 'default': 50}}}, 'FindSnapshotsResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'snapshots': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'continuation': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'FocusedQueryNextOperation': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'operation': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'request_kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'target': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'GeneralSelectionReason': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'source': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'fact': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'edge': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'question': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ImpactDispositionSubmission': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'obligation': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'result': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'rationale': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'evidence': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'fingerprint': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ImpactTraceId': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'ImpactTraceReference': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'id': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'graph': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'applicability': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'InExpression': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'operator': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'fact': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'values': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'InspectCall': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'handle': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'InspectNextOperation': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'operation': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'request_kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'handle': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'InspectableHandle': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'InspectionResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'MaintainEvidenceCall': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'expected_revision': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'evidence': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'plan': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'apply': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'MaintainEvidenceResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'applied': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'changed_files': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'removed_files': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'verification': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ModuleRelationshipKey': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'relation': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'source': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'target': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'MovePolicyUnitEdit': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'policy': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'standard': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'after_policy': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'semantics': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'NavigationIndexEntry': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'id': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'entrypoint': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'destinations': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'content': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'NavigationIndexesResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'authority': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'indexes': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'next_operations': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'NavigationRetarget': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'entrypoint': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'standard': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'NewPolicyUnit': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'id': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'heading_chain': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'semantic_revision': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'intent': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'aliases': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'predecessors': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'successors': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'NextOperation': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'NonEmptyString': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'NotExpression': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'operator': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'expression': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'Obligation': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'handle': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'target': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'scope': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'reasons': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'state': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'applicability': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'permitted_submissions': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'review_contract': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'fingerprint': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ObligationId': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'OperationalReadResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'authority': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'target': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'canonical_id': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'role': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'content': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'application_exposure': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'next_operations': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'PendingResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'handle': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'status': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'context': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'changes': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'changed_units': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'obligations': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'fact_requirements': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'reading_plan': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'next_operations': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'summary': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'PolicyCoverageStatus': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'subject': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'requirement_id': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'status': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'authority': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'PolicyImpactSelectionReason': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'source': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'edge': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'relation': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'evidence_owner': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'traces': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'PolicyInspectionResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'policy': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'declaration': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'representation_digest': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'structural_digest': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'provenance': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'PolicyRelationship': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'source_policy': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'consumer': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'relation': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'applicability': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'source_scope': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'consumer_scope': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'evidence_owner': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'rationale': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'PolicyRelationshipInspection': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'relationship_kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'applicability': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'source_scope': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'consumer_scope': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'propagation': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'evidence_owner': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'rationale': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'PolicyRelationshipKey': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'source_policy': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'consumer': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'relation': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'PolicyScopeUpdate': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'policy': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'heading_path': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'semantics': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'PolicySemanticIntent': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'PolicySummary': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'handle': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'authority': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'scope': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'PolicyUnitDeclaration': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'id': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'module': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'heading_path': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'semantic_revision': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'lifecycle': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'aliases': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'predecessors': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'successors': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'PolicyUnitMapping': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'state': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'reason': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'policy_units': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'PrepareCall': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'request': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'PreservePolicySemantics': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'semantic_revision': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'intent': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'PreviewApplicationCall': {'title': None, 'description': 'Authoring-only inspection of an exact draft through application qualification and filtering; this observation neither publishes nor grants ordinary application access.', 'has_default': False, 'default': None, 'properties': {'revision': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'request': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'PreviewApplicationResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'ProposalHandle': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'id': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'schema_version': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ProposalId': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'ProposalPolicySummary': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'id': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'authority': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'scope': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ProposalReadResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'revision': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'policy': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'content': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'requires': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'specializes': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'related': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'next_operations': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'summary': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'routing': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'coverage': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'application_exposure': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'provenance': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ProposalRelatedResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'revision': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'target': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'authoring_target': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'policy_unit_mapping': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'relationships': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'next_operations': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'summary': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ProposalRelationshipSummary': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'source': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'target': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'relation': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'groups': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'direction': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'traversal_eligible': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'applicability': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ProposalRevisionHandle': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'id': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'schema_version': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ProposalRevisionId': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'ProposalRouteResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'revision': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'reading_plan': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'unresolved_questions': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'next_operations': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'summary': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ProposalSummary': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'proposal': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'head_revision': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ProposeCall': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'change_set': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ProvenanceReadResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'authority': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'record': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'state': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'next_operations': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ProvenanceRecord': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'path': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ProvideFactSubmission': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'requirement': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'value': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'evidence': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ProviderReference': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'id': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'contract': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'contract_version': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'input_digest': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'PutDecisionProvenanceEdit': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'record': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'PutPolicyRelationshipEdit': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'relationship': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'PutRoutingFactEdit': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'fact': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'rationale': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'PutRoutingRuleEdit': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'rule': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'rationale': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'QuarantinedSnapshotSummary': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'lifecycle': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'source_revision': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'created_at': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'purge_deadline': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'QueryCall': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'request': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'QueryNextOperation': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'operation': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'request_kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'target': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'QueryProposalCall': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'revision': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'request': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'QueryProposalNextOperation': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'operation': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'request_kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'target': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'revision': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'QueryProposalResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'QueryRequest': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'QueryResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'Question': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'id': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'prompt': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'state': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'permitted_answers': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ReadCall': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'target': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'include_routing': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'include_coverage': {'title': None, 'description': 'Include current repository attestation status for registered policy units in this read scope.', 'has_default': False, 'default': None}, 'snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'detail': {'title': None, 'description': 'Compact preserves exact policy and essential authority; full includes all relationship rows.', 'has_default': False, 'default': None}}}, 'ReadCoverage': {'title': None, 'description': 'Repository attestation status bound to this snapshot or proposal. Empty subjects means no registered policy units in scope, not complete coverage. Analysis-local attestations are not repository certificates.', 'has_default': False, 'default': None, 'properties': {'subjects': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ReadManyCall': {'title': None, 'description': 'Read 1–32 selected items from one explicit snapshot, preserving order. The complete JSON result is limited to 2 MiB; any failed item rejects the entire request.', 'has_default': False, 'default': None, 'properties': {'snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'items': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ReadManyItem': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'target': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'include_routing': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'include_coverage': {'title': None, 'description': 'Include current repository attestation status for registered policy units in this read scope.', 'has_default': False, 'default': None}, 'detail': {'title': None, 'description': 'Compact preserves exact policy and essential authority; full includes all relationship rows.', 'has_default': False, 'default': None}}}, 'ReadManyResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'items': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ReadRequest': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'target': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'include_routing': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'include_coverage': {'title': None, 'description': 'Include current repository attestation status for registered policy units in this read scope.', 'has_default': False, 'default': None}}}, 'ReadResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'policy': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'content': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'requires': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'specializes': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'related': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'next_operations': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'summary': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'routing': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'coverage': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'application_exposure': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'provenance': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ReadinessHandle': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'id': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'schema_version': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ReadinessId': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'ReadingPlanEntry': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'target': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'scope': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'authority': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'reasons': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'state': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ReadingPlanReason': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'RecoverApplicationCall': {'title': None, 'description': 'Recover an admitted application. Observation performs no Git writes. Explicit completion reconstructs and verifies the exact admitted candidate before one compare-and-swap attempt.', 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'readiness': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'action': {'title': None, 'description': 'Omit or select observe to reconcile only. Explicit complete-publication revalidates and attempts the same admitted candidate against its original expected target; it requires current publication authorization.', 'has_default': False, 'default': None}}}, 'RecoverApplicationResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'application': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'status': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'RecoverCall': {'title': None, 'description': 'Recover an admitted application. Observation performs no Git writes. Explicit completion reconstructs and verifies the exact admitted candidate before one compare-and-swap attempt.', 'has_default': False, 'default': None, 'properties': {'context': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'action': {'title': None, 'description': 'Omit or select observe to reconcile only. Explicit complete-publication revalidates and attempts the same admitted candidate against its original expected target; it requires current publication authorization.', 'has_default': False, 'default': None}}}, 'RegisterConsumerEdit': {'title': None, 'description': 'Register an existing tracked consumer within this proposal. The Engine captures original-revision bytes; use separate policy relationships to declare consumers and review obligations.', 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'consumer': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'path': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'artifact_kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'authority': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'RegisterPolicyUnitEdit': {'title': None, 'description': 'Register an explicitly selected policy scope in an existing standard. The Engine owns declaration placement and validates the final candidate.', 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'standard': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'policy_unit': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'RejectedResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'code': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'outcome': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'target': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'message': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'details': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'next_operations': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'RelatedCall': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'target': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'groups': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'direction': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'transitive': {'title': None, 'description': None, 'has_default': True, 'default': False}, 'snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'RelatedRequest': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'target': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'groups': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'direction': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'transitive': {'title': None, 'description': None, 'has_default': True, 'default': False}}}, 'RelatedResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'target': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'authoring_target': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'policy_unit_mapping': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'relationships': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'next_operations': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'summary': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'RelationshipConsumer': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'RelationshipDisposition': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'relationship': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'disposition': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'replacement_consumer': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'rationale': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'evidence': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'RelationshipInspectionResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'relationship': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'policy_semantics': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'provenance': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'RelationshipKey': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'RelationshipSummary': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'handle': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'source': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'target': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'relation': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'groups': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'direction': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'traversal_eligible': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'applicability': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'RemovePolicyRelationshipEdit': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'relationship': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'RemoveRoutingFactEdit': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'fact': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'rationale': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'RemoveRoutingRuleEdit': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'rule': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'rationale': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ReplaceStandardRelationshipsEdit': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'standard': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'requires': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'specializes': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'rationale': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'RepositoryPath': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'RequiresReadingReason': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'edge': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'source': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ResolveCall': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'analysis': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'submission': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ResolveNextOperation': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'operation': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'request_kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'target': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'work': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'analysis': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ResolveWorkflowCall': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'context': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'submission': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ResumeCall': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'context': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'RetireDecisionProvenanceEdit': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'id': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'RetirePolicyUnitEdit': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'policy': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'retired_semantic_revision': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'successors': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'relationship_dispositions': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'evidence': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'RetireStandardEdit': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'standard': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'successors': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'relationship_dispositions': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'evidence': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ReviewCall': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'context': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'decisions': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ReviewDecision': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'owner': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'decision': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'rationale': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'evidence': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ReviewProposalCall': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'analysis': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'decisions': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'prior_readiness': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ReviewProposalResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'readiness': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'revision': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'status': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ReviewScope': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'ReviseCall': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'context': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'change_set': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ReviseOperationalArtifactEdit': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'target': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'title': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'body': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'RevisePolicyUnitEdit': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'policy': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'title': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'body': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'semantics': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ReviseProposalCall': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'expected_revision': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'change_set': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ReviseProposalResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'proposal': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'revision': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ReviseStandardEdit': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'standard': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'scope_updates': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'RewriteNavigationIndexEdit': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'entrypoint': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'destinations': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'rationale': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'retargets': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'RouteCall': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'facts': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'RouteRequest': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'facts': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'RouteResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'reading_plan': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'unresolved_questions': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'next_operations': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'summary': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'RoutingBaseReadingReason': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'projection': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'RoutingConfiguration': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'facts': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'rules': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'RoutingFactsCall': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'RoutingFactsResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'facts': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'RoutingQuestion': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'id': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'prompt': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'state': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'fact': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'RoutingRuleExplanation': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'id': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'target': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'when': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'state': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'RoutingRuleReadingReason': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'rule': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'facts': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'ScalarValue': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'SelectionReason': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'SemanticProposal': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'policy': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'accepted_semantic_revision': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'proposed_semantic_revision': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'intent': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'structural_digest': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'SnapshotChildHandle': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'child_kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'child_id': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'schema_version': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'SnapshotHandle': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'id': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'schema_version': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'SnapshotId': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'SnapshotInspectionResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'SnapshotSummary': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'SpecializesReadingReason': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'edge': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'source': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'StandardContent': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'id': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'title': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'role': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'level': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'applies_when': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'does_not_apply_when': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'verification': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'body': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'StandardEdit': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'StandardsChangePurpose': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'summary': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'rationale': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'evidence': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'StandardsChangeSet': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'purpose': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'edits': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'StructuredScope': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'heading_path': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'Submission': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'Timestamp': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'UndeleteSnapshotCall': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'UndeleteSnapshotResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'snapshot': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'VerificationFailure': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'code': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'message': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'suite': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'check': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'VerificationReport': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'passed': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'exit_code': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'suites': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'checks': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'failures': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'VerifyProposalCall': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'revision': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'readiness': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'VerifyProposalResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'revision': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'verification': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'readiness': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'VerifyRepositoryCall': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'refresh_verification_inputs': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'VerifyRepositoryResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'refreshed_verification_inputs': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'verification': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'WholeArtifactScope': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'WithdrawApplicationContentEdit': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'target': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'WorkflowContext': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'WorkflowContinuation': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'operation': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'context': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'required_inputs': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'WorkflowOutcome': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {}}, 'WorkflowResult': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'kind': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'context': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'proposal': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'revision': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'status': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'next_operations': {'title': None, 'description': None, 'has_default': False, 'default': None}, 'outcome': {'title': None, 'description': None, 'has_default': False, 'default': None}}}, 'WorkflowStatusCall': {'title': None, 'description': None, 'has_default': False, 'default': None, 'properties': {'context': {'title': None, 'description': None, 'has_default': False, 'default': None}}}}) @dataclass(frozen=True, slots=True) class ActiveSnapshotSummary: @@ -792,13 +792,15 @@ class ApplicationRecoveryRequiredResult: 'code': 'code', 'outcome': 'outcome', 'message': 'message', + 'details': 'details', }) kind: Literal['application-recovery-required-result'] application: ApplicationHandle status: Literal['recovery-required'] - code: Literal['APPLICATION.PUBLICATION_UNAVAILABLE', 'APPLICATION.OBSERVATION_UNAVAILABLE', 'APPLICATION.OUTCOME_PERSISTENCE_UNAVAILABLE', 'APPLICATION.RECOVERY_TARGET_UNCERTAIN', 'APPLICATION.RECOVERY_TARGET_DIVERGED'] + code: Literal['APPLICATION.PUBLICATION_UNAVAILABLE', 'APPLICATION.OBSERVATION_UNAVAILABLE', 'APPLICATION.OUTCOME_PERSISTENCE_UNAVAILABLE', 'APPLICATION.RECOVERY_TARGET_UNCERTAIN', 'APPLICATION.RECOVERY_TARGET_DIVERGED', 'APPLICATION.RECOVERY_BLOCKED'] outcome: Literal['unavailable'] message: NonEmptyString + details: FrozenMap[str, ScalarValue] | MissingValue = MISSING def __post_init__(self) -> None: _RUNTIME.normalize_model(self) @@ -4747,14 +4749,16 @@ def as_contract(self) -> dict[str, object]: @dataclass(frozen=True, slots=True) class RecoverApplicationCall: - '' + 'Recover an admitted application. Observation performs no Git writes. Explicit completion reconstructs and verifies the exact admitted candidate before one compare-and-swap attempt.' __definition__: ClassVar[str] = 'RecoverApplicationCall' __contract_fields__: ClassVar = MappingProxyType({ 'kind': 'kind', 'readiness': 'readiness', + 'action': 'action', }) kind: Literal['recover-application'] readiness: ReadinessHandle + action: Literal['observe', 'complete-publication'] | MissingValue = MISSING def __post_init__(self) -> None: _RUNTIME.normalize_model(self) @@ -4797,12 +4801,14 @@ def as_contract(self) -> dict[str, object]: @dataclass(frozen=True, slots=True) class RecoverCall: - '' + 'Recover an admitted application. Observation performs no Git writes. Explicit completion reconstructs and verifies the exact admitted candidate before one compare-and-swap attempt.' __definition__: ClassVar[str] = 'RecoverCall' __contract_fields__: ClassVar = MappingProxyType({ 'context': 'context', + 'action': 'action', }) context: WorkflowContext + action: Literal['observe', 'complete-publication'] | MissingValue = MISSING def __post_init__(self) -> None: _RUNTIME.normalize_model(self) @@ -6486,7 +6492,7 @@ class WorkflowContinuation: }) operation: Literal['revise', 'analyze', 'resolve_workflow', 'review', 'apply', 'recover', 'workflow_status', 'resume'] context: WorkflowContext - required_inputs: tuple[Literal['change_set', 'submission', 'decisions'], ...] + required_inputs: tuple[Literal['change_set', 'submission', 'decisions', 'action'], ...] def __post_init__(self) -> None: _RUNTIME.normalize_model(self) diff --git a/tools/standards_engine/standards_engine/agent_workflow.py b/tools/standards_engine/standards_engine/agent_workflow.py index 5e2ac26f..9fcccdbf 100644 --- a/tools/standards_engine/standards_engine/agent_workflow.py +++ b/tools/standards_engine/standards_engine/agent_workflow.py @@ -41,6 +41,7 @@ "revise": ["change_set"], "resolve_workflow": ["submission"], "review": ["decisions"], + "recover": ["action"], } @@ -95,6 +96,17 @@ def bind(engine: StandardsEngine, context: c.WorkflowContext) -> BoundWorkflow: return BoundWorkflow(context, revision, analysis, readiness) +def publication_status(engine, readiness): + """A rejected action leaves the durable admitted lifecycle intact.""" + try: + application = engine._authoring.read_selected_application(readiness.readiness_id) + except AuthoringError as error: + if error.failure.code != "APPLICATION.NOT_ADMITTED": + raise + return "ready" + return "applied" if engine._authoring.application_outcome(application) is not None else "recovery-required" + + def view(engine, bound, outcome=None, materials: ProposalMaterials | None = None): context = bound.context.as_contract() status = "draft" @@ -104,21 +116,12 @@ def view(engine, bound, outcome=None, materials: ProposalMaterials | None = None status = "applied" elif isinstance(outcome, c.RejectedResult): status = "rejected" + if bound.readiness is not None: + admitted = publication_status(engine, bound.readiness) + if admitted in ("recovery-required", "applied"): + status = admitted elif bound.readiness is not None: - status = "ready" - try: - application = engine._authoring.read_selected_application( - bound.readiness.readiness_id - ) - except AuthoringError as error: - if error.failure.code != "APPLICATION.NOT_ADMITTED": - raise - else: - status = ( - "applied" - if engine._authoring.application_outcome(application) is not None - else "recovery-required" - ) + status = publication_status(engine, bound.readiness) elif bound.analysis is not None: if not isinstance(outcome, (c.PendingResult, c.CompleteResult)): inputs = ( @@ -206,7 +209,10 @@ def advance(engine, operation, call, materials: ProposalMaterials | None = None) engine._proposal_revision_handle(revision.revision_id) ) return view(engine, bind(engine, context)) - if operation not in {item.operation for item in current.next_operations}: + if ( + operation not in {item.operation for item in current.next_operations} + and not (operation == "recover" and current.status == "applied" and bound.readiness is not None) + ): return engine._reject( "WORKFLOW.OPERATION_NOT_AVAILABLE", "invalid", @@ -276,6 +282,7 @@ def advance(engine, operation, call, materials: ProposalMaterials | None = None) { "kind": "recover-application", "readiness": call.context.as_contract(), + "action": arguments.get("action", "observe"), } ) ) diff --git a/tools/standards_engine/standards_engine/engine.py b/tools/standards_engine/standards_engine/engine.py index 962be656..ff04dbe1 100644 --- a/tools/standards_engine/standards_engine/engine.py +++ b/tools/standards_engine/standards_engine/engine.py @@ -5,6 +5,7 @@ import re import tempfile import tomllib +from contextlib import AbstractContextManager from collections.abc import Iterable, Mapping from dataclasses import dataclass from pathlib import Path @@ -12,6 +13,7 @@ from tools.graph_engine.graph_engine import Direction, Edge, EdgeRegistry, GraphError from tools.repository_git.repository_git import ( CandidateFile, + MaterializedCandidate, CandidateCommitMessage, GitRepository, RevisionReadSession, @@ -201,6 +203,7 @@ APPLICATION_CAPABILITY, APPLICATION_RECOVERY_CAPABILITY, AuthoringError, + AuthoringFailure, AuthoringModule, CANONICAL_TARGET_BRANCH, FindProposalsRequest, @@ -1329,83 +1332,10 @@ def apply_proposal( "unavailable", "The configured main branch no longer matches the readiness target.", ) - projection = self._proposal_projection(revision) - base_capture = self._snapshots.load_content(revision.base_snapshot) - base_files = {str(item.path): item.content for item in base_capture.files} - base_files.update(projection.captured_consumer_files) - proposed_files = dict(projection.source.files) - base_paths = set(revision.base_repository_paths) - proposed_paths = set(projection.repository_paths) - self._publish_coverage_into_candidate( - readiness, - revision, - projection, - base_files, - proposed_files, - proposed_paths, - ) - added_paths = proposed_paths - base_paths - removed_paths = base_paths - proposed_paths - uncaptured_existing_paths = ( - set(proposed_files) - set(base_files) - ) & base_paths - if ( - not added_paths <= set(proposed_files) - or not removed_paths <= set(base_files) - or uncaptured_existing_paths - ): - return self._reject( - "APPLICATION.TOPOLOGY_INVALID", - "invalid", - "The logical projection does not contain exact authority for its topology change.", - ) - candidate_files = tuple( - CandidateFile( - RepositoryPath.parse(path), - content, - _CANONICAL_AUTHORITY_EXECUTABLE, - ) - for path, content in sorted(proposed_files.items()) - if path in added_paths or base_files.get(path) != content - ) - with self._repository.materialize_candidate( - readiness.expected_target, - candidate_files, - removals=tuple( - RepositoryPath.parse(path) for path in sorted(removed_paths) - ), - commit=proposal_commit_message(revision), - ) as candidate: - try: - verification = self._application_verifier(candidate.root) - except OSError: - return self._reject( - "APPLICATION.VERIFICATION_UNAVAILABLE", - "unavailable", - "The complete candidate verification could not be executed.", - ) - if type(verification) is not CompleteVerificationResult: - return self._reject( - "APPLICATION.VERIFICATION_INVALID", - "invalid", - "The complete verifier returned an invalid result.", - ) - if verification.exit_code != 0: - outcome = { - 3: "unavailable", - 4: "unsupported", - }.get(verification.exit_code, "invalid") - code = { - "unavailable": "APPLICATION.VERIFICATION_UNAVAILABLE", - "unsupported": "APPLICATION.VERIFICATION_UNSUPPORTED", - "invalid": "APPLICATION.VERIFICATION_FAILED", - }[outcome] - return self._reject( - code, - outcome, - "The exact candidate did not pass the complete verification checkpoint.", - details=_verification_failure_details(verification), - ) + with self._application_candidate(readiness, revision) as candidate: + verification_failure = self._verify_application_candidate(candidate) + if verification_failure is not None: + return verification_failure if ( self._repository.branch_revision(CANONICAL_TARGET_BRANCH) != readiness.expected_target @@ -1421,46 +1351,9 @@ def apply_proposal( authorization.as_contract(), candidate.revision, ) - try: - publication = self._repository.publish_candidate( - candidate, - readiness.expected_target, - ) - except GitRepositoryError as error: - return self._application_recovery_required( - application, - "APPLICATION.PUBLICATION_UNAVAILABLE", - "Canonical publication did not establish an applied result after " - f"admission ({error.failure.code}).", - ) - if publication == "stale": - return self._application_recovery_required( - application, - "APPLICATION.RECOVERY_TARGET_DIVERGED", - "The configured main branch changed after application admission.", - ) - try: - observed = self._repository.branch_revision(CANONICAL_TARGET_BRANCH) - except GitRepositoryError: - return self._application_recovery_required( - application, - "APPLICATION.OBSERVATION_UNAVAILABLE", - "The canonical target could not be observed after publication.", - ) - if observed != candidate.revision: - return self._application_recovery_required( - application, - "APPLICATION.OBSERVATION_UNAVAILABLE", - "The canonical target did not retain the candidate after publication.", - ) - try: - self._authoring.record_applied(application) - except SnapshotError: - return self._application_recovery_required( - application, - "APPLICATION.OUTCOME_PERSISTENCE_UNAVAILABLE", - "The applied outcome could not be recorded durably.", - ) + failure = self._publish_admitted_application(application, candidate) + if failure is not None: + return failure return ApplyProposalResult.from_value( { "kind": "apply-proposal-result", @@ -1473,6 +1366,133 @@ def apply_proposal( except self._domain_errors() as error: return self._domain_rejection(error) + def _application_candidate( + self, readiness: ProposalReadiness, revision: ProposalRevision, + ) -> AbstractContextManager[MaterializedCandidate]: + """Reconstruct from original captured authority, never the live worktree.""" + projection = self._proposal_projection(revision) + base_capture = self._snapshots.load_content(revision.base_snapshot) + base_files = {str(item.path): item.content for item in base_capture.files} + base_files.update(projection.captured_consumer_files) + proposed_files = dict(projection.source.files) + base_paths = set(revision.base_repository_paths) + proposed_paths = set(projection.repository_paths) + self._publish_coverage_into_candidate( + readiness, + revision, + projection, + base_files, + proposed_files, + proposed_paths, + ) + added_paths = proposed_paths - base_paths + removed_paths = base_paths - proposed_paths + uncaptured_existing_paths = ( + set(proposed_files) - set(base_files) + ) & base_paths + if ( + not added_paths <= set(proposed_files) + or not removed_paths <= set(base_files) + or uncaptured_existing_paths + ): + raise AuthoringError(AuthoringFailure( + "APPLICATION.TOPOLOGY_INVALID", "invalid", + "The logical projection does not contain exact authority for its topology change.", + )) + candidate_files = tuple( + CandidateFile( + RepositoryPath.parse(path), + content, + _CANONICAL_AUTHORITY_EXECUTABLE, + ) + for path, content in sorted(proposed_files.items()) + if path in added_paths or base_files.get(path) != content + ) + return self._repository.materialize_candidate( + readiness.expected_target, + candidate_files, + removals=tuple( + RepositoryPath.parse(path) for path in sorted(removed_paths) + ), + commit=proposal_commit_message(revision), + ) + + def _verify_application_candidate( + self, candidate: MaterializedCandidate, + ) -> RejectedResult | None: + try: + verification = self._application_verifier(candidate.root) + except OSError: + return self._reject( + "APPLICATION.VERIFICATION_UNAVAILABLE", + "unavailable", + "The complete candidate verification could not be executed.", + ) + if type(verification) is not CompleteVerificationResult: + return self._reject( + "APPLICATION.VERIFICATION_INVALID", + "invalid", + "The complete verifier returned an invalid result.", + ) + if verification.exit_code != 0: + outcome = { + 3: "unavailable", + 4: "unsupported", + }.get(verification.exit_code, "invalid") + code = { + "unavailable": "APPLICATION.VERIFICATION_UNAVAILABLE", + "unsupported": "APPLICATION.VERIFICATION_UNSUPPORTED", + "invalid": "APPLICATION.VERIFICATION_FAILED", + }[outcome] + return self._reject( + code, + outcome, + "The exact candidate did not pass the complete verification checkpoint.", + details=_verification_failure_details(verification), + ) + return None + + def _publish_admitted_application( + self, application: ProposalApplication, candidate: MaterializedCandidate, + ) -> ApplicationRecoveryRequiredResult | None: + """One expected-target attempt, followed by exact outcome observation.""" + try: + publication = self._repository.publish_candidate( + candidate, application.expected_target, + ) + except GitRepositoryError as error: + return self._application_recovery_required( + application, "APPLICATION.PUBLICATION_UNAVAILABLE", + "Canonical publication did not establish an applied result after " + f"admission ({error.failure.code}).", + details=_recovery_failure_details(error), + ) + try: + observed = self._repository.branch_revision(CANONICAL_TARGET_BRANCH) + except GitRepositoryError as error: + return self._application_recovery_required( + application, "APPLICATION.OBSERVATION_UNAVAILABLE", + "The canonical target could not be observed after publication.", + details=_recovery_failure_details(error), + ) + if observed != application.candidate: + return self._application_recovery_required( + application, + "APPLICATION.RECOVERY_TARGET_DIVERGED" if publication == "stale" + else "APPLICATION.OBSERVATION_UNAVAILABLE", + "The canonical target did not retain the admitted candidate; " + "observe it again before selecting a recovery action.", + ) + try: + self._authoring.record_applied(application) + except SnapshotError as error: + return self._application_recovery_required( + application, "APPLICATION.OUTCOME_PERSISTENCE_UNAVAILABLE", + "The applied outcome could not be recorded durably.", + details=_recovery_failure_details(error), + ) + return None + def _publish_coverage_into_candidate( self, readiness: ProposalReadiness, @@ -1654,11 +1674,12 @@ def recover_application( return self._recovered_application(application) try: observed = self._repository.branch_revision(CANONICAL_TARGET_BRANCH) - except GitRepositoryError: + except GitRepositoryError as error: return self._application_recovery_required( application, "APPLICATION.OBSERVATION_UNAVAILABLE", "The canonical target could not be observed during recovery.", + details=_recovery_failure_details(error), ) if observed == application.candidate: try: @@ -1671,10 +1692,15 @@ def recover_application( ) return self._recovered_application(application) if observed == application.expected_target: + if call.as_contract().get("action", "observe") == "complete-publication": + return self._complete_admitted_application(application) return self._application_recovery_required( application, "APPLICATION.RECOVERY_TARGET_UNCERTAIN", - "The current target cannot establish whether publication occurred.", + "The target is at the admitted expected revision; this does not establish " + "whether publication previously occurred. Select complete-publication " + "to revalidate and re-establish the exact admitted candidate on an " + "authorized Git-writable host.", ) return self._application_recovery_required( application, @@ -1684,6 +1710,75 @@ def recover_application( except self._domain_errors() as error: return self._domain_rejection(error) + def _complete_admitted_application( + self, application: ProposalApplication, + ) -> RecoverApplicationResult | ApplicationRecoveryRequiredResult: + """Re-establish one admitted candidate; preserve its selection on failure.""" + try: + readiness, revision = self._authoring.application_revision(application.readiness_id) + self._authorize_recovery_completion(application) + state = self._load_analysis( + AnalysisHandle.from_value(self._analysis_handle(readiness.analysis_id)) + ) + evaluation = self._evaluate(state) + if not evaluation.complete or self._review_requires_change(state): + raise AuthoringError(AuthoringFailure( + "APPLICATION.RECOVERY_REVIEW_UNAVAILABLE", "unavailable", + "The admitted review must remain complete for publication.", + )) + with self._application_candidate(readiness, revision) as candidate: + if candidate.revision != application.candidate: + raise AuthoringError(AuthoringFailure( + "APPLICATION.RECOVERY_CANDIDATE_MISMATCH", "invalid", + "Reconstruction differs from the exact admitted candidate.", + )) + failure = self._verify_application_candidate(candidate) + if failure is not None: + return self._application_recovery_required( + application, "APPLICATION.RECOVERY_BLOCKED", failure.message, + details={"cause_code": failure.code, "cause_outcome": failure.outcome, + **failure.details}, + ) + # Verification may take time. Re-observe durable selection/head and + # current permission immediately before the only write attempt. + self._authoring.application_revision(application.readiness_id) + selected = self._authoring.read_selected_application(application.readiness_id) + if selected != application: + raise AuthoringError(AuthoringFailure( + "APPLICATION.RECOVERY_SELECTION_MISMATCH", "invalid", + "Recovery requires the original selected application.", + )) + if self._authoring.application_outcome(application) is not None: + return self._recovered_application(application) + self._authorize_recovery_completion(application) + self._repository.validate_candidate(candidate) + failure = self._publish_admitted_application(application, candidate) + return failure if failure is not None else self._recovered_application(application) + except self._domain_errors() as error: + return self._application_recovery_required( + application, "APPLICATION.RECOVERY_BLOCKED", + "The admitted application is preserved; complete the reported " + "recovery prerequisite before another explicit completion attempt.", + details=_recovery_failure_details(error), + ) + + def _authorize_recovery_completion(self, application: ProposalApplication) -> None: + for action, subject_kind, subject, capability in ( + ("recover-application", "proposal-application-recovery", + application_recovery_subject, APPLICATION_RECOVERY_CAPABILITY), + ("apply-proposal", "proposal-application", + application_subject, APPLICATION_CAPABILITY), + ): + construct_authorization_record( + self._execution_context, + AuthorizationRequest( + action, subject_kind, + subject(application.readiness_id, application.revision_id, + application.expected_target), + capability, (), + ), + ) + @public_operation def prepare( self, call: PrepareCall @@ -3655,6 +3750,8 @@ def _application_recovery_required( application: ProposalApplication, code: str, message: str, + *, + details: Mapping[str, object] | None = None, ) -> ApplicationRecoveryRequiredResult: return ApplicationRecoveryRequiredResult.from_value( { @@ -3664,6 +3761,7 @@ def _application_recovery_required( "code": code, "outcome": "unavailable", "message": message, + **({"details": dict(details)} if details is not None else {}), } ) @@ -3725,6 +3823,12 @@ def _domain_rejection(cls, error: Exception) -> RejectedResult: details={key: value for key, value in diagnostic.as_dict().items() if key not in {"code", "outcome", "message"}}, ) + if isinstance(error, GitRepositoryError) and error.failure.command is not None: + return cls._reject( + error.failure.code, error.failure.kind, + "The Git command failed; inspect the bounded command observation.", + details=_recovery_failure_details(error), + ) failure = getattr(error, "failure", None) if failure is None: raise error @@ -3759,6 +3863,20 @@ def _reject( ) +def _recovery_failure_details(error: Exception) -> dict[str, object]: + """Project owned diagnostic fields, preserving raw error text privately.""" + failure = getattr(error, "failure", None) + if failure is None: + return {"cause_code": type(error).__name__} + details: dict[str, object] = { + "cause_code": failure.code, + "cause_outcome": getattr(failure, "outcome", getattr(failure, "kind", "unavailable")), + } + if isinstance(error, GitRepositoryError) and failure.command is not None: + details.update({f"git_{key}": value for key, value in failure.command.as_contract().items()}) + return details + + def _verification_failure_details( verification: CompleteVerificationResult, ) -> dict[str, object]: diff --git a/tools/standards_engine/tests/test_analysis.py b/tools/standards_engine/tests/test_analysis.py index a7e6ffb0..fdc4d8f6 100644 --- a/tools/standards_engine/tests/test_analysis.py +++ b/tools/standards_engine/tests/test_analysis.py @@ -1528,7 +1528,8 @@ def test_review_composition_publishes_readiness_for_complete_analysis(self) -> N mock.patch.object( self.engine._authoring, "admit_application", - return_value=mock.Mock(application_id="application:sha256:" + "f" * 64), + return_value=mock.Mock(application_id="application:sha256:" + "f" * 64, + candidate=candidate.revision, expected_target=readiness.expected_target), ), mock.patch.object( self.engine._repository, @@ -1570,6 +1571,7 @@ def test_review_composition_publishes_readiness_for_complete_analysis(self) -> N side_effect=( readiness.expected_target, readiness.expected_target, + RepositoryRevision("e" * 40), ), ), mock.patch.object( @@ -1580,7 +1582,8 @@ def test_review_composition_publishes_readiness_for_complete_analysis(self) -> N mock.patch.object( self.engine._authoring, "admit_application", - return_value=mock.Mock(application_id="application:sha256:" + "e" * 64), + return_value=mock.Mock(application_id="application:sha256:" + "e" * 64, + candidate=candidate.revision, expected_target=readiness.expected_target), ), mock.patch.object( self.engine._repository, diff --git a/tools/standards_engine/tests/test_consumer_publication.py b/tools/standards_engine/tests/test_consumer_publication.py index b43f98b7..4e7f0cfc 100644 --- a/tools/standards_engine/tests/test_consumer_publication.py +++ b/tools/standards_engine/tests/test_consumer_publication.py @@ -43,7 +43,7 @@ def rpc(self, method, params, purpose='authoring'): self.assertEqual(process.returncode,0,process.stderr) self.assertEqual(process.stderr,'') responses={row['id']:row for row in map(json.loads,process.stdout.splitlines())} - self.assertIn('interface 34;',responses[1]['result']['instructions']) + self.assertIn('interface 35;',responses[1]['result']['instructions']) return responses[2] def call(self,name,arguments,purpose='authoring',error=False): @@ -146,6 +146,52 @@ def test_same_candidate_registration_preview_review_publication_and_cold_readbac self.assertEqual(self.call('preview_application',{'revision':revision,'request':{'kind':'read','target':F.owner,'detail':'full'}}),preview) self.assertNotEqual(subprocess.check_output(['git','rev-parse','main'],cwd=self.root),before) + def test_failed_publication_observe_and_explicit_cold_completion(self): + from tools.standards_engine.tests.test_agent_workflow import reference_change + change = reference_change(self.root, "recovery-publication") + change["edits"][0]["requires"] = [] + identity = change["edits"][0]["standard"]["id"] + change["edits"].append({"kind": "approve-application-content", "target": identity}) + change["edits"].append({"kind": "audit-policy-unit", "policy": "workflow.commit.commit-message", + "rationale": "Qualify deterministic reconstruction of a reviewed coverage receipt."}) + proposed = self.call("propose", {"change_set": change}) + complete = self.complete(proposed) + ready = self.call("review", {"context": complete["context"], "decisions": decisions(self.root)}) + self.assertEqual(ready["status"], "ready", ready) + before = subprocess.check_output(["git", "rev-parse", "main"], cwd=self.root) + lock = self.root / ".git/refs/heads/main.lock" + lock.write_bytes(b"owned by this isolated recovery test\n") + failed = self.call("apply", {"context": ready["context"]}) + self.assertEqual(failed["status"], "recovery-required", failed) + application = failed["outcome"]["application"] + diagnostic = failed["outcome"]["details"] + self.assertEqual(diagnostic["git_operation"], "update-ref") + self.assertEqual(diagnostic["git_stderr_excerpt"], "File exists") + self.assertEqual(subprocess.check_output(["git", "rev-parse", "main"], cwd=self.root), before) + observed = self.call("recover", {"context": ready["context"], "action": "observe"}) + self.assertEqual(observed["outcome"]["code"], "APPLICATION.RECOVERY_TARGET_UNCERTAIN") + self.assertEqual(observed["outcome"]["application"], application) + # Only the test owner releases its synthetic lock; the Engine never does. + lock.unlink() + local = self.root / "unpublished-local-note.txt" + local.write_bytes(b"independent local data\n") + recovered = self.call("recover", {"context": ready["context"], "action": "complete-publication"}) + self.assertEqual(recovered["status"], "applied", recovered) + self.assertEqual(recovered["outcome"]["application"], application) + published = subprocess.check_output(["git", "rev-parse", "main"], cwd=self.root) + self.assertNotEqual(published, before) + again = self.call("recover_application", { + "kind": "recover-application", "readiness": ready["context"], + "action": "complete-publication", + }) + self.assertEqual(again["application"], application) + self.assertEqual(subprocess.check_output(["git", "rev-parse", "main"], cwd=self.root), published) + exposed = self.call("read", {"target": identity}, purpose="application") + self.assertIn("isolated workflow test reference", exposed["content"]) + self.assertEqual(local.read_bytes(), b"independent local data\n") + self.assertNotIn("unpublished-local-note.txt", subprocess.check_output( + ["git", "ls-tree", "-r", "--name-only", "main"], cwd=self.root, text=True)) -if __name__=='__main__': + +if __name__ == '__main__': unittest.main() diff --git a/tools/standards_engine/tests/test_publication_recovery.py b/tools/standards_engine/tests/test_publication_recovery.py new file mode 100644 index 00000000..013f9fd4 --- /dev/null +++ b/tools/standards_engine/tests/test_publication_recovery.py @@ -0,0 +1,262 @@ +"""Admitted intent survives failed writes and explicit cold recovery. + +Focused faults use real proposal, candidate and SQLite owners; their verifier +substitute is not the system qualification. The cold MCP test in +``test_consumer_publication`` executes the actual complete verifier. +""" +from __future__ import annotations + +from dataclasses import replace +from pathlib import Path +import subprocess +import tempfile +import unittest +from unittest import mock + +from tools.standards_engine.standards_engine import AgentToolFacade +from tools.standards_engine.standards_engine import _generated_contract as c +from tools.standards_engine.tests.test_agent_workflow import ( + decisions, prepare_repository, reference_change, +) +from tools.standards_verifier.standards_verifier import CompleteVerificationResult + + +class RecoveryContractTests(unittest.TestCase): + def test_focused_and_native_calls_accept_explicit_completion(self): + readiness = {"kind": "readiness-handle", "id": "readiness:sha256:" + "1" * 64, + "schema_version": 1} + # Use the canonical example shape for readiness rather than a stored ID. + for model, raw in ( + (c.RecoverCall, {"context": readiness}), + (c.RecoverApplicationCall, {"kind": "recover-application", "readiness": readiness}), + ): + with self.subTest(model=model.__name__): + value = model.from_value({**raw, "action": "complete-publication"}) + self.assertEqual(value.as_contract()["action"], "complete-publication") + + +class PublicationRecoveryTests(unittest.TestCase): + def setUp(self): + self.temporary = tempfile.TemporaryDirectory(prefix="admitted-recovery-") + self.addCleanup(self.temporary.cleanup) + self.root = Path(self.temporary.name) / "repository" + prepare_repository(self.root) + self.author = AgentToolFacade.open_repository(self.root, purpose="authoring") + self.addCleanup(lambda: self.author.close()) + self.engine = self.author._engine + self.verification = mock.patch.object( + self.engine, "_application_verifier", + return_value=CompleteVerificationResult((), None, 0), + ).start() + self.addCleanup(mock.patch.stopall) + proposed = self.author.propose({"change_set": reference_change(self.root, "recovery")}) + self.assertEqual(proposed.get("status"), "complete", proposed) + ready = self.author.review({"context": proposed["context"], "decisions": decisions(self.root)}) + self.assertEqual(ready.get("status"), "ready", ready) + self.context = ready["context"] + self.expected = self.engine._repository.branch_revision("main") + self.lock = self.root / ".git/refs/heads/main.lock" + self.lock.write_bytes(b"owned test lock\n") + failed = self.author.apply({"context": self.context}) + self.assertEqual(failed.get("status"), "recovery-required", failed) + self.failed = failed + self.application = self.engine._authoring.read_selected_application(self.context["id"]) + self.assertEqual(self.engine._repository.branch_revision("main"), self.expected) + + def test_observe_then_complete_preserves_the_selected_application(self): + observed = self.author.recover({"context": self.context}) + self.assertEqual(observed["status"], "recovery-required", observed) + self.assertEqual(observed["outcome"]["code"], "APPLICATION.RECOVERY_TARGET_UNCERTAIN") + self.lock.unlink() + completed = self.author.recover({"context": self.context, "action": "complete-publication"}) + self.assertEqual(completed.get("status"), "applied", completed) + self.assertEqual(completed["outcome"]["application"]["id"], self.application.application_id) + self.assertEqual(self.engine._repository.branch_revision("main"), self.application.candidate) + self.assertEqual(self.engine._authoring.read_selected_application(self.context["id"]), self.application) + + def test_native_completion_and_repeated_recovery_are_idempotent(self): + self.lock.unlink() + completed = self.author.recover_application({ + "kind": "recover-application", "readiness": self.context, + "action": "complete-publication", + }) + self.assertEqual(completed["status"], "applied", completed) + counts = self.engine._snapshots._store.counts() + with mock.patch.object(self.engine._repository, "publish_candidate") as publish: + repeated = self.author.recover({"context": self.context, "action": "complete-publication"}) + self.assertEqual(repeated["status"], "applied", repeated) + publish.assert_not_called() + self.assertEqual(self.engine._snapshots._store.counts(), counts) + rejected = self.author.apply({"context": self.context}) + self.assertEqual(rejected["code"], "WORKFLOW.OPERATION_NOT_AVAILABLE") + + def test_failed_write_remains_recoverable_with_bounded_git_diagnostics(self): + details = self.failed["outcome"]["details"] + self.assertEqual(details["git_operation"], "update-ref") + self.assertEqual(details["git_exit_code"], 128) + self.assertEqual(details["git_reason"], "path-exists") + self.assertEqual(details["git_stderr_excerpt"], "File exists") + self.assertNotIn(str(self.root), str(self.failed)) + self.assertNotIn("remove the file manually", str(self.failed)) + with mock.patch.object(self.engine._repository, "publish_candidate", + wraps=self.engine._repository.publish_candidate) as publish: + failed = self.author.recover({"context": self.context, "action": "complete-publication"}) + self.assertEqual(failed["status"], "recovery-required", failed) + self.assertEqual(publish.call_count, 1) + self.assertEqual(self.engine._authoring.read_selected_application(self.context["id"]), self.application) + self.assertIsNone(self.engine._authoring.application_outcome(self.application)) + + def test_default_observation_uses_no_candidate_or_publication(self): + with (mock.patch.object(self.engine, "_application_candidate") as candidate, + mock.patch.object(self.engine._repository, "publish_candidate") as publish): + result = self.author.recover({"context": self.context}) + self.assertEqual(result["status"], "recovery-required", result) + candidate.assert_not_called() + publish.assert_not_called() + + def test_diverged_target_is_preserved_without_reconstruction(self): + self.lock.unlink() + tree = subprocess.check_output(["git", "rev-parse", "main^{tree}"], cwd=self.root).decode().strip() + competing = subprocess.check_output([ + "git", "-c", "user.name=Recovery Test", "-c", "user.email=recovery@example.invalid", + "commit-tree", tree, "-p", self.expected.oid, "-m", "test: competing revision", + ], cwd=self.root).decode().strip() + subprocess.run(["git", "update-ref", "refs/heads/main", competing, self.expected.oid], cwd=self.root, check=True) + with mock.patch.object(self.engine, "_application_candidate") as candidate: + result = self.author.recover({"context": self.context, "action": "complete-publication"}) + self.assertEqual(result["outcome"]["code"], "APPLICATION.RECOVERY_TARGET_DIVERGED", result) + candidate.assert_not_called() + self.assertEqual(self.engine._repository.branch_revision("main").oid, competing) + self.assertIsNone(self.engine._authoring.application_outcome(self.application)) + + def test_reconstructed_candidate_mismatch_preserves_admission(self): + from contextlib import contextmanager + from tools.repository_git.repository_git import RepositoryRevision + original = self.engine._application_candidate + + @contextmanager + def changed_candidate(*args): + with original(*args) as candidate: + yield replace(candidate, revision=RepositoryRevision("f" * 40)) + + self.lock.unlink() + with (mock.patch.object(self.engine, "_application_candidate", side_effect=changed_candidate), + mock.patch.object(self.engine._repository, "publish_candidate") as publish): + result = self.author.recover({"context": self.context, "action": "complete-publication"}) + self.assertEqual(result["outcome"]["details"]["cause_code"], "APPLICATION.RECOVERY_CANDIDATE_MISMATCH", result) + publish.assert_not_called() + self.assertEqual(self.engine._authoring.read_selected_application(self.context["id"]), self.application) + + def test_current_publication_authorization_is_required_and_rechecked(self): + from tools.standards_analysis.standards_analysis import AuthorizationDenied + delegate = self.engine._execution_context.authorization + + class SelectiveAuthorizer: + contract = delegate.contract + denied = False + requests = [] + + def authorize(self, request): + self.requests.append(request.capability) + if self.denied and request.capability == "standards.proposal.apply": + return AuthorizationDenied("Current application permission is absent.") + return delegate.authorize(request) + + authorizer = SelectiveAuthorizer() + self.engine._execution_context = replace(self.engine._execution_context, authorization=authorizer) + self.lock.unlink() + for late in (False, True): + with self.subTest(revoked_after_verification=late): + authorizer.denied = not late + def verify(root): + authorizer.denied = True + return CompleteVerificationResult((), None, 0) + self.verification.side_effect = verify if late else None + with mock.patch.object(self.engine._repository, "publish_candidate") as publish: + result = self.author.recover({"context": self.context, "action": "complete-publication"}) + self.assertEqual(result["status"], "recovery-required", result) + self.assertEqual(result["outcome"]["details"]["cause_code"], "ANALYSIS.UNAUTHORIZED", result) + publish.assert_not_called() + self.assertEqual(self.engine._repository.branch_revision("main"), self.expected) + self.assertIn("standards.proposal.recover", authorizer.requests) + self.assertIn("standards.proposal.apply", authorizer.requests) + + def test_failed_verification_preserves_the_selected_application(self): + self.lock.unlink() + self.verification.side_effect = OSError("private verifier location") + with mock.patch.object(self.engine._repository, "publish_candidate") as publish: + result = self.author.recover({"context": self.context, "action": "complete-publication"}) + self.assertEqual(result["status"], "recovery-required", result) + self.assertEqual(result["outcome"]["details"]["cause_code"], "APPLICATION.VERIFICATION_UNAVAILABLE") + self.assertNotIn("private verifier location", str(result)) + publish.assert_not_called() + + def test_outcome_persistence_failure_recovers_without_republication(self): + from tools.standards_snapshots.standards_snapshots import SnapshotError, SnapshotFailure + self.lock.unlink() + error = SnapshotError(SnapshotFailure("unavailable", "STORE.FIXTURE_UNAVAILABLE", "private fixture")) + with mock.patch.object(self.engine._authoring, "record_applied", side_effect=error): + result = self.author.recover({"context": self.context, "action": "complete-publication"}) + self.assertEqual(result["outcome"]["code"], "APPLICATION.OUTCOME_PERSISTENCE_UNAVAILABLE", result) + self.assertEqual(self.engine._repository.branch_revision("main"), self.application.candidate) + with (mock.patch.object(self.engine._repository, "publish_candidate") as publish, + mock.patch.object(self.engine, "_application_candidate") as candidate): + recovered = self.author.recover({"context": self.context}) + self.assertEqual(recovered["status"], "applied", recovered) + publish.assert_not_called() + candidate.assert_not_called() + + def test_competing_same_candidate_is_reconciled(self): + self.lock.unlink() + original = self.engine._repository.publish_candidate + + def concurrent_completion(candidate, expected): + self.assertEqual(original(candidate, expected), "updated") + return "stale" # The competing request won before this one's CAS. + + with mock.patch.object(self.engine._repository, "publish_candidate", side_effect=concurrent_completion): + recovered = self.author.recover({"context": self.context, "action": "complete-publication"}) + self.assertEqual(recovered["status"], "applied", recovered) + self.assertEqual(recovered["outcome"]["application"]["id"], self.application.application_id) + + def test_application_purpose_cannot_request_completion(self): + app = AgentToolFacade.open_repository(self.root, purpose="application") + try: + denied = app.recover({"context": self.context, "action": "complete-publication"}) + finally: + app.close() + self.assertEqual(denied["code"], "APPLICATION.OPERATION_UNAVAILABLE", denied) + self.assertEqual(self.engine._repository.branch_revision("main"), self.expected) + + def test_recovery_reconstructs_a_candidate_that_was_never_imported(self): + from tools.repository_git.repository_git import GitRepositoryError, GitRepositoryFailure + self.lock.unlink() + proposed = self.author.propose({"change_set": reference_change(self.root, "failed-fetch")}) + ready = self.author.review({"context": proposed["context"], "decisions": decisions(self.root)}) + with mock.patch.object(self.engine._repository, "publish_candidate", side_effect=GitRepositoryError( + GitRepositoryFailure("unavailable", "REPOSITORY_GIT.COMMAND_UNAVAILABLE", "private fetch failure") + )): + failed = self.author.apply({"context": ready["context"]}) + self.assertEqual(failed["status"], "recovery-required", failed) + selected = self.engine._authoring.read_selected_application(ready["context"]["id"]) + missing = subprocess.run(["git", "cat-file", "-e", selected.candidate.oid], cwd=self.root, capture_output=True) + self.assertNotEqual(missing.returncode, 0) + recovered = self.author.recover({"context": ready["context"], "action": "complete-publication"}) + self.assertEqual(recovered["status"], "applied", recovered) + self.assertEqual(recovered["outcome"]["application"]["id"], selected.application_id) + self.assertEqual(self.engine._repository.branch_revision("main"), selected.candidate) + + def test_stale_readiness_is_not_substituted_with_new_proposal_content(self): + self.lock.unlink() + changed = self.author.revise_proposal({ + "kind": "revise-proposal", + "expected_revision": self.engine._proposal_revision_handle(self.application.revision_id), + "change_set": reference_change(self.root, "recovery", revision=True), + }) + self.assertEqual(changed["kind"], "revise-proposal-result", changed) + with mock.patch.object(self.engine, "_application_candidate") as candidate: + result = self.author.recover({"context": self.context, "action": "complete-publication"}) + self.assertEqual(result["status"], "recovery-required", result) + self.assertEqual(result["outcome"]["details"]["cause_code"], "AUTHORING.READINESS_STALE", result) + candidate.assert_not_called() + self.assertEqual(self.engine._authoring.read_selected_application(self.context["id"]), self.application) From c947f5456d37c9fffbaefdf0bb0d4004eee699cf Mon Sep 17 00:00:00 2001 From: MrScripty Date: Thu, 24 Sep 2026 23:11:29 -0700 Subject: [PATCH 26/26] docs: record admitted recovery integration results --- .../execution-ledger.md | 15 +++++++++++++ .../admitted-publication-recovery/plan.md | 4 ++-- .../verification.md | 21 +++++++++++++++++++ 3 files changed, 38 insertions(+), 2 deletions(-) diff --git a/docs/plans/admitted-publication-recovery/execution-ledger.md b/docs/plans/admitted-publication-recovery/execution-ledger.md index d9d5fedf..08e0e560 100644 --- a/docs/plans/admitted-publication-recovery/execution-ledger.md +++ b/docs/plans/admitted-publication-recovery/execution-ledger.md @@ -33,3 +33,18 @@ is not publication acceptance on the user's restricted host. R6 and the overall plan remain verifying until the operator-qualified installation and live result are established. Final packaging evidence is retained in verification.md and the ZIP's checks directory. + +## 2026-09-24 — Complete-checkout integration + +Applied the package to the exact baseline and committed the source repair as +`5e7c04a8` under MrScripty. The supported Python 3.12.3 environment used locked +contract dependencies, including rpds-py 2026.6.3. Repository Git (32), focused +recovery (14), affected Engine tests (55), and the separate cold-process +publication test (1) passed. Contract projection freshness and both complete +structural verification paths passed 73 suites / 121 checks. The generated +suite-input manifest matched the supplied version. + +The committed-head interface-34-to-35 probe completed the original admission. +The changed-evidence probe blocked the same application and preserved its target. +Only disposable repositories and stores were used. Operator-host qualification +and actual live recovery remain pending. diff --git a/docs/plans/admitted-publication-recovery/plan.md b/docs/plans/admitted-publication-recovery/plan.md index 9a46b8a4..f528c1d7 100644 --- a/docs/plans/admitted-publication-recovery/plan.md +++ b/docs/plans/admitted-publication-recovery/plan.md @@ -2,7 +2,7 @@ **Plan status:** `Verifying` **Acceptance status:** `pending` -**Current phase:** Source implementation and local qualification complete; supported operator-host qualification remains pending. +**Current phase:** Source implementation and supported Python 3.12 local qualification complete; operator-host qualification remains pending. **Next slice:** Install current code and schemas without advancing the admitted target; verify the supported locked host, then use the original readiness to observe and explicitly complete the preserved application. **Canonical plan:** `docs/plans/admitted-publication-recovery/plan.md`; operation: `verify` the installed handoff. **Source baseline:** `MrScripty/Coding-Standards@2c406a8cbe0cecad6b4d83e1f431e74bb8618f16`. @@ -96,4 +96,4 @@ Source delivery can finish with R6 explicitly pending. It cannot claim the user' ## Blockers And Replan Triggers -The user's Git-writable host and actual store are unavailable here. The downloaded source is complete; local Python may differ from supported 3.11/3.12. Replan only if exact candidate replay cannot reconstruct the admitted identity, existing records cannot preserve required authority, or the selected completion promise needs additional persistent state. Keep catalog hot reload and 84-decision response overhead as separate findings. +The user's Git-writable host and actual store are unavailable here. The downloaded source is complete and local integration passed on supported Python 3.12 with locked dependencies. Replan only if exact candidate replay cannot reconstruct the admitted identity, existing records cannot preserve required authority, or the selected completion promise needs additional persistent state. Keep catalog hot reload and 84-decision response overhead as separate findings. diff --git a/docs/plans/admitted-publication-recovery/verification.md b/docs/plans/admitted-publication-recovery/verification.md index f854ff46..d1a164cd 100644 --- a/docs/plans/admitted-publication-recovery/verification.md +++ b/docs/plans/admitted-publication-recovery/verification.md @@ -71,6 +71,27 @@ These observations are complete for the named local environment. They do not claim the supported locked deployment, the user's actual client, or the user's likely sandbox error has been reproduced exactly. +## Complete-checkout integration on supported Python + +The supplied patch was applied to the exact baseline and committed as +`5e7c04a8` under MrScripty. Integration used Python 3.12.3 with the repository's +locked contract dependencies, including rpds-py 2026.6.3. Archive integrity, +patch applicability, and the staged whitespace check passed. No live store, +readiness, or accepted target was changed. + +Repository Git passed 32 tests; focused recovery passed 14; the affected Engine +modules passed 55; and the real cold-process publication test passed separately. +The canonical contract projection was fresh. The Engine repository verification +and direct complete verifier each passed 73 suites / 121 checks. Regenerating the +suite-input manifest produced no difference from the supplied patch. + +The committed-head cross-edition probe passed: an interface-34 admission was +completed with interface 35 while retaining its application, expected target, +and store. The separate changed-evidence probe passed by blocking completion, +retaining the same application and leaving the target unchanged. These local +results qualify the source integration; operator-host installation and the +preserved live application remain pending. + ## Evidence | Check | Actual observation |