Repository navigation
feat(memory): add agent corrections and reviewed lifecycle candidates - #53
Merged
Merged
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 75459bf352
ℹ️ 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".
entelecheia
force-pushed
the
feat/40-agent-candidates
branch
from
October 24, 2026 15:27
75459bf to
3741581
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Refs #40
Agents can propose a structured fail or an exact-entry correction through MCP; only the person can accept it into curated memory. Goal completion offers linked short-note promotion candidates instead of promoting automatically.
amem decaypreviews old notes and applies only after a fresh revision review and explicit confirmation.F8: remember keeps its legacy text shape and explicit kind, and adds the complete structured fail shape. New amem_correct binds the visible exact id and current revision in the host. Policy screens the proposal plus target before/after awaits; model parameters cannot select a home, project, actor or revision.
F9: promotion is machine-local candidate metadata, accepted through existing store.promote with canonical identity and original attribution. Goal links and about goal/task nodes select notes without a live board; repeated bounded offers skip retained pending/decided receipts. Existing retention still applies, so a rejected note can be offered again once its receipt expires. Decay defaults to live long notes strictly older than 90 days, protected by open/active/blocked goals. Retained positive citations only exempt (delivery time cannot date a later citation); unknown remains unknown. Demote is default; forget requires --forget each run and a confirmation explicitly naming forgetting. Every selected revision and current eligibility is checked before any effect. Shared-v1 schema, hashing and operation vocabulary are unchanged.
Scope and ceilings are in docs/contracts.md: 64 selected notes/5000 scanned rows bound asynchronous work, while core list/get still materialize the corpus; older/raw writers retain the existing mutation-fence ceiling; a filesystem failure after preflight can leave an append-only partial batch. A completed goal remains done if subsequent candidate offering fails. Interrupted acceptance needs person inspection.
Approved existing-test spec changes (agent-mem#40 F8/F9 replaces the #15 deferrals):
Spec-driven tool-count changes: src/mcp.ts adds amem_correct; test/mcp.test.ts (3 lengths and title), test/mcp-cli.test.ts and scripts/measure-mcp-budget.ts move 9 to 10. Every count also checks the exact full tool-name list including amem_correct, so swaps cannot hide behind the count. All budget limits are unchanged.
Round 1 review repairs:
Expiry-bound follow-up: core demote and decay whole-batch preflight share assertDemotionExpiry. An explicit deadline must be canonical future UTC and no later than the configured short-tier TTL (14days by default) plus one hour from now. Past/noncanonical and one millisecond beyond the cap refuse without writes; the exact upper boundary and a custom TTL are tested. A forged overlong plan refuses before any demote attempt, rather than only failing the first effect. Focused12pass/0fail,87assertions; removing either the core cap or batch preflight makes its regression fail. Only store.ts,decay-review.ts,its test and contracts change after3741581.
Latest validation at9de2df68523debb98069b4efe88e9847a8609ef9, on fresh mainf2bcf5b2ce28104e0d123863b0846dda736ef3d9:
Exact-head Ubuntu/macOS CI and the installed-artifact smoke remain required. No local Linux or additional artifact smoke was run for this delta. No publish, merge or real-home mutation.