Repository navigation
Description
Purpose
Polylogue has useful verification assets, but the current showcase/QA layer mixes several different jobs into one hard-to-reason-about verification spine: product demo data, CLI help baselines, subprocess checks, generated reports, VHS tape scaffolding, scenario projections, and validation-lane metadata.
The latest verifiability chatlog at /realm/inbox/download/6a35bffd-84fc-83eb-aeb5-74592f8cbcfb.md changes the earlier conclusion: do not delete demo, synthetic data, real CLI subprocess checks, or visual tests. Those are valuable. The thing to remove is the miniature QA bureaucracy that sits between those behaviors and ordinary tests.
Parent: #1807
Related: #2177 owns broader contract/surface cleanup. This issue owns the demo/showcase/visual verifiability revamp so #2177 does not become an unbounded test-suite rewrite.
Sister Sinex issue: Sinity/sinex#1981 owns the narrower Sinex test-pattern/gate-cadence cleanup extracted from the same chatlog.
Current diagnosis
Latest chatlog override
The later part of /realm/inbox/download/6a35bffd-84fc-83eb-aeb5-74592f8cbcfb.md supersedes the softer advice about improving coverage-owner maps and exemption files. The preferred direction is not better metadata around tests. It is fewer verification subsystems and more ordinary tests whose assertions already explain the behavior.
Concrete implication: do not repair devtools verify test-coverage-contracts by growing docs/plans/test-coverage-exemptions.yaml. That repeats the owner-map problem. Mine the useful signal from that checker, add direct behavioral tests for the named modules, then delete or park the checker as a manual diagnostic if it is no longer pulling its weight.
Target model:
1. ordinary unit tests
2. parametrized behavior matrices
3. property tests where the domain is parser/algebraic
4. a few integration tests using shared fixtures
5. manual scripts for demos, benchmarks, live checks, and visual artifacts
Remove or demote as first-class verification mechanisms unless implementation proves a specific behavior would be lost:
generated quality catalogs
scenario projection catalogs
validation lane catalogs
topology target matrices
closure matrices
showcase baselines
QA/showcase runners as tests
tests that validate lane metadata instead of behavior
tests that validate CI workflow structure while CI is intentionally disabled
coverage-owner/exemption maps
The good pieces are real:
polylogue import --demoalready materializes a deterministic demo corpus and schedules daemon ingest.polylogue/scenarios/corpus.pyowns deterministic demo sessions and source specs.seed_demo_user_overlays(...)adds useful demo overlays: tags, notes, saved views, marks, and assertions.tests/unit/cli/test_import.pychecks theimport --demoscheduling path.tests/unit/scenarios/test_demo_archive_convergence.pyproves the synthetic demo archive can converge in process.tests/integration/test_demo_daemon_convergence.pyproves the daemon path eventually ingests the demo archive.tests/visual/*already exercise the daemon reader through real HTTP routes and DOM assertions.
The problematic pieces are also real:
polylogue/showcase/exercise_catalog.jsonand generated help baselines have repeatedly drifted behind the actual CLI command surface.- The showcase layer proves catalog/report/scaffolding behavior more than product behavior.
- VHS generation currently assumes an already-correct shell/archive environment instead of declaring and verifying its own demo state.
devtools lab scenario verify-baselinesand related showcase lanes keep a second verification vocabulary alive where ordinary pytest would be clearer.- Large piles of full help snapshots churn when command text moves, but do not prove much beyond what a semantic Click help inventory can prove.
Target shape
Keep the useful behaviors, but move them into simpler owners:
polylogue.demo
product-grade deterministic demo seed/verify helpers
tests/infra
demo archive fixture, CLI subprocess runner, shared assertion helpers
tests/unit/cli and tests/integration/cli
semantic CLI routing, JSON, error, and demo-surface tests
tests/visual
browserless reader DOM/API tests over demo and synthetic archives
devtools visual
optional screenshot/VHS recording commands backed by a verified demo archive
The verification spine should become ordinary pytest plus a few thin devtools conveniences. It should not be a scenario catalog, QA report generator, proof ledger, or command fossil bed.
Scope
1. Product-grade demo commands
Add explicit demo primitives so the product can distinguish “daemon accepted this source” from “archive is ready now”:
polylogue demo seed --root <dir> --force --with-overlays
polylogue demo verify --root <dir> --format json
polylogue import --demo --wait --timeout 30 --with-overlays
polylogue demo script --shell bashExpected semantics:
demo seedcreates a ready-to-query deterministic archive immediately, without relying on daemon scheduling.demo verifychecks semantic facts: session count, message count, known demo IDs, queryability, overlay presence when requested, and absence of private absolute path leaks.import --demo --waitkeeps the realistic daemon ingest path but waits for convergence and then runs the same verifier.demo scriptprints a copy-pastable environment and representative command script for docs and visual recordings.
2. Demo fixture ownership
Split stable demos from broad synthetic generation:
- Keep synthetic corpus generation for breadth, fuzz-ish fixtures, and variable-size archives.
- Add a stable demo fixture world for user-facing demos and visual recordings.
- Prefer a layout like:
polylogue/demo/
fixtures.py
seed.py
verify.py
overlays.py
tests/data/demo-fixture-world/v1/
chatgpt/demo-00.json
claude-code/demo-00.jsonl
codex/demo-00.jsonl
manifest.json
A materialization check/update command is acceptable, but the normal demo path should use the committed representative fixture rather than silently changing whenever the synthetic generator changes.
3. Replace showcase QA with ordinary tests
Introduce direct behavior tests instead of exercising a showcase catalog:
tests/unit/cli/test_help_inventory.py: every registered Click command has working help and a substantive description.tests/unit/cli/test_query_first_routing_matrix.py: direct verbs,find ... then ..., root filters, ops dispatch, rejected ambiguous grammar, and useful error guidance.tests/unit/cli/test_demo_cli_surface.py: real CLI invocations against a seeded demo archive.tests/unit/cli/test_cli_json_contracts.py: representative JSON-producing commands parse and expose stable envelope facts.tests/unit/cli/test_cli_error_boundaries.py: invalid-input matrix for shared CLI validation boundaries.tests/integration/cli/test_import_demo_daemon.py: daemon import demo path, eventually usingimport --demo --wait.tests/unit/demo/test_demo_seed_verify.py: seed/verify behavior.tests/visual/test_reader_demo_archive.py: reader UI against the demo archive.
Do not repeat backend semantics through every UI layer. Backend/query/storage behavior should have exhaustive backend tests; CLI/daemon/MCP/web tests should prove routing, envelopes, auth/errors, and rendering on representative cases.
4. Redesign visual and VHS support
Keep visual evidence, but remove dependence on showcase exercises.
- Keep and expand browserless
tests/visualDOM/API tests. - Add
devtools visual smokeas a thin wrapper overpytest tests/visualif useful. - Add
devtools visual record --case .../--allonly as demo artifact generation, not as the primary correctness oracle. - Generate VHS/screenshot runs from explicit visual cases that seed/verify their own demo environment.
- Store generated recordings under
.local/visual/<run-id>/with a manifest recording fixture version, Polylogue version, commands, outputs, and verifier status.
VHS/GIF output is a presentation artifact. Correctness belongs in pytest DOM/API/screenshot checks.
5. Retire the showcase bureaucracy after replacement exists
After replacement tests and demo commands exist, remove or move the old layers:
Move/rewrite if still useful:
polylogue/showcase/workspace.py->tests/infra/demo_workspace.pyorpolylogue/demo/workspace.pypolylogue/showcase/cli_boundary.py->tests/infra/cli_subprocess.pypolylogue/showcase/vhs.py->devtools/visual/vhs.py- demo-specific pieces of
polylogue/scenarios/corpus.py->polylogue/demo/fixtures.py
Delete once replaced:
polylogue/showcase/exercise_catalog.json- showcase catalog/model/dimension/generator/invariant layers
qa_runner*,qa_markdown,qa_summary,report*,showcase_report*, and runner layers- orphaned
polylogue/cli/shared/qa_*helpers if no public command uses them tests/baselines/showcase/*.txtexcept any consciously retained root-help snapshot- most
tests/unit/showcase/*, rewritten into direct demo/CLI/visual tests where still valuable - stale docs that mention non-existent
polylogue audit --only exercisesstyle commands
Compression targets from the chatlog
These are not all required in the first PR, but they are good candidates while touching the verification surface:
- Convert
tests/unit/archive/test_paste_boundary_resolution.pyinto a visible decision matrix. - Convert repeated runtime-health checks in
tests/unit/cli/test_check_runtime.pyinto parameterized check-name cases. - Convert validation-lane command/dry-run tests into table-driven cases.
- Convert CLI invalid-input tests into a shared error-boundary matrix.
- Consolidate repeated user-state HTTP resource tests into a resource contract table if that surface still exists after refactor: make Polylogue contracts own surfaces and delete parallel dispatch #2177 work.
- Keep HTML sanitizer security tests visibly separate, but share case builders.
The rule is: compress duplicated test implementation, not observability. If a case needs a distinct test identity for failure triage, keep named ids or generated named tests.
Concrete file-level migration targets
The chatlog named several specific compression/refactor candidates. Treat these as source-level guidance, not as a requirement to make one giant mechanical PR. The goal is to make behavioral laws visible and remove bespoke scaffolding.
tests/unit/cli/test_check_runtime.py
Current pattern: many near-identical readiness tests such as:
test_runtime_health_includes_db_writable_check
test_runtime_health_includes_schema_version_check
test_runtime_health_includes_fts_tables_check
test_runtime_health_includes_sqlite_vec_check
test_runtime_health_includes_archive_root_writable_check
test_runtime_health_includes_render_root_writable_check
test_runtime_health_includes_config_home_check
test_runtime_health_includes_terminal_check
test_runtime_health_includes_ui_libraries_check
test_runtime_health_includes_vhs_check
Target: one parameterized readiness-check matrix with stable case ids:
@pytest.mark.parametrize(
"check_name",
[
"db_writable",
"schema_version",
"fts_tables",
"sqlite_vec",
"archive_root_writable",
"render_root_writable",
"config_home",
"terminal",
"ui_libraries",
"vhs",
],
ids=str,
)
def test_runtime_health_includes_expected_check(runtime_config, check_name):
result = run_runtime_health(runtime_config)
assert check_name in {check.name for check in result.checks}Keep separate tests only where a check has genuinely distinct setup or failure semantics.
tests/unit/archive/test_paste_boundary_resolution.py
Current pattern: many one-off tests encode one priority law:
test_all_three_sources_agree_exact
test_history_only_exact
test_history_exact_trumps_hook
test_hook_only_projected
test_hook_projected_even_with_normal_text
test_hash_only
test_hash_only_with_normal_text
test_heuristic_only_paste_marker
test_heuristic_only_forwarding_pattern
test_priority_exact_over_hash_only
test_priority_hook_over_hash_only
Target: a visible priority decision table:
@pytest.mark.parametrize(
"history, hook, hash_hit, message_text, expected_boundary, expected_reason",
[
pytest.param(..., id="all-three-exact"),
pytest.param(..., id="history-only-exact"),
pytest.param(..., id="history-trumps-hook"),
pytest.param(..., id="hook-only-projected"),
pytest.param(..., id="hash-only"),
pytest.param(..., id="heuristic-paste-marker"),
],
)
def test_paste_boundary_resolution_matrix(...):
...This should make precedence readable in one place rather than scattered across tiny tests.
tests/unit/devtools/test_validation_lanes.py
Current pattern: repeated command-shape and dry-run assertions:
cmd = build_lane_command(LANES["..."])
assert cmd[0] == "pytest"
assert "some/test/path.py" in cmd
exit_code = main(["--lane", "...", "--dry-run"])
assert exit_code == 0
assert "child-lane" in captured.outTarget: split command cases from composite dry-run cases:
LANE_COMMAND_CASES = [
("semantic", ["tests/unit/semantic"]),
("retrieval", ["tests/unit/retrieval"]),
("embeddings", ["tests/unit/embeddings"]),
]
COMPOSITE_DRY_RUN_CASES = [
("archive-intelligence", ["query-routing", "archive-contract"]),
("source-runtime", ["source-laws", "runtime-health"]),
]Then assert the common laws once per case. Keep lane-specific tests only for lanes with non-standard behavior.
tests/unit/pipeline/test_ingestion_chaos.py
Current timestamp normalization examples are good regression anchors but should be a table:
test_epoch_one_day_as_string
test_y2038_as_string
test_just_past_y2038
test_year_2100_timestamp
test_far_future_iso_string
test_epoch_float
test_epoch_string
test_iso_with_z_suffix
test_float_with_microseconds
Target:
@pytest.mark.parametrize(
"raw_value, expected",
[
("86400", ...),
("2147483647", ...),
("2147483648", ...),
("4102444800", ...),
("2100-01-01T00:00:00Z", ...),
(0.0, ...),
],
ids=[
"epoch-one-day-string",
"y2038-string",
"past-y2038",
"year-2100",
"iso-z",
"epoch-float",
],
)
def test_timestamp_normalization_examples(raw_value, expected):
...Then add one Hypothesis property for the accepted timestamp domain. Keep examples as named regression anchors.
tests/unit/cli/test_archive_query.py
This file is large and mixes concerns. The chatlog identified an obvious block-stripping cluster:
test_strip_tools_removes_tool_use
test_strip_tools_removes_tool_result
test_strip_tools_keeps_other_blocks
test_strip_thinking_removes_thinking
test_strip_thinking_keeps_other_blocks
test_strip_all_keeps_prose
Target matrix:
@pytest.mark.parametrize(
"block_type, strip_tools, strip_thinking, should_keep",
[
("tool_use", True, False, False),
("tool_result", True, False, False),
("thinking", False, True, False),
("text", True, True, True),
],
)
def test_archive_query_block_stripping_policy(...):
...Also consider splitting the file by concern instead of keeping a 100+ test-function catchall:
test_archive_query_parse.py
test_archive_query_execution.py
test_archive_query_formatting.py
test_archive_query_block_stripping.py
test_archive_query_errors.py
Do not blindly compress the whole file. Split where it improves locality and table-drive only clear law matrices.
tests/unit/cli/test_cli_error_boundaries.py
If invalid-input tests are scattered or duplicated, consolidate them into a shared error-boundary matrix:
@pytest.mark.parametrize(
"args, expected_message",
[
(["--limit", "nope"], "invalid"),
(["--limit", "-1"], "greater than"),
(["--min-messages", "nope"], "invalid"),
(["--max-messages", "nope"], "invalid"),
(["--min-words", "nope"], "invalid"),
],
)
def test_cli_rejects_invalid_inputs(args, expected_message, cli_runner):
result = cli_runner(args)
assert result.exit_code != 0
assert expected_message in result.outputtests/unit/daemon/test_user_state_http.py
If this surface still exists after #2177 absorbs user-state into ops state, migrate repeated resource tests into a resource contract table for:
annotation
view
pack
workspace
Target shape:
RESOURCE_CASES = [
ResourceCase("annotation", "/user/annotations", valid_payload, invalid_payload),
ResourceCase("view", "/user/views", valid_payload, invalid_payload),
ResourceCase("pack", "/user/packs", valid_payload, invalid_payload),
ResourceCase("workspace", "/user/workspaces", valid_payload, invalid_payload),
]
@pytest.mark.parametrize("case", RESOURCE_CASES, ids=lambda c: c.name)
def test_user_state_resource_crud_contract(case, client):
...tests/unit/cli/commands/test_status.py or current status-test location
Repeated tier-status tests should become a tier matrix where setup differs but the contract is shared:
index tier with sessions
source tier with raw sessions
user tier with annotations/assertions
embeddings tier with embedding status
ops tier with ingest attempts
Use tier_name, seed_fn, expected_status cases. Keep separate tests only for distinct error boundaries or auth/format behavior.
HTML sanitizer tests
The chatlog saw overlap between:
tests/unit/rendering/test_html_sanitizer.py
tests/unit/rendering/test_html_sanitizer_security.py
Keep the security file visibly separate because its failure semantics are different. Share case builders/fixtures instead of flattening security and rendering behavior into one table.
Current verification gaps to fold into this revamp
These are concrete current-state concerns from the chatlog and should be verified against the live tree before implementation:
devtools verify test-coverage-contractsreportedly named these uncovered large modules:
polylogue/archive/query/archive_execution.py
polylogue/archive/query/expression.py
polylogue/archive/query/unit_results.py
polylogue/cli/commands/maintenance.py
polylogue/cli/read_view_handlers.py
polylogue/cli/shell_completion_values.py
polylogue/insights/run_projection.py
polylogue/readiness/__init__.py
For each, either add direct tests, improve the contract checker's ownership mapping, or write a real exemption explaining the indirect owner and expiry condition. Do not leave “no dedicated test file” as a risk rationale.
docs/plans/test-coverage-exemptions.yamlreportedly has dozens of exemptions. Audit these for actual risk rationale, owning tests, and expiry criteria.docs/test-quality-workflows.mdreportedly listed uncovered runtime operations such as mutation actions and maintenance targets. Those should become tests, explicit non-goals, or owned contract-lane entries.devtools verify coverageis heavier than the PR default. Decide whether CI needs a small PR-safe behavioral pytest slice or a scheduled/master-only coverage gate, and document the cadence.- Replace a blunt global coverage floor with a ratchet-style policy where practical: global floor cannot decrease, changed-package floor cannot decrease, new large modules need tests or real exemptions, and critical domains have explicit floors.
- Treat host-clock allowlists as debt: allowed tests should either use
frozen_clockor carry a clear reason they must read wall clock.
Concrete removal and demotion candidates
The chatlog named these Polylogue verification layers as removal candidates. Do not delete blindly; first identify any actual product behavior they own, move that behavior into ordinary tests or thin manual commands, then remove the layer.
Validation/catalog/projection layer:
devtools/quality_registry.py
devtools/authored_scenario_catalog.py
devtools/scenario_projection_catalog.py
devtools/scenario_projections.py
devtools/validation_catalog.py
devtools/validation_lane_catalog_contracts.py
devtools/validation_lane_catalog_live.py
devtools/validation_lane_runtime.py
devtools/run_validation_lanes.py
devtools/lane_models.py
devtools/render_quality_reference.py
Corresponding tests that should be deleted or rewritten into behavior tests:
tests/unit/devtools/test_validation_lanes.py
tests/unit/devtools/test_quality_registry.py
tests/unit/devtools/test_authored_scenario_catalog.py
tests/unit/devtools/test_scenario_projections.py
tests/unit/devtools/test_executable_scenarios.py
tests/unit/devtools/test_render_quality_reference.py
tests/unit/devtools/test_scenario_coverage.py
tests/unit/devtools/test_artifact_graph.py
Generated planning/status surfaces to delete, demote to manual docs, or stop rendering if they are not user-facing build outputs:
docs/test-quality-workflows.md
docs/topology-status.md
docs/plans/test-quality-coverage.yaml
docs/plans/scenario-coverage.yaml
docs/plans/oracle-quality.yaml
docs/plans/campaign-coverage.yaml
docs/plans/test-closure-matrix.yaml
docs/plans/topology-target.yaml
docs/plans/test-coverage-domains.yaml
Showcase/QA layer to remove after replacement behavior exists:
polylogue/showcase/**
tests/unit/showcase/**
tests/baselines/showcase/**
devtools/lab_scenario.py
Also audit and remove references from:
polylogue/__init__.py
polylogue/cli/shared/qa_capture.py
polylogue/cli/shared/qa_requests.py
polylogue/cli/shared/qa_snapshot.py
polylogue/readiness/__init__.py
polylogue/operations/specs.py
devtools/pipeline_probe/engine.py
Synthetic/demo naming cleanup:
polylogue/schemas/synthetic/showcase.py
should become either polylogue/schemas/synthetic/demo.py for manual/demo data or tests/infra/corpus.py for test fixture generation. Do not keep showcase as a correctness-testing concept.
Replacement harnesses under tests/infra
Reusable test abstractions should live in tests/infra, not in devtools registries. The target is small helpers consumed by ordinary pytest modules.
Archive fixture builder:
# tests/infra/archive.py
@dataclass(frozen=True)
class SessionRow:
id: str
source: str
messages: tuple[str, ...]
tags: tuple[str, ...] = ()
metadata: Mapping[str, object] = field(default_factory=dict)
def build_archive(tmp_path: Path, rows: Sequence[SessionRow]) -> ArchiveHandle:
...This should replace ad hoc archive seeding across query, read, insight, status, maintenance, and daemon tests.
Cross-surface adapter:
# tests/infra/surfaces.py
class SurfaceAdapter(Protocol):
name: str
def query(self, archive: ArchiveHandle, expression: str) -> SurfaceResult: ...
def read(self, archive: ArchiveHandle, session_id: str) -> SurfaceResult: ...Use this for CLI/daemon/MCP/facade parity only where the surfaces are meant to agree. Do not force every backend semantic through every UI layer.
Query case matrix:
@dataclass(frozen=True)
class QueryCase:
id: str
expression: str
expected_filter: object | None = None
expected_error: str | None = None
expected_session_ids: tuple[str, ...] = ()Split cases into LEXER_CASES, LOWERING_CASES, REJECTION_CASES, and EXECUTION_CASES. The query DSL tests should read like a grammar spec, not hundreds of one-off assertions.
Resource CRUD harness for any remaining user-state HTTP surface:
@dataclass(frozen=True)
class ResourceCase:
name: str
base_path: str
valid_payload: Mapping[str, object]
invalid_payload: Mapping[str, object]Readiness matrix:
@dataclass(frozen=True)
class ReadinessCheckCase:
name: str
arrange: Callable[[RuntimeFixture], None]
expected_status: str
expected_message: strCLI error matrix:
@dataclass(frozen=True)
class CliErrorCase:
argv: tuple[str, ...]
expected_exit: int
expected_text: strBehavior gaps to test directly
The file coverage contract surfaced real risks, but the remedy is direct tests rather than exemption bookkeeping. Add or improve ordinary tests for these modules and behaviors:
polylogue/archive/query/expression.py
Canonical grammar/lowering/rejection/execution matrices. This should become the user-facing query language spec in test form.
polylogue/archive/query/archive_execution.py and polylogue/archive/query/unit_results.py
Seeded archive execution tests covering:
query returns stable session ordering
query respects terminal unit boundaries
empty result has stable shape
mixed source result groups correctly
errors preserve a machine-readable code
unsupported in-memory summary fields fail closed instead of broadening results
polylogue/cli/commands/maintenance.py
A maintenance-target matrix covering:
empty_sessions
message_embeddings
message_type_backfill
orphaned_attachments
orphaned_messages
superseded_raw_snapshots
wal_checkpoint
polylogue/cli/read_view_handlers.py
Output matrix for:
plain
json
markdown
with metadata
without metadata
missing session
empty body
polylogue/cli/shell_completion_values.py
Tests that completions are derived from actual enums/registries instead of duplicated strings.
polylogue/insights/run_projection.py
Projection matrix for:
empty archive
single session
multi-source archive
date-bounded projection
tag-bounded projection
bad projection request
polylogue/readiness/__init__.py
Use the readiness matrix above. Remove showcase/VHS readiness checks unless those remain user-facing features.
Mutation operations
Cover these as real command/API behavior tests, not catalog rows:
mutate-add-tag
mutate-bulk-tag-sessions
mutate-delete-metadata
mutate-delete-session
mutate-remove-tag
mutate-set-metadata
devtools verify simplification target
The chatlog argues for a smaller default spine. Treat this as a design target to verify against the live repo, not as an unconditional one-shot deletion:
devtools verify --commit
ruff format --check
ruff check
mypy
devtools verify
ruff format --check
ruff check
mypy
pytest -q -m "not slow and not benchmark and not live"
devtools verify --all
ruff format --check
ruff check
mypy
pytest
Generated-output checks may remain only for artifacts that are real user-facing build outputs, such as CLI reference or OpenAPI. Delete, demote, or make explicit/manual if they are only internal paperwork:
verify topology
verify closure-matrix
verify manifests
verify ci-workflows
verify lane-assertions
verify test-coverage-contracts
verify test-infra-currency
render quality-reference
render topology-status
lab scenario
If CI is meant to be disabled for this project phase, make that explicit rather than half-disabled. Options: move workflows to .github/workflows.disabled/ or make them workflow_dispatch only. This must be reconciled with the repository’s PR/merge policy before implementation.
Acceptance criteria
- A deterministic demo archive can be seeded and verified without daemon scheduling.
- The daemon demo path can optionally wait for convergence and run the same semantic verifier.
- CLI acceptance is expressed as ordinary pytest over real commands and semantic assertions, not a showcase exercise catalog.
- Visual reader checks are ordinary pytest tests over HTTP/DOM/API behavior; recording commands are optional artifact generators.
- The old showcase/QA catalog/report/baseline layers are deleted or reduced to thin wrappers only after replacement behavior exists.
- Generated docs and
TESTING.mddescribe the new demo/visual/test commands and no longer teach stalepolylogue audit --only exercisesflows. - Broad verification still runs through
devtools verify; this issue should simplify what it invokes, not add a second verification authority.
Non-goals
- No new proof ledger, scenario registry, or declarative QA bureaucracy.
- No absence-only tests that merely assert old file names or command names are gone.
- No deletion of demo data, synthetic generation, CLI subprocess tests, or real visual tests.
- No Playwright/browser screenshot requirement for the default fast path unless a concrete visual contract cannot be checked browserlessly.
Current state (audited 2026-06-27)
Readiness: ~42% already in code · scope L · conflict risk medium · depends on: none
Assessment & remaining work: The demo infrastructure (polylogue/demo/ module with seed/verify/script, CLI commands, tests/unit/demo/, tests/unit/cli/test_demo_command.py, tests/visual/ DOM tests) and showcase removal (polylogue/showcase/, tests/unit/showcase/, tests/baselines/showcase/) are already complete. The remaining work has three phases: (1) retire the devtools validation lane bureaucracy — delete or reduce quality_registry.py, run_validation_lanes.py, lane_models.py, validation_catalog.py, authored_scenario_catalog.py, scenario_projection_catalog.py, scenario_projections.py, validation_lane_catalog_contracts/live/runtime.py, render_quality_reference.py, lab_scenario.py and their 9 corresponding test files in tests/unit/devtools/, removing entries from command_catalog.py; (2) add missing CLI test files (test_help_inventory.py, test_query_first_routing_matrix.py) and convert test_check_runtime.py readiness checks and test_archive_query.py block stripping into parametrize matrices as specified in the issue; (3) delete or demote generated planning docs (docs/test-quality-workflows.md, docs/plans/test-closure-matrix.yaml, docs/plans/topology-target.yaml, docs/plans/test-quality-coverage.yaml) and simplify devtools/verify.py to remove bureaucracy gate invocations. The #2177 contract/surface refactor is co-open and may touch some of the same CLI test files but the devtools bureaucracy retirement can proceed independently.
Primary files: devtools/quality_registry.py, devtools/run_validation_lanes.py, devtools/lane_models.py, devtools/validation_catalog.py, devtools/authored_scenario_catalog.py, devtools/scenario_projection_catalog.py, devtools/scenario_projections.py, devtools/scenario_coverage.py
Grounded re-assessment from the 2026-06-27 backlog triage; verify against source before acting.
Activity
feat(demo): add deterministic archive seed commands (#2196) (#2208)
refactor(verifiability): gate demo evidence with pytest (#2196) (#2211)
refactor(devtools): drop verification owner-map gates (#2177) (#2217)
Sinity commentedon Jun 21, 2026
Reopening from a closure-integrity audit. The issue body's core claim is to replace/delete the showcase QA bureaucracy after ordinary demo/CLI/visual tests exist, but live source still contains the old layer.
Concrete evidence in the current tree:
polylogue/showcase/qa_summary.py,polylogue/showcase/qa_markdown.py, andpolylogue/showcase/qa_runner_reporting.pystill exist and are tested directly.tests/unit/showcase/test_operator_reporting_runtime.pyandtests/unit/showcase/test_report.pystill exercise the QA report/summary machinery.devtools/lab_scenario.pystill importspolylogue.showcase.qa_runner_reporting.format_qa_summary.polylogue/showcase/**,tests/unit/showcase/**,tests/baselines/showcase/**, anddevtools/lab_scenario.pyas remove/rewrite targets after replacement behavior exists.This should stay open until that layer is either actually removed/replaced by ordinary demo/CLI/visual tests, or the issue body is corrected with a source-grounded justification for retaining the surviving pieces. Do not close this on partial demo harness improvements while the named QA/showcase report layer remains live.
refactor(verifiability): remove showcase QA report bureaucracy (#2293)
Sinity commentedon Jun 21, 2026
Implementation note after #2295 opened.
This branch removes the next concrete showcase/QA bureaucracy layer that survived #2293:
polylogue/showcase/qa_session_payload.py,report_models.py,report_common.py, andshowcase_report_payloads.py;polylogue/cli/shared/qa_capture.py,qa_requests.py, andqa_snapshot.pybecause no public CLI command imports them;tests/unit/showcase/test_report.py,tests/unit/cli/test_qa.py,tests/unit/cli/test_qa_requests.py);devtools lab scenario run archive-smoke --jsonto emit a direct scenario status payload instead of a QA-session report wrapper;Verification:
devtools test tests/unit/showcase/test_verification_lane.py tests/unit/showcase/test_qa_workflow_runtime.py tests/unit/showcase/test_qa_runner_request.py tests/unit/cli/test_deterministic_output.py tests/unit/devtools/test_render_quality_reference.py-> 111 passed.devtools lab scenario list --json && devtools lab scenario run archive-smoke --tier 0 --json->ok: true.devtools verify --quick-> exit_code 0.devtools verify --quick-> exit_code 0.This still does not close the issue. Remaining live scope is the larger showcase exercise catalog/runner stack (
exercise_catalog.json,ShowcaseRunner,qa_runner_request/workflow, and manytests/unit/showcase/*tests). Those still powerarchive-smoke; they need a separate replacement/deletion pass once ordinary demo/CLI/visual tests cover the same behavior directly.PR: #2295
Sinity commentedon Jun 21, 2026
Update after the second #2295 commit.
I also removed the QA session request/workflow/model layer itself:
devtools lab scenario run archive-smokenow callsShowcaseRunnerandcheck_invariantsdirectly;polylogue/showcase/qa_runner.py,qa_runner_models.py,qa_runner_request.py,qa_runner_stages.py, andqa_runner_workflow.py;tests/unit/showcase/test_verification_lane.py;ok: true.This shrinks the live showcase QA stack further without removing the actual archive-smoke behavior. Remaining #2196 scope is now narrower: the exercise catalog/runner machinery itself (
exercise_catalog.json,ShowcaseRunner, showcase runner support, and catalog/invariant tests) still exists and still powersarchive-smoke. It should be replaced/deleted only once the same behavior is covered by ordinary demo/CLI/visual tests.22 remaining items
feat: integrate archive contract patch wave (#2358)
docs(verifiability): clarify closure matrix ownership (#2369)
docs(devtools): name verification-lab in verify help (#2370)
Sinity commentedon Jun 24, 2026
Backlog reshape (Ref #1807): reprioritize ↑ → Train 1 (Ship), slot #3 (residual scope).
Per the #2307 thread, upstream #2293–#2298 already drained much of the
showcase/QA vocabulary. The high-value residual is the product-grade demo
commands, the committed demo-fixture world, and
devtools visual record—because those are the raw material for the README demo GIF/screenshot and the
7-minute skim (#2379), and the deterministic surface the postmortem blade (#2380)
renders against. Prioritize that residual; the bureaucracy-removal is largely done.
Sinity commentedon Jun 26, 2026
Follow-up surfaced closing #2380: bare
polylogue demo seeddoes not materialize session-profile insights, so the #2379 README first-contact demo andanalyze --postmortemrender an empty postmortem on the demo archive. Wiring the demo path to daemon-backed ingest (or a seed mode that materializes profiles) belongs in this issue's residual demo-grade scope — it's what makes the one-command 'wow' actually populated. Ref #2380 Ref #2379.Sinity commentedon Jun 26, 2026
Demo-grade residual: profiles fix landed, but the corpus is too thin for the postmortem blade
First slice landed on master (commit 5283a6d, Ref #2380):
seed_demo_archivenow runsrebuild_session_insights_syncsosession_profilesmaterialize without the daemon.analyze --postmortemon a demo archive went frommatched=3, analyzed=0(empty) toanalyzed=3.But that is necessary, not sufficient. The synthetic demo corpus (
polylogue/scenarios/corpus.py:539 build_demo_corpus_specs) emits no token/cost/usage data at all (grep token|cost|usage polylogue/schemas/synthetic/→ nothing). So the materialized postmortem now renders:i.e. "analyzed but all-zero" — arguably a worse first-contact impression than "empty", because it looks like the blade found nothing. The README's documented one-command demo points a stranger at exactly this.
Remaining demo-grade scope (this issue)
session_provider_usage_eventswith realistic input/output/cache tokens. Target a total spend in the ~$3–8 range with one clearly dominanttop_expensive_session(~60% of spend) so the cost lane and top-session field pop.subagent_session_streamchildren (thetopology_edges/sidechain machinery already exists) sosubagent_branch_count > 0andget_session_treeshows a non-trivial tree.synthetic-NNNNNrepo tokens with plausible names (e.g.polylogue,acme-api,web-dashboard) sorepos_touchedand the repos facet read as product repos, not noise. (Coordinates with the refactor(product): rationalize root onboarding and facets #2317 repo-facet canonicalization work.)tool_useJSON ({"id": "fbc67a83...", "input": {"query": ...) instead of prose.Acceptance criteria (added)
demo seed-ed archive,analyze --postmortemrenders non-zeroestimated_cost, a namedtop_expensive_session, ≥2 realrepos_touched, andsubagent_branch_count ≥ 1.synthetic-NNNNNtokens or raw-JSON titles appear in any demo read/analyze surface.Ref #2380 Ref #2317 Ref #1807
feat(demo): materialize session insights in no-daemon seed (#2439)
Sinity commentedon Jun 26, 2026
Slice 1 landed on master as #2439 (21951de): the no-daemon
demo seednow materializessession_profiles, soanalyze --postmortemrenders analyzed>0 on a fresh demo archive. Remaining: slice 2 (synthetic-corpus token/cost/usage enrichment so the blade shows real $cost / top session / repo names instead of $0).Sinity commentedon Jun 26, 2026
Slice 2 (cost) landed in PR #2446: the demo claude-code session now carries
deterministic Opus 4.8 usage (injected demo-scoped, no synthetic-generator change
→ no snapshot ripple), so
analyze --postmortemshows a real top-expensivesession (~$2.03) with matching token lanes instead of $0 / 0 tokens.
Along the way this fixed a real production bug:
SessionProfile.from_dictdropped the seven cost/token-attribution fields
to_dictemits, so everybatch-hydrated/round-tripped profile reported zero tokens — zeroing postmortem
token lanes for all archives, not just the demo.
Remaining slice-2 polish: the demo blade still shows generic repo names and
0 subagent branches; repo-name and subagent-stream enrichment for the demo
corpus remain follow-ups (lower-value than cost).
feat(demo): enrich demo cost and fix profile token-lane round-trip (#…
feat(demo): give demo session a canonical repo for repos_touched (#2447)
Sinity commentedon Jul 9, 2026
Status update: multiple slices landed. Notably, PR #2446 fixed a real production bug found along the way (
SessionProfile.from_dictwas silently dropping 7 cost fields).Remaining scope is minor demo polish only: generic repo names in the demo fixtures, and the demo blade currently shows 0 subagent branches (should show at least one for realism).
Sinity commentedon Jul 26, 2026
2026-07-26 current-reality reconciliation
Audited against
masteratb14ec34eand the issue comments.Disposition: close as completed.
The obsolete showcase/QA subsystem named in the discussion is gone: current code search has no
polylogue/showcase,ShowcaseRunner,exercise_catalog, orqa_runner. Verification now runs through ordinary demo fixtures, CLI/integration tests, visual/VHS tooling, installed-package smoke, generated witnesses, and real-daemon browser tests.The original migration objective was to make demos and ordinary product paths own proof rather than preserving a parallel showcase framework. That has happened. Future demo quality or first-impression problems are product defects, not reasons to restore this umbrella.