Skip to content

chore: track post-renewal consolidation and architectural cohesion #401

Closed

Description

@Sinity

Problem

Polylogue now has a real proof kernel, verification catalog, affected-obligation routing, validation lanes, scenario execution, synthetic corpus generation, README media, browser capture, tail overlays, and product/readiness surfaces. The remaining risk is architectural cohesion: several migrations landed enough to close narrow issues, but not enough to make the product/control-plane split obvious to a new user or maintainer, and several large packages still carry flat prefix-family layouts that hide ownership.

Current symptoms:

Ambitious expansion

Treat this as the umbrella for finishing the consolidation rather than another README or baseline refresh. Two interlocking tracks:

Renewal-completion track (originally scoped here):

  • Build and maintain an issue-to-capability matrix for the recent closed renewal work: feature, user surface, repo/operator surface, proof route, focused verification command, and residual gap.
  • Coordinate the retirement of public audit/qa/showcase leakage. Product health should live under user-facing product commands such as doctor/check; repo proof/lab work should live under devtools and the proof catalog.
  • Coordinate first-class transient input support for web exports and remove the inbox source/path concept.
  • Coordinate scenario metadata, representative schema corpora, and README/VHS generation so docs media becomes a verified projection rather than ad hoc scripts.
  • Expand affected-obligation routing for maintained non-Python surfaces: README media, VHS tapes, browser extension assets, tail-overlay paths, representative corpus files, scenario catalogs, and provider schema/demo packages.
  • Audit deployment-facing assumptions after the Sinnix catch-up service change: what is covered by Polylogue repo checks, what belongs in Sinnix NixOS tests, and what remains manual/live.

Architectural-cohesion track (added 2026-04-26 after a comprehensive structural audit):

Child issues

Renewal-completion track:

Architectural-cohesion track:

Acceptance criteria

Renewal-completion track:

  • A durable issue comment lists recent closed issues and classifies each as covered, partially covered, or needing follow-up.
  • Public product CLI help no longer exposes repo-verification vocabulary as normal archive usage.
  • Devtools/proof-lab commands own proof, generated scenario verification, schema audit, media verification, and changed-path routing.
  • README quickstart uses first-class input paths or durable configured sources correctly; inbox is gone as a product/source concept.
  • README/media/docs examples are selected from executable scenarios with captions/presentation metadata and verified outputs.
  • Representative demo corpus generation is transparent, reviewable, and verified from committed manifests rather than opaque arbitrary fixtures.
  • Affected-obligation routing is sampled over README/docs, proof, browser extension, tail overlay, schema/provider, product, input, and scenario paths, with unknown classes resolved or filed.
  • Verification commands are run intentionally and recorded; avoid a reflexive full suite unless the audit finds a concrete reason.

Architectural-cohesion track:

Sequencing recommendation (added 2026-04-26 by #429)

The pre-flight cluster-cohesion check produced an empirical landing order based on inbound-edge count (high inbound = many clusters depend on this one):

Order Issue Why
1 #424 (lib) Highest inbound; 39 clusters import from lib/. Move first so downstream PRs reference final paths.
2 #425 (storage) Many storage modules import lib types; lands after lib is stable.
3 #414 (products) Needs storage/products/session/ from #425 and stable lib/ types.
4 #426 (root + facade) Most affected by the prior moves; consolidates what's left.
5 #403 (sources) Independent of lib/storage/products; can run in parallel.
6 #420 (schemas) Independent; can run in parallel.
7 #413 (showcase) Depends on #410 substrate decisions.
8 #419 (test splits) Tests follow ownership; lands after production moves settle.
9 #427 (docs) Documents the realized tree after all moves land.

In-flight compatibility shims should carry # topology: shim until #NNN comments so the lint can flag stale ones.

Verifiability-coherence track (added 2026-04-26 after a comprehensive verification audit)

The architectural-cohesion track makes structural claims executable (#429/#432/#433). The verifiability-coherence track does the analogous work for the other axes of verification — soft-mode lint escalation, manifest internal consistency, render-drift gating, surface parity, evidence freshness, and mutation/benchmark coverage. The audit found six gaps that can each be closed with a manifest + lint + dashboard pattern matching the existing topology-target.yaml shape.

Child issues:

Plus directly tied to this analysis:

Track acceptance

Once the verifiability-coherence track lands:

  • All verify-* lints either exit 0 or fail blocking — no soft-mode steady state.
  • docs/plans/*.yaml manifests are themselves under lint coverage.
  • Every generated surface is gated by render-all --check and that gate is hard-fail.
  • CLI / MCP / facade / sync / async surfaces verify isomorphic.
  • Each proof obligation has a freshness SLA and the catalog reports per-claim coverage.
  • Mutation and benchmark coverage maps are declarative, not folk.
  • devtools status becomes a unified meta-status surface answering "for this commit, is everything fresh, consistent, and verified?" in one place.

Catalog tautology cleanup (added 2026-04-27)

A targeted audit of the proof catalog runner code surfaced a deeper class of problem than the structural / coherence gaps above: most catalog obligations are not actually catching regressions. Of 9149 declared obligations, only ~150 are real behavioral checks. The remaining ~9000 are tautologies (closed loop with the source of the assertion), self-attestation (read subject metadata back and check non-emptiness), or phantom (runner declared with no executable code). Headline coverage was ~60× inflated.

Child issues for this cleanup:

Effect once landed: catalog drops from 9149 → ~250 obligations, all of which observe real external state. The headline number stops lying about coverage; depth-expansion issues (#421, #494) act on an honest base.

Holistic assurance umbrella (added 2026-04-27)

After a 2026-04-27 external audit (https://chatgpt.com/c/69ee926d-055c-83eb-9bb5-7a429925c99f) reframed the verifiability work around product confidence domains rather than mechanism layers, a new umbrella supersedes the verifiability-coherence and catalog-tautology-cleanup sub-tracks above:

#506 — tracking: complete holistic assurance coverage map

It reorganizes existing issues into four tracks plus introduces foundational primitives:

The four tracks under #506:

This umbrella does not invalidate prior work; it gives every existing verifiability issue a coverage cell to fill, replacing flat obligation counts with domain-aware evidence reporting.

Activity

  1. Sinity commented on Apr 25, 2026

    @Sinity
    OwnerAuthor

    Initial audit pass while fixing README media:

    Closed work sampled

    Commands run

    devtools run-validation-lanes --list
    devtools affected-obligations --json \
      --path README.md \
      --path docs/assets/readme/polylogue-quickstart.tape \
      --path polylogue/lib/tail_overlay.py \
      --path browser-extension/polylogue-browser-capture/manifest.json
    
    devtools lab-scenario verify-baselines
    devtools lab-scenario verify-baselines --update
    devtools lab-scenario verify-baselines
    devtools verify --quick --lab

    Findings

    • README.md routes to workflow.generated_surfaces_current and recommends devtools render-all --check.
    • docs/assets/readme/*.tape, docs/assets/readme/*.gif, and docs/assets/readme/README.md are unclassified by affected-obligation routing.
    • polylogue/lib/tail_overlay.py is unclassified by affected-obligation routing.
    • browser-extension/polylogue-browser-capture/manifest.json is unclassified by affected-obligation routing.
    • Showcase baselines had drifted after browser capture, tailing, cost products, and wallclock product filters landed. This branch refreshes the baselines and devtools lab-scenario verify-baselines now passes.
    • devtools verify --quick --lab passes after the README/VHS and showcase baseline updates.

    Next work

  2. changed the title [-]audit: close verifiability and presentation coverage gaps after renewal[/-] [+]audit: finish post-renewal product and verification consolidation[/+] on Apr 26, 2026
  3. Sinity commented on Apr 26, 2026

    @Sinity
    OwnerAuthor

    Consolidation issue set created/updated

    This is the issue set for finishing the product/verifiability/docs consolidation without more narrow README-only or baseline-only slices.

    Existing issues updated

    New child issues

    Recommended execution order

    1. feat(cli): support transient input paths in run pipeline #409 — fix the import/input foundation and remove inbox.
    2. refactor: retire public audit qa showcase surfaces #413 — retire/rehome audit/qa/showcase while command semantics are being cleaned.
    3. feat(schemas): add representative provider corpora #411 — create representative provider corpora so demos use reviewed realistic data.
    4. refactor(scenarios): make scenarios the docs/media/proof catalog #410 — enrich scenarios and make docs/media/proof projections share the catalog.
    5. docs: rebuild README as executable product tour #412 — rebuild README from the corrected CLI, corpus, and scenario system.
    6. test(proof): route maintained surfaces to affected obligations #397 and feat(browser): make extension install and debug loop first-class #398 in parallel where possible — route the new maintained surfaces and finish the browser extension operator loop.
    7. refactor: rationalize source and test module structure #403 after or alongside refactor: retire public audit qa showcase surfaces #413/feat(cli): support transient input paths in run pipeline #409 — rationalize source/test layout around the new boundaries.

    Design decisions captured

    • Do not create a separate polylogue import command for now. run --input PATH... is the cleaner extension of the pipeline command.
    • Do not demote inbox; remove it as a product/source concept.
    • Do not promise new raw-retention semantics for --input; reuse the existing configured-path source/raw/blob behavior.
    • Do not make README-specific scenarios. Add presentation metadata to ordinary scenarios and let README select from them.
    • Static fixtures are acceptable when they are generated, reviewed, manifest-described representative corpora, not opaque arbitrary dumps.
    • LLM-generated representative corpora can be maintainer-run and committed, but CI should verify committed artifacts rather than call APIs.
  4. Sinity commented on Apr 26, 2026

    @Sinity
    OwnerAuthor

    Structural audit update — 2026-04-26

    I audited the source/test hierarchy rather than only the docs surface. The main result is that the repo has several real half-migrations, not just stale wording.

    High-confidence findings

    1. inbox is still a product primitive in code.

      Evidence:

      • polylogue/config.py builds a default Source(name="inbox", path=inbox_root()).
      • polylogue/paths/_roots.py exposes inbox_root().
      • polylogue/browser_capture/receiver.py defaults captures to inbox_root() / "browser-capture" and exposes inbox_path in status payloads.
      • polylogue/cli/commands/browser_capture.py exposes --inbox and describes writing captures to the normal inbox.
      • README/configuration/CLI docs and many tests still encode --source inbox.

      Conclusion: feat(cli): support transient input paths in run pipeline #409 must delete the inbox concept end-to-end, not merely add --input beside it. Browser capture needs either direct import/spool semantics or another explicit source path design that does not recreate inbox under a new name.

    2. audit / qa / showcase are still live execution surfaces.

      Evidence:

      • polylogue/cli/click_command_registration.py still registers polylogue audit from polylogue/cli/commands/qa.py.
      • .github/workflows/ci.yml still runs uv run devtools verify-showcase.
      • devtools/verify_showcase.py, devtools/lab_scenario.py, devtools/lab_corpus.py, devtools/quality_registry.py, and devtools/authored_scenario_catalog.py still import from polylogue.showcase.
      • tests/baselines/showcase/ owns command help baselines, including help-audit.txt.
      • tests/unit/showcase/ has 20 files, while tests/unit/scenarios/ has 9 files.
      • polylogue/showcase/ is about 5.4k LOC, roughly twice the size of polylogue/scenarios/.

      Conclusion: refactor(scenarios): make scenarios the docs/media/proof catalog #410/refactor: retire public audit qa showcase surfaces #413 need a real port, not a naming cleanup. Scenarios should become the canonical catalog, devtools should own execution/report/media, and public product CLI should lose audit/qa/showcase terminology.

    3. Source/provider code and source tests need structural normalization.

      Evidence:

      • polylogue/sources/ mixes generic source acquisition with provider-specific root files such as drive_auth.py, drive_source_factory.py, drive_source_support.py, and provider-specific assembly_* files.
      • Provider naming is inconsistent across sources/parsers/ and sources/providers/ (gemini_message, chatgpt_message_models, claude_code_record, etc.).
      • The biggest source tests are very large law/model files (test_source_laws.py ~2460 LOC, test_models.py ~1650 LOC), which makes the intended structure hard to read.

      Conclusion: refactor: rationalize source and test module structure #403 should include both source-module package layout and test decomposition/readability, not just small file moves.

    4. Product/read-model ownership is scattered enough to deserve its own issue.

      Evidence:

      • polylogue/products/ is tiny, but product concepts live in root files (archive_product_models.py, archive_products.py, product_readiness.py, product_export_bundles.py, sync_product_queries.py), storage files (session_product_*, repository_product_*, product query mappers), CLI/MCP contracts, and a compatibility re-export (polylogue/cli/products_workflow.py).
      • pyproject.toml packages and exposes both polylogue and devtools, which blurs future product distribution vs source-checkout control-plane tooling.

      Follow-up issue opened: refactor: rationalize product ownership and package boundary #414.

    5. README/media work is currently ad hoc relative to the desired scenario/proof architecture.

      Evidence:

      • docs/assets/readme/ contains tracked GIFs, tapes, and scripts specific to README media.
      • The current README still documents inbox, polylogue audit, and the current browser-capture inbox path.
      • The media should be generated from the same scenario catalog used for verification/docs, with captions, pacing, visual-quality checks, and privacy-safe data.

      Conclusion: refactor(scenarios): make scenarios the docs/media/proof catalog #410 must land before docs: rebuild README as executable product tour #412 produces final README media, otherwise the README will keep freezing arbitrary demos instead of presenting proof-backed product exercises.

    Suggested sequencing impact

    The current open sequence still looks right, but the scope should be interpreted strongly:

    1. feat(cli): support transient input paths in run pipeline #409: remove inbox as a concept; add run --input/transient path semantics; port browser capture away from inbox.
    2. refactor(scenarios): make scenarios the docs/media/proof catalog #410: make scenario catalog canonical; define metadata enough for docs, proof, and media.
    3. refactor: retire public audit qa showcase surfaces #413: remove public audit/qa/showcase surfaces and compatibility wrappers after refactor(scenarios): make scenarios the docs/media/proof catalog #410 exists.
    4. docs: rebuild README as executable product tour #412: rebuild README/docs/media from the scenario catalog, not from bespoke scripts.
    5. refactor: rationalize source and test module structure #403: rationalize source/provider modules and large source tests.
    6. refactor: rationalize product ownership and package boundary #414: rationalize product ownership and packaging boundary.
  5. added
    type:tracking
    theme:verifiability
    area:devtools
    on Apr 26, 2026
  6. changed the title [-]audit: finish post-renewal product and verification consolidation[/-] [+]chore: track post-renewal product and verification consolidation[/+] on Apr 26, 2026
  7. Sinity commented on Apr 26, 2026

    @Sinity
    OwnerAuthor

    Open issue-list audit — 2026-04-26

    I audited the current open issue list after #404 merged.

    Coherence assessment

    The core roadmap is now coherent and has a clear dependency spine:

    1. feat(cli): support transient input paths in run pipeline #409 removes the stale inbox import model and gives README/docs a real run --input story.
    2. feat(schemas): add representative provider corpora #411 provides representative provider corpora so docs/media/proof can use realistic reviewed data.
    3. refactor(scenarios): make scenarios the docs/media/proof catalog #410 turns scenarios into the shared docs/media/proof catalog.
    4. refactor: retire public audit qa showcase surfaces #413 removes the old public audit/qa/showcase surfaces once scenarios/devtools own the behavior.
    5. docs: rebuild README as executable product tour #412 rebuilds README/docs/media from those scenario and input foundations.
    6. feat(browser): make extension install and debug loop first-class #398 makes browser capture a polished product workflow instead of a receiver plus unpacked extension.
    7. test(proof): route maintained surfaces to affected obligations #397 closes a concrete proof-routing gap for tail-overlay source paths.
    8. refactor: rationalize source and test module structure #403 rationalizes source/provider/test structure.
    9. refactor: rationalize product ownership and package boundary #414 rationalizes product/read-model ownership and package boundaries.

    That set fits together: input model, representative data, scenario/proof catalog, command cleanup, README, browser UX, proof routing, source/test layout, product ownership.

    Gaps found and filled

    Two important workflows were present only as loose issues, so I added anchors:

    Cleanup applied

    Residual notes

  8. Sinity commented on Apr 26, 2026

    @Sinity
    OwnerAuthor

    Additional open-surface audit — 2026-04-26

    I did a second pass over source layout, docs, browser extension, static site, packaging, schemas, and test size. New/expanded tracking from this pass:

    Local note: .agent/scratch and .local contain lots of ignored residue, including old README/VHS demo workspaces and browser-control profiles. They are ignored local state, not tracked repo content. I did not treat them as source issues in this pass.

  9. Sinity commented on Apr 26, 2026

    @Sinity
    OwnerAuthor

    Verifiability audit update — 2026-04-26

    I did a focused proof/verification audit after the README/media/source-surface cleanup.

    What currently works

    • devtools render-verification-catalog --check reports the generated catalog is synchronized.
    • devtools verify-showcase passes: tier-0 showcase exercises run, 50 exercises, all baselines match.
    • devtools lab-scenario verify-baselines also passes: tier-0 exercises run, 50 exercises, all baselines match.
    • devtools artifact-graph --json reports no uncovered artifacts, no uncovered operations, and no uncovered declared operations.

    Main gaps

    1. The proof catalog is heavily schema-centered.

      Current catalog summary:

      • 9,046 subjects
      • 9,147 obligations
      • 8,897 schema annotation subjects
      • 50 CLI command subjects
      • 2 workflow claim subjects

      That is useful, but it is not a complete proof vocabulary for the actual product surface.

    2. affected-obligations suppresses maintained product paths as unknown.

      In a mixed path sample, only README.md and provider schema catalogs routed meaningfully. These suppressed as unknown:

      • browser-extension/src/content/chatgpt.js
      • browser-extension/src/popup.js
      • docs/browser-capture.md
      • docs/assets/readme/example.tape
      • polylogue/site/templates_index_style.py
      • polylogue/templates/style.css
      • polylogue/schemas/generation_workflow.py
      • polylogue/showcase/exercise_catalog.json
      • pyproject.toml

      test(proof): route maintained surfaces to affected obligations #397 is now retitled to cover maintained-surface routing, not just tail overlay.

    3. The catalog lacks product-surface obligation families.

      Routing can only be good if there are native subjects/claims to route to. I opened feat(proof): add product-surface obligation families #421 for the missing proof families: browser extension, site publication, docs/media, distribution, input workflow, scenario projection adequacy, and maintenance-target coverage.

    4. Scenario projection coverage is too permissive.

      devtools scenario-projections --json currently has 95 projections with no path, artifact, operation, or maintenance target. Many are authored exercises, validation lanes, mutation campaigns, or validation families. They can pass baselines while staying invisible to semantic routing.

    5. Artifact graph coverage still leaves maintenance targets uncovered.

      Remaining uncovered maintenance targets:

      • empty_conversations
      • orphaned_attachments
      • orphaned_content_blocks
      • orphaned_messages
      • wal_checkpoint

      Either cover these with scenarios/proof routes or explicitly classify exclusions with tracked rationale.

    Tracking changes

    The updated split is: #421 adds real proof vocabulary and obligations; #397 makes changed-path routing target that vocabulary; #410/#412 consume the scenario/media side once the catalog can represent it.

  10. changed the title [-]chore: track post-renewal product and verification consolidation[/-] [+]chore: track post-renewal consolidation and architectural cohesion[/+] on Apr 26, 2026
  11. 5 remaining items

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:devtoolsarea:docstheme:verifiabilitytype:tracking

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions