Skip to content

P2-X: Fix PLAN.md drift, simplify ClusterStability, add curiosity broadcasting integration tests#83

Merged
devlux76 merged 6 commits intomainfrom
copilot/p2-x-ensure-background-consolidation
Mar 14, 2026
Merged

P2-X: Fix PLAN.md drift, simplify ClusterStability, add curiosity broadcasting integration tests#83
devlux76 merged 6 commits intomainfrom
copilot/p2-x-ensure-background-consolidation

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Mar 14, 2026

P2 background consolidation + sharing pipeline implementations all exist and pass tests, but PLAN.md had stale duplicate entries marking completed modules as missing, ClusterStability used an unnecessarily complex traversal based on an incorrect assumption about the MetadataStore API, and integration test coverage was missing for the curiosity broadcasting pipeline.

PLAN.md cleanup

  • Remove 4 duplicate ❌ rows for modules already marked ✅ (IdleScheduler, HebbianUpdater, PrototypeRecomputer, FullNeighborRecalc)
  • Update ExperienceReplay to ✅, Daydreamer status to 6/6 (100%)
  • Mark Blocker 3 (sharing pipeline) as RESOLVED

ClusterStability simplification

  • collectAllShelves() and collectAllVolumes() were doing O(pages × books × volumes × shelves) traversal because a comment incorrectly claimed MetadataStore lacked getAllShelves()—it's been in core/types.ts since the interface was defined.
// Before: ~45 lines of manual page→book→volume→shelf traversal
private async collectAllShelves(metadataStore: MetadataStore) {
  return metadataStore.getAllShelves();
}

Integration test coverage

  • Curiosity broadcasting + PII gating: ingest eligible + PII content → broadcast probe → verify eligibility classifier blocks PII pages while passing public-interest content
  • Graph fragment import: verify SubgraphImporter persists pages, strips sender identity, and makes imported content discoverable via getPage()
Original prompt

This section details on the original issue you should resolve

<issue_title>P2-X: Ensure P2 background consolidation + sharing pipeline meets DESIGN</issue_title>
<issue_description>NOTE: DESIGN has been moved to the wiki https://github.com/devlux76/cortex/wiki

This is a super-task for completing the remaining P2 work that must satisfy the DESIGN’s background consolidation + safe sharing contract.\n\nIt should be a child of the existing P2 tracker (#70). Close each listed subtask issue as it is verified complete; this issue remains open until all checklist items are checked.\n\n### Subtasks (close the relevant issue when done)\n- [ ] Ensure Busy/Idle Scheduler + task queue operates reliably and is resilient to throwing tasks. (Related: #29)\n- [ ] Ensure HebbianUpdater properly strengthens/decays edges, enforces , and triggers salience + promotion sweep. (Related: #30)\n- [ ] Ensure FullNeighborRecalc recomputes obeying and clears dirty flags (including ensuring neighbor graph is populated). (Related: #31/#62)\n- [ ] Ensure PrototypeRecomputer recomputes prototypes/medoids and appends them to the VectorStore, including quota-based promotion sweep. (Related: #32)\n- [ ] Ensure ClusterStability detects oversized/empty communities and performs splits/merges, including deletion of orphaned volumes. (Related: #34)\n- [ ] Ensure Curiosity broadcast + P2P sharing is implemented with eligibility/PII gating, rate limiting, and safe import. (Related: #35/#63)\n- [ ] Ensure Integration test coverage validates Williams-bound resident capacity, background consolidation behavior, and safe curiosity broadcasting. (Related: #33)\n\n### Completion guidelines\n- Close each source issue (e.g., #29, #30, #31, #32, #33, #34, #35, #62) as soon as the implementation meets its acceptance criteria.\n- Keep this issue open until all checklist items are complete and the system matches the P2 design expectations.\n\n> NOTE: This is a tracking issue; it does not implement behavior itself. It exists to coordinate completion across the individual subtasks and ensure none are silently left behind.,labels:[P2: medium]</issue_description>

<agent_instructions>DESIGN is now at https://github.com/devlux76/cortex/wiki</agent_instructions>

Comments on the Issue (you are @copilot in this section)


🔒 GitHub Advanced Security automatically protects Copilot coding agent pull requests. You can protect all pull requests by enabling Advanced Security for your repositories. Learn more about Advanced Security.

Copilot AI and others added 2 commits March 14, 2026 07:57
…y broadcasting integration tests

- Remove duplicate ❌ Missing rows in Daydreamer section of PLAN.md
- Update ExperienceReplay status to ✅ Complete
- Update Daydreamer completion to 6/6 (100%)
- Mark Blocker 3 (sharing pipeline) as RESOLVED
- Simplify ClusterStability.collectAllShelves/collectAllVolumes to use
  MetadataStore.getAllShelves()/getAllVolumes() instead of complex workaround
- Add integration tests for curiosity broadcasting (PII gating) and
  graph fragment import (identity stripping, discoverability)

Co-authored-by: devlux76 <86517969+devlux76@users.noreply.github.com>
…dary

Co-authored-by: devlux76 <86517969+devlux76@users.noreply.github.com>
Copilot AI changed the title [WIP] [P2-X] Ensure P2 background consolidation and sharing pipeline P2-X: Fix PLAN.md drift, simplify ClusterStability, add curiosity broadcasting integration tests Mar 14, 2026
Copilot AI requested a review from devlux76 March 14, 2026 08:00
@github-actions github-actions bot added layer: daydreamer Background consolidation (LTP/LTD, recalc) layer: testing Test coverage and integration tests layer: documentation API docs, developer guide, architecture diagrams labels Mar 14, 2026
@devlux76 devlux76 marked this pull request as ready for review March 14, 2026 08:18
Copilot AI review requested due to automatic review settings March 14, 2026 08:18
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR cleans up P2 documentation drift, simplifies Daydreamer’s ClusterStability volume/shelf collection by using the MetadataStore aggregate APIs, and adds integration coverage around the sharing pipeline (curiosity probe broadcasting, eligibility gating, and fragment import discoverability).

Changes:

  • Remove stale/duplicate “missing” module entries in PLAN.md, update Daydreamer completion status, and mark Sharing Blocker 3 as resolved.
  • Simplify ClusterStability shelf/volume collection to use metadataStore.getAllShelves() / getAllVolumes() directly.
  • Add integration tests for curiosity probe broadcasting + eligibility filtering and for importing a peer graph fragment into MetadataStore.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.

File Description
tests/integration/Daydreamer.test.ts Adds integration tests for curiosity probe broadcasting/PII gating and fragment import discoverability.
daydreamer/ClusterStability.ts Replaces expensive traversal helpers with direct MetadataStore aggregate methods.
PLAN.md Removes duplicate “missing” rows, updates Daydreamer status to 6/6, and marks the sharing blocker as resolved.

devlux76 and others added 3 commits March 14, 2026 02:29
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@devlux76 devlux76 merged commit f7b75ef into main Mar 14, 2026
1 of 3 checks passed
@devlux76 devlux76 deleted the copilot/p2-x-ensure-background-consolidation branch March 14, 2026 08:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

layer: daydreamer Background consolidation (LTP/LTD, recalc) layer: documentation API docs, developer guide, architecture diagrams layer: testing Test coverage and integration tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

P2-X: Ensure P2 background consolidation + sharing pipeline meets DESIGN

3 participants