Skip to content

feat(cfl): migrate mutation success output to presenters for #271#442

Merged
rianjs merged 2 commits into
mainfrom
feat/435-cfl-mutation-success-presenters
Jun 24, 2026
Merged

feat(cfl): migrate mutation success output to presenters for #271#442
rianjs merged 2 commits into
mainfrom
feat/435-cfl-mutation-success-presenters

Conversation

@rianjs

@rianjs rianjs commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

Summary

Testing

  • rtk go test ./tools/cfl/internal/present ./tools/cfl/internal/cmd/space ./tools/cfl/internal/cmd/page ./tools/cfl/internal/cmd/attachment
  • rtk go test ./tools/cfl/... ./shared/...
  • rtk golangci-lint run ./tools/cfl/...

@rianjs

rianjs commented Jun 24, 2026

Copy link
Copy Markdown
Contributor Author

Findings

  • Minor: tools/cfl/internal/cmd/page/edit_test.go still has a legacy branch test that only checks request-body conversion (TestRunEdit_FileDash_Stdin_Legacy around line 1719) and does not assert the rendered stdout/stderr. That means a regression in the new presenter-owned legacy warning/success output for --file - --legacy could slip through while the test still passes. I would pin the exact output there as well, or drop the duplicate branch if TestRunEdit_Stdin_Legacy is meant to cover it.
  • Minor: tools/cfl/internal/cmd/page/copy_test.go moved invalid-output validation to rootCmd.Execute() (TestExecuteCopy_InvalidOutputFormat around line 171), so there is no longer a direct runCopy-level test that would fail if the helper accidentally reintroduced view.ValidateFormat or other legacy output plumbing. The grep gate in the proof doc helps, but the executable coverage is now thinner than before for that helper-specific regression.

Overall, the new presenter tests and the exact stdout/stderr assertions cover the main success, cancel, and size paths well. The remaining gaps are branch-specific and low risk, but they are the spots where this suite would still pass if the implementation drifted.

@monit-reviewer monit-reviewer left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Automated PR Review

Reviewed commit: 4e2787b

Approved with 2 non-blocking suggestions below. Address at your discretion.

Summary

Reviewer Findings
documentation:docs-reviewer 1
harness-engineering:harness-self-documenting-code-reviewer 1
documentation:docs-reviewer (1 findings)

💡 Suggestion - docs/proofs/271-435-cfl-mutation-success.md:113

The proof document references 'OUTPUT_SPEC.md' without a path. If this file does not exist in the repository, the reference is a dead pointer that future readers cannot follow to understand the pinned expectations.

harness-engineering:harness-self-documenting-code-reviewer (1 findings)

💡 Suggestion - tools/cfl/internal/cmd/page/edit.go:213

The inline boolean expression opts.legacy && hasNewContent passed as the showLegacyWarning argument to PresentEdit requires the reader to mentally evaluate two variables and match them to a parameter name only visible by jumping to the definition. Extracting a named intermediate — e.g. appliedLegacyFormat := opts.legacy && hasNewContent — makes the semantic self-evident at the call site.

2 info-level observations excluded. Run with --verbose to include.

1 PR discussion thread considered.


Completed in 2m 07s | $2.25 | sonnet | daemon 0.2.132 | Glorfindel
Field Value
Model sonnet
Reviewers hybrid-synthesis, documentation:docs-reviewer, harness-engineering:harness-architecture-reviewer, harness-engineering:harness-enforcement-reviewer, harness-engineering:harness-knowledge-reviewer, harness-engineering:harness-self-documenting-code-reviewer, security:security-code-auditor
Engine claude · sonnet
Reviewed by pr-review-daemon · monit-pr-reviewer
Duration 2m 07s wall · 2m 03s compute (Reviewers: 1m 33s · Synthesis: 31s)
Cost $2.25 (estimated)
Tokens 421.4k in / 16.2k out
Turns 14

Per-workstream usage

Workstream Model In Out Cache read Cache create Cost
hybrid-synthesis sonnet 37.1k 1.7k 13.1k 23.9k (1h) $0.17
documentation:docs-reviewer sonnet 37.3k 1.7k 13.1k 24.2k (1h) $0.18
harness-engineering:harness-architecture-reviewer sonnet 69.6k 1.0k 13.1k 56.4k (1h) $0.36
harness-engineering:harness-enforcement-reviewer sonnet 71.5k 2.5k 13.1k 58.3k (1h) $0.39
harness-engineering:harness-knowledge-reviewer sonnet 71.4k 2.6k 13.1k 58.2k (1h) $0.39
harness-engineering:harness-self-documenting-code-reviewer sonnet 69.8k 5.4k 13.1k 56.6k (1h) $0.42
security:security-code-auditor sonnet 64.8k 1.3k 13.1k 51.6k (1h) $0.33

Re-reviews only run when @monit-reviewer is re-requested as a reviewer — push as many commits as you need, then re-request when ready. PRs targeting branches other than main, master are skipped, even when @monit-reviewer is re-requested.

- `page create` success
- `page copy` success pinned to `OUTPUT_SPEC.md`
- `page edit` success
- `page edit --legacy` warning on `stderr` plus success on `stdout`

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Low (documentation:docs-reviewer): The proof document references 'OUTPUT_SPEC.md' without a path. If this file does not exist in the repository, the reference is a dead pointer that future readers cannot follow to understand the pinned expectations.

Reply to this thread when addressed.

@@ -218,14 +213,7 @@ func runEdit(ctx context.Context, opts *editOptions) error {
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Low (harness-engineering:harness-self-documenting-code-reviewer): The inline boolean expression opts.legacy && hasNewContent passed as the showLegacyWarning argument to PresentEdit requires the reader to mentally evaluate two variables and match them to a parameter name only visible by jumping to the definition. Extracting a named intermediate — e.g. appliedLegacyFormat := opts.legacy && hasNewContent — makes the semantic self-evident at the call site.

Reply to this thread when addressed.

@rianjs rianjs marked this pull request as ready for review June 24, 2026 21:33
@rianjs rianjs merged commit 0f7ebde into main Jun 24, 2026
10 checks passed
@rianjs rianjs deleted the feat/435-cfl-mutation-success-presenters branch June 24, 2026 21:33
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.

2 participants