Skip to content

feat: make resume baseline explicit from SDLC ledger - #58

Merged
nutt-adam merged 3 commits into
mainfrom
fix/issue-30-v03
Mar 18, 2026
Merged

feat: make resume baseline explicit from SDLC ledger#58
nutt-adam merged 3 commits into
mainfrom
fix/issue-30-v03

Conversation

@wren-nutthouse

@wren-nutthouse wren-nutthouse commented Mar 16, 2026

Copy link
Copy Markdown
Collaborator

Summary\n- print an explicit baseline line before SDLC ledger summary during \n- surface the exact run id + SDLC state being resumed from to reduce ambiguity in recovery flows\n\n## Validation\n- cargo test -q sdlc_pr_comment_summary_renders_transitions\n- cargo test -q serialize_dry_run_contains_prompt_and_command_steps\n\nFixes #30

Summary by CodeRabbit

  • Bug Fixes
    • Improved logging visibility when resuming operations from a ledger by displaying baseline status information before processing the ledger summary.

@coderabbitai

coderabbitai Bot commented Mar 16, 2026

Copy link
Copy Markdown
📝 Walkthrough

Walkthrough

This change adds a baseline resume log line that outputs the run_id and state before processing the SDLC ledger summary during resume operations. The modification alters control flow structure with explicit braces but preserves existing error handling behavior.

Changes

Cohort / File(s) Summary
Resume Logging Enhancement
src/cli/run.rs
Adds baseline resume line output displaying run_id and state before SDLC ledger summary formatting in the resume flow.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Possibly related PRs

Poem

🐰 A baseline shines bright at the start,
Showing the path where work can restart.
Run_id and state, now clear from the view,
The way forward glows when resuming anew. 🌟

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Description check ⚠️ Warning The PR description includes summary and validation sections, but lacks required versioning section with Cargo.toml/CHANGELOG updates, SemVer choice, and release information specified in the template. Add the complete Versioning section including Cargo.toml version update, CHANGELOG.md entry, SemVer choice (likely MINOR for new capability), and release tag planning as required by the template.
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title 'feat: make resume baseline explicit from SDLC ledger' clearly summarizes the main change: making the resume baseline information explicit when resuming from an SDLC ledger.
Linked Issues check ✅ Passed The code changes directly address issue #30 objectives by making run_id and SDLC state visible in resume flows, improving operator visibility of affected runs and reducing ambiguity in recovery actions.
Out of Scope Changes check ✅ Passed All changes in src/cli/run.rs are scoped to adding explicit baseline resume information from the SDLC ledger, directly supporting the PR's objective of surfacing run context during resume operations.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/issue-30-v03
📝 Coding Plan
  • Generate coding plan for human review comments

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@wren-nutthouse

Copy link
Copy Markdown
Collaborator Author

Addressed current actionable CI blocker:\n- ran cargo fmt and pushed c24ed55 to fix the failing check.\n\nValidation rerun is now in progress.

@nutt-adam

Copy link
Copy Markdown
Contributor

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Mar 18, 2026

Copy link
Copy Markdown
✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@coderabbitai coderabbitai Bot 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.

🧹 Nitpick comments (2)
src/cli/run.rs (2)

101-103: Warning message could include actionable guidance.

Per coding guidelines, user-facing errors in src/cli/**/*.rs should include actionable guidance. The current warning doesn't tell operators what to do next.

💡 Suggested improvement
                     Err(err) => {
-                        eprintln!("warn: failed to format SDLC run ledger summary: {err}");
+                        eprintln!("warn: failed to format SDLC run ledger summary: {err}; resuming without summary");
                     }

As per coding guidelines: "User-facing errors should include actionable guidance".

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/cli/run.rs` around lines 101 - 103, The warning logged in the Err arm
that currently prints "warn: failed to format SDLC run ledger summary: {err}"
should be expanded to provide actionable guidance to operators: update the
`Err(err)` branch in src/cli/run.rs (the SDLC run ledger summary formatting code
path) to include next steps such as verifying the ledger input/format, retrying
the command, and where to find logs or how to report the error (e.g., “check
ledger file/permissions, rerun with --verbose, and if the issue persists open an
issue with the following error”). Keep the original error `{err}` in the message
for diagnostics and make the guidance concise and specific.

94-105: Consider deduplicating run_id/state output or clarifying intent.

The new baseline log (lines 95-98) outputs run_id and state, then sdlc_pr_comment_summary immediately outputs these same values again (per src/state/mod.rs:215-218: "SDLC run '{}' for #{} is currently '{:?}'..."). This produces redundant output like:

Resume baseline from SDLC ledger: run='abc123' state='Branched'
SDLC run `abc123` for `#42` is currently `Branched` (updated ...)

If the duplication is intentional for clarity in recovery flows, consider adding a brief comment explaining why both lines are needed. Otherwise, you could remove the duplicate fields from the baseline or adjust sdlc_pr_comment_summary to skip them when called during resume.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/cli/run.rs` around lines 94 - 105, The resume baseline message in run.rs
currently prints run_id/state and then calls sdlc_pr_comment_summary which
prints the same fields again; to fix, remove the duplicate fields from the
eprintln in the Ok(Some(ledger)) arm (keep a concise "Resume baseline from SDLC
ledger" message or nothing) and rely on sdlc_pr_comment_summary(&ledger) to emit
the full, formatted summary, or alternatively modify sdlc_pr_comment_summary in
src/state/mod.rs to accept a flag like include_header: bool and pass false from
run.rs; update call sites accordingly so the run_id/state are only printed once
(adjust the Ok(Some(ledger)) eprintln or the sdlc_pr_comment_summary signature
as chosen).
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In `@src/cli/run.rs`:
- Around line 101-103: The warning logged in the Err arm that currently prints
"warn: failed to format SDLC run ledger summary: {err}" should be expanded to
provide actionable guidance to operators: update the `Err(err)` branch in
src/cli/run.rs (the SDLC run ledger summary formatting code path) to include
next steps such as verifying the ledger input/format, retrying the command, and
where to find logs or how to report the error (e.g., “check ledger
file/permissions, rerun with --verbose, and if the issue persists open an issue
with the following error”). Keep the original error `{err}` in the message for
diagnostics and make the guidance concise and specific.
- Around line 94-105: The resume baseline message in run.rs currently prints
run_id/state and then calls sdlc_pr_comment_summary which prints the same fields
again; to fix, remove the duplicate fields from the eprintln in the
Ok(Some(ledger)) arm (keep a concise "Resume baseline from SDLC ledger" message
or nothing) and rely on sdlc_pr_comment_summary(&ledger) to emit the full,
formatted summary, or alternatively modify sdlc_pr_comment_summary in
src/state/mod.rs to accept a flag like include_header: bool and pass false from
run.rs; update call sites accordingly so the run_id/state are only printed once
(adjust the Ok(Some(ledger)) eprintln or the sdlc_pr_comment_summary signature
as chosen).

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 69368ffe-319b-4eb9-81f9-6981ea8ccf03

📥 Commits

Reviewing files that changed from the base of the PR and between 44f1cd5 and cdd8411.

📒 Files selected for processing (1)
  • src/cli/run.rs

@nutt-adam
nutt-adam merged commit c354d6a into main Mar 18, 2026
10 checks 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.

2 participants