Skip to content

Fix ISS-013: add lightweight per-skill-run telemetry log - #101

Merged
sankar-ramamoorthy merged 3 commits into
mainfrom
add-skill-run-telemetry
Aug 5, 2026
Merged

sankar-ramamoorthy merged 3 commits into
mainfrom
add-skill-run-telemetry

Conversation

@sankar-ramamoorthy

Copy link
Copy Markdown
Owner

Summary

  • New py_mono/skill/telemetry.py: log_skill_run/read_skill_runs append/read a flat JSON-lines log (skill, provider, model, duration_ms, success, timestamp) at telemetry/skill_runs.jsonl. Write failures are logged and swallowed, never breaking skill execution.
  • Hooked into run_skill_safe (py_mono/skill/approval.py) — the single existing chokepoint every skill execution already passes through — via try/finally, so both successful and failed runs are logged.
  • telemetry/ added to .gitignore, matching the existing workspace//dynamic_tools/ pattern (operational data, not source).
  • Minimal version only, as scoped in docs/ROADMAP_PLAN.md: ISS-014 (model/task fitness check) is the immediate consumer; Milestone 7 extends this same log rather than building a second one.
  • Closes ISS-013 in docs/ISSUES.md; SDD trail in specs/011-add-skill-run-telemetry/.

Test plan

  • pytest tests/test_skill_telemetry.py tests/test_skill_approval.py -v — 12 passed
  • Full suite — no new regressions (5 pre-existing ISS-005 failures tracked/fixed separately in Fix ISS-005: root-cause three pre-existing test failures #96, unrelated to this change)
  • python -m compileall -q py_mono skills — clean

New py_mono/skill/telemetry.py: log_skill_run()/read_skill_runs()
append/read a flat JSON-lines log (skill, provider, model,
duration_ms, success, timestamp) at telemetry/skill_runs.jsonl. A
write failure logs a warning and never breaks skill execution.

Hooked into run_skill_safe (py_mono/skill/approval.py), the single
existing chokepoint every skill execution already passes through for
approval/tool-access enforcement - times the skill.run() call and
logs exactly one record via try/finally, for both successful and
failed runs. Provider/model come from
context.session_manager.get_active_provider(), falling back to
<unknown> when no session manager is present.

Minimal version only, as scoped: Milestone 6's model/task fitness
check (ISS-014) is the immediate consumer; Milestone 7's
failure-driven evolution will extend this same log rather than
building a second one.

telemetry/ added to .gitignore, matching the existing
workspace//dynamic_tools/ pattern.

Adds tests/test_skill_telemetry.py (5 tests) and 3 new tests in
tests/test_skill_approval.py. See specs/011-add-skill-run-telemetry/.
@sankar-ramamoorthy
sankar-ramamoorthy merged commit 43467a3 into main Aug 5, 2026
1 check 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.

1 participant