Skip to content

Fix #94: admit promoted reflections in the project namespace on retrieve - #121

Merged
emp3thy merged 1 commit into
mainfrom
auto-fix/issue-94-agentcore-promoted-project-visibility
Jul 31, 2026
Merged

emp3thy merged 1 commit into
mainfrom
auto-fix/issue-94-agentcore-promoted-project-visibility

Conversation

@emp3thy

@emp3thy emp3thy commented Jul 30, 2026

Copy link
Copy Markdown
Owner

Closes #94

Summary

_fetch_reflection_buckets restricted the project-namespace admit set to frozenset({"active"}) while reflection_list (agentcore.py:1043) and the migrator (agentcore_migrate.py: confirmed → "promoted", scope=project → projects/{p}/reflections/) both use {"active", "promoted"}. Any migrated confirmed reflection therefore parsed cleanly and was then silently dropped at the status gate, so memory.retrieve and SessionStart returned only pending_review rows — the whole reviewed corpus went invisible. This PR widens allowed_project to match allowed_general (the safer of the two options the issue proposes), replaces the now-obsolete test_retrieve_excludes_non_active_status_in_project_namespace (which encoded the contradictory "promoted-in-project must be excluded" contract) with two focused tests: one keeps the retired-exclusion guarantee, the other pins the migrated-confirmed visibility bug from #94. Full tests/storage/ + tests/cli/test_agentcore_migrate.py suites pass (283/283).

Confidence

~92%. The fix is precisely the one the issue names ("(safer) widen allowed_project to {active, promoted} to match reflection_list, and fix the two contradictory tests together"): a two-line prod change and one test rewrite, in an area with dense existing coverage.


This PR was generated by a scheduled Claude routine that scans open issues and opens PRs only when confidence ≥ 90%.


Generated by Claude Code

_fetch_reflection_buckets restricted the project namespace admit set to
{active} while reflection_list and the migrator both use {active,
promoted}: migrated confirmed reflections (scope=project, body status=
promoted) were parsed and then silently dropped, so every memory.retrieve
returned only pending_review rows. Widen the project admit set to match.

@github-actions github-actions 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.

🟢 Claude BugBot Analysis

The diff widens the project-namespace status admit set from {"active"} to {"active", "promoted"} in _fetch_reflection_buckets, aligning it with reflection_list's documented default vocabulary; this is a scoped, self-consistent fix (project_ns remains actor-scoped so no cross-tenant leakage) with matching test updates, and no defects were found.

No bugs were detected in this PR.

@emp3thy
emp3thy merged commit afb2ec8 into main Jul 31, 2026
3 checks passed
@emp3thy
emp3thy deleted the auto-fix/issue-94-agentcore-promoted-project-visibility branch July 31, 2026 16:38
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.

Migrated confirmed reflections are invisible to retrieval (agentcore.py:450)

1 participant