Skip to content

feat(demo): seed deterministic user overlays (#1843) - #1975

Merged
Sinity merged 1 commit into
masterfrom
feature/feat/demo-assertion-overlays-1843
Jun 16, 2026
Merged

Sinity merged 1 commit into
masterfrom
feature/feat/demo-assertion-overlays-1843

Conversation

@Sinity

@Sinity Sinity commented Jun 16, 2026

Copy link
Copy Markdown
Owner

Summary

Adds deterministic user-tier overlay evidence for the approved demo archive. After the existing build_demo_corpus_specs() archive convergence path stores the three demo sessions, seed_demo_user_overlays() attaches a pytest-triage tag, README example mark, blackboard note, saved query, and typed tag/decision assertions to the Claude Code demo session.

Problem

#1843's demo fixture world had deterministic source/index convergence evidence, but the remaining known tags/notes/KV overlay requirement was still unrepresented after the #1883 assertion substrate landed. Public docs could show search/read examples, but there was no private-data-free evidence that the demo archive also exercises user.db overlays and assertion rows.

Solution

polylogue.scenarios.corpus now exposes the fixed approved demo session IDs plus seed_demo_user_overlays(archive_root). The helper intentionally runs after archive convergence rather than changing polylogue import --demo, because import is an asynchronous daemon scheduling command and cannot synchronously attach overlays to sessions that may not exist yet. The demo convergence test now proves deterministic user overlays, assertion kinds, idempotent reseeding, and no private path leakage. README and docs/generate.md describe the shipped evidence without changing the import command contract.

Verification

  • nix develop --command devtools test tests/unit/scenarios/test_corpus.py tests/unit/scenarios/test_demo_archive_convergence.py -> 20 passed
  • nix develop --command devtools verify --quick -> exit_code 0
  • git push pre-push quick gate -> exit_code 0

PR handoff checklist

Issue slice: #1843 known tags/notes/KV overlays for the approved demo fixture world after #1883.
Files inspected: polylogue/scenarios/corpus.py, polylogue/scenarios/__init__.py, tests/unit/scenarios/test_corpus.py, tests/unit/scenarios/test_demo_archive_convergence.py, polylogue/storage/sqlite/archive_tiers/user_write.py, README.md, docs/generate.md.
Files changed: polylogue/scenarios/corpus.py, polylogue/scenarios/__init__.py, tests/unit/scenarios/test_corpus.py, tests/unit/scenarios/test_demo_archive_convergence.py, README.md, docs/generate.md.
Old surface removed or retained: retained polylogue import --demo as asynchronous daemon scheduling; added repository fixture evidence after convergence.
Contracts/tests added: demo session ID constants; seed_demo_user_overlays(); assertions for tag, mark, note, saved query, typed assertions, idempotency, and private-path hygiene.
Generated artifacts updated: none; devtools render-all --check stayed clean.
Verification commands and results: listed above.
Known caveats / SPEC_MISMATCH: polylogue import --demo still schedules daemon ingest; it does not synchronously seed overlays. Overlay seeding is repository evidence after convergence.
Follow-up intentionally not included: a public CLI/API command for seeding demo overlays, if wanted, should be designed as a separate user-facing surface rather than hidden inside import scheduling.

Ref #1843

Problem: the approved demo archive had source/index convergence evidence but no deterministic user-tier overlay evidence after the #1883 assertion substrate landed, leaving #1843's known tags/notes/KV requirement unrepresented.\n\nWhat changed: add fixed demo session IDs and a seed_demo_user_overlays fixture that writes a user tag, mark, blackboard note, saved query, and typed assertion rows for the converged demo archive. Extend the demo archive convergence test to prove those rows are idempotent and private-path-free, and update README/generate docs to describe the evidence without changing import --demo's asynchronous scheduling contract.\n\nVerification: nix develop --command devtools test tests/unit/scenarios/test_corpus.py tests/unit/scenarios/test_demo_archive_convergence.py -> 20 passed; nix develop --command devtools verify --quick -> exit_code 0.\n\nRef #1843
@coderabbitai

coderabbitai Bot commented Jun 16, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@Sinity, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 32 minutes and 8 seconds. Learn how PR review limits work.

Your organization has used up its prepaid credits, and credit purchases are no longer available. Enable the review add-on in the billing tab to keep reviews running — you're only billed for reviews past your plan's rate limits ($0.25/file).

⌛ How to resolve this issue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: 730a92b7-a837-4b54-8de6-a801e74bbd69

📥 Commits

Reviewing files that changed from the base of the PR and between 43e5f2a and 5c3a181.

📒 Files selected for processing (6)
  • README.md
  • docs/generate.md
  • polylogue/scenarios/__init__.py
  • polylogue/scenarios/corpus.py
  • tests/unit/scenarios/test_corpus.py
  • tests/unit/scenarios/test_demo_archive_convergence.py
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feature/feat/demo-assertion-overlays-1843

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

github-actions Bot pushed a commit that referenced this pull request Jun 16, 2026
@Sinity
Sinity merged commit b61bb63 into master Jun 16, 2026
14 checks passed
@Sinity
Sinity deleted the feature/feat/demo-assertion-overlays-1843 branch June 16, 2026 02:42
Sinity added a commit that referenced this pull request Jun 16, 2026
## Summary

Adds direct `polylogue status --format json` component-readiness entries
for the assertion substrate and deterministic recovery transforms. The
new entries are additive under `component_readiness.assertions` and
`component_readiness.transforms`; existing `archive_readiness`,
embedding readiness, and archive-surface components remain unchanged.

## Problem

#1832 is converging status/readiness onto one vocabulary. After #1880
and #1883 settled concrete transform and assertion surfaces, status JSON
still could not answer whether those capability families were usable,
missing, or degraded.

## Solution

Add typed readiness adapters in `polylogue.readiness.capability` for the
user-tier assertion substrate and transform registry. Direct status JSON
now reads bounded `user.db.assertions` counts and maps the transform
registry plus existing archive session count into canonical
`ComponentReadiness` DTOs. This intentionally stays in direct CLI status
for now: daemon/web surfaces do not yet carry truthful user-tier
assertion counts or transform availability details.

## Verification

- `nix develop --command devtools test
tests/unit/core/test_readiness_capability.py
tests/unit/cli/test_status.py -k 'readiness or component or assertion or
transform'` -> `15 passed, 24 deselected`
- `nix develop --command devtools verify --quick` -> `exit_code 0`
- Rebased onto current `origin/master` after #1975 merged; pre-push
quick gate -> `exit_code 0`

## PR handoff checklist

Issue slice: #1832 transform/assertion readiness entries after
#1880/#1883 surfaces settled.
Files inspected: `polylogue/readiness/capability.py`,
`polylogue/readiness/__init__.py`, `polylogue/cli/commands/status.py`,
`tests/unit/core/test_readiness_capability.py`,
`tests/unit/cli/test_status.py`, `polylogue/daemon/status.py`.
Files changed: `polylogue/readiness/capability.py`,
`polylogue/readiness/__init__.py`, `polylogue/cli/commands/status.py`,
`tests/unit/core/test_readiness_capability.py`,
`tests/unit/cli/test_status.py`.
Old surface removed or retained: retained existing status/archive
readiness surfaces; added canonical component entries only.
Contracts/tests added: adapter tests for assertion/transform readiness;
direct status JSON tests for ready and missing states.
Generated artifacts updated: none; render/topology checks stayed clean.
Verification commands and results: listed above.
Known caveats / SPEC_MISMATCH: daemon/web readiness is not changed
because those payloads do not currently include bounded assertion counts
or transform registry/session capability details.
Follow-up intentionally not included: daemon/web/MCP projection for
assertion/transform readiness once their payload seams carry the same
bounded counts.

Ref #1832

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

* **New Features**
* Enhanced status reporting to include assertions and transforms
readiness information.
* Status command now provides detailed diagnostics for assertions and
transform registry availability.

* **Tests**
* Added comprehensive test coverage for new assertions and transforms
readiness checks.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
Sinity added a commit that referenced this pull request Jun 16, 2026
## Summary
Complete #1843's README-ready demo transcript by adding the missing
`analyze` example alongside the existing demo import, status, stats,
search, and read commands.

## Problem
The #1843 acceptance criteria require the demo archive to support
search/read/analyze examples. The current README and `docs/generate.md`
transcript showed search and read after daemon convergence, but not an
analyze command. Closing the issue without this would leave a literal AC
gap.

## Solution
Add `polylogue find "pytest" then analyze --facets` to both the README
quick transcript and the detailed generate/demo page. Update the async
import caveat so it consistently says search/read/analyze examples
become meaningful after daemon convergence.

### AC matrix

| AC | Current state |
| --- | --- |
| A new user can run demo import from a clean checkout. | Satisfied by
`polylogue import --demo` in `polylogue/cli/commands/import_command.py`;
tested by `tests/unit/cli/test_import.py`; documented in `README.md` and
`docs/generate.md`. |
| Demo archive supports search/read/analyze examples. | Satisfied here:
README/docs now show `polylogue "pytest" list`, `polylogue find "pytest"
then read --view messages`, and `polylogue find "pytest" then analyze
--facets`. The archive-level `pytest` search/read evidence is pinned by
`tests/unit/scenarios/test_demo_archive_convergence.py`; analyze is the
registered aggregate verb over the matched result set. |
| Fixture world is committed and documented. | Satisfied by
`build_demo_corpus_specs()` and docs in `docs/generate.md`; prior PRs
#1934, #1935, #1936, #1937, #1940, #1943, #1950, #1953, and #1975
recorded the fixture, live daemon path, convergence proof, and overlay
evidence. |
| Tests validate demo output without relying on dev machine state. |
Satisfied by isolated archive/config roots in the demo import and
convergence tests; #1975 additionally proves deterministic user overlays
and private-path hygiene. |
| No private data / no host-specific absolute paths. | Satisfied by the
relative fixture-path tests and convergence assertions in
`tests/unit/scenarios/test_corpus.py` and
`tests/unit/scenarios/test_demo_archive_convergence.py`. |
| Known tags/notes/KV once #1883 lands. | Satisfied by #1975:
`seed_demo_user_overlays()` stores the `pytest-triage` tag, mark,
blackboard note, saved query, and typed tag/decision assertions in
`user.db` after convergence. |

### Explicit decisions

`polylogue import --demo` remains asynchronous daemon scheduling. It
does not synchronously seed user overlays because the target sessions
may not exist yet. Overlay seeding stays as deterministic
repository/release evidence after convergence, as documented by #1975.

## Verification
- `nix develop --command devtools verify-doc-commands` -> `99 doc files
scanned, no stale commands`.
- `nix develop --command devtools verify --quick` -> `exit_code 0`.
- Pre-push `devtools verify --quick` -> `exit_code 0`.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant