fix(execute): the final report says whether the app was seen with Claude Code's run
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
050a77f513
commit
6226372eaa
3 changed files with 51 additions and 1 deletions
|
|
@ -2140,6 +2140,11 @@ built thing — not in the run. (A ≥ 1.8 plan cannot reach here with its
|
||||||
`End-to-end:` command missing from `## Verification`: the plan validator
|
`End-to-end:` command missing from `## Verification`: the plan validator
|
||||||
rejects that as `PLAN_END_TO_END_NOT_VERIFIED`.)
|
rejects that as `PLAN_END_TO_END_NOT_VERIFIED`.)
|
||||||
|
|
||||||
|
Record `run_seen`: `yes` when the app was seen and driven with Claude Code's
|
||||||
|
built-in `run` in this run, else `no — {reason}` (no app to launch, `run` not
|
||||||
|
available, not started, and why). The verdict is still the `End-to-end:`
|
||||||
|
command.
|
||||||
|
|
||||||
### Architecture rules (K5) and the plan-file sweep (K6)
|
### Architecture rules (K5) and the plan-file sweep (K6)
|
||||||
|
|
||||||
Two whole-run checks, for a trekplan and a session spec alike, in one Bash
|
Two whole-run checks, for a trekplan and a session spec alike, in one Bash
|
||||||
|
|
@ -2808,6 +2813,7 @@ Phase 2.3 (validate exit) and Phase 5 (dry-run) intentionally do not write
|
||||||
**Mode:** {execute | resume | step N}
|
**Mode:** {execute | resume | step N}
|
||||||
**Result:** {COMPLETED | FAILED at step N | STOPPED (escalation) | PARTIAL (N/total passed)}
|
**Result:** {COMPLETED | FAILED at step N | STOPPED (escalation) | PARTIAL (N/total passed)}
|
||||||
**End to end:** {verified | not verified end to end}
|
**End to end:** {verified | not verified end to end}
|
||||||
|
**Seen with `run`:** {yes | no — {reason}}
|
||||||
|
|
||||||
### Step Results
|
### Step Results
|
||||||
|
|
||||||
|
|
@ -2933,6 +2939,7 @@ To continue (multi-session waves): re-run the same /trekexecute command (not --r
|
||||||
"legacy_plan": false,
|
"legacy_plan": false,
|
||||||
"progress_file": "{path}",
|
"progress_file": "{path}",
|
||||||
"end_to_end": "{verified | not-verified | n/a}",
|
"end_to_end": "{verified | not-verified | n/a}",
|
||||||
|
"run_seen": "{yes | no — reason}",
|
||||||
"steps_without_red_proof": 0,
|
"steps_without_red_proof": 0,
|
||||||
"stop_class": "{none | 1 | 2 | 3 | 4}",
|
"stop_class": "{none | 1 | 2 | 3 | 4}",
|
||||||
"decisions": 0,
|
"decisions": 0,
|
||||||
|
|
|
||||||
2
tests/fixtures/jsonl-schemas.md
vendored
2
tests/fixtures/jsonl-schemas.md
vendored
|
|
@ -22,7 +22,7 @@
|
||||||
| trekbrief-stats | ts, task, slug, mode, interview_turns, review_iterations, brief_quality, research_topics, auto_research, auto_result, intent_approved, project_dir, order_id, order_claimed_at, order_reason | commands/trekbrief.md (orchestrator-emit Phase 7; order_* added by lib/stats/stats-append.mjs) | trekbrief.md:1140-1164 | profile, phase_models, profile_source | none |
|
| trekbrief-stats | ts, task, slug, mode, interview_turns, review_iterations, brief_quality, research_topics, auto_research, auto_result, intent_approved, project_dir, order_id, order_claimed_at, order_reason | commands/trekbrief.md (orchestrator-emit Phase 7; order_* added by lib/stats/stats-append.mjs) | trekbrief.md:1140-1164 | profile, phase_models, profile_source | none |
|
||||||
| trekresearch-stats | ts, question, mode, scope, engine, slug, project_dir, brief_path, dimensions, dimensions_baseline, dimensions_baseline_preserved, effort, conv_turns, empty_turns, unique_sources, agents_local, agents_external, gemini_used, confidence, contradictions, open_questions | lib/stats/stats-append.mjs (trekresearch.md Stats tracking) | trekresearch.md:806-839 | profile, phase_models, parallel_agents, external_research_enabled, profile_source | none |
|
| trekresearch-stats | ts, question, mode, scope, engine, slug, project_dir, brief_path, dimensions, dimensions_baseline, dimensions_baseline_preserved, effort, conv_turns, empty_turns, unique_sources, agents_local, agents_external, gemini_used, confidence, contradictions, open_questions | lib/stats/stats-append.mjs (trekresearch.md Stats tracking) | trekresearch.md:806-839 | profile, phase_models, parallel_agents, external_research_enabled, profile_source | none |
|
||||||
| trekplan-stats | ts, task, mode, slug, brief_path, project_dir, codebase_size, codebase_files, agents_deployed, deep_dives, research_briefs_used, research_scout_used, critic_verdict, guardian_verdict, outcome | lib/stats/stats-append.mjs (trekplan.md Phase 12) | trekplan.md:1305-1333 | profile, phase_models, parallel_agents, profile_source | none |
|
| trekplan-stats | ts, task, mode, slug, brief_path, project_dir, codebase_size, codebase_files, agents_deployed, deep_dives, research_briefs_used, research_scout_used, critic_verdict, guardian_verdict, outcome | lib/stats/stats-append.mjs (trekplan.md Phase 12) | trekplan.md:1305-1333 | profile, phase_models, parallel_agents, profile_source | none |
|
||||||
| trekexecute-stats (Phase 9 record) | ts, plan, plan_type, mode, result, steps_total, steps_passed, steps_failed, steps_skipped, failed_at_step | lib/stats/stats-append.mjs (trekexecute.md Phase 9) | trekexecute.md:2962-2984 | profile, phase_models, profile_source | none |
|
| trekexecute-stats (Phase 9 record) | ts, plan, plan_type, mode, result, steps_total, steps_passed, steps_failed, steps_skipped, failed_at_step | lib/stats/stats-append.mjs (trekexecute.md Phase 9) | trekexecute.md:2969-2991 | profile, phase_models, profile_source | none |
|
||||||
| trekexecute-stats (autonomy events) | ts, event, known_event, payload | lib/stats/event-emit.mjs `emit()` | event-emit.mjs:78-99 | payload.profile, payload.phase_models, payload.profile_source | none |
|
| trekexecute-stats (autonomy events) | ts, event, known_event, payload | lib/stats/event-emit.mjs `emit()` | event-emit.mjs:78-99 | payload.profile, payload.phase_models, payload.profile_source | none |
|
||||||
| trekexecute-stats (PostToolUse Bash) | ts, session_id, command_excerpt, duration_ms, success | hooks/scripts/post-bash-stats.mjs (Bash PostToolUse) | post-bash-stats.mjs:42-54 | none (hook is plugin-level, not profile-aware) | command_excerpt (CWE-212) |
|
| trekexecute-stats (PostToolUse Bash) | ts, session_id, command_excerpt, duration_ms, success | hooks/scripts/post-bash-stats.mjs (Bash PostToolUse) | post-bash-stats.mjs:42-54 | none (hook is plugin-level, not profile-aware) | command_excerpt (CWE-212) |
|
||||||
| trekreview-stats | ts, slug, verdict, counts (BLOCKER/MAJOR/MINOR/SUGGESTION), reviewed_files_count, mode, duration_ms | lib/stats/stats-append.mjs (trekreview.md Phase 8) | trekreview.md:636-686 | profile, phase_models, profile_source | none |
|
| trekreview-stats | ts, slug, verdict, counts (BLOCKER/MAJOR/MINOR/SUGGESTION), reviewed_files_count, mode, duration_ms | lib/stats/stats-append.mjs (trekreview.md Phase 8) | trekreview.md:636-686 | profile, phase_models, profile_source | none |
|
||||||
|
|
|
||||||
|
|
@ -998,3 +998,46 @@ test('keep: the other verdict-gate callers carry no --repo', () => {
|
||||||
for (const h of hits) assert.ok(!h.includes('--repo'), `${rel} gained --repo: ${h.trim()}`);
|
for (const h of hits) assert.ok(!h.includes('--repo'), `${rel} gained --repo: ${h.trim()}`);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// --- D67: the final report says whether the app was seen with `run` ---------
|
||||||
|
// Phase 7's "run the thing" says to use Claude Code's built-in `run`, but the
|
||||||
|
// final report never said whether that happened. The line is said for every
|
||||||
|
// run, also one with no app to launch (the "no — {reason}" form).
|
||||||
|
|
||||||
|
const E2E = '### End to end — "run the thing" (P9 (6))';
|
||||||
|
|
||||||
|
/** Phase 8 of /trekexecute, read up to Phase 9 (its report fence holds its own `## ` heading). */
|
||||||
|
function phase8(text) {
|
||||||
|
const start = text.indexOf('## Phase 8 — Final report');
|
||||||
|
const end = text.indexOf('## Phase 9');
|
||||||
|
assert.ok(start !== -1 && end > start, 'Phase 8 — Final report and Phase 9 must both exist, in that order');
|
||||||
|
return text.slice(start, end);
|
||||||
|
}
|
||||||
|
|
||||||
|
test('[D67] the Phase 8 report template says, right after End to end, whether the app was seen with `run`', () => {
|
||||||
|
const lines = phase8(read(EXEC)).split('\n');
|
||||||
|
const e2e = lines.findIndex((l) => l.startsWith('**End to end:**'));
|
||||||
|
assert.ok(e2e !== -1, 'the report template has no **End to end:** line');
|
||||||
|
assert.equal(lines[e2e + 1], '**Seen with `run`:** {yes | no — {reason}}',
|
||||||
|
'the line after **End to end:** is not the "Seen with `run`" line in its yes / no — {reason} form');
|
||||||
|
});
|
||||||
|
|
||||||
|
test('[D67] the summary JSON carries "run_seen" right after "end_to_end"', () => {
|
||||||
|
const text = read(EXEC);
|
||||||
|
const sumIdx = text.indexOf('"trekexecute_summary": {');
|
||||||
|
assert.ok(sumIdx !== -1, 'summary JSON block missing');
|
||||||
|
const lines = text.slice(sumIdx, text.indexOf('\n```', sumIdx)).split('\n').map((l) => l.trim());
|
||||||
|
const e2e = lines.findIndex((l) => l.startsWith('"end_to_end":'));
|
||||||
|
assert.ok(e2e !== -1, 'the summary JSON has no "end_to_end" key');
|
||||||
|
assert.equal(lines[e2e + 1], '"run_seen": "{yes | no — reason}",',
|
||||||
|
'the key after "end_to_end" is not "run_seen" with its yes / no — reason value');
|
||||||
|
});
|
||||||
|
|
||||||
|
test('[D67] the End to end section says to record run_seen, also when no app was seen, and keeps the End-to-end: command as the verdict', () => {
|
||||||
|
const s = flat(section(read(EXEC), E2E));
|
||||||
|
assert.match(s, /Record `run_seen`: `yes` when the app was seen and driven with Claude Code's built-in `run` in this run, else `no — \{reason\}`/,
|
||||||
|
'the End to end section does not say to record run_seen as yes, or no with a reason');
|
||||||
|
assert.match(s, /no app to launch/, 'the no-form does not name the run with no app to launch');
|
||||||
|
assert.match(s, /The verdict is still the `End-to-end:` command\./,
|
||||||
|
'the End to end section no longer says the End-to-end: command is the verdict');
|
||||||
|
});
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue