Repository navigation
docs(skills): recover missing focus via sibling SnapshotDB choice - #156
Merged
Merged
Conversation
Focus can warn and exit 0 when the target file is gone, so agents treated a sibling .db as free to inspect with sqlite. Require user confirmation and pt-snap metadata first, without persisting focus or importing. Fixes #151
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.
📝 Description
Add a helper and diagnostic-skill recovery rule for when the effective focus path is missing but sibling
*.db/*.pickle.dbfiles exist. Agents must list candidates without auto-selecting, wait for an explicit user choice, then inspect withpt-snap metadata --json. They must not persist focus, import pickle, run query/report before confirmation, or inherit the old focused device.Existing
missing-databasee2e coverage stays the explicit-missing-path branch. This PR addssibling-database-recovery.🔗 Related Issue
Fixes #151
Related to the Agent-friendly parent roadmap (issue 136) only. This slice must not auto-close that parent.
🧪 Testing
PYTHONPATH=src pytest tests/skills/test_helper_contract.py tests/skills/test_memory_leak_contract.py tests/skills/test_memory_fragmentation_contract.py tests/skills/test_memory_peak_breakdown_contract.py tests/test_bundled_skills.py tests/skills/test_agent_e2e.py— 48 passedpython -m tests.skills validate tests/skills/suites/pt-snap-agent-e2e/suite.yamlruff checkon edited test filespytestsuite✅ Checklist
Snapshot Runtime Provenance
Snapshot provenance decision: no-update
Snapshot provenance no-update reason: This PR only changes skill markdown, bundled copies, skill-eval cases/baselines, contract tests, and a changelog bullet. It does not modify
src/pt_snap_cli/snapshot/**.📋 Additional Notes
CHANGELOG.mdunder[0.4.0]. Parallel with the snapshot type-check PR; rebase the later merge on that file.skills/andsrc/pt_snap_cli/bundled_skills/stay identical.