# Offline declared run-outcome summary Development tooling for [protocol §7](../03-experimental-protocol.md#7-independent-assessment). Untested as study infrastructure; outputs are not experimental evidence. All defaults remain unfrozen. The tool calls no models and calculates no requirement-satisfaction scores. From the repository root, using explicitly selected **existing sealed archives**: ```sh python3 -B 'Japa two/run-sealing/summarize_run_outcomes.py' \ --archives /coordinator/archive-a /coordinator/archive-b ``` The JSON report goes to stdout; errors go to stderr with exit code 2 and no report. Nothing is written to the archives. If saving stdout, choose a separate coordinator-only destination outside all inputs. Reports contain operational identities and paths and must not be distributed as rater packets. Filesystem permissions are not configured by this tool. `--registry PATH` optionally selects a compatible version-1.0 task registry. The default is the existing twelve-task assessment registry. A self-contained archive can instead supply its `registry/task-registry.json`; original source files need not remain available. Matching task/rubric metadata, family membership, criterion mapping, and reference hashes are required; relocation of reference paths is allowed. The twelve-task development set remains an unfrozen default, not a registered sample size. ## Validation and inputs Use archives produced by [seal_runs.py](README.md). Supply archive directories, not packet manifests alone: endpoint-only packet manifests omit runs with no designated deliverable. All supplied archives must pass validation before any summary is emitted; invalid archives are never silently skipped. The authoritative commit is `packet-build-manifest.json` with `batch_sealed: true`. The inventory's informational `state` describes preparation and is not itself a seal. This reader accepts only version-1.0 archive inventories, source inventories, registries, and packet-build manifests. It reuses the sealer's inventory, usage-ledger, and payload validation, verifies byte counts and SHA-256 hashes, checks the archived registry references, and reconciles the complete declared run inventory with the commit's designated endpoints and unassessable-run list. Archive payload paths must stay inside the archive. Run/attempt times, when supplied, must not postdate sealing. Original `source_path` and source-inventory paths are provenance strings, never dereferenced. Duplicate archive paths, seal identities, run IDs, or condition/task/repetition cells across the supplied archives are rejected. Duplicate cells within an archive are rejected by shared sealing validation. Missing commit records, unsealed declarations, inconsistent identities/endpoints, incompatible versions/reference hashes, or corrupt payloads prevent reporting. As in the existing sealer, a version-1.0 archive requires at least one designated endpoint overall; a batch with no endpoints cannot be represented by that contract. This utility does not change that limitation. ## Counts, denominators, and absent cells The reversible default is to use each archived run's **declared `run_status`**. The four literal statuses—`completed`, `incomplete`, `failed`, and `cancelled`—are counted separately. Successful requests or a designated artifact do not imply that the run was completed. An endpoint may exist for an unsuccessful run; unassessable unsuccessful runs remain in the counts. `incomplete` is not silently combined with failure or cancellation. Expected cells are the cross-product of every registry task and each declared condition/repetition combination. When archives form separate shards, repeated declarations of the same condition/repetition are deduplicated by set union; distinct repetition IDs expand expected coverage. The caller must supply the intended collection of archives. Entirely undeclared conditions or repetitions cannot be recovered from absence and are outside this denominator. The report supplies `overall`, `by_condition[condition].summary`, `by_condition[condition].by_family[family]`, and pooled `by_family[family]` groups. Each includes: - `status_counts` and `status_rates_among_observed`: each numerator counts a literal status; its denominator is **all observed archived runs in that group**, including unsuccessful runs. A zero denominator yields a null rate. - `expected_run_cells`, `observed_run_denominator`, `observed_cell_coverage` (observed/expected), and an explicit list/count of `absent_cells`. Absent cells have no assigned run status and never enter a status numerator or observed-run denominator. - `endpoint_availability` with available/not-designated counts and its observed-run denominator, plus the number of runs declaring any artifact records. These are availability facts, not completion or quality judgments. `runs` retains identities, declared statuses, endpoint availability, and archive seal references. `archives` records source archive and hash provenance; `condition_repetitions` exposes the expected-coverage declarations. Separate status denominators and coverage make partial collections visible instead of classifying missing runs as passes or failures. These are descriptive run counts/rates, not the primary equal-task/equal-family quality score; no quality values are imported, pooled, or imputed. `requirement_satisfaction_evaluated` is always false. Declared completion is a task-completion proxy requiring an agreed operational definition before a study. Hashes and consistency checks do not prove truthful status classification, collection completeness, preregistration, prior immutability, or semantic success. The tool neither chooses a best endpoint nor applies the protocol's possible missing-artifact quality-score rule. Satisfaction and assessed regressions remain the responsibilities of the separate assessment utilities. ## Fixture tests ```sh cd 'Japa two/run-sealing' python3 -B -m unittest -v test_run_outcomes test_seal_runs ``` These tests create and remove temporary artificial metadata/text archives, without task answers or purported study findings. They cover literal statuses, endpoint independence, missing cells and zero denominators, shard/repetition declarations, duplicate cells, incompatible versions, missing seals, hash/commit inconsistency, archive containment, relocation, and read-only operation. Existing sealing tests also exercise packet-builder compatibility and unsuccessful-run retention.