# Offline observation-boundary compliance audit Development tooling, not empirical evidence. All choices below are unfrozen. This implements the operational audit in [protocol §10](../03-experimental-protocol.md). It makes no semantic leakage judgments, runs no models, changes no archived inputs, and does not select, repair, exclude, replace, or rerun runs. Audit materials, forms, and summaries are coordinator-only: keep them separate from artifact-quality packets and from adaptation. Directory separation does not enforce confidentiality. The utility reuses the complete read-only sealing validation from [run outcomes](../run-sealing/summarize_run_outcomes.py), the canonical block, unchanged template, unique identifier, history-bound, and typed-memory checks from [the planner-response validator](../permitted-observations/validate_planner_response.py), and existing binary human-judgment, timestamp, exact-span and exclusive-output helpers. The separate [B1 adapter](b1_contract.py) checks the generic-continuation contract. The separate [common initial adapter](initial_contract.py) validates explicitly declared initial inputs through opt-in manifest version 1.1. The separate [B2 paired adapter and guide](B2-README.md) extend the version 1.1 continuation-contract union without changing the existing adapter schemas. The separate [B3 native-state adapter and guide](B3-README.md) use opt-in manifest 1.2 and `b3-native` scope, with distinct initialization, incumbent state, four-round comparison mappings and recorded deterministic selection. It does not project B3 onto continuation history or certify a verified SPO reproduction. The matched-treatment validator and all other research utilities are unchanged. ## Prepare an explicit inventory Copy [manifest.template.json](manifest.template.json) for the treatment or [manifest-b1.template.json](manifest-b1.template.json) for B1 outside the research assets and fill it in. Nulls are placeholders, not example observations. Paths are relative to that manifest; archive aliases, run/packet IDs, and versions are explicit. Supply only sealed archives. Every run in the supplied archives must appear once; duplicate archive/run cells are rejected by the shared archive validator. This scope is an explicit assigned operational cohort, not necessarily a full study. Runs absent from these archives cannot be audited or silently represented as passes. These two existing templates retain manifest version 1.0 and continuation-only scope. To audit initial inputs, use [manifest-initial.template.json](manifest-initial.template.json) and the version 1.1 scope declarations below; do not add fields to version 1.0 rows. Each run includes its archived identity and seal ID, plus: - `contract`: `matched-treatment/1.0` for the unchanged full treatment reference, or `b1-generic-continuation/1.0` for the unchanged B1 continuation template. B2's paired contract is available only through the scoped version 1.1 interface described in its [separate guide](B2-README.md). Other baseline/ablation contracts and unknown versions are explicitly rejected, without a semantic noncompliance verdict. - `packet_inventory_complete`: a coordinator declaration about logging coverage, never a conclusion established by hashes. Use false when completeness is unknown. - `packets`: one explicit slot per archived adaptation `planner` attempt for the treatment, or per explicitly designated B1 continuation `worker` attempt, including failed and retry attempts. Supply globally unique packet IDs, the exact attempt ID, and strictly increasing positive chronological `sequence` values. This declaration is not independently verified historical chronology. A present packet names an archived `submitted_prompt` or `operational_record` linked to that run and attempt, with its SHA-256. Do not reconstruct a packet from sources or substitute a directive for the full recorded input packet. Distinct attempts may explicitly reference the same archived input bytes (for example, an identical transport retry); retain distinct packet/attempt slots. A missing packet uses both `record_id: null` and `sha256: null`; retain its slot. An empty list is permitted only if there are no expected planner/continuation attempts. All archived runs, regardless of completion, quality, spending, endpoint availability, or audit verdict, remain in the denominator. Request role/kind tags and inventory completeness are coordinator declarations: this tool cannot find omitted requests or determine whether a purported input was actually delivered. Mark uncertain inventories incomplete rather than silently asserting comprehensive coverage. `bounds` explicitly declares the input byte cap and memory-entry bound, defaulting reversibly to 2 MiB and 32 entries; the memory-entry bound applies only to treatment. Both adapters enforce at most two earlier artifacts and twelve previous instructions. The embedded public task packet must match the selected registry's immutable public-packet hash. The shared validator also rejects extra block fields, unknown treatment-memory evidence identifiers, duplicate keys, unresolved placeholders, noncanonical treatment blocks, and altered wrappers. It does not independently tokenize memory or verify reference-location truth. Archive validation reads inventoried operational files to check sealing integrity; none of those records are added to a planner input or a quality-rater packet. ## B1 continuation adapter and request coverage `b1-generic-continuation/1.0` pins the existing [B1 prompt](../baseline-prompts/b1-continuation.txt) to SHA-256 `25f117b6f9f326cef23c6f80c012b983eb9a16952746b54c794bcf7ff43de4aa`. Its four JSON values are the complete immutable public task packet, current artifact, earlier artifacts, and prior worker instructions. The adapter checks the literal unchanged wrapper, block order/separators and terminal newline. B1's existing convention permits compact or indented JSON; unlike the treatment, canonical serialization is not required. Recorded bytes and decoded text are never rewritten. Artifact objects permit only `artifact_id` and `text`; prior instruction objects only `instruction_id` and `text`. IDs must be unique across task, public requirements/sources, artifacts and instructions. There is no memory, critique, score, worker report, or candidate-selection field. A string can still contain mislabeled restricted content; humans decide semantic leakage. For each B1 run, add `request_slots`, an array of exact `{"attempt_id": ..., "kind": "initial" | "continuation"}` objects. As an unfrozen development default it must explicitly classify **every archived adaptation worker attempt**, including failed, incomplete, cancelled, unknown and retry attempts. No planner role is assumed and role alone never determines request kind. An initial request is the common first worker instruction; a continuation uses the B1 template. There can be at most one initial root plus its transport retries; a retry cannot change its parent's designation. Each continuation designation must have exactly one chronological `packets` slot; missing bytes remain a slot with null record/hash. An omitted designation or packet slot is an input error, not permission to discard an attempt. Distinct retry slots may explicitly share the same archived record, preserving their identities and coverage obligations. Initial requests are explicitly accounted for but are **outside this continuation adapter's validation scope**. It does not validate the common initial wrapper or infer stages from prompt text, file names, attempt order, outcome, or condition ID. Other operational roles are not reclassified into worker requests. These labels and an exhaustive runtime log remain coordinator assertions; human review must consider mislabeled stages, omitted requests and undisclosed chat/context. Unknown logging completeness requires `packet_inventory_complete: false`. One manifest may mix C and B1 rows using their respective contracts, with any explicit condition IDs. All runs in all supplied archives still appear exactly once. Matched-treatment rows retain their original schema and planner-attempt coverage rule; do not add `request_slots` to them. Context copies distinguish `planner_input` from `b1_continuation_input`. Existing form/evidence interfaces, unknown coverage rules, independent/adjudicated separation and all-assigned-run denominators apply to both; condition summaries remain separate. A compliance label describes this declared audit scope, not proof of unrestricted whole-run purity or a basis for replacing unfavorable runs. The history arrays follow the existing explicitly supplied chronological order. They have no timestamp fields, so structural validation cannot establish whether they truly are the latest artifacts or already-submitted directive-only history. That and semantic provenance remain human audit questions. The new adapter does not alter the B1 template, add treatment principles/memory, validate task answers, or feed retrospective findings into adaptation. ## Common initial inputs and explicit audit scope The new, separate `common-initial-worker/1.0` adapter pins [common-initial-worker.txt](../baseline-prompts/common-initial-worker.txt) to SHA-256 `dd21eaf83a75524982f7e2ebd18fea3b8ed3dd26c346f430130e65313ce94e0a`. It checks the unchanged literal prefix, block label, suffix and terminal newline around the sole `TASK_PACKET_JSON` value. The value must be a JSON **string** whose decoded UTF-8 bytes match the complete immutable registry public-packet hash and task identity. Different valid JSON escaping is accepted without rewriting bytes. No artifact, history, memory, critique, report, or extra JSON field/block is allowed. Invalid UTF-8, unresolved placeholders, changed wrappers, unsupported versions, extra prose/values, and hash mismatches are rejected. Shared sealed-archive and request/record linkage checks still apply. No stage is inferred from prompt text, condition ID, record filename, request outcome, or the archive's attempt-array order. Initial-only auditing is a reversible development default, not a frozen setting. Manifest version **1.1** has the same top-level keys as 1.0, with explicit run rows: - Retain the six run identity fields plus `archive_id` and `seal_record_id`. - Set `audit_scope` to `initial-only`, `continuation-only`, or `combined`. - Declare `initial_input` as an object containing only `contract` (the common initial contract above) and Boolean `packet_inventory_complete`, or null when outside scope. Merely tagging an attempt initial does not opt it into validation. - Declare `continuation_input` with the same two fields, using the existing matched-treatment or B1 contract, or null when outside scope. The B2-specific variant additionally requires explicit pairs, as documented in the separate guide. Unknown interfaces are rejected, without a semantic noncompliance verdict. - `request_slots` uses the existing explicit worker partition: every archived adaptation worker attempt is designated `initial` or `continuation`, including failed, incomplete, cancelled, unknown and retry attempts. The shared partition helper allows one initial root and its transport retries, and forbids changing kind across a retry link. Here `continuation` means outside the initial stage; it does **not** assert B1 behavior for a treatment worker. Use null only for matched-treatment continuation-only scope, which needs no worker partition. - `packets` retains existing packet/attempt IDs, sequence, record ID and hash, adding `input_scope: "initial"` or `"continuation"`. Each in-scope attempt needs exactly one explicit slot. Keep all packets in caller-declared increasing sequence order across the run; do not infer their stages from that order. Missing bytes have null record ID **and** hash. Identical transport retries may reference one archived source record while retaining distinct packet identities. For combined scope, declare both interfaces and include both sets of packet slots. For initial-only scope, set `continuation_input` null and include only initial packet slots, while retaining every worker attempt's stage designation. For continuation-only scope, set `initial_input` null and include only continuation slots; B1 still needs the complete worker partition. Each run in every supplied archive remains assigned exactly once, even if no inputs are available, it failed, or its judgments are unfinished. An unknown initial history stays unknown through the separate completeness flag and missing slots; no failed attempt is dropped. Version 1.1 contexts and reports are explicitly versioned 1.1. The existing human form schema remains version 1.0: each form binds to the complete scope-bearing context hash, and its run judgment covers **all declared in-scope inputs**. Reviewers use packet IDs and exact hash-bound spans as before. A zero for reviewed material does not produce scoped compliance unless all declared scope inventories are complete, all required packets available, and all reviewed. Any confirmed violation remains noncompliant even if other coverage is missing. Adjudication remains separate. Reports label every run's `audit_scope` and provide separate initial/continuation coverage, including declared-attempt denominators, available/reviewed/missing packet counts, and incomplete-inventory/missing-judgment counts by condition and series. Out-of-scope interfaces are explicit, with null inventory completeness; they are not counted as reviewed or compliant. Zero attempt denominators yield null coverage fractions. These are coverage statistics, not automatic per-stage leakage judgments. Reports also group run verdicts by scope so mixed initial-only and combined audits are not silently presented as equivalent coverage. All-assigned-run denominators remain intact, and `whole_run_compliance_certified` is always false. A compliant initial-only audit says nothing about continuation inputs; a compliant continuation-only audit says nothing about the common initial input. Combined scope covers only the two declared interfaces. For the treatment it covers common initial worker requests plus between-turn planner inputs, not later worker request bodies or undisclosed system/chat context. No scope establishes semantic purity, logging completeness, genuine receipt, or absence of unseen leakage. Coordinator stage and completeness declarations still require human scrutiny. Use the same `prepare` and `summarize` commands below; all outputs stay coordinator-only and retrospective. Existing manifest 1.0 rows, context bindings, form schemas and continuation/matched validation behavior are preserved. Their audit scope remains continuation-only; they do not silently acquire initial validation. Existing blank templates are unchanged. Additions are development tooling with unfrozen defaults, not study data. ```sh python3 'Japa two/observation-boundary/audit_boundary.py' prepare \ --manifest /absolute/path/coordinator-audit-manifest.json \ --output /absolute/path/new-coordinator-audit ``` `--registry` optionally selects an explicit compatible registry. The default is the existing manual-assessment registry. The new directory receives byte-preserving packet copies, matching public packets, their mappings/hashes in `audit-context.json`, instructions, and three blank forms: two independent human reviewers and a distinct third adjudicator. These are development defaults; identity labels are coordinator supplied. All observations, evidence and judgments start blank. Context publication is last; a failed preparation has no valid context commit and must not be used. Existing output paths, including broken symlinks, are refused. Never write inside sealed archives. No filesystem permission or blinding guarantee is implied. Structurally malformed supplied packets cause validation failure before a usable audit is published. This is a tooling rejection, not a compliant verdict or a reason to delete the run. Preserve the historical input and assigned cohort; document the failure and use a separately declared human audit or a future compatible adapter. Do not repair a recorded input until this checker passes it. ## Human judgments and separate series Work on copies of the blank forms. For each run, set `violation` to integer 1 (confirmed violation), integer 0 (none confirmed in the reviewed material), or leave null (missing/unfinished). Supply `reviewed_packet_ids`, a reason describing review scope, a UTC completion timestamp, and a form lock timestamp. A finding requires its category, packet ID, packet SHA-256, exact `location` (`start`, `end`, `text`), and human explanation. Offsets are zero-based Unicode code points, half-open, in the unchanged UTF-8 packet, preserving CR/LF/BOM. Findings must cite reviewed supplied packets; duplicate findings and false quotes/hashes are rejected. No quote or valid citation automatically establishes a violation or permission. The proposed category labels are `external_scores_or_assessor_material`, `worker_diagnostics_or_self_reports`, `private_reasoning_or_tool_traces`, `agent_or_harness_code`, `unauthorized_sources_or_history`, and `other_restricted_information`. They organize human explanations of the existing information boundary; they do not introduce new requirements. The planner's own qualitative evaluation is allowed, unlike an external score or assessor answer. Restricted content copied into a valid artifact, instruction, source or memory field may pass every structural check. Human review must decide semantic leakage. Independent forms must be completed and locked before sharing. Adjudicated rows use `independent_judgments: [first_reviewer_value, second_reviewer_value]` in the manifest's reviewer order and a `resolution_note`; both independent judgments and locks must exist first. No automatic verdict copying occurs. Unfinished rows stay blank, rather than encoding uncertainty as a pass or failure. ```sh python3 'Japa two/observation-boundary/audit_boundary.py' summarize \ --context /absolute/path/new-coordinator-audit/audit-context.json \ --forms /absolute/path/reviewer-one.json /absolute/path/reviewer-two.json \ /absolute/path/adjudicator.json \ --output /absolute/path/new-coordinator-summary.json ``` Omit unavailable forms; their entire series remains unassessed. Partial forms retain every run with null rows. Originals, seal commits, copied packets, context, and form bindings are revalidated; ratings are never recalculated from quality scores or pooled across reviewers/adjudication. Output publication is exclusive and atomic. Inputs are never modified. The reversible run-level default is **any confirmed violation**: - Noncompliant: a human confirms at least one violation with supplied evidence, even if other packets or inventory coverage are missing. - Compliant within the declared audit scope: a human zero judgment, declared complete inventory, no missing packets, and all available packets reviewed. A reviewed complete empty inventory also needs an explicit human zero judgment. - Unassessed: everything else, including missing packets/judgments, incomplete inventories, and partially reviewed runs with no confirmed violation. Reports give counts and fractions of **all assigned runs** by condition and rating series, plus missing packet/judgment/review counts. Confirmed-violation frequency always states its assigned-run denominator; with unresolved runs it is only an observed lower bound, not an estimated fully observed violation prevalence. `complete_coverage` additionally requires full packet review even for runs already known noncompliant. Raw independent agreement has an explicit paired-run denominator, using only runs with resolved classifications for both reviewers. Adjudication remains separate. Zero denominators yield null rates. These operational counts use run denominators, not family-weighted artifact-quality scores. No strict-only quality subset or replacement cohort is generated. Structural validity never certifies semantic purity, exhaustive logging, genuine receipt, semantic support, truthful provenance, absence of unseen leakage, or correct tokenizer counts. This retrospective audit cannot repair a systematic filter failure or establish causal quality improvement. Preserve/report such failures under §10 rather than quietly constructing a favorable compliant set. ## Local verification ```sh cd 'Japa two/observation-boundary' python3 -B -m unittest -v test_audit_boundary.py test_b1_contract.py test_initial_contract.py test_b2_contract.py test_b3_contract.py ``` Tests use temporary artificial parser/archival and human numeric fixtures only; they generate no actual study inputs, judgments, or empirical findings.