Skip to content

fix(cli): reject nonexistent transcript summary paths - #128589

Merged
steipete merged 1 commit into
mainfrom
codex/transcript-summary-path-owner-20260824
Aug 24, 2026
Merged

steipete merged 1 commit into
mainfrom
codex/transcript-summary-path-owner-20260824

Conversation

@steipete

Copy link
Copy Markdown
Contributor

What Problem This Solves

Fixes an issue where users running openclaw transcripts path <session> for an active session without a summary would receive a successful command and a nonexistent summary.md path. This silently misled operators and downstream shell commands into treating an unavailable export as real.

Why This Change Was Made

Make the plain-text path command honor the same missing-summary contract as its sibling transcripts show command while preserving the documented machine-readable path --json response with exists: false. Reuse the path command's existing transcript store for both session lookup and export, removing a redundant helper and a second store opening.

User Impact

The normal transcript summary path command now clearly reports when a summary has not been created, while JSON consumers continue receiving the existing availability field. Metadata, raw transcript, session-directory exports, ambiguous selectors, and valid completed summaries retain their existing behavior.

Evidence

  • Extended the existing real CLI-parser active-session fixture to verify both path --json reporting exists: false and plain path rejecting the missing summary. The new plain-text assertion fails against current main because the command resolves successfully with a nonexistent path.
  • Run node scripts/run-vitest.mjs src/cli/program/register.transcripts.test.ts src/transcripts/store.test.ts: 30 CLI and artifact-owner tests pass across both actual Vitest lanes.
  • Run node scripts/run-tsgo.mjs -p tsconfig.core.json --incremental --tsBuildInfoFile /private/tmp/openclaw-transcript-core.tsbuildinfo and node scripts/run-tsgo.mjs -b test/tsconfig/tsconfig.core.test.config-cli.json --builders 1: core production and CLI-test type checks both pass.
  • Run node scripts/run-oxlint.mjs --tsconfig config/tsconfig/oxlint.core.json src/cli/program/register.transcripts.ts src/cli/program/register.transcripts.test.ts, targeted oxfmt --check, and git diff --check.
  • Fresh independent read-only local review confirms valid/missing/ambiguous sessions, JSON output, metadata/transcript/directory exports, sibling show behavior, and existing environment/database cleanup: CLEAN, no actionable findings.
  • Production delta: +7/-9, net -2 lines. Only the CLI owner and its existing colocated test change; no storage implementation, database schema, configuration, public flags, authentication, or protocol changes.

@clawsweeper

clawsweeper Bot commented Aug 24, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

@openclaw-barnacle openclaw-barnacle Bot added cli CLI command changes size: XS maintainer Maintainer-authored PR labels Aug 24, 2026
@steipete
steipete marked this pull request as ready for review August 24, 2026 07:14
@steipete
steipete merged commit e6915d0 into main Aug 24, 2026
225 of 226 checks passed
@steipete
steipete deleted the codex/transcript-summary-path-owner-20260824 branch August 24, 2026 07:25
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cli CLI command changes maintainer Maintainer-authored PR size: XS

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant