You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
session-flow: switch save_point.py and census.py to the shared plugin_paths.py #17383
In the session-flow plugin, scripts/save_point.py and scripts/census.py each keep their own copy of the plugin data-root rule. scripts/plugin_paths.py is the shared implementation, so the rule exists in three places, and test_plugin_paths.py carries an agreement test that exists only to keep the copies in step.
Switching both scripts is not a one-line change: their tests copy a fixed list of scripts into a temporary plugin tree, so that list and those tests change too.
Done looks like
save_point.py and census.py import the data-root rule from scripts/plugin_paths.py.
Their tests' fixed script lists include plugin_paths.py and the tests pass.
One implementation of the rule remains; the agreement test in test_plugin_paths.py is removed or reduced to what is still needed.
Size: Small
Complexity: Low
Uncertainty: Known
Flags: none
Blocked by: none
Blast radius: session-flow's save_point.py, census.py, their tests, and test_plugin_paths.py; run by the plugin's scripts and its test suite.
Reversible: yes; revert the change.
Open questions: none
Understood: remove the duplicated data-root rule from save_point.py and census.py by importing scripts/plugin_paths.py, add plugin_paths.py to the tests' copied script lists, and drop or trim the agreement test. The done-when items are exact. No duplicate or merged fix found among the listed issues and pull requests.
Not admitted to the issue lane yet: no trusted-human acceptance criteria: a listed human must put the confirmed - [ ] criteria in the body or post them as their own comment, or, on an issue a listed human filed, intake's newest refinement comment must hold them unedited; intake's refinement of this body is due and may supply them.
melodic-automation-lanes commented on Nov 19, 2026
Refinement. A read-only run explored this repository, searched its issues and pull requests, and read the allowed docs to draft what follows. On an issue a listed human filed, it counts as the issue's spec once posted, while unedited; it is still model text, so check it.
Intended outcome: save_point.py imports data_root from plugin_paths.py, its cache-install test copies plugin_paths.py too, and the agreement test is removed; census.py likely needs no change.
census.py has no copy of the data-root rule: it only takes a data_dir argument. Is census.py meant to change, or is the issue wrong about it?
RECOMMENDED: Drop census.py from scope. Only save_point.py changes, and no census test has a copied script list. Basis: .base/plugins/session-flow/scripts/census.py:72
Should the work be limited to replacing _plugin_data_root in save_point.py with plugin_paths.data_root(os.environ, _SCRIPTS_DIR.parent)?
RECOMMENDED: Yes. That is the only duplicate outside plugin_paths.py, and away.py already uses plugin_paths. Basis: .base/plugins/session-flow/scripts/save_point.py:3153
The agreement test calls save_point._plugin_data_root, which will no longer exist. Remove it and keep the direct data_root test?
RECOMMENDED: Remove the agreement test at test_plugin_paths.py:75-82 and keep the direct rule test at line 16. Basis: .base/plugins/session-flow/scripts/tests/test_plugin_paths.py:75
The cache-install helper copies only save_point.py and io_streams.py. Is adding plugin_paths.py there enough, given save_point.py will import it by sibling path?
RECOMMENDED: Yes, add plugin_paths.py to the tuple at test_save_point.py:1464, and make sure save_point.py puts its own scripts dir on sys.path as away.py does. Basis: .base/plugins/session-flow/scripts/tests/test_save_point.py:1464
Sources read
.base/plugins/session-flow/scripts/plugin_paths.py:35: data_root is the shared rule, with write_atomic and run_git
.base/plugins/session-flow/scripts/save_point.py:3153: _plugin_data_root is a local copy of the rule
.base/plugins/session-flow/scripts/census.py:72: only takes data_dir; no data-root rule
The data-root rule now has one home: save_point._default_memory_dir calls the shared plugin_paths.data_root, and save_point's own copy is gone.
census.py has no data-root rule. Its only overlap with the shared helpers is write_atomic, which stays as it is: collect.py lists census.py as a collector input, so editing it would re-collect every stored session.
Activity
github-actions commentedon Nov 19, 2026
Size: Small
Complexity: Low
Uncertainty: Known
Flags: none
Blocked by: none
Blast radius: session-flow's save_point.py, census.py, their tests, and test_plugin_paths.py; run by the plugin's scripts and its test suite.
Reversible: yes; revert the change.
Open questions: none
Understood: remove the duplicated data-root rule from save_point.py and census.py by importing scripts/plugin_paths.py, add plugin_paths.py to the tests' copied script lists, and drop or trim the agreement test. The done-when items are exact. No duplicate or merged fix found among the listed issues and pull requests.
Automated triage. A maintainer reviews it.
melodic-automation-lanes commentedon Nov 19, 2026
Not admitted to the issue lane yet: no trusted-human acceptance criteria: a listed human must put the confirmed
- [ ]criteria in the body or post them as their own comment, or, on an issue a listed human filed, intake's newest refinement comment must hold them unedited; intake's refinement of this body is due and may supply them.melodic-automation-lanes commentedon Nov 19, 2026
Refinement. A read-only run explored this repository, searched its issues and pull requests, and read the allowed docs to draft what follows. On an issue a listed human filed, it counts as the issue's spec once posted, while unedited; it is still model text, so check it.
Intended outcome: save_point.py imports data_root from plugin_paths.py, its cache-install test copies plugin_paths.py too, and the agreement test is removed; census.py likely needs no change.
Related work
Open questions
RECOMMENDED: Drop census.py from scope. Only save_point.py changes, and no census test has a copied script list. Basis: .base/plugins/session-flow/scripts/census.py:72
RECOMMENDED: Yes. That is the only duplicate outside plugin_paths.py, and away.py already uses plugin_paths. Basis: .base/plugins/session-flow/scripts/save_point.py:3153
RECOMMENDED: Remove the agreement test at test_plugin_paths.py:75-82 and keep the direct rule test at line 16. Basis: .base/plugins/session-flow/scripts/tests/test_plugin_paths.py:75
RECOMMENDED: Yes, add plugin_paths.py to the tuple at test_save_point.py:1464, and make sure save_point.py puts its own scripts dir on sys.path as away.py does. Basis: .base/plugins/session-flow/scripts/tests/test_save_point.py:1464
Sources read
To answer, post a comment that starts with this line:
Automated refinement by the lanes App. Answer with a comment whose first line is
**Decision recorded.**.kyle-sexton commentedon Nov 19, 2026
Done in #17391.
save_point._default_memory_dircalls the sharedplugin_paths.data_root, and save_point's own copy is gone.census.pyhas no data-root rule. Its only overlap with the shared helpers iswrite_atomic, which stays as it is:collect.pylistscensus.pyas a collector input, so editing it would re-collect every stored session.