Repository navigation
refactor(active-memory): split runtime modules - #106285
Conversation
da2953a to
40e966a
Compare
|
Codex review: needs real behavior proof before merge. Reviewed July 13, 2026, 12:13 PM ET / 16:13 UTC. Summary PR surface: Source +489. Total +489 across 13 files. Reproducibility: not applicable. This PR is a behavior-preserving refactor rather than a reported runtime defect. The packaging-surface problem is directly source-verifiable from the new top-level module placement and bundled entry discovery. Review metrics: 1 noteworthy metric.
Stored data model Root-cause cluster Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Rank-up moves:
Proof guidance:
Risk before merge
Maintainer options:
Next step before merge
Security Review findings
Review detailsBest possible solution: Move the implementation modules beneath a private directory such as Do we have a high-confidence way to reproduce the issue? Not applicable: this PR is a behavior-preserving refactor rather than a reported runtime defect. The packaging-surface problem is directly source-verifiable from the new top-level module placement and bundled entry discovery. Is this the best way to solve the issue? No, not in its current layout. Splitting the monolith is appropriate, but private implementation modules should live below the top-level packaged entrypoint boundary rather than expanding the plugin's importable surface. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against ec2f0c6861fe. Label changesLabel changes:
Label justifications:
Evidence reviewedPR surface: Source +489. Total +489 across 13 files. View PR surface stats
What I checked:
Likely related people:
What the crustacean ranks mean
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics. How this review workflow works
|
40e966a to
15f9fcb
Compare
7e3bb57 to
f4dff5b
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: f4dff5b296
ℹ️ 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".
| @@ -0,0 +1,397 @@ | |||
| import path from "node:path"; | |||
There was a problem hiding this comment.
Keep split modules out of packaged plugin surface
In packaged builds, bundled plugin discovery treats every top-level .ts file as a public build entry (collectTopLevelPublicSurfaceEntries), and listBundledPluginPackArtifacts() now includes dist/extensions/active-memory/config.js plus the other new sibling modules. That makes these private refactor modules shipped/importable artifacts instead of keeping index.ts/doctor-contract-api.ts as the only Active Memory surfaces, effectively freezing internals that this split was meant to keep local; move the runtime modules under a private subdirectory (or exclude them from the bundled public-surface collector) before release.
Useful? React with 👍 / 👎.
f4dff5b to
a10dbc3
Compare
…-memory-modules-landing
…-memory-modules-landing
|
Land-ready verification:
Known proof gap: no live provider recall run. This is a behavior-preserving module split; the full focused test surface and exact-head gates cover the moved branches. |
|
Merged via squash.
|
* refactor(active-memory): split runtime modules * fix(active-memory): annotate hook deadline result * refactor(active-memory): keep runtime modules bounded * fix(active-memory): use type-only recall imports * refactor(active-memory): supersede partial split * fix(gateway): type pruned worker manifest
Closes #106280
What Problem This Solves
The Active Memory plugin runtime had grown to 4,182 lines in one entrypoint, combining configuration, session eligibility, prompt/query shaping, transcript evidence, recall execution, and plugin registration. That made reviews slower and made ownership boundaries harder to see.
After refreshing the branch onto current
main, the repository-wide type gates also exposed a pre-existing strict-indexing error in the new worker bundle manifest pruning code. That baseline error blocked exact-head validation for this refactor.Why This Change Was Made
This keeps
index.tsas the thin plugin registration surface and moves the existing runtime into focused sibling modules for types/constants, configuration, sessions, prompts/queries, transcript evidence, and recall execution. Runtime behavior, plugin exports, config/storage contracts, and the existing test helper surface remain unchanged. Every changed Active Memory production module is below the repository's 500-line LOC ratchet; the largest is 445 lines.The worker bundle fix is one type-only annotation: the pruned JSON manifest remains a string-keyed record while dynamically named fields are deleted. Runtime bytes and behavior are unchanged.
User Impact
No user-visible behavior change. Maintainers get smaller review surfaces and explicit one-way module dependencies for future Active Memory fixes.
Evidence
corepack pnpm test extensions/active-memory— 179 tests passed on Blacksmith Testboxtbx_01kxe08p2t4208d1hdse6cct5t(Actions run).corepack pnpm check:loc --base origin/main -- extensions/active-memory— all 13 changed Active Memory production files passed the 500-line ratchet on the same Testbox.corepack pnpm check:test-typesandcorepack pnpm build— full test-type and build gates passed on the same Testbox.tbx_01kxe17bwfqfvdwkatdyybenbz(Actions run): extension lint, 179 focused tests, and test types passed.AI-assisted: yes. The implementation and generated diff were reviewed against the complete Active Memory test surface.