Skip to content

docs: v2.x specs for replay/derivation-worker/view-flip chain - #267

Merged
robotrocketscience merged 2 commits into
mainfrom
docs/v2x-replay-derivation-flip-specs
Apr 29, 2026
Merged

docs: v2.x specs for replay/derivation-worker/view-flip chain#267
robotrocketscience merged 2 commits into
mainfrom
docs/v2x-replay-derivation-flip-specs

Conversation

@robotrocketscience

Copy link
Copy Markdown
Owner

Summary

Three cascade addenda to docs/design/write-log-as-truth.md, one per post-#205 chain issue. Drafts the formal spec memos called for by the needs-spec label on each.

Pattern matches the substrate-cascade addenda merged via #257 / #259: each memo states what's being decided, recommendation, decision asks, downstream impact, out-of-scope, provenance. Recommendations only; ratification is a separate sweep.

Recommendations at a glance

Issue Memo Recommendation
#262 v2_replay.md Shape-equality at ingest time, not bit-equality. Posterior drift and legacy-origin backfill bucketed separately, not flagged as drift.
#264 v2_derivation_worker.md Single-transaction ingest, idempotency on (derived_belief_ids non-empty AND beliefs exist), recover-by-replay between batches, edges in same pass as beliefs.
#265 v2_view_flip.md `WRITE_LOG_AUTHORITATIVE` flag with two-release soak before default-on. `aelf rebuild` preserves alpha/beta and replays feedback. `--rule-set` and `--as-of` ship as stubs in v2.x. Drift alarm wires `replay_full_equality` into `aelf doctor`.

Cross-links

Test plan

  • Memos render on GitHub without broken cross-links.
  • Each memo's Decision asks section is reviewable in isolation (don't need to read the whole chain to ratify a single ask).
  • Recommendations are consistent across the three memos (the equality contract in v2_replay.md matches the worker's invariants in v2_derivation_worker.md, which match the rebuild semantics in v2_view_flip.md).

Three cascade addenda to docs/design/write-log-as-truth.md, one per
post-#205 chain issue:

- docs/v2_replay.md (#262): shape-equality at ingest time, not
  bit-equality. Posterior drift is feedback doing its job, not
  drift; legacy-origin backfill bucketed separately. Drift exit
  threshold and example sample sizes settled.
- docs/v2_derivation_worker.md (#264): single-transaction
  ingest path, idempotency check on (derived_belief_ids non-empty
  AND beliefs exist), recover-by-replay between batches, edges
  derived in same pass as beliefs.
- docs/v2_view_flip.md (#265): WRITE_LOG_AUTHORITATIVE flag with
  two-release soak before default-on, aelf rebuild preserves
  alpha/beta and replays feedback by default, --rule-set and
  --as-of ship as stubs in v2.x, drift alarm wires
  replay_full_equality into aelf doctor.

Each memo follows the cascade-addendum pattern: what's being
decided, recommendation, decision asks, downstream impact,
out-of-scope, provenance. Recommendations only; decisions are
the maintainer's.
@robotrocketscience

Copy link
Copy Markdown
Owner Author

Review: discretion grep flags one phrase — docs/v2_replay.md line 150: queen-tier → drop the hyphen to match the existing convention in docs/substrate_decision.md ("queen" / "rook" used as plain label names). Otherwise CI green and content reads cleanly. Dropping review label so the author can address.

@robotrocketscience

Copy link
Copy Markdown
Owner Author

Review: discretion leak — three docs added in this PR carry tier vocabulary that's reserved for internal coordination, not public artifacts.

  • docs/v2_derivation_worker.md L75–77: ## Why queen heading + body
  • docs/v2_replay.md L148–150: ## Why queen heading + body (queen-tier work)
  • docs/v2_view_flip.md L235–237: ## Why queen heading + body (queen)

Suggested fix: drop the section entirely, or rename to something neutral like ## Cost / risk profile and rewrite without tier terms (e.g. drop "queen work" → "judgment-heavy"; drop "queen-tier work" → "design-decision work"). Recommendations and LOC estimates can stay; the tier framing is the leak.

Once sanitized, push the fixup and re-request review. Dropping review-Kulili.

@robotrocketscience robotrocketscience added review-Setr PR coordination mutex and removed review-Kulili PR coordination mutex labels Apr 29, 2026
@robotrocketscience

Copy link
Copy Markdown
Owner Author

Discretion review — three uses of queen/queen-tier in public docs:

  • docs/v2_derivation_worker.md line ~75 ("## Why queen") and line ~77 body
  • docs/v2_replay.md line ~148 ("## Why queen") and line ~150 body ("queen-tier work")
  • docs/v2_view_flip.md line ~235 ("## Why queen") and line ~237 body

Tier vocabulary doesn't belong in public artifacts. Suggest reframing as "Why this is design-heavy" / "Risk surface" or similar — the substance of the sections is fine, just the label needs to come out.

Dropping review-Setr so author can address.

@robotrocketscience robotrocketscience added review-Kulili PR coordination mutex and removed review-Setr PR coordination mutex labels Apr 29, 2026
@robotrocketscience

Copy link
Copy Markdown
Owner Author

Review: blocked on one fix.

Discretion leakdocs/v2_derivation_worker.md line ~150 ("The judgment calls above are the queen-tier work…"). Tier vocabulary doesn't appear in public artifacts. Suggest The judgment calls above are the design work or just the spec work.

Otherwise the cohort looks coherent: shape-equality contract in v2_replay matches worker invariants in v2_derivation_worker matches rebuild semantics in v2_view_flip; docs/design/write-log-as-truth.md and federation-primitives.md resolve; all CI green; no other discretion hits in the diff.

Push the one-word fix and history-scan should re-run clean. Dropping review label.

@robotrocketscience robotrocketscience added review-Kulili PR coordination mutex and removed review-Kulili PR coordination mutex labels Apr 29, 2026
@robotrocketscience

Copy link
Copy Markdown
Owner Author

Review: blocked — needs rebase before this is reviewable.

Branch last commit 2026-04-28T23:55, predates #253, #266, #259, #273, #276, #271, #277, #279 landing on main.

git diff main..head --stat against current main: 497 insertions / 3507 deletions across 24 files. The intended additions are three new spec files (docs/v2_replay.md, docs/v2_derivation_worker.md, docs/v2_view_flip.md, ~251 lines). The 3507 deletions are spurious — the branch was forked before the recent merge train and would unship src/aelfrice/derivation.py (#273), tests/test_ingest_bulk.py (#276), tests/test_legacy_migration.py (#271), docs/vocabulary_bridge.md (#279), tests/test_doctor_classify_orphans.py (#253), and several other recently-landed files.

Action requested: rebase onto current main, resolve so the diff is just the three new spec docs, re-request review. CI will need to re-run.

Dropping review-Kulili.

@robotrocketscience robotrocketscience added review-Kulili PR coordination mutex and removed review-Kulili PR coordination mutex labels Apr 29, 2026
@robotrocketscience

Copy link
Copy Markdown
Owner Author

Blocker on merge: all three new memos ship tier-reasoning vocab in public-readable docs.

  • docs/v2_replay.md: ## Why queen + "the queen-tier work"
  • docs/v2_derivation_worker.md: ## Why queen + "the queen work"
  • docs/v2_view_flip.md: ## Why queen + "what makes it queen"

Per coordination protocol, "queen" / "queen-tier" / "rook" / "rook-tier" are banned in any third-party-readable artifact. The substance of the section (high-judgment scope, settle calls before implementing) is fine — just rename to e.g. ## Why this is judgment-scope and rephrase the body to drop the tier word. Same fix as the comment I just left on #277.

Sanitize in place, force-push, ping. Dropping review-Kulili.

@robotrocketscience robotrocketscience removed the review-Kulili PR coordination mutex label Apr 29, 2026
@robotrocketscience

Copy link
Copy Markdown
Owner Author

[claim:review:Kulili:2026-04-29T01:22:43Z]

@robotrocketscience

Copy link
Copy Markdown
Owner Author

Re-review after rebase: rebase is clean (251 ins / 0 del, three new docs only) and CI is green, but the discretion leak flagged in prior reviews has not been addressed. Still blocked.

Confirmed instances in current diff:

  • docs/v2_derivation_worker.md L75 ## Why queen, L77 "the queen work"
  • docs/v2_replay.md L148 ## Why queen, L150 "the queen-tier work"
  • docs/v2_view_flip.md L235 ## Why queen (+ body)

Per coordination protocol, queen / queen-tier / rook / rook-tier do not appear in third-party-readable artifacts. The section content is fine — just rename the heading (e.g. ## Why this is judgment-scope or ## Risk surface) and rephrase the bodies to drop the tier word.

Sanitize in place, force-push, re-request review. Dropping review-Kulili.

@robotrocketscience

Copy link
Copy Markdown
Owner Author

[release:review:Kulili:2026-04-29T01:23:30Z]

Renames '## Why queen' to '## Why this is judgment-scope' and rephrases bodies in v2_replay.md, v2_derivation_worker.md, v2_view_flip.md to drop 'queen'/'queen-tier' references. Substance unchanged.
@robotrocketscience

Copy link
Copy Markdown
Owner Author

[claim:review:Kulili:2026-04-29T01:25:54Z]

@robotrocketscience
robotrocketscience merged commit 643d4d5 into main Apr 29, 2026
8 checks passed
@robotrocketscience

Copy link
Copy Markdown
Owner Author

[release:review:Kulili:2026-04-29T01:26:12Z]

@robotrocketscience
robotrocketscience deleted the docs/v2x-replay-derivation-flip-specs branch April 29, 2026 01:26
robotrocketscience added a commit that referenced this pull request Apr 29, 2026
## Summary

Cascade addendum to `docs/bayesian_ranking.md`. Drafts the v2.0 spec
memo for the residual scope of
[#151](#151) — the
work that remains after #146 shipped the core posterior-weighted ranking
at v1.3.

- New file: `docs/v2_posterior_ranking_residual.md`
- Pattern matches `substrate_decision.md`, `v2_replay.md`,
`v2_view_flip.md`, `v2_derivation_worker.md`.

## Recommendation at a glance

| Slice | What | When |
|---|---|---|
| 1 | MRR uplift + ECE eval harness under
`benchmarks/posterior_ranking/` | ships first; no #150 dependency |
| 2 | Heat-kernel composition into the score equation | gated on #150 |
| 3 | Per-corpus weight sweep (`aelf bench --sweep`) | last; needs slice
1's evaluator |

Real-feedback retest is held out of v2.0 and filed as a follow-up —
pending corpus size threshold (≥1000 events / ≥100 beliefs).

## Decision asks (in the memo)

1. Three-slice sequencing.
2. MRR uplift threshold `+0.05`.
3. ECE threshold `0.10` for synthetic.
4. Weight sweep range `[0.0, 1.0]` step `0.1`.
5. Real-feedback retest deferred outside v2.0.

## Cross-links

- Closes (spec only) #151. Implementation tracked separately under the
same issue.
- Adjacent v2.x cascade specs: #267 (replay/derivation/view-flip).
- v1.3 partial: `docs/bayesian_ranking.md` (already on main).

## Notes

Docs-only. No code, no tests. Recommendation only — ratification is a
separate sweep, same as the other cascade addenda.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs-spec Spec doc not yet written

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant