Skip to content

feat(insights): regenerate Fable packets from archive - #2814

Merged
Sinity merged 2 commits into
masterfrom
feature/fanout/fable-demo-2
Jul 13, 2026
Merged

Sinity merged 2 commits into
masterfrom
feature/fanout/fable-demo-2

Conversation

@Sinity

@Sinity Sinity commented Jul 13, 2026

Copy link
Copy Markdown
Owner

Summary

Archive-backed cold-regeneration adapter for the Fable delegation packet compiler — the gap PR #2775's review honestly marked partial on polylogue-212.9.1.

Problem

The packet compiler was fail-closed but accepted supplied structural/label inputs; 212.9.1 requires loading canonical delegations, durable schema provenance, and active annotations from the archive itself.

Solution

polylogue/insights/fable_packet.py: archive-backed regeneration path reading canonical delegations + durable annotation schema (via DurableAnnotationSchema) + active assertion labels before compiling. Coordinator follow-up commit narrows applicable/confidence typing and fixes the qualified_id access for mypy --strict.

Verification

  • Lane: focused archive integration checks on the adapter commit (7287c54)
  • Coordinator: mypy polylogue/insights/fable_packet.py clean; focused fable/packet tests 2 passed; pre-push quick gate green

Ref polylogue-212.9.1

Sinity and others added 2 commits July 13, 2026 01:52
Load canonical delegation attempts, durable schema provenance, and active annotation assertions from ArchiveStore before compiling the private packet.\n\nRef polylogue-212.9.1\n\nCo-Authored-By: Codex <[email protected]>
Coordinator follow-up on the lane's 7287c54: narrow applicable/
confidence through bound locals so mypy can prove the types, and reach
qualified_id through the DurableAnnotationSchema wrapper's inner
AnnotationSchema.

Verified: mypy clean on the file; focused fable/packet tests 2 passed.

Co-Authored-By: Claude <[email protected]>
@coderabbitai

coderabbitai Bot commented Jul 13, 2026

Copy link
Copy Markdown

Warning

Review limit reached

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

Next review available in: 20 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

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.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: 38de470e-dfb8-4f85-8e82-b4f4007e2a22

📥 Commits

Reviewing files that changed from the base of the PR and between 4fde802 and 3c1ffe7.

📒 Files selected for processing (1)
  • polylogue/insights/fable_packet.py
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feature/fanout/fable-demo-2

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.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 3c1ffe7df7

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread polylogue/insights/fable_packet.py Resolved
Comment thread polylogue/insights/fable_packet.py Resolved
@Sinity
Sinity merged commit d29fdea into master Jul 13, 2026
3 of 14 checks passed
@Sinity
Sinity deleted the feature/fanout/fable-demo-2 branch July 13, 2026 02:06
Sinity added a commit that referenced this pull request Jul 13, 2026
…6,2817,2818

th0 (test-harness-2 #2817) and 212.9.1 (fable-demo-2 #2814) fully
satisfied — closed. ra3w/s7ae.8/20d.2 (basetemp-fix #2815, live-performance
continuation #2816) supplementary progress noted on already-open beads.
rxdo.9 (analysis-rigor #2818, program adoption only), rxdo.4 (rxdo-lifecycle
#2812, fuller FINDING implementation but resolve-proof/provenance
projection still deferred), rxdo.2/rxdo.3 (rxdo-substrate #2813, explicitly
incomplete per its own adversarial review) noted with disposition.

Co-Authored-By: Claude <[email protected]>
Sinity added a commit that referenced this pull request Jul 29, 2026
Problem: polylogue/insights/fable_packet.py (polylogue-212.9.1) was
closed as delivered by PR #2814, credited with adding "an archive-backed
cold-regeneration adapter" (regenerate_private_fable_packet) over the
pure compile_private_fable_packet. Whole-tree grep found zero callers of
either function outside the module's own unit test, and that test only
exercises the pure compiler with hand-built fixtures -- the
archive-reading half the close claim is about had no test coverage and
no CLI/MCP/devtools surface anywhere. Nothing could invoke it short of a
Python REPL: closed-and-shipped that was never reachable.

Solution: delete the module and its test. polylogue/insights/cohorts.py
(compile_cohort_manifest and friends) stays -- it has an independent,
real caller in polylogue/demo/receipts.py. Reopened polylogue-212.9.1
with a corrective note rather than leave a closed bead recording a false
completion claim; the parent campaign (212.9) is P3/deferred, and
resuming this work needs a real operator-facing surface built alongside
it, not ahead of one. Full design preserved in git history for reuse.

Verification: devtools render topology-projection && devtools render
topology-status (no drift beyond the removed module's rows); devtools
render all --check clean.

Ref polylogue-212.9.1
Sinity added a commit that referenced this pull request Aug 5, 2026
## Summary

Restore and wire the three modules identified by polylogue-ic5i. Git
history, Bead intent, and the current architecture all show these as
intended capabilities rather than positively unwanted code. No archive
migration or lifecycle work is included.

## Problem

PR #3390 removed `storage/sqlite/holdout_cohorts.py`,
`insights/fable_packet.py`, and `storage/block_anchor.py` because they
had no production callers. Their prior design records show incomplete
integration or an adopted contract, so deletion would remove desired
behavior. The holdout policy was especially unsafe as an uncalled guard
could not protect any route.

## Solution

- `storage/sqlite/holdout_cohorts.py`: RESTORE + WIRE. Bead
`polylogue-rxdo.9.4` and PR #2888 establish the analysis-integrity
policy. `DurableRefResolver._retained_result` now applies the guard
before reading result-set members, and the registered MCP
reference-query route reaches that resolver. Exploratory reads fail
closed for held-out result sets; explicit confirmation remains available
to confirmation callers.
- `insights/fable_packet.py`: RESTORE + WIRE. Bead `polylogue-212.9.1`
and PR #2814 establish the archive-backed cold-regeneration adapter.
`Polylogue.regenerate_private_fable_packet` exposes it through the
existing async API facade and operation-parity surface, including real
delegation and annotation reads.
- `storage/block_anchor.py`: RESTORE + WIRE. Bead `polylogue-svfj` and
PR #2588 establish the content-hash citation-anchor contract.
`Polylogue.resolve_ref` now recognizes the textual anchor form and
resolves it through the existing archive read route, returning a typed
block-anchor payload.

No module was deleted. The deferred `relocated_lineage` and
`quarantined` anchor states remain unchanged because this task does not
establish their production semantics.

## Holdout enforcement and anti-vacuity

The guard is enforced in the production evaluation path, before the sole
`get_result_set_members()` call.
`tests/unit/archive/query/test_evaluator.py::test_retained_holdout_result_set_fails_closed_before_members_are_read`
proves the resolver ordering.
`tests/unit/mcp/test_reference_query_pipeline.py::test_mcp_query_refuses_an_exploratory_read_of_a_holdout_result_set`
seeds durable result-set data and exercises the registered MCP query
handler. Removing `require_non_holdout_access` changes that route from a
typed refusal to a successful member read, so the tests do not merely
assert a helper or a test-only registry.

The Fable facade test uses a real temporary archive with persisted
delegations and labels. The block-anchor test resolves an actual stored
block through `run_archive_read` and checks its content hash.

## Verification

Focused real-route tests:

```text
direnv exec . devtools test tests/unit/archive/query/test_evaluator.py tests/unit/mcp/test_reference_query_pipeline.py tests/unit/api/test_facade_contracts.py tests/unit/insights/test_fable_packet.py tests/unit/storage/test_block_anchor.py tests/unit/storage/test_holdout_cohorts.py
337 passed, 4 warnings in 34.05s
```

Quick gate on the rebased head:

```text
direnv exec . devtools verify --quick
exit_code: 0
run_id: 20260805T075357Z-quick-1683451-664ef79b
```

`devtools verify --all` and the integration suite were not run. The
focused suite covers the changed production routes and the quick gate
covers formatting, typing, generated surfaces, layering, and policy
checks.

## Review notes

An independent adversarial review traced the MCP route to
`DurableRefResolver` and found one legitimate gap: the initial Fable
facade test covered only an empty archive. Commit `0813d4415` adds a
non-empty persisted delegation and label case, then the focused suite
and quick gate were rerun on the rebased head. A nested cold review
process later hit the checkout guard because it bypassed `direnv`; it
emitted no additional actionable finding.

---------

Co-authored-by: Claude <[email protected]>
Co-authored-by: test <[email protected]>
@Sinity

Sinity commented Sep 30, 2026

Copy link
Copy Markdown
Owner Author

Historical Codex triage: evidence checked at 5ebcfe5. This records that source revision; it does not claim a fresh review of current master.

Only the rows listed above are dispositioned. Held findings remain open.

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