Skip to content

fix(skills): unify diagnostic prerequisite probes - #172

Merged
codeasier merged 1 commit into
mainfrom
fix/issue-162-prerequisite-probes
Oct 3, 2026
Merged

codeasier merged 1 commit into
mainfrom
fix/issue-162-prerequisite-probes

Conversation

@codeasier

Copy link
Copy Markdown
Owner

📝 Description

  • Unify helper and all three diagnostic skills around capabilities --json + overview <db> --json, with identical bundled copies.
  • Reuse complete results only for the same CLI/Python environment/version and unchanged database target; direct skill invocation performs the same validation. Document cold/partial/warm discovery budgets of 2/1/0 calls without re-emitting the catalog.
  • Require checking overview.import_metadata.status even when the command succeeds with ok: true. Stop on invalid metadata/schema errors; continue on legacy unavailable / metadata_missing with unknown provenance recorded.
  • Preserve report-help validation and the user-confirmed missing-focus metadata-first exception, followed by normal capabilities/overview checks.
  • Replace stale per-template-probe test requirements; add static policy contracts and real CLI tests for named-template coverage, contract equivalence, missing templates, metadata statuses/schema errors, and separate call/output-size measurements.

🔗 Related Issue

Fixes #162

🧪 Testing

  • Tests added/updated
  • Manual testing completed (no live model/agent evaluation)

All Python checks used /Users/test1/liuyekang/miniconda3/bin/python, from the worktree root, with PYTHONPATH=<worktree>/src. Pytest used an isolated temporary HOME while preserving original site-package paths; no editable install was performed.

  • Fixture provenance first: 7 passed.
  • Focused skill/preflight/bundled checks: 59 passed.
  • Full pytest -q: 1041 passed, 1 xfailed, including all tests/skills, bundled tests, CLI/JSON/API contracts, and runtime suites.
  • python -m ruff check .: passed.
  • python -m black --check .: passed (156 files).
  • python -m basedpyright --pythonpath /Users/test1/liuyekang/miniconda3/bin/python: 0 errors, 831 informational warnings in unchanged Python package sources.
  • git diff --check: passed.

Measured synthetic-DB discovery (two calls, excluding availability/focus/report help): 55,683 bytes per diagnostic. Additional redundant metadata/per-template probes would add 9 calls / 23,671 bytes for the leak required list, 5 / 14,473 for peak, and 5 / 13,803 for fragmentation. These are measured payload sizes, not a claim that the cold full catalog is smaller than individual probes. Reuse decisions are covered by static skill contracts, not live model execution. The existing pytest-asyncio environment emits its unset loop-scope deprecation warning.

✅ Checklist

  • Code follows project guidelines
  • Documentation updated (if applicable)
  • No new warnings introduced (Python package sources unchanged; informational baseline above)
  • Changes tested locally

Snapshot Runtime Provenance

  • Snapshot provenance evaluation completed when snapshot runtime files change
    Snapshot provenance decision: no-update
    Snapshot provenance no-update reason: Only skill Markdown and skill contract tests change; no snapshot runtime code, executable fixture, or provenance evidence changes.

📸 Screenshots (if applicable)

Not applicable.

📋 Additional Notes

@codeasier
codeasier merged commit 662d8bf into main Oct 3, 2026
6 checks passed
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.

pt-snap-helper and the diagnostic skills contradict each other on prerequisite probing

1 participant