feat: persist per-step telemetry in checkup workflow state (#1709)#1710
feat: persist per-step telemetry in checkup workflow state (#1709)#1710prompt-driven-github[bot] wants to merge 3 commits into
Conversation
Add Requirement 10 to agentic_checkup_orchestrator_python.prompt specifying the step_telemetry feature: STEP_ID_MAP constant for stable string step ids, accumulator initialization on resume, _handle_step_result append contract, skipped-step recording at --no-fix bypass sites, _build_state/_save_state extension, Step-7 report inclusion, and the sum-reconciliation invariant. Update CHANGELOG.md with matching Unreleased Feat entry. Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
…or step_telemetry (#1709) Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
…metry (#1709) Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
|
🚀 Job Queued! Job ID: Budget cap: none You can add or change a cap by commenting: Run controls require write access; |
PDD Agentic Sync ProgressIssue: #1710 Mid-run feedback: @DianaTao pending at next step boundary.
Total cost: $1.51 Failed module details
|
|
| internal # | real CLI step (slug) | description | proposed STEP_ID_MAP |
|
|---|---|---|---|---|
| 1 | discover |
Discover project structure & tech stack | request_resolved |
❌ wrong |
| 2 | deps |
Audit dependencies | plan_built |
❌ wrong |
| 3 | build |
Run build/compile checks | research |
❌ wrong |
| 4 | interfaces |
Check cross-module interfaces | requirements_clear |
❌ wrong |
| 5 | test |
Run tests | test |
✅ |
| 6.1 | fix |
Fix discovered issues | fix |
✅ |
| 6.2 | regression_tests |
Write regression tests | regression |
✅ ≈ |
| 6.3 | e2e_tests |
Write e2e/integration tests | e2e |
✅ ≈ |
| 7 | verify |
Verify fixes + generate final report | verdict |
✅ ≈ |
| 8 | create_pr |
Create/push PR | pr_post |
✅ ≈ |
The map borrowed the front-end vocabulary from the generic pdd change 13-step workflow (request_resolved, plan_built, research, requirements_clear) instead of checkup's real steps (discover, deps, build, interfaces).
Why this matters (fix now, not post-release)
- The telemetry is operator-facing and would be misleading —
request_resolved: $0.42when the step actually ran the build misattributes cost per phase. - Requirement 10 says these ids MUST NOT be renamed after release — shipping wrong names means either living with them or breaking the contract later. The fix is free now (prompt-only, not yet regenerated).
- The CLI already has the right names — the
stepstable atagentic_checkup_orchestrator.py:2218already carries stable slugs;STEP_ID_MAPjust needs to mirror them.
Corrected map
STEP_ID_MAP = {
1: "discover",
2: "deps",
3: "build",
4: "interfaces",
5: "test",
6.1: "fix",
6.2: "regression_tests",
6.3: "e2e_tests",
7: "verify",
8: "create_pr",
}Simplification worth considering
Since the steps table already holds these exact stable slugs (steps[step_num][1]), STEP_ID_MAP is largely redundant — the telemetry could emit the existing slug directly as step_id, removing a second drift-prone naming table. Either approach is fine; if you keep the explicit map, align it to the slugs above.
Cloud-side mapping (for promptdriven/pdd_cloud#2297)
With the corrected slugs, the cloud maps CLI → its canonical 11-step model as:
discover,deps,build,interfaces,test→layer1_checksfix→fix_attemptregression_tests,e2e_tests→validation_after_fixverify→verdict_producedcreate_pr→github_renderedrequest_resolved,plan_built→ same-named cloud stepsworkspace_prepared,checkpoint_restored,reports_persisted→ cloud-only, recorded cloud-side (no CLI equivalent)
🤖 Generated with Claude Code
|
@DianaTao Noted — your feedback will be incorporated at the next step of the run. |
❌ PDD Execution FailedExecution failed: PDD command failed with exit code 1. |
Summary
Adds per-step telemetry (
step_telemetry) to thepdd checkupworkflow state, enablingpdd_clouddurable runs to record each CLI step with stable IDs, cost fidelity, status, model, and timestamps — without coupling to internal step numbering.Closes #1709
Changes Made
Prompts Modified
pdd/prompts/agentic_checkup_orchestrator_python.prompt— added Requirement 10 describingSTEP_ID_MAP,step_telemetryaccumulator,_handle_step_resultappend logic, skipped-step recording,_build_state/_save_stateextension, and Step-7 final JSON inclusionArchitecture Updated
architecture.json— updated_build_statesignature to reflect newstep_telemetryparameter; addedpdd-interfacetagUser Stories Added
user_stories/story__agentic_checkup_orchestrator.md— issue-derived story linked to the promptuser_stories/contracts/agentic_checkup_orchestrator.contract.md— machine-checkable contract for the featureUser Stories
warnuser_stories/story__agentic_checkup_orchestrator.md— issue-derived story linked to:agentic_checkup_orchestrator_python.promptuser_stories/contracts/agentic_checkup_orchestrator.contract.md— generated machine-checkable contractReview Checklist
Next Steps After Merge
Created by pdd change workflow