Repository navigation
Description
Summary
Audit, strengthen, and simplify Polylogue's verification-lab/proof/scenario machinery so serious verification claims are backed by executable evidence, runtime observations, or explicit architectural boundary checks.
This is not an anti-verification cleanup. The intent behind the current machinery is real and should be preserved: Polylogue should have automated ways to verify as many important aspects of the system as viable. The issue is that vacuous, self-attesting, or implementation-locking abstractions can obscure reality and make future agents trust evidence that did not actually test anything.
This is a focused refinement from the broader backlog pass in #852. It does not replace #806 or #807; it sharpens them by removing or demoting the parts of the verification setup that can look rigorous without proving behavior.
Audit evidence
The current verification surface is large and partly useful, but it mixes real mechanisms with ceremonial metadata:
polylogue/proof/models.pydefaults new claims tooracle="construction_sanity",assertion_source="proof_catalog",observation_source="repo_static_analysis",independence_level="independent", andseverity="serious". That lets serious/independent-looking claims exist without an explicit oracle choice.polylogue/proof/catalog.pyhas many default claims and runner bindings. The catalog quality checks are valuable, but much of the assurance is metadata completeness rather than independent behavior checks.polylogue/proof/catalog.pystamps runner trust metadata from static catalog values such ascode_revision="catalog-reviewed"and a fixed review timestamp. That is authored metadata, not a run artifact or freshness signal.- Generated scenario evidence in
polylogue/proof/runners.pyvalidates scenario/projection metadata, but does not necessarily execute the scenario behavior it represents. polylogue/showcase/invariants.pycontains aclean_stderrinvariant that currently returns success unconditionally because Click runner output merges stderr into stdout.AssertionSpecinpolylogue/scenarios/assertions.pydefaults to exit-code-only success. Validation lane builders indevtools/validation_lane_base.pyuse default assertions by default, so a lane can pass while checking only process shape.docs/plans/test-quality-coverage.yamlstill records gaps for fuzzing, flakiness tracking, and mock-depth measurement, and some manifest references appear stale after recent cleanup.devtools verify-layeringappears to protect a real architectural boundary when it prevents substrate packages from importing CLI/MCP/site/UI adapters.devtools verify-topology/docs/plans/topology-target.yamlare more suspect: they can usefully catch orphaned files and root-kernel drift, but they can also freeze exact module placement, owner labels, and source package shape in a way that constrains implementation rather than protecting behavior.
Judgment framework
Classify each verification surface before keeping, strengthening, or deleting it:
Keep and strengthen when it verifies reality
A verification surface is real if it can fail for a meaningful system regression and points to a concrete fix. Good examples:
- parser crashlessness, null handling, schema drift, and provider fixture replay;
- idempotent archive writes and content-hash honesty;
- FTS/search parity and query contract behavior;
- daemon cursor, retry, parse-failure, and status behavior;
- API/CLI/MCP/web-reader contract parity;
- security/privacy boundaries;
- executable scenario or lab checks with meaningful assertions;
- observability signals that expose ingest lag, failure counts, degraded status, cursor health, and repairability.
Strip or demote when it is vacuous
Remove or demote checks that cannot fail except by metadata churn, or that only prove that a catalog entry describes itself. Metadata completeness can be useful, but it must be labeled as metadata/spec completeness rather than behavior proof.
Re-scope when it locks implementation shape
Structural checks should protect stable architectural contracts, not freeze arbitrary file/module organization. In particular, audit source/topology checks for whether they protect one of these real boundaries:
- substrate packages must not import surfaces;
- source acquisition/parsing must not depend on CLI/MCP/site/UI adapters;
- provider detection/parsing behavior stays covered as providers evolve;
- generated docs/manifests do not reference missing files;
- root package files remain a small explicit kernel if that is still an intentional architecture rule.
If a topology/source check only enforces today's file placement or naming taxonomy without protecting one of those boundaries, make it advisory, delete it, or replace it with behavior/import-contract tests.
Scope
Classify and prune proof claims
- Classify each proof claim as one of:
- executable behavior check;
- runtime/observability evidence;
- structural architectural-boundary check;
- metadata/spec completeness check;
- manual review assertion.
- Serious correctness claims must name an explicit oracle, observation source, independence level, assurance domain, and executable or runtime evidence mechanism.
- Remove or demote metadata-only claims that cannot be made valuable.
- Make Proof Pack output distinguish executable/runtime evidence from metadata/spec completeness so PR agents do not treat both as equivalent.
Replace self-attesting trust metadata
- Stop treating fixed catalog review timestamps or
catalog-reviewedrevisions as evidence freshness. - Derive trust/freshness metadata from actual command runs, git revisions, committed witness artifacts, daemon/status observations, or explicitly mark it as authored metadata.
- Ensure
devtools proof-pack --checkor an equivalent gate fails on serious claims that lack real evidence routing.
Strengthen scenario and lane assertions
- Delete or repair the vacuous
clean_stderrinvariant. - Require validation lanes to declare non-default assertions when they claim semantic coverage; otherwise label them as smoke/process lanes.
- Pair generated scenario/projection claims with executable scenario runners where possible, or demote them to spec completeness.
- Add invariants for archive-visible behavior where harnesses currently check only exit code, JSON validity, or nonempty output.
Audit topology, source, and manifest gates
- Decide which topology checks are blocking, advisory, or obsolete.
- Keep structural gates that protect ring boundaries or source/surface separation.
- Demote checks that freeze exact file placement, owner labels, or source package taxonomy without protecting a behavioral or architectural contract.
- Replace implementation-shape checks with import-boundary checks, behavior tests, generated-doc freshness checks, or source/provider replay tests where that better matches the intent.
- Refresh stale quality/scenario/topology manifest entries so they describe the live tree after feat(daemon): replace run ingest with observable convergence (#845) #847.
Fold in harness and observability gaps
- Decide whether fuzz targets should run in a focused lab/CI lane or stay explicitly out-of-band; document the decision in the lane catalog.
- Add a concrete flakiness evidence path or remove stale flakiness language from the quality manifest.
- Add mock-depth visibility for high-risk surfaces, or explicitly move that gap to test(archive): systematic test architecture — catalog-driven invariants across all domains #807 with a measurable acceptance criterion.
- Identify which runtime observability signals should double as verification evidence for daemon/live ingest: cursor progress, ingest attempts, raw failure taxonomy, parse/quarantine counts, repair state, queue lag, and degraded-health reasons.
- Coordinate observability-driven checks with fix(daemon): surface raw validation and parse failures in ingest/status #844 and feat(daemon): add tiered health, backup, alerts, maintenance #830 instead of inventing a separate proof vocabulary for runtime health.
Non-goals
- Do not delete useful verification mechanisms just because they are imperfect.
- Do not preserve vacuous abstractions just because the intent behind them is good.
- Do not turn this into a broad test-writing campaign; test(archive): systematic test architecture — catalog-driven invariants across all domains #807 owns catalog-driven test architecture.
- Do not freeze implementation layout unless the check protects a durable architectural boundary.
- Do not duplicate architecture prose from
docs/architecture.mdordocs/internals.md. - Do not make Proof Pack more jargon-heavy. The output should become plainer about what was actually executed or observed.
Dependencies
- Coordinates with fix(verification): verifiability infrastructure — wire missing bridges, activate dead systems #806 for activating proof/evidence infrastructure.
- Coordinates with test(archive): systematic test architecture — catalog-driven invariants across all domains #807 for new invariant/property/fuzz coverage.
- Coordinates with refactor(core): structural simplification — delete vacuous abstractions, collapse parallel implementations #805 where simplification requires deleting dead verification abstractions or generated surfaces.
- Coordinates with fix(daemon): surface raw validation and parse failures in ingest/status #844 and feat(daemon): add tiered health, backup, alerts, maintenance #830 where observability/status signals become verification evidence.
- Feeds chore(backlog): daemon-first execution graph after #847 #852 Phase F as the verification-quality and pruning slice.
Acceptance criteria
- A claim/surface inventory exists that marks each proof, scenario, validation-lane, topology, source, and manifest gate as executable behavior, runtime evidence, architectural-boundary, metadata/spec, manual-review, advisory, or obsolete.
- Serious proof claims cannot rely on default oracle/independence/observation metadata.
devtools proof-pack --checkor an equivalent gate reports/fails serious claims that lack executable or runtime evidence routing.- Metadata-only scenario/projection checks are labeled as such in generated reports and are not counted as behavior proof.
- The vacuous
clean_stderrinvariant is removed or replaced with a runner that actually captures stderr. - Validation lanes that are exit-code-only are visibly labeled as smoke/process lanes, not semantic proof.
- Topology/source gates are either tied to explicit architectural contracts, made advisory, or removed.
- Runtime observability signals needed for verification are listed and linked to fix(daemon): surface raw validation and parse failures in ingest/status #844/feat(daemon): add tiered health, backup, alerts, maintenance #830 implementation work.
- Stale quality/scenario/topology manifest entries are refreshed or moved to explicit follow-up issues.
- A focused verification command set is recorded for PR agents, distinguishing cheap inner-loop checks from broad gates and distinguishing behavior evidence from structural/advisory checks.
Verification
Expected focused checks for this issue:
devtools render-verification-catalogdevtools proof-pack --checkdevtools verify-layeringdevtools verify-topologyafter deciding which topology findings should remain blockingdevtools render-all --check- targeted pytest for proof runners, scenario assertions, validation lanes, topology/layering tools, and Proof Pack rendering
devtools verify --labonce the claim/lane changes are coherent
Activity
Sinity commentedon May 6, 2026
Refinement: walk back custom abstractions before deleting real checks
Interpret this issue as a request to prune the abstraction layer first, not to throw away useful underlying verification.
Preferred direction:
devtoolscommands.So the default fix is often:
This especially applies to source/topology/proof surfaces. The question is not whether the intent is valid; it is whether Polylogue needs a bespoke abstraction there, or whether a standard test/import check/manifest freshness check gives the same or better evidence with less conceptual weight.
Sinity commentedon May 6, 2026
Execution split
This issue is now the verification-pruning umbrella. The project audit found three concrete child issues that can run as bounded PRs:
polylogue/storage/blob_gc.pyTBD.Keep this umbrella open until those children have either landed or produced a smaller follow-up list. The closeout for #853 should summarize which abstractions were preserved, flattened, demoted, or deleted, and why.
Sinity commentedon May 6, 2026
Additional audit evidence from deeper pass
Three concrete verification-surface findings should feed the #853 closeout matrix:
devtools affected-obligations --jsonreports no affected obligations or inner-loop checks, whiledevtools proof-pack --jsonstill reports 533 stable affected obligations and 32 required gates. refactor(proof): make Proof Pack evidence taxonomy actionable #855 owns separating baseline/stable catalog context from change-specific required gates.devtools verify-test-ownershipis an import/ownership map, not behavior coverage. It currently reports zero uncovered modules by import reachability, with two orphan structural tests. test(archive): systematic test architecture — catalog-driven invariants across all domains #807 should consume it as discoverability signal, not proof that contracts are tested.devtools verify-witness-lifecyclehas real metadata checks, but freshness is currently based on authoredlast_exercised_atmetadata unless connected to actual replay/test artifacts. fix(verification): verifiability infrastructure — wire missing bridges, activate dead systems #806 owns either wiring replay evidence or labelling freshness as authored metadata.These reinforce the pruning rule: preserve checks that fail for real regressions, but label import presence, authored freshness, and baseline catalog context honestly so agents do not over-trust them.
Refs #855 #807 #806.
Sinity commentedon May 7, 2026
Reconnaissance Report for #853
Date: 2026-05-07 | Wave: 6 (UMBRELLA — closeout only)
Agent: Codebase exploration complete.
Status: Children completed
All three children have been MERGED:
EvidenceTaxonomyadded tomodels.py, report restructured with actionable/does-not-block groupingverify-layeringstays blocking,verify-cluster-cohesionandverify-cross-cutsare advisory,blob_gc.pyTBD resolvedclean_stderrinvariant deleted —AssertionClassenum added, generated scenario runners labeled withevidence_noteBuild this (closeout summary)
This issue is now purely a closeout umbrella. The actual implementation work happened in #855/#856/#857. What remains is documentation: categorize every verification surface into one of four buckets and summarize why.
1. Preservation matrix — what survived and why
EvidenceTaxonomy(executable_behavior/observability/architectural_static/metadata_spec/manual_review/advisory)models.pylines 59-66, used byproof_pack.pybuild_proof_packreport (taxonomy-grouped markdown)proof_pack.pybuild_slop_dashboard(anti-vacuity)proof_pack.pylines 427-518verify-topology— orphans/missing/conflicts/kernel_ruleverify-layering(substrate-vs-surface import boundary)verify-test-ownership(import/ownership map)runners.py)showcase/invariants.py)json_valid,exit_code,nonempty_outputare real checks;clean_stderrwas deleteddevtools verifypipeline2. Flattened — custom wrappers removed, underlying checks kept
_check_clean_stderrshowcase invariantshowcase/invariants.pyandSHOWCASE_INVARIANTSregistry. No underlying check lost.evidence_notelabeling3. Demoted — from blocking to advisory/metadata
verify-cluster-cohesionverify-cross-cutsrender-topology-statusrender-all --checkverify-topologyTBD cells--strict-tbd4. Deleted — vacuous abstractions
_check_clean_stderr()inshowcase/invariants.pyNone(pass) without checking stderrAssertionSpec()is nowSMOKE_PROCESS— visibly not semantic proofRemaining gaps (noted for follow-ups, NOT blocking closeout)
Clean-tree routing mismatch:
devtools affected-obligations --jsonreports no affected obligations, whiledevtools proof-pack --jsonstill reports 533 stable obligations and 32 required gates. refactor(proof): make Proof Pack evidence taxonomy actionable #855 separated baseline catalog context from change-specific gates, but the mismatch in zero-change mode may still be confusing for agents. Follow-up: Add aclean_treeflag (already done in refactor(proof): make Proof Pack evidence taxonomy actionable #855) to distinguish catalog stats from diff obligations.Witness lifecycle freshness is authored metadata:
devtools verify-witness-lifecycle --jsonbases freshness on authoredlast_exercised_at, not actual replay/test artifacts. fix(verification): verifiability infrastructure — wire missing bridges, activate dead systems #806 owns either wiring replay evidence or labeling freshness honestly. Tracked in fix(verification): verifiability infrastructure — wire missing bridges, activate dead systems #806 comment.verify-test-ownership is an import map, not coverage: It reports 806 covered modules for 719 production modules (more covered than exist!) because it marks ancestors/descendants as covered by import reachability. test(archive): systematic test architecture — catalog-driven invariants across all domains #807 owns consuming this as discoverability. Tracked in test(archive): systematic test architecture — catalog-driven invariants across all domains #807 comment.
527 of 534 obligations are
construction_sanity-classified: From the proof catalog:Counter(oracle) = {'construction_sanity': 28 claims}, meaning most claims default to metadata/spec classification. The 17 claims that need explicitoracle=overrides are tracked in fix(verification): verifiability infrastructure — wire missing bridges, activate dead systems #806.Orphan devtools scripts: The audit found 3 orphaned devtools scripts not wired into
devtools verify. Identify and wire them (or delete if truly unused). Tracked in refactor(core): structural simplification — delete vacuous abstractions, collapse parallel implementations #805.Do NOT build this in closeout
Files to touch (closeout documentation only)
docs/verification-catalog.mddocs/plans/assurance-domains.yamlCoordination
Focused tests (verification that closeout is coherent)
Acceptance criteria (closeout only)
Close when a comment on this issue summarizes:
Ambiguities / Stale comments
runners.pyproduces real git revision and dirty state via_git_revision()and_git_dirty_state(). But witness lifecycle freshness remains authored. This is tracked in fix(verification): verifiability infrastructure — wire missing bridges, activate dead systems #806, not a blocker for refactor(verification): replace ceremonial proof layers with executable evidence #853 closeout.AssertionSpec()isSMOKE_PROCESS, andprint_laneshowsassertion: smoke/process. The two broken lanes still need fixing (fix(verification): verifiability infrastructure — wire missing bridges, activate dead systems #806).Closeout verdict
The three children are merged. All implementation work for #853 is complete. This issue is ready for closeout once the preservation/flattening/demotion/deletion summary is written as a final comment.
Sinity commentedon May 7, 2026
#853 Closeout — Verification Pruning Implementation Complete
All three child issues (#855, #856, #857) are merged. This comment closes #853.
Preserved
EvidenceTaxonomy— 6-category classification (executable_behavior, observability, architectural_static, metadata_spec, manual_review, advisory) inpolylogue/proof/models.pydevtools verifypipeline — format/lint/mypy/render/topology/layering/budgets/ownership/roundtrip/cross-cuts/suppressions/manifests/witness-lifecycle/proof-packFlattened
_check_clean_stderr()— deleted (always returned success without checking stderr)evidence_note="metadata/spec completeness"(not semantic proof)Demoted
verify-cluster-cohesionandverify-cross-cuts— advisory only--strict-tbdconstruction_sanity(527 of 534 obligations) — classified as metadata_spec, not behavior evidenceDeleted
_check_clean_stderr()function — vacuous invariant, never checked anything meaningfulFollow-ups
verify-test-ownership(import reachability ≠ behavior coverage)Refs #855 #856 #857 #806 #807 #805