Repository navigation
refactor(session-flow): share the plugin data-root rule with save_point - #17391
Conversation
save_point.py now resolves its fallback memory dir through plugin_paths.data_root, the rule away.py already uses, so one implementation of the data-root rule remains. The cache-install test copies plugin_paths.py into the fake plugin tree, and the agreement test that kept the copies in step is gone. census.py is unchanged: it holds no data-root rule (its data dir is the required --data-dir argument), and it is a collector fingerprint input, so editing it would re-ingest every stored session. Co-authored-by: Claude Opus 5.5 <[email protected]>
…actor Co-authored-by: Claude Opus 5.5 <[email protected]>
Codex Review Summary: ✅ CompletedThis 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. |
|
claude-review reviewed No findings. This is a code-review pass over all 5 changed files at The PR removes Behavior is unchanged (checked by reading the code, not by running it).
No caller is left behind.
Coverage stays in place.
Loosened-check criterion.
Closing issue. The PR context file has no closing-issue section: the PR says Other checks.
Verifier dropped 0 of 0 candidates. |
|
claude-security-review reviewed Security review: PR #17391, head 6a8c72aI found no security issues. What changed. What I checked.
critical-findings: 0 |
Refs: #17383
Summary
Problem: the session-flow plugin data-root rule existed in two places,
save_point.pyand the sharedplugin_paths.py, and an agreement test existed only to keep them in step. Nowsave_point.pycallsplugin_paths.data_root, the same functionaway.pyuses, so only one implementation of the rule remains.census.pyis left unchanged. It has no data-root rule: its data dir comes from the required--data-dirargument. Its only overlap withplugin_paths.pyiswrite_atomic.census.pyis also listed inCOLLECTOR_INPUTSincollect.py, so any edit to it re-ingests every stored session. Since this refactor must not change behavior, that is out of scope here.Fix
save_point.py: removed_plugin_data_root._default_memory_dirnow callsplugin_paths.data_root(os.environ, _SCRIPTS_DIR.parent).test_save_point.py: the fake cache install now copiesplugin_paths.pyalong with the other scripts.test_plugin_paths.py: droppedtest_matches_save_point_rule. Once both scripts call the same function, it can no longer fail.reference/structure.md: the verification record now namesplugin_paths.pydata_root.bump: none.Verification
uvx --with pytest pytest plugins/session-flow/scripts/tests -q: 540 passed. The baseline before the change was 544; the difference is the 4 deleted parametrized cases.scripts/run-ruff.sh checkon the three changed Python files: all checks passed.check-affected: passed.census.pyand its tests are unchanged.Related
N/A
Remaining
census.pyimporting fromplugin_paths.py: there is no data-root rule in it to switch. The only possible change is to delegate itswrite_atomic. Becausecensus.pyis a collector fingerprint input, that would re-ingest every stored session once, and it would add the shared version's fsync. The owner decides between that change and treating the issue as delivered by this PR.test_collect.py) only needplugin_paths.pyifcensus.pyimports it.🤖 Generated with Claude Code